Recipes / Dev & code
Claude CodeWorkflowDev & code

Research → annotated plan → implement

Make the agent write its research and plan to markdown files, mark up the plan yourself until it's right, and only then let it build.

Setup time10 min
CostIncluded in plan
RunsPer feature
NeedsClaude Code, git
Last updated2026-10-15
BlogSource

How I Use Claude Code

by Boris Tane · 2026-02-11

✓ Opened with WebFetch on 2026-10-15

Read the original ↗
Part 1 · What the source did

Make the agent write its research and plan to markdown files, mark up the plan yourself until it's right, and only then let it build.

  • Asks Claude to read a part of the codebase deeply and write findings to research.md.
  • Has it write plan.md with code snippets, file paths and trade-offs.
  • Adds inline notes to the plan and sends Claude back, repeating 1–6 times with an explicit 'don't implement yet'.
  • Asks for a todo list, then one standing 'implement it all' prompt that runs typecheck continuously.
“never let Claude write code until you’ve reviewed and approved a written plan”— Boris Tane, Blog

Summary written by Agent Cookbook. See the original for the full context.

Part 2 · Our copy-paste version

Adapted by us from what the source described. Fill in the [BRACKETS].

The prompt

PHASE 1: Read [FOLDER/FEATURE] in depth. Understand how it works and its edge cases. Write everything you learned to research.md. Do not change code. PHASE 2: Based on research.md, write plan.md for [CHANGE]: approach, exact file paths, code snippets for key edits, trade-offs, open questions. Do NOT implement yet. PHASE 3 (repeat): I added notes in plan.md. Address every note and update the plan. Do NOT implement yet. PHASE 4: Add a granular todo list to plan.md. Do NOT implement yet. PHASE 5: Implement the whole plan. Tick each todo in plan.md as you finish it. Run [TYPECHECK/TEST COMMAND] after each phase and fix what you broke.
🛡
Approval ruleThe agent must not touch code until you've signed off on plan.md. If it goes wrong, revert with git and narrow the scope rather than patching.

Set it up

  1. Start a fresh session on a clean branch.
  2. Run phase 1 and read research.md yourself; correct anything wrong.
  3. Run phase 2, then annotate plan.md in your editor.
  4. Repeat phase 3 until you'd approve it as a PR description.
  5. Run phases 4–5, review the diff, and commit.

Common failures

⚠
What usually goes wrong
  • Skipping the 'don't implement yet' guard: the agent starts coding after round one.
  • Thin research leads to plans that ignore existing layers. Ask for depth explicitly.
  • Long sessions drift; point it back to plan.md, which survives compaction.

Variations

  • Paste a reference implementation from another repo with the plan request.
  • Use a second agent to review plan.md before you annotate.

Related recipes