Skip to content

fix(writing-plans): the plan is a document — check code by reading, not by building it - #2379

Closed
obra wants to merge 1 commit into
devfrom
fix/writing-plans-plan-is-a-document
Closed

obra wants to merge 1 commit into
devfrom
fix/writing-plans-plan-is-a-document

Conversation

@obra

@obra obra commented Sep 25, 2026

Copy link
Copy Markdown
Owner

Who is submitting this PR? (required)

Field Value
Your model + version Claude Opus 5.5 (claude-opus-5-5, 1M context)
Harness + version Claude Code 2.1.282 (CLI, Linux)
All plugins installed agent-sdk-dev@claude-plugins-official, claude-code-setup@claude-plugins-official, claude-session-driver@superpowers-marketplace, code-simplifier@claude-plugins-official, context7@claude-plugins-official, deal-team@deal-team, elements-of-style@superpowers-marketplace, episodic-memory@superpowers-marketplace, frontend-design@claude-plugins-official, github-triage@github-triage-dev, gopls-lsp@claude-plugins-official, jam@2389-research, landing-page-design@2389-research, linear@claude-plugins-official, mcp-server-dev@claude-plugins-official, plugin-dev@claude-code-plugins, plugin-dev@claude-plugins-official, primeradiant-ops@primeradiant, proving-it-works@proving-it-works, release-radar@whats-new-marketplace, scenario-testing@2389-research, simmer@2389-research, simplify-code@simplify-code-dev, speed-run@2389-research, summarize-meetings@2389-research-marketplace, superpowers-chrome@superpowers-marketplace, superpowers-developing-for-claude-code@superpowers-marketplace, superpowers-lab@superpowers-marketplace, superpowers@claude-plugins-official, worldview-synthesis@2389-research-marketplace
Human partner who reviewed this diff Jesse Vincent (maintainer; directed the investigation and approved this text and diff before submission)

What problem are you trying to solve?

On Opus 5.5, writing-plans turns planning into building. Asked to write a plan from an approved spec, the session implements the project in a scratch directory, generates the plan's code blocks from that implementation with a script, then writes a second script to replay the plan and prove it matches. The plan is the deliverable and it doesn't arrive.

Field evidence (Superpowers 6.4.1, Claude Code 2.1.280, claude-opus-5-5), from two of Harper Reed's projects:

  • A Go CLI (specrater): the plan overview records the method verbatim: "Each writer builds its tasks' code in a scratch copy of the repo, runs make check there, and transcribes the verified code into a plan part." 16,704 lines of plans, 25 compaction boundaries in the root transcript, two of four milestone plans written, no application code in the repo, plus check-transcription.sh and check-part-hygiene.sh built to keep the plan in sync with the scratch tree.
  • A Go service: 8 of 17 phases implemented in scratch while the plan stayed undelivered, a 1,054-line writer brief and 1,739 lines of assembly/replay/merge tooling, 44 compactions across three planning sessions.

Reproduced with Opus 5.5 subagents on a 12-component Go spec (SQLite, bcrypt, HTTP API, worker, CLI): 6/6 runs built the whole project in scratch (61–187 .go files), rendered the plan from it, and replayed it — 38–76 tool calls, 17–24 minutes. It happens with the current skill (2/2), with No Placeholders and type-consistency removed (2/2), and with no skill at all (2/2). The model verifies code by running it; nothing in the skill says planning doesn't.

What does this PR change?

Adds one section, "The Plan Is a Document," above Scope Check: the deliverable is the plan file, its code is checked by reading it against the spec, earlier tasks' interfaces, and the self-review checklist, and it first runs in its task's test cycle. Planning ends when the plan is written and self-reviewed.

Is this change appropriate for the core library?

Yes. writing-plans is core, and the failure is model behavior on any multi-component spec, not project-specific.

What alternatives did you consider?

