Kairos CDD-Design
Full brainstorm flow orchestration, callable standalone — the imported brainstorm flow lands the program mode (new-program routes straight to grilling, no inventory check; phase-within-program gates on whether the phase is registered in the parent overall).
Invocation discipline — every engine command runs as a background dispatch: launch it in the background and await the completion notification — never poll — then read the full output (stdout/stderr). Output filtering is forbidden — no piping to tail/head, no 2>&1 |, no EXIT=$? capture. Round rhythm — one review pass per dispatch; a fix round re-enters the review while the route is not done; ensure the working tree is clean before entering review (dirty → BLOCKED; the orchestrator writes no tree during dispatch). Failure face — cross-node failure handling lives in the Failure Modes table below (the single source); node Fail entries keep only local behavior.
Flow Digraph
Node Definitions
run-cdd-design-session
- Do: Import
/superpowers:brainstorming(pi:/skill:brainstorming); it lands the mode marker (new-program= no parent overall;phase-within-program= has a parent overall) and the design context this flow routes on - Read: nothing before the import; the import resolves mode + design context
- Exit: Import landed →
explore-context - Fail: Upstream superpowers plugin missing → BLOCKED (no downgrade, no skip, no inline restatement)
explore-context
- Do: Explore project context in the resolved mode so the routing and the delegated flows have what they need — code, issues, docs, and git log are reference examples of exploration surfaces, not a fixed channel set; scale the surface to what the task needs (exploration does not constitute a resolved-mode constraint)
- Read: whatever the task needs — e.g. project files, docs, git log, the parent overall (phase-within-program mode)
- Exit: Exploration complete →
mode? - Fail: Context read fails → report + fail-open
mode?
- Do: Branch on the mode the import resolved. Gate order matters — mode is decided before the register gate:
new-programconnects straight torun-grilling-sessionand skips the inventory check (a new program checks no parent inventory, which does not exist yet);phase-within-program→phase-registered? - Read: mode marker from
run-cdd-design-session - Exit:
new-program→run-grilling-session;phase-within-program→phase-registered? - Fail: —
phase-registered?
- Do: Read the parent overall's Phase inventory — is the requested phase registered?
new-programnever passes through this node (mode?routes it directly to grilling). Not registered → run the register-reflow node, then re-judge - Read: parent overall (
docs/kairos/overalls/*-overall.md) Phase inventory - Exit: registered →
run-grilling-session; not registered →run-cdd-charter · sync→ re-judge - Fail: Phase inventory missing or unparseable → BLOCKED (overall-sync-failed); serial-phase — registering a new phase whose hard-dependency predecessor has Design spec ≠
Donein the parent inventory → BLOCKED (never release grilling for an unmet phase)
run-cdd-charter · sync
- Do: Run the charter sync variant of the parameterized writer — the phase registration as a four-table sync of the parent overall (issue inventory / phase inventory / dependency graph / version bump + change history), then flow back to
phase-registered?for the re-judge — the landed registry entry routes the re-entry, not a re-import. Registration reflow — not the terminal overall write (run-cdd-charteris) - Read: the parent overall
- Exit: Sync landed →
phase-registered? - Fail: four-table sync inconsistent → BLOCKED (overall-sync-failed)
run-grilling-session
- Do: Import
/mattpocock-skills:grilling(pi:/skill:grilling), scoped by mode:new-program→ scope-level grilling (each candidate phase's scope / dependencies / acceptance / issue ownership, one grilling pass);phase-within-program→ enumerate-then-grill: enumerate the requirements registered for the phase in the parent overall item by item (each requirement's status —[Pending]/ Done / dropped), restate the full list to the user, and enter the grilling frontier several passes after the user confirms the enumerated coverage is complete. It lands the grilling outcome; the size judgment (size?) routes on it. Register-before-grill is guaranteed by thephase-registered?gate. - Read: landed grilling outcome + mode marker + gate verdict
- Exit: Grilling outcome landed → the size judgment
- Fail: Grilling an unregistered phase → register-gate violation (BLOCKED upstream at
phase-registered?)
size?
- Do: Judge the scope size to route the write target: on the
new-programpath — does the program fit one single spec or become an overall program (single-spec→ one spec ·multi/oversized→ a charter); on thephase-within-programpath — does this phase fit one phase spec (fit→ phase-spec ·oversized→ a charter that syncs the sub-phase split into the parent) - Read: grilling output + exploration context + parent overall (phase-within-program mode)
- Exit:
single-spec→run-cdd-spec(single-spec target);fit→run-cdd-spec(phase-spec target);multi/oversized→run-cdd-charter(the overall / charter target) - Fail: —
run-cdd-spec
- Do: Import
/kairos:cdd-spec-writer(pi:/skill:cdd-spec-writer) with the target parameter (single-spec / phase-spec — the two near-identical dispatch variants are ONE node). The delegated writer lands the document's front-matter identity —slug:on either target, plusprogram:(the parent overall'sslug:) on the phase-spec target - Read: grilling output + exploration context
- Exit: Handoff executed →
handoff-next - Fail: Target skill missing → BLOCKED (install kairos — see the kairos README's installation table)
run-cdd-charter
- Do: Import
/kairos:cdd-spec-writer(pi:/skill:cdd-spec-writer) with the overall target; the delegated writer lands the document's front-matterslug:— an overall declares noprogram:(it is the program) - Read: grilling output + parent overall (oversized phase-within-program case)
- Exit: Handoff executed →
handoff-phase-design - Fail: Target skill missing → BLOCKED (install kairos — see the kairos README's installation table)
handoff-next
- Do: Hand off following the engine's
next:literal — this node is the spec line's convergence onto the engine's unified next face: read thenext:line the delegated writer's closing round emitted and dispatch it as written (no design-domain continuation of this flow) - Read: the committed spec + the delegated writer's
next:line - Exit: Handoff executed → flow ends for this skill
- Fail: Target missing → BLOCKED (install kairos — see the kairos README's installation table)
handoff-phase-design
- Do: Hand off — to
/compactor the next phase's design session (kairos:cdd-design[Px program]), summarizing the committed charter - Read: the committed charter + the run's next phase context
- Exit: Handoff executed → flow ends for this skill
- Fail: Target missing → BLOCKED (install kairos — see the kairos README's installation table)
Invariants
| # | Invariant |
|---|---|
| I1 | Design first — zero implementation dispatch: no code commits, no implement dispatch; the flow ends in the delegated writer flows, never in implementation |
| I2 | Review Convergence (next: is the dispatch) — a review closes by its conclusion (APPROVED / CHANGES_REQUESTED / REVIEW_FIX), and the output's next: line carries the engine's default next step as a complete executable command; read the next: line and dispatch it as written — the literal is the dispatch, no kind→command mapping layer. A mid-backfill or a user adjudication that lands governs over the suggestion (current world state wins). Fixes always dispatch via the fix round, consuming the findings handoff; the orchestrator must not edit in place as a substitute; a fix commit opens a new review, never a re-run of a closed one |
| I3 | Spec commit discipline — spec approved = commit immediately; do not wait for dev merge (enforced inside the delegated writer flows) |
| I4 | Mid-Flight Backfill — a user-raised backfill of overall/spec/plan docs surfaced while a dispatch is in flight lands through four ordered steps on the current call's return: (1) land immediately — hot context, no deferral; (2) commit on its own — a standalone change, never mixed with implementation commits; (3) pause the loop until clean — an uncommitted backfill trips the next review's entry gate (dirty → BLOCKED); (4) audit in-band on resume — the next review audits the backfill in-band; a backfill rewriting the current task's own plan/spec text routes through the orchestrator's plan write authority |
Failure Modes
| failure | behavior | reason |
|---|---|---|
| Upstream superpowers plugin missing | BLOCKED (install superpowers — see the kairos README's installation table) | Block policy: no silent fallback |
| Grilling plugin missing | BLOCKED (install mattpocock-skills — see the kairos README's installation table) | Block policy: no degradation |
| Phase inventory missing / unparseable | BLOCKED (overall-sync-failed) | Registration gate cannot run |
| Registering with predecessor Design spec ≠ Done | BLOCKED (serial-phase) | Never release grilling for an unmet phase |
| Four-table sync inconsistent | BLOCKED (overall-sync-failed) | Refuse to register an inconsistent phase |
Completed round with no next: line (not BLOCKED/TIMEOUT) | HARD_ERROR — report the carried reason, re-run the same command to continue | No dispatchable next |


