Method·8 min read·3 August 2026

Claude Code Plan Mode Workflow: A Production Guide

Master the claude code plan mode workflow: when to plan vs execute, what belongs in CLAUDE.md, approval gates, and verifiable output patterns for production teams.

By Solomon Udoh · AI Architect & Certification Lead

Claude Code Plan Mode Workflow: A Production Guide

The claude code plan mode workflow separates thinking from doing. Before Claude writes a single line of code, it produces a structured plan you can read, challenge, and approve. That separation is not a convenience feature; it is the primary mechanism for keeping a human in the loop on consequential changes. This guide explains how to use it deliberately, what to put in CLAUDE.md to make it stick, and how to chain plan mode with tests and gates so the output is verifiable rather than "best effort."

What is plan mode in Claude Code, and when should you use it?

Plan mode is a first-pass execution phase in which Claude Code reads your codebase, reasons about the task, and produces a written plan without making any file edits. You review the plan, request changes, and only then trigger the implementation phase.

Use plan mode whenever:

  • The change touches more than one file or module boundary.
  • You cannot easily reverse the edit (database migrations, API contract changes, dependency upgrades).
  • You are working in an unfamiliar codebase and want Claude to surface its assumptions before it acts on them.
  • A team member other than the requester needs to sign off.

For single-file, low-risk edits, the overhead of a full plan cycle is rarely worth it. The exam-relevant principle here is proportionate fixes: apply the heaviest process to the highest-stakes work.

How does the plan-then-execute cycle actually work?

The cycle has four phases. Each phase has a clear exit condition before the next begins.

  1. Codebase Q&A. Before writing the plan, ask Claude to read the relevant files and answer scoping questions. This surfaces stale assumptions early. See the incremental codebase understanding pattern for how to structure these reads.
  2. Plan generation. Claude produces a numbered list of changes: which files, what edits, in what order, and why. No writes happen.
  3. Human review and approval. You read the plan, push back on anything that looks wrong, and give explicit approval. This is the checkpoint.
  4. Execution. Claude implements the approved plan. If it encounters something unexpected, it surfaces it rather than improvising.

The cycle maps directly to the hybrid plan-then-execute pattern covered in Domain 1 of the CCAR-F exam, which carries 27% of the exam weight.

text
User: /plan Refactor the payment module to support multi-currency.
Claude: [reads src/payment/, src/models/, tests/payment_test.py]
Plan:
1. Add `currency` field to PaymentIntent schema (models/payment.py, line 42)
2. Update PaymentService.charge() to accept currency param (services/payment.py)
3. Add currency validation helper (utils/currency.py, new file)
4. Update 3 existing tests; add 2 new currency-specific cases
Assumptions: USD is the default; no FX conversion in scope.
Proceed? (y/n)

The explicit "Assumptions" line is worth requiring in your CLAUDE.md. Surfaced assumptions are reviewable; buried assumptions become bugs.

What should go in CLAUDE.md to enforce plan mode?

CLAUDE.md is the project-level configuration file Claude Code reads at session start. It is the right place to encode team conventions that should apply to every task, not just the ones you remember to mention. The three-level configuration hierarchy means a project-level CLAUDE.md at the repo root overrides user-level defaults, so team conventions win.

What belongs in CLAUDE.md:

  • Mandatory plan phase. State explicitly that Claude must produce a plan and wait for approval before editing any file outside the current working directory.
  • Assumption surfacing. Require an "Assumptions" section in every plan.
  • Test gate. Require that all existing tests pass before the task is marked complete.
  • Scope limits. List directories or files that are off-limits without explicit permission (e.g., infra/, migrations/).
  • Output format. Specify how Claude should report completion (e.g., a structured summary with files changed, tests run, and any open questions).

What does NOT belong in CLAUDE.md:

  • Long prose explanations of why a rule exists. Claude reads the file on every session; verbose rationale dilutes the signal.
  • Rules that contradict each other. Conflicting instructions produce unpredictable behaviour; resolve conflicts before committing them.
  • Anything that changes per-task. Per-task instructions belong in the prompt, not the config file.
markdown
# CLAUDE.md
## Mandatory workflow
1. Read all files relevant to the task before writing any plan.
2. Output a numbered plan with an explicit "Assumptions:" section.
3. Wait for the user to type "approved" before making any edits.
4. Run the test suite after edits. Report pass/fail counts.
5. Do not edit files under infra/ or migrations/ without explicit permission.
## Output format on completion
- Files changed: <list>
- Tests: <pass count>/<total>
- Open questions: <list or "none">

The key insight is that CLAUDE.md functions as a persistent system prompt for your project. Keep it short, imperative, and free of contradiction.

Anthropic , Claude Code documentation

How do you structure a plan for a large feature or multi-repo change?

Large features benefit from phase decomposition: break the work into phases that can each be planned, approved, and executed independently. This is the dynamic adaptive decomposition pattern applied to a single-engineer workflow.

