Skip to main content

Plan Mode or Just Do It

Why This Matters

Planning a one-line fix wastes time; not planning a change across five files wastes a day. The deciding factor is the blast radius, not how hard the task sounds.

Blast radius

QuestionSmallLarge
How many files change?OneSeveral, across folders
How many callers are affected?NoneA shared function or schema
How hard is it to undo?One revertData, fixtures or other repos involved
Do others depend on it?NoThe golden set, CI, the MCP server

Small blast radius: just do it, then review the diff. Large blast radius: plan first.

Same request, two sizes

  • “Fix the typo in the system prompt”: one line, one file, trivial to undo. Do it.
  • “Add severity everywhere”: schema, prompt, tests, fixtures, report, maybe the MCP server. Plan first.

Plan mode

In plan mode Claude Code reads and analyses, then proposes a plan without changing files. You review and adjust the plan before anything changes. In TestPilot’s CLAUDE.md, the team made this a default for changes touching more than one file in src/.

In TestPilot, asked in plan mode to add a category infra_config “everywhere it is needed”, Claude Code first explored the code, then stopped before writing a plan, because two decisions were not its to make: how far the change should reach into the fixtures, and what happens to the team. It offered options, with a recommendation and the trade-off of each:

In plan mode Claude Code asks a scope question before writing the plan: code plus one run-1042 case (recommended), code plus run-1042 plus golden cases (needs a reason and a paid eval run), or code only (breaks the one-failure-per-category rule)

Notice that it already knew the constraints from earlier lessons: the golden set is hook-protected, npm run eval costs tokens, and run-1042 has one failure per category. A plan that starts with the right questions is half reviewed.

With the scope agreed, the plan itself:

Claude Code’s plan for infra_config: context (why CI configuration problems need their own category and owner), the agreed scope, then changes per area with file and line: src/schema.ts as the single source of truth, the prompt definitions, the eval output, the triage team; it ends with the choice to proceed with auto mode, approve edits manually, or tell Claude what to change

Read it the way the next section describes. It explains why (a CI config problem has a different owner and fix than a runtime environment problem), it names files and lines, and it relies on a single source of truth (failureCategories in src/schema.ts) instead of editing every list by hand. It also spots a consequence you might miss: the type of the confusion-table labels will not compile until infra_config gets a short name. That is a plan you can approve with confidence, or correct in one sentence.

The second half of the same plan:

The rest of the plan: the team’s ACTION map gets infra_config (“fix the CI config”), one new failure t-008 in run-1042 with a log, tests including one that checks flaky versus infra_config escalates because the actions differ, docs, a “Not in this change” list (the golden set, the paid scripts) and a verification list ending with the reviewer agent

Three things a reviewer looks for, and finds here: an explicit “Not in this change” list, so scope creep is visible; tests named per behaviour, including one that follows lesson 39’s rule (flaky versus infra_config must escalate, because “fix the test” and “fix the CI config” are different actions); and a verification section that ends with the reviewer agent from lesson 52, before anything is committed.

Review a plan like a test plan

A tester reads a plan with three questions:

  1. What is missing? “The plan changes the schema but not the golden fixtures.”
  2. What is risky? “Changing the category list will invalidate every eval baseline.”
  3. What will prove it works? “Which test fails first, and which passes at the end?”

Ask Claude Code to revise the plan until all three have answers. Iterating on a plan is cheap; iterating on a half-finished change across seven files is not.

Exercise

Ask for both changes above. Do the typo directly. For severity, use plan mode, review the plan with the three questions, ask for at least one revision, then let it implement and compare the result with the plan.

Compare with solution/lesson-52-claude-code, which has the Claude Code setup for lessons 42–52. Its docs/claude-code-demo.md walks you through all of module 6 in one session.