All posts

Planning

Stop letting AI write code first

Turn on plan mode in Claude Code, ask for a phased plan with files, a done line and a test, and read it before any code changes.

What to do

  1. Turn on plan mode

    In Claude Code, press Shift+Tab or start your prompt with /plan[1]. Claude then reads and plans, but does not edit your source files until you approve[2].

  2. Plan with the best model you have

    The plan decides how the rest of the build goes, so the strongest model is worth it here[3][4].

  3. Break the work into phases

    A good plan splits the build into phases[3][5][6].

  4. Give each phase files, a done line and a test

    Each phase lists the files it touches, what done looks like and how it will be tested[3][5][6]. A test that passes or fails lets Claude find and fix its own mistakes[5].

  5. Read the plan before you approve it

    Do not approve a plan you have not read[1][3][6].

  6. Edit the plan yourself

    Press Ctrl+G to open the plan in your own editor and change it before Claude goes on[1][3][6].

The prompt

Paste this into your coding agent before it writes any code.

The plan prompt
Plan this feature. Don't change any code until I approve the plan.
Break the work into phases.
For each phase, list:
1. The files it touches.
2. What done looks like.
3. A pass-or-fail test.
Then stop and wait for my approval.

Use it in plan mode, which you turn on with Shift+Tab or /plan[1]. Before you approve, read the whole plan and press Ctrl+G to change it in your editor[1][3][6].

Did not fit in the video

Plan mode does not stop Claude from working. It still reads and plans, and what it holds back is edits to your source files until you approve[2]. So say "it does not edit your code", not "it does nothing".

No source shows that the strongest model writes better plans. It is a common planning habit, and Claude Code's own opusplan setting follows the same idea: it uses Opus in plan mode and Sonnet to carry out the plan[3][4].

The three parts of each phase are a common way to make a plan easy to check[3][5][6]. Anthropic's docs back the done line in their own words: Claude needs a goal condition, a spec file, or a failing test it has to turn green[3][5][6]. A fuller plan can also list which files need to move, what the new structure looks like, what it will cost to run and what could break[3][5][6].

The same goes for reading: review the plan yourself before it goes any further[1][3][6].

Sources

  1. Permission modes: analyze before you edit with plan mode (Claude Code docs)

    code.claude.com

  2. Common workflows: plan before editing (Claude Code docs)

    code.claude.com

  3. 1,000 hours of vibecoding: everything I learned, start to finish (Murphmaxxing, playbook S55)

    murphmaxxing.com

  4. Model configuration: opusplan model setting (Claude Code docs)

    code.claude.com

  5. Best practices for Claude Code: let Claude run without you (Claude Code docs)

    code.claude.com

  6. The $120/Month AI Stack That Ships a 5M-User App (joinfndrs PDF, playbook S57)

    joinfndrs.com

Want the rest? Every post, by month and topic.

See all posts