/** * Initiative Record — pure advisory Lifecycle gate evaluator (SPEC-004 Lifecycle Engine). * * TRANSCRIPTION, not design: transcribes the "gate evaluation" rules in * `.mma/specs/2026-08-13-spec-004-lifecycle-engine.md` (SPEC-004, FR-5, FR-6, FR-8) that * Task I-3 owns as its own dedicated Output. Task I-2 creates this module early — per its * own task context — because `sqlite-store.ts`'s `initiative_phase_satisfy` and * `initiative_focus_set` mutations must compute and record a `gate_snapshot` before Task * I-3 formally lands; the alternative (duplicating this logic inline in the store) is * explicitly disallowed. Task I-3 owns refining/extending this file and adding its own * dedicated test coverage and public barrel exports. * * This module performs NO database read or write, NO caching, and NO mutation of its * inputs. It is a pure function of already-read record data. The store * (`sqlite-store.ts`) is the only database owner and is the only caller — for both live * reads and required mutation snapshots. */ import type { AcceptanceCriterion, Decision, DeliverableValidationState, Event, GateStatus, LifecycleContract, Phase, Requirement } from './types.js'; /** The already-read record data one gate evaluation needs — the store supplies all of it. */ export interface EvaluateLifecycleGateInput { /** The Initiative's currently selected Lifecycle Contract, or `null` when none applies. */ contract: LifecycleContract | null; /** The phase whose gate is being evaluated. */ phase: Phase; requirements: readonly Requirement[]; acceptanceCriteria: readonly AcceptanceCriterion[]; decisions: readonly Decision[]; /** * Initiative-scoped lifecycle Events, chronological (`event_sequence` ascending). The * store may append one prospective (not-yet-persisted) `phase_satisfied` Event at the * current mutation's future sequence number so a satisfy's own current-request * assertions count toward its own snapshot (SPEC-004 "Data model"). */ events: readonly Event[]; /** * SPEC-007 (Task I-7, ← AC-1.11): the current `validation_state` of every Deliverable * belonging to the Initiative, in any order. Drives the `deliverables_valid` satisfier — * an empty array (no Deliverables) satisfies it vacuously. */ deliverableValidationStates: readonly DeliverableValidationState[]; } /** * Evaluates one phase's live, advisory Lifecycle gate (SPEC-004 FR-8). `green` with * `missing: []` only when every required Establishment for `phase` is satisfied; * otherwise `red` with the exact missing entries. A `null` contract always reads green * with the frozen note — an advisory gate NEVER blocks any caller-requested transition, * whatever its colour. */ export declare function evaluateLifecycleGate(input: EvaluateLifecycleGateInput): GateStatus; //# sourceMappingURL=lifecycle-gates.d.ts.map