doc-plan
/octopus:doc-plan reads a completed spec and produces a
step-by-step implementation plan where every task follows the
red-green-commit TDD cycle. The resulting plan file is ready to be
executed by an agent or a human without further interpretation.
What it solves
A specโs Implementation Plan section describes what to build and in what order. It doesnโt describe how to build it safely in small, verifiable increments. Without that breakdown, implementation tends to drift: changes accumulate before being tested, tasks are ambiguous in scope, and the commit history doesnโt map back to the original design.
doc-plan bridges that gap. Each high-level spec item becomes one or
more tasks with an explicit failing-test step, a minimal implementation
step, a passing-test step, and a commit. The plan is a concrete
executable artifact โ not a restatement of the spec.
How it works
- Setup โ reads
docs/specs/<slug>.mdand verifies the Implementation Plan section is populated. Aborts with a clear message if the spec is missing or the plan section is empty. - Context scan โ silently reads recent git history and the specโs metadata, overview, detailed design, and testing strategy.
- Plan header โ drafts the goal, architecture summary, tech stack, spec link, and a file-structure table from the spec. Shows the draft for approval before writing.
- Pipeline frontmatter โ generates task IDs (
t1,t2, โฆ), infers the responsible agent role, and infers dependencies between tasks. Asks for approval before finalising. - Task decomposition โ maps each Implementation Plan item to one or more TDD tasks. Items that are too large (touching many files or doing many things) are split; items that are trivially small are folded into the previous task.
- Self-review โ scans the buffered plan for placeholder language, naming inconsistencies, coverage gaps against the spec, and excessive plan length before writing.
- Write + commit โ writes
docs/plans/<slug>.mdto a docs-only branch and commits. Prompts before overwriting an existing plan.
Hard gate: this command does not write production code, tests, or implementation branches. The terminal state is a committed plan file.
Pipeline position
doc-rfc โ doc-spec โ doc-design โ doc-plan
After the plan is merged, execute it with
superpowers:executing-plans or superpowers:subagent-driven-development.
Usage & parameters
/octopus:doc-plan <slug><slug>โ required. The kebab-case spec slug whose Implementation Plan section will be decomposed (e.g.checkout-revamp). The spec must already exist atdocs/specs/<slug>.mdwith a populated Implementation Plan.