The Planning/Architecture Agent

Claude Code Agents: Advanced Orchestration

Chapter 6 · The Planning/Architecture Agent

Chapter 5 specialized code review toward security. This chapter covers a different kind of specialization entirely: an agent whose job is to think through how something should be built — before any implementation begins — and produce a reviewable plan rather than working code.

What a Planning/Architecture Agent Actually Produces

A planning agent's output is a structured plan: the proposed approach, which files or areas of the codebase will be touched, the key architectural tradeoffs actually considered and the reasoning behind the recommended choice, and any genuinely open questions or risks. It does not produce the implementation itself — that's Fundamentals' Chapter 5's own coding agent's job, once a plan exists to actually implement.

Why Separate Planning From Implementation

Committing straight to an implementation approach without thinking it through first risks real wasted work if that approach turns out to be wrong partway through building it. Keeping planning as its own separate, reviewable step — proposing an approach, getting it reviewed and approved, then implementing — catches a flawed approach while it's still just a written plan, cheap to revise, rather than after a real implementation has already been built around it. This is the same underlying logic as reviewing code before merging it, applied one step earlier in the process.

Designing a Planning Agent's Definition

"Use this agent to design an implementation approach for a non-trivial feature or change before any code is written — identifying the files involved, the architectural approach, and the key tradeoffs. Not for writing the actual implementation." Tool access should stay read-only — Read, Grep, Glob, no Edit or Write — for the same reason a review agent stays read-only: keeping the plan itself as a discrete, reviewable proposal, rather than an agent that quietly starts implementing while it's supposed to be planning.

Writing the System Prompt for a Planning Agent

A planning agent's system prompt should instruct it to actually understand the existing codebase's own relevant conventions before proposing anything — a plan disconnected from how the codebase already works isn't genuinely useful — to name real tradeoffs explicitly rather than presenting one option as though it were the only possibility, and to flag genuine open questions or risks honestly rather than glossing over uncertainty to make the plan look more complete than it really is.

Briefing a Planning Agent Well

A good brief states the actual goal, any known constraints (must integrate with an existing system, can't change a specific public interface), and how much freedom the agent actually has — a genuinely open architectural question versus "given we've already decided on approach X, plan the specifics of implementing it."

A Worked Example

"We need to add real-time notifications to the app. Plan the approach — consider WebSockets, Server-Sent Events, and polling, and identify the tradeoffs between them for our specific situation: mostly one-way server-to-client updates, a moderate number of concurrent users. Don't implement anything yet — just produce the plan for review." This states the actual goal, names the specific options worth weighing, gives the real constraints that should inform the choice, and explicitly confirms this is a planning task, not an implementation one.

AspectCoding Agent (Fundamentals Ch.5)Planning/Architecture Agent
OutputWorking, implemented codeA structured plan and its tradeoffs — no code
ToolsRead, Edit, Write, Grep, BashRead, Grep, Glob — no Edit/Write
When it runsAfter the approach is decidedBefore any implementation begins
Actually review and approve the plan before implementing
The entire value of separating planning from implementation depends on the plan actually being reviewed before it's handed off — skipping straight from "the plan exists" to "implement it" without genuinely considering whether the proposed approach is right defeats the whole purpose of having a planning step at all.
A plan is a snapshot, not a permanent guarantee
A plan is only as good as the planning agent's own understanding of the codebase and constraints at the moment it was written. If the codebase changes meaningfully between planning and implementation, or if a real constraint was missed during planning, the plan itself may need revisiting rather than followed blindly — it represents the best approach given what was known at the time, not an unquestionable, permanently correct answer.

Hands-On Exercises

Exercise 1

Explain why a planning agent is denied Edit access, using the same underlying reasoning this chapter connects to code review.

📄 View solution
Exercise 2

A planning agent produces a plan that presents only one approach, with no mention of any alternative considered or rejected. Explain what's missing from this plan, using this chapter's own system-prompt guidance.

📄 View solution
Exercise 3

A plan was approved two weeks ago, but before implementation began, an unrelated change significantly altered one of the systems the plan assumed would stay the same. A developer decides to implement the original plan exactly as written anyway. Using this chapter's own warning box, explain the risk here.

📄 View solution

Chapter 6 Quick Reference

  • A planning agent produces a reviewable plan — approach, files involved, tradeoffs, open risks — never the implementation itself
  • Keeping planning separate from implementation catches a flawed approach while it's still cheap to revise
  • No Edit/Write access — the same isolation logic as a review agent, keeping the plan a discrete proposal
  • A good plan names real tradeoffs explicitly and flags genuine uncertainty rather than hiding it
  • Actually reviewing and approving the plan is what makes the separation worthwhile — skipping that defeats the purpose
  • A plan is a snapshot based on what was known when it was written — not a permanent guarantee if circumstances change