Skip to content

Plan-Driven Development

Last updated:

Confidence: Tier 1 (based on Claude Code’s native /plan mode functionality).

Use /plan mode for anything non-trivial. Claude explores the codebase (read-only), then proposes an implementation plan for your approval.


  1. TL;DR
  2. The /plan Workflow
  3. When to Use
  4. Plan File Structure
  5. Integration with Other Workflows
  6. Tips
  7. Advanced: Custom Markdown Plans (Boris Tane Pattern)
  8. See Also

1. Enter Plan Mode (Shift+Tab twice) or ask complex question
2. Claude explores codebase (read-only)
3. Claude writes plan to .claude/plans/
4. You review and approve
5. Claude executes

Toggle Plan Mode with Shift+Tab (press twice to cycle Normal β†’ Auto-Accept β†’ Plan):

# Press Shift+Tab twice to enter Plan Mode
# (Plan Mode indicator appears in the UI)

Or ask a complex question that triggers plan mode automatically:

How should I refactor the authentication system to support OAuth?

In plan mode, Claude:

  • Reads relevant files
  • Searches for patterns
  • Understands existing architecture
  • CANNOT make any changes

Claude creates a plan file at .claude/plans/[name].md:

# Plan: Refactor Authentication for OAuth
## Summary
Add OAuth support while maintaining existing email/password auth.
## Files to Modify
- src/auth/providers/index.ts (add OAuth provider)
- src/auth/middleware.ts (handle OAuth tokens)
- src/config/auth.ts (OAuth config)
## Files to Create
- src/auth/providers/oauth.ts
- src/auth/providers/google.ts
## Implementation Steps
1. Create OAuth provider interface
2. Implement Google OAuth provider
3. Update middleware to detect token type
4. Add OAuth routes
5. Update config schema
## Risks
- Breaking existing sessions during migration
- Token format differences between providers

Review the plan for:

  • Completeness (all requirements covered)
  • Correctness (right approach for your codebase)
  • Scope (not over-engineering)
Looks good. Proceed with the plan.

Or request changes:

Modify the plan: also add support for GitHub OAuth, not just Google.

ScenarioWhy
Multi-file changesSee all affected files upfront
Architecture changesValidate approach before coding
New featuresEnsure complete implementation
Unfamiliar codebaseLet Claude explore first
Risky operationsReview before execution
ScenarioWhy
Single-line fixesObvious, low risk
Typo correctionsNo planning needed
Simple questionsExploration, not implementation
Adding commentsTrivial change

Plans are stored in .claude/plans/ with auto-generated names.

# Plan: [Title]
## Summary
[1-2 sentence overview]
## Context
[Why this change is needed]
## Files to Modify
[List of existing files that will change]
## Files to Create
[List of new files]
## Files to Delete
[List of files to remove, if any]
## Implementation Steps
[Ordered list of steps]
## Testing Strategy
[How to verify the changes]
## Risks & Mitigations
[What could go wrong and how to handle it]
## Open Questions
[Things to clarify before proceeding]

# Enter Plan Mode (Shift+Tab twice), then:
I need to implement a rate limiter.
Plan the test cases first, then the implementation.

Claude plans both tests and implementation in proper TDD order.

# Enter Plan Mode (Shift+Tab twice), then:
Review the Payment Processing spec in CLAUDE.md.
Create an implementation plan that satisfies all acceptance criteria.

After plan approval, Claude can break down into tasks:

Approved. Create tasks from this plan and start implementing.

# Too vague (after entering Plan Mode via Shift+Tab twice)
Improve the API
# Better
Add pagination to the /users endpoint with cursor-based navigation.
Maintain backwards compatibility with existing clients.
The plan looks good but:
- Add error handling for network failures
- Skip the caching optimization for now
- Include rollback procedure
# Enter Plan Mode (Shift+Tab twice), then:
I'm considering two approaches for state management:
A) Redux Toolkit
B) Zustand
Explore the codebase and recommend which fits better.

Plans in .claude/plans/ serve as decision documentation:

  • Why certain approaches were chosen
  • What files were expected to change
  • Implementation order rationale

Source: Boris Tane, Engineering Lead @ Cloudflare, in β€œHow I use Claude Code” (Feb 2026). 9 months of production usage. Confidence: Tier 2 (practitioner-validated pattern, not official Anthropic documentation).

When Plan Mode isn’t enough, iterative human/agent planning before any code is written.