A practical phase structure for a large feature:

PhaseScopeApproval gate
1. DiscoveryRead codebase, produce dependency mapArchitect reviews map
2. Schema changesData model edits only, no logicDBA or lead reviews migration
3. Service layerBusiness logic changesAuthor self-review + tests green
4. API surfaceEndpoint changes, contract updatesAPI consumer team reviews
5. Tests and docsNew tests, updated docsCI must pass

Each phase produces a plan. Each plan gets approved before execution. The phases are small enough that a mistake in phase 3 does not require re-running phases 1 and 2.

For multi-repo refactors, the same structure applies but with an additional constraint: changes to shared interfaces (API contracts, shared libraries) must be planned and approved before any downstream repo work begins. This is a prerequisite gate design applied at the repository boundary.

How do you make Claude Code output verifiable rather than "best effort"?

Verifiable output requires three things: a test gate, a structured completion report, and a cross-check step.

Test gate. Require in CLAUDE.md that Claude runs the existing test suite after every implementation phase and reports the result. If tests fail, Claude must diagnose the failure before proceeding. This is not optional; a plan that passes review but breaks tests is not done.

Structured completion report. Require a machine-readable summary at the end of each phase. A JSON block works well for this because it is easy to parse in CI or a review script:

json
{
"phase": "service_layer",
"files_changed": ["services/payment.py", "utils/currency.py"],
"tests_run": 47,
"tests_passed": 47,
"tests_failed": 0,
"open_questions": []
}

Cross-check step. After implementation, ask Claude to re-read the plan and confirm that every item was addressed. This catches cases where Claude silently skipped a step because it encountered an unexpected dependency. The self-correction with cross-validation pattern formalises this.

The CCAR-F exam consistently rewards deterministic, verifiable solutions over probabilistic ones when stakes are high. A plan mode workflow with explicit gates is the architectural expression of that principle.

When should you use a command, a skill, or an agent instead of plan mode?

Plan mode is a session-level workflow. Commands, skills, and agents are reusable artefacts. The choice depends on how often you repeat the work and how much autonomy you want to grant.

PatternBest forReusable?Human gate?
Plan mode (interactive)One-off or novel tasksNoYes, explicit
/commandRepeated single-step tasksYesOptional
Skill (.claude/skills/)Reusable multi-step proceduresYesConfigurable
Sub-agentParallel or delegated workYesAt coordinator level

For tasks you run more than a few times per week, encoding the plan as a skill or command pays off. The skill file captures the approved workflow so you do not have to re-approve the same plan repeatedly. See skills vs CLAUDE.md distinction for how these layers interact.

For tasks that benefit from parallelism, such as running the same analysis across multiple services simultaneously, parallel subagent spawning is more efficient than sequential plan mode cycles.

How do you chain Claude Code with GitHub CLI and CI checks?

The terminal-native workflow chains Claude Code with gh (GitHub CLI) to keep the full loop inside one session: plan, implement, test, commit, open PR, check CI.

bash
# 1. Plan phase (no edits yet)
claude --plan "Add multi-currency support to payment module"
# 2. After approval, execute
claude "Implement the approved plan"
# 3. Run tests locally
pytest tests/payment_test.py -v
# 4. Commit and push
git add -p
git commit -m "feat: add multi-currency support to payment module"
git push origin feature/multi-currency
# 5. Open PR with gh CLI
gh pr create --title "feat: multi-currency payment support" \
--body "Implements approved plan. All 47 tests pass." \
--reviewer @payment-team
# 6. Check CI status
gh pr checks --watch

The --plan flag (or /plan slash command in interactive mode) triggers the plan phase without executing. The git add -p step is deliberate: reviewing the patch interactively is a second human checkpoint that catches anything the plan review missed.

If CI fails, bring the failure back into Claude Code with the output pasted as context. Claude can diagnose the failure and propose a targeted fix, which you then approve before applying. This keeps the human-in-the-loop pattern intact even in the fix cycle.

Plan mode is most valuable not because it prevents Claude from making mistakes, but because it makes Claude's reasoning visible before the mistakes happen.

Anthropic , Claude Code documentation

How does plan mode relate to the CCAR-F exam?

Plan mode sits squarely in Domain 3 (Claude Code Configuration and Workflows, 20% of the exam) and Domain 1 (Agentic Architecture and Orchestration, 27%). Together those two domains account for 47% of the exam weight.

The exam tests practical judgment, not recall. Scenario questions will present a situation where a team is getting unreliable output from Claude Code and ask you to diagnose the root cause and propose a fix. The correct answer almost always involves:

  1. Adding a plan phase before execution.
  2. Making assumptions explicit and reviewable.
  3. Inserting a test gate before marking work complete.
  4. Using deterministic enforcement (config, gates) rather than hoping the prompt is followed.

