/kairos:cdd-planfrom kairos
Writes a plan document from an approved spec, backfills design on drift, commits before review, and runs a review-fix loop with strict dispatch discipline.
Ships in kairos. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Writes a plan document from an approved spec, backfills the design when planning surfaces substantive drift, commits the plan before reviewing under the cdd plan contract; on closure the engine's next: face carries the pipeline continuation.
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. Dispatch boundary — the obligation runs both ways: a dispatched child carries every verification / build command to completion inside its own turn, never ending that turn to await a background task it launched itself — ending the turn terminates the child, so the awaited notification never arrives and the round dies half-finished while still looking successful; the launching side certifies success by the terminal contract (a clean working tree and the target action actually completed), never by exit code 0. Round rhythm — one review pass per dispatch; a fix round re-enters the review while the route is not done; commit the authored plan before the first review round; ensure the working tree is clean before entering review (dirty → BLOCKED; the orchestrator writes no tree during dispatch). Approval gate — before the first NEXT-LOOP dispatch, submit the authored plan together with this self-check's conclusion to the author and stop; dispatch only after an explicit approval, and a dispatch without one is a violation — the submitted line declares its authorship plainly: this document was written by the orchestrator in this session. Write authority — the two lanes are one split, and neither borrows the other. The author writes the document; the fix round writes the dispositions. Authoring the plan stays the orchestrator's — it is written in this session, never handed to a subagent that holds only a brief, because the ruling's reasons live in the session while the brief is not part of the document, so a paraphrase that drifts has no reader who could see it; and the author never takes the fix round's half either — a finding is answered in the sidecar and applied by a dispatched fix round, never edited in place as a substitute. A dispatched implement or fix round holds only its own half: it may amend the plan's content face (facts, file lists, steps, acceptance detail, cited line numbers); its structure face — the plan's Task id set and every task's DependsOn set — is the orchestrator's alone, and the engine judges a round that changes it hard. Failure face — cross-node failure handling lives in the Failure Modes table below (the single source); node Fail entries keep only local behavior.
flowchart TD
A[backfill-design] --> C[author-plan]
C --> S[run-cdd-docs-review-session]
S --> K[commit-plan]
K --> L[NEXT-LOOP]
L -->|until next is terminal| L
L -->|no next| Z2((BLOCKED))
backfill-designauthor-planauthor-planDo: Write the complete plan document to docs/kairos/plans/YYYY-MM-DD-<feature>.md — generate the canonical skeleton first (npx -y @oscaner-skills/cdd-engine@latest schema get plan --output skeleton <target path>) and fill its slots in place; the structure stays as generated. Plan header MUST carry the document identity in its front-matter slug: key, inherited from the approved spec it plans — the same value the spec carries, so spec and plan resolve as one run (the generated skeleton emits the slug: key for you to fill). The plan declares no attribution key of its own: its program chain is implied by the identity document of the same slug, so a program attribution resolves through that chain (workspace plan record → the plan's slug: → the identity document of that slug, read through its own attribution — a phase-spec's program:, or, for an overall / single-spec, its own inventory), the plan record being the first hop of its program chain. Plan assertions stay inside what is judgeable while the code does not yet exist — task boundaries, wave edges, acceptance conditions, frozen consumer-surface bytes; per-module delivery attribution is not one of them, arriving in the implement round and judged by the wave review against the real diff. Registered disciplines bind while filling: facets-before-filling · one-todo-per-sentence · count-is-not-identity.
## Constraints section declares the constraint surface the implement child reads — zero separately materialized constraints file; declaring no constraint rows never blocks a dispatch — no silent fallback, no phantom rules file.#### DependsOn section — one line of comma-separated task ids under that heading (any existing task id; forward references are legal; none = the explicit no-dependency declaration); the declared edges group the tasks into dispatch waves.#### DependsOn sections — no new field, no new slot.DependsOn edges point only at already-closed tasks, so the engine derives a fresh dispatch wave for them; never rewrite the content of an already-closed task (a closed wave's content is history — later work enters as a new task); a user adjudication that re-scopes a closed task is the one exception and lands under Plan write authority (I3); an appended task declares its Acceptance exactly like any other.#### Objective / #### Steps / #### Acceptance sections directly.- Modify: <path>), not a coordinate: the shape gate refuses a prose path:line on a plan's decision face exactly as it does on a spec's, so a task names the file it changes or a colocated pin, never a line number.**Files:** entry is a slice token or an exact path; a slice token is a trailing / behind at least one non-empty segment, and the bare /, an empty segment (docs//) and a pattern (<slug>/) declare no slice. A slice is the segment that guards one invariant, not an arbitrary directory, so the coarse form carries the plan's claim; an exact path is reserved for an entry that must not be guessed — the composition root, a rewired config, the file a pin lives in, a file whose name is itself the contract.Consumes / Produces — name the slice's public door and its data-face constants, never every module: one Produces claim then answers to one entry a review can spot-check, not a module roster.line-coordinate)- Modify: <path>), never a prose path:line; the condition that must hold belongs to the spec, so restate such a description as that condition (line-coordinate)Rows written from this plan keep the same discipline the charter's rows keep — one line asserts, the record explains: the row carries the identity, the single-sentence conclusion, the status and the relation, and the reasoning lives in the record the row names, never beside the assertion.
Read: approved spec + backfill-design output + the plan's structural contract (the same structure fact the review reads)
Exit: File written → run-cdd-docs-review-session
Fail: Schema read fails or the draft plan is unusable → BLOCKED (missing plan input)
run-cdd-docs-review-session/kairos:cdd-docs-review(pi:/skill:cdd-docs-review) and run its author-side self-check mode over the just-written plan before committing; it lands the self-check verdict. This variant's supplement holds what the procedure leaves to the flow — the five checks, substance first: (1) coverage — every approved-spec requirement maps to a task; (2) step decidability — each step lets the implementer write exactly one reasonable thing (a line that decides nothing, or a signature-and-tests-determined transcript, is a defect); (3) consistency — task ids / DependsOn edges / naming agree; (4) failure-mode coverage — every failure mode the spec implies has a task whose checkable exercises it; (5) proportion — the plan is not many times the length of the spec it implements. Then the mechanical tail: zero leftover :::fill markers, zero angle-bracket literals outside link-anchor slots. Issues found are fixed inline on the same file; this is a pre-commit self-check inside this flow, not a review round (no next: dispatch, no findings carrier).commit-plancommit-plangit add the plan + conventional commit.NEXT-LOOPNEXT-LOOPnpx -y @oscaner-skills/cdd-engine@latest review --type plan --plan <path>); every later hop follows the engine's next: face. Fixes dispatch via the fix round — never an in-place edit as a substitute; a BLOCKED/TIMEOUT round's carried reason is reported, never overridden. Closed waves are history: when a finding lands on the content face of an already-closed task block, amend the document to align with the delivered split — never carry work into or out of a closed task, and never dispatch a fix for a finding that would rewrite the historical split.next: faceuntil next is terminal self-loop); a route that leaves the loop ends this skill's flow| # | Invariant |
|---|---|
| I1 | Review Convergence — a review closes by its conclusion (APPROVED / CHANGES_REQUESTED / REVIEW_FIX); the loop advances by the engine's next: face, never by orchestrator guesswork. A mid-backfill or a user adjudication that lands governs over the suggestion (current world state wins). Fixes always dispatch via the fix round; 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 |
| I2 | Plan commit discipline — the authored plan commits before the first review round; each fix round commits its own changes — approval closes the loop on a committed state; do not wait for dev merge |
| I3 | Plan write authority — the plan's writes discriminate by trigger: review findings land through the fix round dispatch only; a user adjudication or durable backfill lands through the orchestrator's own standalone commit, amending the target task's data fields directly; fix/implement agents hold zero plan-structure authority (their content-face amendment right is the write-authority clause above) |
| 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 |
| I5 | Ruling Landing — when a fix dispatch needs a ruling on a finding, the ruling lands at the sidecar path the engine prints in next:; the orchestrator never derives that path itself |
| failure | behavior | reason |
|---|---|---|
| review re-run after a closure conclusion (REVIEW_FIX / APPROVED) | Violates I1 (Review Convergence) — stop + report to user | A fix commit opens a new review, never a re-run of a closed one |
| Entering review with an un-backfilled drift | Violates the design-backfill rule — stop + backfill first | Spec and plan must agree before review |
| Git commit error | report + fail-open | Do not block user plan review |
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 |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub oscaner/skills --plugin kairos6 skills in this plugin
/cdd-closeIndependent cdd-close orchestrator -- Node-anchored flow with digraph as single control-flow source of truth. Owns its Git finish menu (merge / PR / keep / discard) and gates on the landed finish outcome, then closes related issues. Layers personal rules (no worktrees / conventional commits / typed-discard). Callable standalone; invoke as kairos:cdd-close(pi:/skill:cdd-close)./cdd-designIndependent brainstorm orchestrator -- Node-anchored flow with digraph as single control-flow source of truth. Explores the request's design context in this session, judges which program owns the change and gates on phase registration, runs grilling, and dispatches the parameterized spec-writer(/kairos:cdd-spec-writer) under one template (single-spec / phase-spec / overall charter). Callable standalone; invoke as kairos:cdd-design(pi:/skill:cdd-design)./cdd-Other plugins' skills for the same job