The operational invariants and constraints that govern the Keel Simulator.
The primary goal of the engine is to eliminate Drift. Progress is blocked if any of the following are detected by the doctor:
- Structural Drift: Missing files, invalid IDs, or broken frontmatter.
- Architectural Drift: Working in a bounded context with a
proposedADR. - Requirement Drift: Stories missing SRS references or acceptance criteria.
- Scaffold Drift: Presence of placeholder text (e.g.,
{{goal}},Item 1).
keel doctor remains the authoritative remediation surface, but keel flow is allowed to distinguish transitional intake from actual circuit failure.
- Blocking by Default: Non-transitional doctor errors still short-circuit the flow circuit.
- Transitional Intake Exception:
MissionMissingChildrenandMissionActiveNoWorkmay be suppressed inkeel flowwhile the heartbeat is energized and the board is showing live entity-creation pressure from missions, planning work, or research work. - No Silent Waiver: This exception changes the circuit-readiness judgment only. It does not clear doctor debt or waive the need to finish wiring the mission correctly.
- Pressure Bound: If transitional intake debt exceeds current live intake pressure, the circuit still short-circuits.
Every entity in the .keel/ directory must adhere to these structural rules:
- Missions: Must have a
CHARTER.mdwith at least oneboard:-verifiable goal to beactive. - Epics: Status is derived from voyages. An epic is
draftuntil its first voyage isplanned. - Voyages: Must have an
SRS.mdandSDD.mdwith authored content to transition fromdrafttoplanned. - Stories: Must link to a
voyage/SRSrequirement via the[SRS-XX/AC-YY]format.
A mission is considered Achieved only when:
- Goals Met: All
board:-verifiable goals in theCHARTER.mdare terminal and satisfied in the board state. - No Open Work: All child entities (Stories, Voyages, Epics, Bearings, ADRs) are in terminal states.
- Documented: At least one entry exists in
LOG.mdto summarize the session.
State transitions are explicit and gated. An actor cannot "force" a state without satisfying the prerequisites:
- Thaw: Requires valid SRS references and authored acceptance criteria.
- Start: Requires the parent Voyage to be
active. - Submit: Requires all acceptance criteria to have recorded verification proofs.
- Accept: Requires human verification of the submitted evidence.
The engine resolves the "next move" using a strict priority hierarchy:
- Diagnostics (Priority 0): Critical board health issues must be fixed first.
- Architectural Decisions: Proposed ADRs block all implementation in their context.
- Human Acceptance: Piling up "Needs Verification" items blocks the flow.
- Strategic Planning: Draft voyages and epics must be planned/decomposed.
- Active Work: Continuing in-progress stories takes precedence over starting new ones.
- Research: Exploration of bearings happens when the implementation queue is clear.
When querying with --status, the engine MUST:
- Return exactly three bullets.
- Prioritize high-signal "blockers" over "routine work."
- Use action-oriented language (e.g., "Review ADR," "Start Story").
- Style IDs and Titles consistently to minimize cognitive load.
To prevent "Strategic Fog," every mission must align with one of four archetypes. Choose the archetype that matches the mission's primary intent:
- Strategic (Foundation): Large-scale value shifts or architectural foundations. Choose when the mission introduces new capabilities, defines new bounded contexts, or reshapes how the system works.
- Maintenance (Healing): Purely focused on reaching/maintaining Zero Drift. Choose when the mission exists to fix doctor errors, resolve structural drift, or pay down technical debt without adding new features.
- Exploratory (Discovery): Dominated by
BearingsandPlay; focuses on reducing the fog of war. Choose when the path forward is uncertain and the mission's primary output is research, evidence, and assessed options rather than shipped code. - Bridging (Realization): Explicitly graduates conclusive research (Graduated Bearings) into
Plannedimplementation work. Choose when assessed bearings are ready to become epics and the mission's job is to author PRDs, SRS/SDDs, and decompose stories.