The prompt-based vs programmatic enforcement concept is directly relevant here: CLAUDE.md rules are prompt-based and can be overridden; CI gates and test requirements are programmatic and cannot. For high-stakes workflows, layer both.

Our Claude Code Configuration and Workflows concept library covers the full Domain 3 task statements, and the Agentic Architecture and Orchestration library covers Domain 1. Both are mapped to the 30 task statements in the CCAR-F exam guide.

The CCAR-F exam costs $125 per attempt, is scored on a 100 to 1000 scale with a passing score of 720, and Domain 3 alone represents one-fifth of that score. A solid plan mode workflow is not just good engineering practice; it is a high-yield exam topic.

Frequently asked questions

How do I enable plan mode in Claude Code?
Use the /plan slash command in interactive mode, or pass the --plan flag when invoking Claude Code from the terminal. Claude will read the relevant files, produce a numbered plan with an explicit assumptions section, and wait for your approval before making any edits. No configuration is required beyond the command itself.
What is the difference between plan mode and normal Claude Code execution?
In normal execution, Claude reads the task and immediately begins editing files. In plan mode, Claude produces a written plan first and waits for explicit human approval before any file is touched. Plan mode adds a review checkpoint that makes Claude's reasoning visible and correctable before changes are applied.
Can I enforce plan mode for all tasks using CLAUDE.md?
Yes. Add a rule to your project-level CLAUDE.md stating that Claude must output a numbered plan and wait for the word 'approved' before editing any file. Because CLAUDE.md is read at session start, this applies to every task in that project. Combine it with a test gate requirement for maximum reliability.
How should I structure a CLAUDE.md file for a team using plan mode?
Keep it short and imperative. Include: a mandatory plan phase with an assumptions section, an explicit approval trigger (e.g., the word 'approved'), a test gate requiring the suite to pass before completion, scope limits on sensitive directories, and a structured completion report format. Avoid verbose prose and contradictory rules.
Does plan mode work for multi-repo or monorepo refactors?
Yes, but decompose the work into phases first. Plan and approve shared interface changes (API contracts, shared libraries) before any downstream repo work begins. Each phase gets its own plan and approval gate. This prevents a mistake in one repo from cascading before it is caught.
How does the claude code plan mode workflow relate to the CCAR-F exam?
Plan mode is tested in Domain 3 (Claude Code Configuration and Workflows, 20%) and Domain 1 (Agentic Architecture and Orchestration, 27%), which together account for 47% of the CCAR-F exam. Scenario questions reward deterministic, gate-based workflows over probabilistic ones, making plan mode a high-yield exam topic.

People also ask

What does plan mode do in Claude Code?
Plan mode makes Claude produce a structured, numbered plan of all intended file changes before executing any of them. Claude surfaces its assumptions, waits for explicit human approval, and only then begins editing. This keeps a human in the loop on consequential changes and makes Claude's reasoning reviewable before mistakes happen.
How do I use Claude Code without it making changes automatically?
Trigger plan mode with the /plan slash command or --plan flag. Claude will read the codebase and output a plan without touching any files. You can also add a rule to CLAUDE.md requiring Claude to wait for an explicit approval word before editing, which enforces this behaviour across every session in the project.
What should I put in CLAUDE.md for Claude Code?
Include short, imperative rules: a mandatory plan phase, an assumption-surfacing requirement, a test gate, scope limits on sensitive directories, and a structured completion report format. Avoid long prose rationale, contradictory rules, and per-task instructions that belong in the prompt rather than the config file.
How do you chain Claude Code with GitHub CLI?
Run the plan and implementation phases in Claude Code, then use gh pr create to open a pull request and gh pr checks --watch to monitor CI, all from the same terminal session. Paste CI failure output back into Claude Code for diagnosis. This keeps the full plan-implement-review loop inside one terminal without switching tools.
Is plan mode in Claude Code useful for large refactors?
Yes. For large refactors, decompose the work into phases (discovery, schema, service layer, API surface, tests) and run a separate plan-and-approve cycle for each phase. This limits blast radius, keeps each approval checkpoint manageable, and ensures shared interface changes are locked down before downstream work begins.

About the author

Solomon Udoh

AI Architect & Certification Lead

Solomon Udoh is an AI Architect who designs and ships production agent systems on the Claude API and Claude Code. He built AI Skill Certs' adaptive engine and authored its 174-concept knowledge graph, mapping every Claude Certified Architect - Foundations objective to hands-on, exam-aligned practice.

  • Designs production multi-agent systems on the Claude API and Agent SDK
  • Author of the AI Skill Certs knowledge graph (174 mapped exam concepts)
  • Builds with MCP, Claude Code, structured outputs, and agentic loops daily
  • Reviews every concept page against the official Anthropic exam guide

You might also like

Ready to put it into practice?

Study every exam concept with an adaptive tutor.

Start studying