6 min read · EN

Plan Mode & the PDCA Cycle

Use Plan Mode to explore before editing, then apply an Explore, Plan, Implement and Commit workflow with PDCA checkpoints.

Updated

Plan Mode asks Claude to explore and propose changes before editing source files. It can read files, search code, run exploration commands and write a plan. It is not a security sandbox: command approval depends on your settings, and sessions with bypass permissions available have fewer restrictions. Keep external isolation and permission rules in place for sensitive work.

This matters because the most expensive mistakes happen when you start implementing before you understand the problem. Plan Mode forces the exploration phase, and when combined with a structured workflow, it consistently produces better outcomes than diving straight into code.


Entering Plan Mode

Cycle to Plan Mode with Shift+Tab, prefix a prompt with /plan, or start Claude Code with claude --permission-mode plan. See the official permission-mode documentation for the approval flow and exceptions.

The workflow goal is to separate understanding from implementation. Review the proposed scope before approving edits; Plan Mode does not guarantee that every command is harmless or that the plan stays in scope.

Plan mode exploring the authentication system


The Four-Phase Workflow

Plan Mode is most effective as part of a structured workflow: Explore, Plan, Implement, Commit.

Phase 1: Explore (Plan Mode)

Start in plan mode. Ask Claude to understand the relevant parts of the codebase before anything else.

How does the authentication system work in this project? Trace the
flow from login request through middleware to session creation.
What's the current architecture for handling payments? Show me the
key files and how they interact.
Where are all the places we validate user input? Are they consistent?

Claude reads files, traces call paths, examines patterns. You build a shared understanding of the current state before proposing changes.

Phase 2: Plan (Plan Mode)

Still in plan mode. Now that you and Claude understand the current state, define what needs to change.

I want to add password reset functionality. Create a plan covering:
- Files to modify and files to create
- The user-facing flow (request reset, receive email, set new password)
- How it integrates with the existing auth system
- What tests to write

Claude produces a concrete plan: specific files, specific changes, specific test cases. You review the plan before a single line of code is written.

Phase 3: Implement (Normal Mode)

At the plan approval prompt, select Yes, manually approve edits. If you leave Plan Mode with Shift+Tab, cycle explicitly to Manual mode (default) and check the mode indicator before requesting implementation. One keypress can select an automatic mode instead. Existing permission rules and sandbox settings still affect which actions prompt.

Illustrative transition from Plan Mode to auto-accept, not manual approval

This illustration shows [auto-accept], not Manual mode. Do not use its single-keypress instruction for the approval workflow above. Select manual approval explicitly and verify the active mode in your own session.

Implement the password reset feature as planned. ONLY modify the files
we discussed. Work through it step by step. I'll review each change.

By referencing "as planned," you anchor Claude to the plan you already approved. The "ONLY" constraint prevents scope creep. "Step by step" keeps diffs reviewable.

Review each proposed change. Accept or reject individually. If something deviates from the plan, say so.

Phase 4: Commit (Normal Mode)

After implementation, verify and commit:

If unrelated work is already staged, unstage only those paths without discarding their file contents before continuing. If an intended file also contains unrelated edits, use git add -p -- path/to/file to select only the intended hunks. Replace the example paths below with your own.

# Inspect tracked changes and list all new files
git status --short --untracked-files=all
git diff                    # Unstaged tracked changes
git diff --cached           # Already staged changes
# Open and review each new file listed by status before staging it

# Run the test suite
npm test    # or pytest, dotnet test, etc.

# Stage only reviewed paths, not unrelated work (replace these example paths)
git add -- src/auth.ts tests/auth.test.ts
git diff --cached           # Review the final staged diff, including new files
git status --short --untracked-files=all
git commit -m "Add password reset functionality"

If tests fail, stay in normal mode and let Claude fix them. If the implementation needs adjustment, iterate before committing.


The PDCA Cycle

The four-phase workflow maps directly to the Plan-Do-Check-Act cycle, a proven quality framework that works well with agentic AI development.

Plan

Enter plan mode. Explore the codebase. Design the approach. The output is a written plan with:

  • Files to change (and files NOT to change)
  • Implementation approach
  • Test strategy
  • Potential risks or edge cases

