AugmentClaude

CDD Plan Writer

Generate detailed project plans from specifications with built-in design validation.

Installation

  1. Make sure Claude is on your device and in your terminal.

    Skills load from ~/.claude/skills/ when Claude Code starts up β€” so you need it on your machine first. If you don't have it yet, install it once with the command below, then run claude in any terminal to verify.

    One-time setup
    npm i -g @anthropic-ai/claude-code

    Already have it? Skip ahead.

  2. Paste into Claude Code or into your terminal.

    This copies the whole skill folder into ~/.claude/skills/cdd-plan-oscaner/ β€” the SKILL.md plus any scripts, reference docs, or templates the skill ships with. Works for every skill.

    What this command does
    1. Makes a new, empty temporary folder.
    2. Downloads the skill's folder, packages/kairos/skills/cdd-plan, from github.com/Oscaner/skills (branch main), the GitHub repository it's listed from. You get the version that is there now, not a copy we keep.
    3. Copies that folder to ~/.claude/skills/cdd-plan-oscaner/.
    4. Deletes the temporary folder.

    Installing runs none of the skill's files; it only downloads and copies them. When you later use the skill, Claude follows its SKILL.md and may run scripts that come with it. Read them first.

    How we check skills, and what we don't Β· Report this skill

    Faster alternative (instruction-only skills)

    Skips the clone and grabs only the SKILL.md file. Don't use this if the skill ships Python scripts, reference markdowns, or asset templates β€” they won't be downloaded and the skill will fail when it tries to load them.

    Quick install (SKILL.md only)
    Sign up to copy
  3. Restart Claude Code.

    Quit and reopen Claude Code (or any other agent that loads from ~/.claude/skills/). New skills are picked up on startup.

  4. Just ask Claude.

    Skills auto-activate when your request matches the skill's description β€” no slash command needed. Trigger phrases live in the skill's own frontmatter; you can read them in the β€œWhat this skill does” section above.

Prefer to read the source first? Open on GitHub.

When Claude uses it

Independent plan-writing orchestrator -- Node-anchored flow with digraph as single control-flow source of truth. Consumes the /superpowers:writing-plans(pi:/skill:writing-plansοΌ‰ flow inline as this session's baseline, backfills the design spec on substantive drift before authoring, commits the authored plan before the review-fix loop, and runs the loop following the engine's next face β€” the engine's next directive carries the pipeline continuation. Callable standalone; invoke as kairos:cdd-plan(pi:/skill:cdd-planοΌ‰.

What this skill does

Kairos CDD-Plan

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 plan's creation stays the orchestrator's, written in this session and never handed wholesale to a subagent. A dispatched implement or fix round 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.

Flow Digraph

flowchart TD
  A[run-cdd-plan-session] --> B[backfill-design]
  A --> Z1((BLOCKED: upstream plugin missing))
  B --> C[author-plan]
  C --> S[self-review]
  S --> K[commit-plan]
  K --> L[NEXT-LOOP]
  L -->|until next is terminal| L
  L -->|no next| Z2((BLOCKED))

Node Definitions

run-cdd-plan-session

  • Do: Import /superpowers:writing-plans(pi:/skill:writing-plansοΌ‰ to plan the approved spec; it lands the draft plan (session-call; the upstream document is not read)
  • Read: nothing before the import; the import plans from the approved spec and lands the draft plan
  • Exit: Import landed β†’ backfill-design
  • Fail: Upstream superpowers plugin missing β†’ BLOCKED (no downgrade, no skip, no inline restatement)

backfill-design

  • Do: Check the drafted plan against the approved design. Substantive drift (factual error / missing constraint / a new implementation step the design does not cover) β†’ backfill the design spec first β€” revise the spec + record the drift β€” so spec and plan agree before plan-review (the design-backfill rule). Cross-phase matters still backfill to the parent overall per Boundary rules
  • Read: approved spec + landed plan draft
  • Exit: spec ↔ plan consistent β†’ author-plan
  • Fail: Entering plan-review with an un-backfilled drift β†’ violates the design-backfill rule

author-plan

  • Do: 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 cdd-report resolves program attribution 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.
    • Constraints β€” the ## 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.
    • Dependencies β€” declare each task's dependencies as the single directed edge in its task record's #### 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.
    • Appending work β€” work that surfaces after the plan has been reviewed enters as new tasks whose 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.
    • Write authority β€” cross-task adjudication surfaced later (user adjudication / phase-level re-scope) is handled by the orchestrator under Plan write authority (I3): it amends the target task's #### Objective / #### Steps / #### Acceptance sections directly.
    • Citations β€” the plan owns the work item (- 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.
    • pin β€” a behavior claim cites a colocated pin by module path + symbol name; a line coordinate is not a pin (line-coordinate)
    • count β€” a count is stated only as census:<id> = <n>, the id taken from the census registry; a bare integer plus a count unit in prose is refused (measure-literal), as is an arithmetic over live counts (live-arithmetic); naming the guard that maintains the value is the reason for the reference, not its form
    • narrative β€” a present-tense description of the tree as it stands is refused in a spec and in a plan alike: what belongs to the plan is the work item (- Modify: <path>), never a prose path:line; the condition that must hold belongs to the spec; restate such a description as that condition (temporal-indicator Β· line-coordinate)
  • Read: approved spec + backfill-design output + the plan's structural contract (the same structure fact the review reads)
  • Exit: File written β†’ self-review
  • Fail: Schema read fails or the draft plan is unusable β†’ BLOCKED (missing plan input)

self-review

  • Do: Review the just-written plan before committing β€” run 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 (cheap hygiene the doc-contract gate would otherwise flag). 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). The four self-review questions every authoring flow holds itself to are registered once in the skill-anatomy contract's SELF_REVIEW_OBLIGATIONS β€” apply all four; this file does not restate them.
  • Read: the written plan document + the approved spec it implements
  • Exit: Self-check clean (issues fixed inline) β†’ commit-plan
  • Fail: Unresolvable defect needing design input β†’ BLOCKED (missing plan input)

commit-plan

  • Do: git add the plan + conventional commit.
  • Read: The committed plan file path
  • Exit: Commit complete β†’ NEXT-LOOP
  • Fail: Git error β†’ report + fail-open (do not block user plan review)

NEXT-LOOP

  • Do: Run the review-fix rhythm for the authored plan β€” one review pass per dispatch. Dispatch the review round on the current ref (npx -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.
  • Read: the full stdout β€” the review conclusion, the findings handoff path, and the engine's next: face
  • Exit: each fix pass re-enters this hub while that route keeps the loop alive (the until next is terminal self-loop); a route that leaves the loop ends this skill's flow
  • Fail: Re-running a review after a closure conclusion β†’ violates Review Convergence (stop + report)

Invariants

#Invariant
I1Review 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
I2Plan 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
I3Plan 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)
I4Mid-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
I5Ruling 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 Modes

failurebehaviorreason
Upstream superpowers plugin missingBLOCKED (install superpowers β€” see the kairos README's installation table)Block policy: no silent fallback
review re-run after a closure conclusion (REVIEW_FIX / APPROVED)Violates I1 (Review Convergence) β€” stop + report to userA fix commit opens a new review, never a re-run of a closed one
Entering review with an un-backfilled driftViolates the design-backfill rule β€” stop + backfill firstSpec and plan must agree before review
Git commit errorreport + fail-openDo 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 continueNo dispatchable next

Related skills