op:plan
Think expensive, execute cheap: plan at high effort so the build can run lean.
Steps
Locate the spec: the argument, else the newest
docs/specs/*/spec.mdwithstatus: approved. Hard stop if not approved or Open questions is non-empty — route back to /op:spec.Effort check: suggest max for this step (arrow-choice).
Compute the spec pin (body = everything after the closing frontmatter
---):awk 'c==2{print} /^---$/{if(c<2)c++}' docs/specs/<slug>/spec.md | shasum -a 256 | cut -c1-12Write
docs/specs/<slug>/plan.md:
---
spec: docs/specs/<slug>/spec.md
spec-version: <12-hex pin>
status: draft
---
# <title> — build plan
## Tasks
### Task 1: <name>
- Files: exact paths to create or modify
- Tests: the failing test to write first, named from the spec's Tests section
- Steps: write test → see it fail → implement → see it pass → commit
(one section per task; every spec Behavior maps to a task; every task ends committable)
- Self-check against the spec: every Behavior covered, no placeholders, exact paths. Fix inline.
- Sign-off gate (arrow-choice): sign off / revise / abandon. On sign-off →
status: signed-off, commit (docs: add <slug> plan), offer /op:build. - Re-run: /op:plan on a spec that already has a plan regenerates plan.md fresh (new pin). It never edits the spec.
Proof at end: plan path, pin value, status.