/** * Epic refactor guardrails — SP-083. * * Detects large refactoring workloads and emits spine-decomposition, * test-gate, and frontier-routing policies. Inert for normal requests — * callers treat `is_epic: false` as a no-op. */ import type { RoutingRequest, Tier } from './types/index.js'; export declare const EPIC_REFACTOR_DETECTED: "epic_refactor_detected"; export declare const EPIC_REFACTOR_NOT_DETECTED: "epic_refactor_not_detected"; export declare const EPIC_REFACTOR_RECOMMENDED_TIER: Tier; export type EpicRefactorGuardrailKind = 'spine_decomposition' | 'test_gate' | 'frontier_routing'; export declare const EPIC_REFACTOR_GUARDRAILS: readonly EpicRefactorGuardrailKind[]; export interface EpicRefactorScopeSignals { readonly epic_keyword_hits: number; readonly file_path_mentions: number; readonly cyclomatic_score: number; readonly planning_turn: boolean; } export interface EpicRefactorGuardrailEvaluation { readonly is_epic: boolean; readonly reason_code: typeof EPIC_REFACTOR_DETECTED | typeof EPIC_REFACTOR_NOT_DETECTED; readonly guardrails: readonly EpicRefactorGuardrailKind[]; readonly recommended_tier?: Tier; readonly signals: EpicRefactorScopeSignals; } export interface EpicRefactorGuardrailConfig { /** Minimum epic-keyword hits when paired with other scope signals. Default 1. */ readonly minKeywordHits?: number; /** File-path mentions required with a keyword hit. Default 3. */ readonly minFilePathMentions?: number; /** Cyclomatic score required with planning turn + keyword. Default 15. */ readonly minCyclomaticScore?: number; /** Keyword hits that alone qualify as epic. Default 2. */ readonly standaloneKeywordHits?: number; } export declare function collectEpicRefactorScopeSignals(request: RoutingRequest): EpicRefactorScopeSignals; /** * Returns true when scope signals indicate an epic refactor workload. * Conservative thresholds keep normal routing and small edits unaffected. */ export declare function isEpicRefactorScope(signals: EpicRefactorScopeSignals, config?: EpicRefactorGuardrailConfig): boolean; /** * Evaluate epic-refactor guardrails for a routing request. * Non-epic requests return empty guardrails and no tier override. */ export declare function evaluateEpicRefactorGuardrails(request: RoutingRequest, config?: EpicRefactorGuardrailConfig): EpicRefactorGuardrailEvaluation; //# sourceMappingURL=refactor-guardrails.d.ts.map