Claude Certified Architect

Foundations · CCAR-F

Domain 3 — 20%

Task 3.3

Plan Mode & Iteration

When to plan first vs execute directly

📘What You Need to Know

Plan Mode: Think Before You Build

Plan mode (Shift+Tab in Claude Code) makes Claude analyze the codebase, identify dependencies, and explain its proposed approach without making any changes. It is the blueprint phase — you review the plan, catch wrong assumptions, and approve the direction before a single file is modified.

Use plan mode when mistakes are expensive to undo, when changes span many interconnected files, or when the task requires architectural decisions that benefit from human review. An architect draws blueprints before construction crews demolish walls; plan mode is your blueprint step.

  • •Multi-file architectural changes
  • •Tasks affecting many interconnected components
  • •Mistakes that are expensive to undo
  • •New features requiring design decisions before implementation

Direct Execution: When Speed Wins

Direct execution mode is the default — Claude reads, edits, and runs tools immediately. Use it when the task is simple, well-defined, and has an obvious correct approach. Fixing a typo, adding a log statement, updating a single import, or applying a known pattern to one file are all direct-execution tasks.

Over-planning simple tasks wastes time. If you can describe the change in one sentence and it affects one file, start executing. The exam presents scenarios and asks you to classify them — the key signal is scope and reversibility, not task difficulty alone.

  • •Simple, well-defined tasks (fix typo, add log statement)
  • •Single-file changes with clear scope
  • •Obvious correct approach with no architectural decisions
🔑Key Concept

Complex + interconnected + expensive to undo → plan first. Simple + single-file + obvious → execute directly.

TDD Iteration Pattern

Test-driven development pairs naturally with Claude Code iteration. Instead of asking Claude to implement a feature in one shot, use a loop: write tests first → implement to pass tests → run tests → refine based on failures → repeat. Each cycle gives Claude concrete, machine-verifiable feedback rather than subjective "make it better" instructions.

This pattern is especially effective for business logic where correctness matters. Tests define the contract; Claude implements against that contract; failing tests provide specific, actionable feedback for the next iteration. It reduces the risk of Claude producing code that looks correct but handles edge cases wrong.

# TDD iteration loop with Claude Code
1. "Write tests for calculateDiscount() covering: no discount, 10% off, expired promo, stackable coupons"
2. "Implement calculateDiscount() to pass all tests"
3. "Run npm test and fix any failures"
4. "Add edge case: discount exceeds subtotal — update tests and implementation"

The Interview Pattern for Ambiguous Requirements

When requirements are vague, do not let Claude guess and build the wrong thing. Use the interview pattern: "Ask me 3 questions before you start." This forces Claude to surface ambiguities, clarify constraints, and confirm assumptions before writing code.

For example, "Add user authentication" could mean OAuth, magic links, or username/password with JWT. The interview pattern turns a vague request into a precise specification. It is especially valuable in plan mode, where Claude can ask questions, incorporate your answers, and then present a plan grounded in your actual requirements.

💡Tip

"Ask me 3 questions before you start" is one of the highest-ROI prompts for ambiguous tasks. It prevents wasted rework.

Concrete Examples Beat Abstract Instructions

When iterating on formatting, style, or output structure, show Claude a concrete example of the desired result rather than describing it abstractly. "Format commits like this: feat(auth): add OAuth2 login flow" is more effective than "use conventional commit format."

This principle applies across iteration patterns: TDD provides concrete pass/fail examples; the interview pattern produces concrete answers; plan mode produces a concrete step-by-step approach you can review. Abstraction creates ambiguity; examples create alignment.

⚠️Exam Traps

Trap: Using direct execution for multi-file architectural changes

Why it's wrong: Without planning, interconnected changes cause cascading errors, missed dependencies, and expensive rework.

Correct approach: Use plan mode when changes affect many components or are expensive to undo.

Trap: Using plan mode for a single-line typo fix

Why it's wrong: Planning adds unnecessary overhead for trivial, reversible changes with obvious solutions.

Correct approach: Use direct execution for simple, single-file tasks with clear scope.

Trap: Asking Claude to implement ambiguous requirements without clarification

Why it's wrong: Claude will guess at requirements and may build the wrong solution, wasting significant effort.

Correct approach: Use the interview pattern: "Ask me 3 questions before you start."

Trap: Single-shot implementation without test feedback loops

Why it's wrong: One-shot code generation lacks machine-verifiable correctness checks for complex business logic.

Correct approach: Use TDD iteration: write tests → implement → test → refine based on failures.

✓Concept Check

You need to restructure authentication across 12 files, migrating from session cookies to JWT with refresh tokens. What approach should you use?

🔨Build Exercise

Beginner30 minutes

Practice Plan vs Direct Decision-Making

What you'll learn

  • •Classify tasks as plan-mode vs direct-execution
  • •Practice TDD iteration and the interview pattern
  • •Use concrete examples to guide Claude's output