This is your investment in understanding before acting.

Do

Leave Plan Mode by explicitly selecting manual approval and checking the mode indicator. Review proposed edits and permission prompts; do not assume leaving Plan Mode enables manual approval.

Keep Claude constrained to the plan. If it wants to go beyond scope, redirect: "Let's stick to the plan. We can address that separately."

Check

Verify the work against objective criteria:

# Review tracked changes and inspect every new file listed by status
git status --short --untracked-files=all
git diff
git diff --cached

# Run the test suite
npm test        # JavaScript
pytest           # Python
dotnet test      # .NET
go test ./...    # Go

# Manual verification where appropriate
npm run dev      # Start the app and check the feature

Don't skip the check phase. "It compiled" is not verification. "The tests pass and I manually confirmed the behavior" is verification.

Plain git diff omits staged changes and untracked file contents. Before committing, inspect new files, stage only intended paths, and read the final git diff --cached. See the Git references for diff and status.

Act

Based on what you found in the check phase:

  • Accept: Changes are correct and verified. Commit them.
  • Iterate: Something's not right. Feed the specific issue back to Claude and repeat Do-Check.
  • Reject: The approach is fundamentally wrong. Go back to Plan with what you learned.

Each cycle is self-correcting. The check phase catches what the plan missed. The act phase feeds learnings back into the next cycle.


When to Use Plan Mode

Plan Mode adds a step to your workflow. It's valuable when that step prevents expensive rework, and unnecessary when the task is simple.

Use Plan Mode

  • Unfamiliar codebase: you (or Claude) need to understand before acting
  • Multi-file changes: changes that ripple across several files or layers
  • Architectural decisions: choosing between approaches with different tradeoffs
  • High-risk changes: database migrations, auth changes, payment logic
  • When you want a second opinion: "before I implement this, what am I missing?"
  • Onboarding to a new project: explore the codebase systematically before making any changes

Skip Plan Mode

  • Simple single-file changes: a bug fix in one function, a style update
  • Well-understood tasks: you've done this exact thing before and know what to change
  • Trivial operations: rename a variable, update a string, fix a typo
  • You already have a plan: you designed the approach yourself and just need Claude to execute

The rule of thumb: if you can describe the change in one sentence AND you know which files are involved, you probably don't need plan mode. If either of those is unclear, plan first.


Common Plan Mode Mistakes

Staying in plan mode too long. Plan mode is for planning, not for perfecting the plan. Once you have a reasonable approach, switch to implementation. You'll learn more from writing code than from refining a plan.

Skipping plan mode for complex changes. The impulse to "just start coding" is strong, especially when you think you understand the task. But multi-file refactors, architectural changes, and unfamiliar codebases consistently benefit from a planning phase.

Not referencing the plan during implementation. After switching to normal mode, explicitly tell Claude to follow the plan: "Implement the approach we discussed." Without this reference, Claude may generate a fresh solution that diverges from what you approved.

Planning without constraints. A plan mode prompt without scope boundaries produces an over-engineered plan. "Add caching to the reports endpoint" gets you a comprehensive caching architecture. "Add Redis caching to the reports endpoint. Cache the query result for 5 minutes, invalidate on write" gets you a practical plan.


Key Takeaways

  • Plan Mode separates exploration from source edits, but is not a security boundary. Check command permissions and isolation separately.
  • The four-phase workflow (Explore, Plan, Implement, Commit) prevents expensive rework by front-loading understanding.
  • The PDCA cycle (Plan-Do-Check-Act) gives you explicit control at every decision point, with Claude handling the execution.
  • Use plan mode for unfamiliar code, multi-file changes, architectural decisions, and high-risk modifications.
  • Skip plan mode for simple, well-understood, single-file changes.
  • Always reference the approved plan when switching to implementation: "Implement as planned. ONLY modify the files we discussed."
  • The check phase is non-negotiable. Run tests, review diffs, verify behavior before committing.

Want to discuss a project like this?

SFLOW helps companies implement practical AI solutions — from custom platforms to industrial integrations with your existing systems.

← All courses