FactorPlan Mode (native)Custom .md plan
PersistenceLost on context compactionSurvives compaction, shareable
Review surfaceChat-based, linearStructured file, diffs
IterationBack-and-forth in conversationAnnotate file, re-run
Shared statePer-session”Shared mutable state” between human and agent
Best forStandard features, <30 min tasksComplex features, architectural decisions

Decision rule: Use Plan Mode (Shift+Tab twice) for known scope. Use custom .md plans when you expect misunderstandings or want explicit sign-off on approach before a single line of code.


β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Phase 1: RESEARCH β”‚
β”‚ β†’ Emphatic prompt β†’ research.md (written, not verbal) β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Phase 2: PLANNING (Annotation Cycle) β”‚
β”‚ β†’ plan.md draft β†’ human annotates β†’ agent updates β†’ repeat β”‚
β”‚ β†’ Exit: plan approved, no open questions β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Phase 3: IMPLEMENTATION β”‚
β”‚ β†’ Mechanical execution, decisions already made β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Claude skims without strong signal. Use emphatic language to force depth:

Research the authentication system in this codebase deeply.
Understand the intricacies of how sessions are managed, in great detail.
Cover edge cases, existing patterns, and any non-obvious dependencies.
Write your findings to research.md β€” do not implement anything.

Why it works: β€œdeeply”, β€œin great detail”, β€œintricacies” shift Claude from surface scan to thorough investigation. Output must be written to a file. Verbal summaries disappear on context compaction.

Research.md should include:

  • Existing patterns and conventions
  • File paths and key functions
  • Non-obvious dependencies
  • Constraints and risks identified

The core of the Boris Tane pattern. Iterate on plan.md until ready, before any implementation.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ ANNOTATION CYCLE β”‚
β”‚ β”‚
β”‚ Human prompt ──→ Agent writes plan.md β”‚
β”‚ ↑ ↓ β”‚
β”‚ Annotate plan Human reviews plan.md β”‚
β”‚ (add comments, ↓ β”‚
β”‚ ask questions, Issues found? β”‚
β”‚ flag trade-offs) β”œβ”€ Yes β†’ Annotate β†’ loop β”‚
β”‚ └─ No β†’ Approved β†’ Phase 3 β”‚
β”‚ β”‚
β”‚ Typical: 1-6 iterations before approval β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Guard prompt. Always include this to prevent premature implementation:

Based on research.md, write a plan for implementing [feature].
Include: approach, affected file paths, code snippets for key decisions,
trade-offs considered, and open questions.
Write to plan.md. Do NOT implement anything yet.

What plan.md should contain:

# Plan: [Feature Name]
## Approach
[Strategy and rationale]
## Files Affected
- path/to/file.ts β€” what changes and why
- path/to/other.ts β€” what changes and why
## Key Implementation Details
[Code snippets for non-obvious parts β€” not the full implementation]
## Trade-offs
- Option A vs B: chose A because X
- Considered but rejected: Y (reason)
## Open Questions
- [ ] Should we handle edge case Z?
- [ ] Does this affect the mobile client?

Annotation example:

## Approach
Use JWT tokens stored in httpOnly cookies.
<!-- Human annotation: βœ“ Agreed. But also consider refresh token rotation -->
## Open Questions
- [ ] Should we handle token expiry in middleware?
<!-- Human annotation: Yes, centralize this β€” don't leave it to each route -->

Exit criteria. The plan is ready when:

  • No open questions remain
  • Trade-offs are documented and agreed
  • File paths are specific (not β€œsome auth file”)
  • Key snippets show the approach, not just describe it

β€œThe markdown file acts as shared mutable state between you and the agent.” (Boris Tane)


Once the plan is approved, implementation becomes execution; no creative decisions left.

Implement everything in plan.md.
Work through each item sequentially.
Mark tasks as completed as you go with [x].
Do not stop between tasks to ask for confirmation β€” keep going until done.

Feedback during implementation:

  • Keep it terse: short phrases or screenshots, not paragraphs
  • Decisions are already made; redirect scope changes back to plan.md
  • If something unexpected comes up: pause, update plan.md, continue

Mindset shift: Phase 3 is mechanical. All thinking happened in Phase 2.


TechniqueWhatWhen
Cherry-pickingImplement subset of plan.mdPlan too large, ship incrementally
Scope trimmingRemove items from plan before implementingReduce risk, focus on core
Reference-based guidancePoint to existing code: β€œdo it like auth.ts”Enforce consistency
Revert & re-scopegit revert + restart with narrower planPlan went wrong, reset cleanly