/** * IVTR Breaking-Change Gate — blocks completion when task touches CRITICAL-risk symbols. * * Implements EP3-T8 from T1042 living-brain decomposition. The gate reads the task's * `files` field, queries nexus for symbols in those files, calls `reasonImpactOfChange()` * for each symbol, and fails if any symbol returns `mergedRiskScore === 'CRITICAL'`. * * Gate is OPT-IN via `CLEO_NEXUS_IMPACT_GATE=1` env var to prevent surprise breakage. * * @task T1073 * @epic T1042 */ import type { Task } from '@cleocode/contracts'; /** * Result of running the nexusImpact gate validator. */ export interface NexusImpactGateResult { /** Whether the gate passed (true = no CRITICAL symbols, or gate disabled). */ passed: boolean; /** Exit code if gate failed. */ exitCode?: number; /** Error message if gate failed. */ error?: string; /** Critical symbols that triggered the failure. */ criticalSymbols?: Array<{ symbolId: string; symbolName: string | null; filePath: string | null; mergedRiskScore: string; narrative: string; }>; /** Narrative summary. */ narrative: string; } /** * Validate the nexusImpact gate for a task. * * If `CLEO_NEXUS_IMPACT_GATE` env var is not set to '1', returns passed=true * with a note that the gate is disabled (prevents surprise breakage). * * When enabled, reads the task's `files` array, queries nexus for all symbols * in those files, and calls `reasonImpactOfChange()` for each. If any symbol * returns `mergedRiskScore === 'CRITICAL'`, the gate fails with a list of * critical symbols. * * @param task - The task to validate * @param projectRoot - Absolute path to project root * @returns Gate result with pass/fail status and evidence */ export declare function validateNexusImpactGate(task: Task, projectRoot: string): Promise; //# sourceMappingURL=nexus-impact-gate.d.ts.map