/** * Gate evaluation with exit-code semantics for CI/CD integration. * * `evaluateGate()` checks whether a phase passes its gate: * - Exit 0 (pass: true) iff phase status is 'complete'. * - Otherwise, returns structured data naming missing artifacts and unsatisfied criteria. * * Requirements: 9.1, 9.6 */ import type { PhaseState, WorkflowTemplate, TemplatePhase } from './types.js'; import type { TraceabilityResult } from '../traceability/types.js'; import type { TasksResult } from '../tasks/types.js'; import type { ComplianceResult } from '../compliance/gate-criterion.js'; import type { ReceiptResult } from '../verify/gate-criterion.js'; /** * Gate check result for CI/CD integration. */ export interface GateCheckResult { /** True if the phase is complete (exit code 0). */ pass: boolean; /** Phase name checked. */ phase: string; /** Missing artifacts (empty if pass). */ missingArtifacts: string[]; /** Unsatisfied exit criteria descriptions (empty if pass). */ unsatisfiedCriteria: string[]; /** * AC coverage matrix — present only when the traceability criterion * evaluated (testing phase, AC-bearing instance). Attached at the command * layer; evaluateGate itself never sets it (traceability-ids AC-15). */ traceability?: TraceabilityResult; /** * Task breakdown result — present only when the tasks criterion evaluated * (implementation phase, task-bearing or required-scope instance). Attached * at the command layer; evaluateGate itself never sets it (task-breakdown * AC-19). */ tasks?: TasksResult; /** * Compliance control coverage — present only when a compliance pack is installed. * Attached at the command layer; `evaluateGate` never sets it. * * Conditionally assigned, following the two fields above, so a project with no * pack produces a `--json` payload byte-identical to the pre-feature one * (compliance-packs/AC-55). */ compliance?: ComplianceResult; /** * Test receipt check — present only in verified mode, for the testing phase. * Attached at the command layer, conditionally, so a solo project's `--json` * payload is byte-identical to the pre-feature one (tool-written-test-receipts/AC-23). */ receipt?: ReceiptResult; } /** * Evaluate whether a phase passes its gate check. * * Exit 0 (pass: true) iff the phase status is 'complete'. * Otherwise, returns structured data naming what's missing (Req 9.6). * * @param phaseName - Name of the phase to check. * @param phaseStates - Map of phase name → PhaseState for the instance. * @param template - The resolved workflow template defining required artifacts. * @returns A GateCheckResult indicating pass/fail with structured details. */ export declare function evaluateGate(phaseName: string, phaseStates: Map, template: WorkflowTemplate): GateCheckResult; /** * Effective required artifacts for a phase, applying the tasks.md legacy * filter (task-breakdown AC-27, design §5a): the design-phase `tasks.md` * requirement binds only instances whose phase state carries a tasks.md * artifact entry (seeded at `aidlc start` from the new templates). * Pre-existing instances without the entry are legacy-allowed — mirroring * the branch-gate "missing field = legacy-allowed" precedent. Deliberately * narrow: only tasks.md, only the design phase. */ export declare function effectiveRequiredArtifacts(templatePhase: TemplatePhase, phaseState: PhaseState | undefined): TemplatePhase['required_artifacts']; //# sourceMappingURL=gate.d.ts.map