All on the same fixture and prompt, Opus 5.5, 5 reps each; "built" means the run implemented the project outside the plan (dependency-version probes and reading library source don't count).

Arm Built Plan lines Tool calls Time Tokens
dev (baseline) 6/6 4,200–4,600 38–76 17–24 min 170–200K
This PR 0/5 4,600–5,400 21–38 17–24 min 190–240K
Implementation described in prose, tests in full 1/5 2,500–3,200 16–23 11–20 min 127–197K
#2333 alone 0/5 675–953 9–18 6–7 min 88–97K
#2333 + this section 0/5 726–1,432 13–25 6–9 min 90–117K

#2333 fixes this too, and does it better: once plans stop carrying implementation bodies, there is nothing to verify by building, and runs are a third of the time and half the tokens. This section adds nothing measurable on top of #2333. This PR is a stopgap: one additive section that leaves the tuned No Placeholders text alone, so it can land while #2333's larger rewrite is reviewed. It should be closed or reverted when #2333 merges.

The prose-implementation arm (close to #2333's step recipe without its proportion check and reader changes) had one run write the plan, then implement the whole project in scratch to "dry-run" it — the same instinct, applied after writing instead of before.

Does this PR contain multiple unrelated changes?

No. One section, one failure.

Existing PRs

Environment tested

Harness (e.g. Claude Code, Cursor) Harness version Model Model version/ID
Claude Code (subagents, general-purpose) 2.1.282 Claude Opus 5.5 claude-opus-5-5

New harness support (required if this PR adds a new harness)

Not applicable.

Evaluation

  • Initial prompt: the maintainer pasted two field reports of sessions "losing the plot and building forever," asked for a diagnosis from the skills with subagent micro-tests, then for a fix.
  • Eval prompt (every arm): "Write the implementation plan from the approved spec at docs/superpowers/specs/2026-09-20-switchboard-design.md. I'm stepping away for a few hours, so don't wait on me." Skill text supplied as a file to read and follow; Go 1.22.2 toolchain installed.
  • Sessions after the change: 5 with this section on dev, 5 with it on top of writing-plans: a plan is decisions, not a transcript (step recipe, proportion check, capable reader) #2333.
  • Outcome: scratch builds went from 6/6 to 0/5. Runs still researched (reading library source, checking dependency go directives, one tiny version-resolution module) and several said unprompted that the plan's code first runs in its task's test cycle. Plans still carry full code, so length, time and tokens are unchanged; what's gone is the scratch implementation and the render/replay tooling that compounded into the field reports' compactions.

Rigor

  • If this is a skills change: I used superpowers:writing-skills and completed adversarial pressure testing (paste results below)
  • This change was tested adversarially, not just on the happy path
  • I did not modify carefully-tuned content (Red Flags table, rationalizations, "human partner" language) without extensive evals showing the change is an improvement

writing-skills: RED baseline first (6/6 across three arms including no-skill), form chosen per "Match the Form to the Failure" (a recipe for a wrong-shaped process, not a prohibition), two wordings compared against the baseline, every run's work log and scratch directory read. Not done: multi-pressure adversarial scenarios, and a clean-config control. Every arm's subagents inherited the maintainer's global CLAUDE.md, which pushes TDD and never skipping steps; Harper's sessions also carried strict verification instructions. Also unmeasured: whether plans whose code was never compiled produce more fix rounds during execution.

Human review

  • A human has reviewed the COMPLETE proposed diff before submission

https://claude.ai/code/session_011XgkdvAxv9MF2k55kX6Npj

…ot by building it

Field report (Harper Reed, Opus 5.5): asked to write a plan from an
approved spec, the session built 8 of 17 phases in scratch, generated
the plan from the built code, and grew 1,739 lines of build/replay
tooling across 44 compactions — while the plan stayed undelivered.

Reproduced with Opus 5.5 subagents on a 12-component Go spec: 6/6 runs
built the whole project in scratch, rendered the plan from it with a
script, then replayed the plan to verify (38–76 tool calls). Same result
with the full skill (2/2), with No Placeholders and type-consistency
removed (2/2), and with no skill at all (2/2) — the model verifies code
by running it, and nothing in the skill said planning doesn't.

A positive recipe ("the plan is a document; check its code by reading;
the code first runs in its task's test cycle") ended it: 5/5 runs built
nothing beyond a dependency-version check (0–1 .go files vs 61–187), at
21–38 tool calls, with full code still in every task. An alternative
that described implementation in prose instead of code went 4/5 (one
run dry-ran the whole implementation after writing the plan) and was
rejected.

Claude-Session: https://claude.ai/code/session_011XgkdvAxv9MF2k55kX6Npj
@obra

obra commented Sep 25, 2026

Copy link
Copy Markdown
Owner Author

Superseded by #2333, now merged. Under the original report's conditions, #2333 alone took scratch builds from 5/5 to 0/5, and this section on top of it added nothing measurable. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant