Task decomposition into narrow, ordered subtasks. MUST load at the Planning step.
Decompose complex tasks into small, specific, agent-assigned subtasks. Use during Step 2 (Planning) to explore the codebase, build a systematic plan, and get user approval before delegation. MUST load at the planning step.
Navigate deeper from here:
| Document | Covers |
|---|---|
| gotchas.md | Known mistakes and corrections for _plan |
Enter plan mode. Use EnterPlanMode to explore, decompose, and write the plan. Use ExitPlanMode to present it for approval.
Plan mode lets you explore the codebase with read-only tools, design the approach, and write the plan — all before any implementation begins. ExitPlanMode presents the plan to the user for approval. No delegation happens without user sign-off.
Decompose into small, specific tasks. Each task has one agent, one deliverable, one clear scope.
Vague tasks produce vague results. Break work down until each task is small enough that a single agent can complete it without losing focus. Name the agent, list the skills to load, and define the expected deliverable.
Every task specifies its subagent and skills.
A task without a named subagent gets routed to the wrong specialist. A task without listed skills gets executed without the knowledge the agent needs. The plan must name which agent from .claude/agents/ handles each task and which skills from .claude/skills/ it loads — this is what makes delegation precise instead of hopeful.
Research before planning when knowledge is insufficient.
When a task requires domain expertise, external context, or codebase understanding that the orchestrator lacks, spawn research agents to investigate before decomposing. A plan built on incomplete knowledge produces tasks with wrong assumptions. The research cost is small compared to the rework cost of a misinformed plan.
Always start in plan mode.
Planning outside of EnterPlanMode means planning without codebase exploration — and plans built on assumptions fail on contact with reality.
Explore before decomposing.
Understanding the existing codebase, patterns, and architecture is a prerequisite to meaningful task breakdown. A plan that doesn't reflect the codebase will produce work that doesn't fit the codebase.
Spawn PI-level agents when needed.
If the task crosses unfamiliar territory — new APIs, unfamiliar subsystems, external dependencies — spawn PI-level agents to investigate before writing the plan. They return findings; the orchestrator synthesizes them into planning context. Do not guess what you can investigate.
Decomposition is the core act of planning.
The plan's quality is determined by how well tasks are broken down — see "How to Decompose" below. Everything else (goal statement, execution order, collection plan) supports the task list.
Exit plan mode to present, not to finish.
ExitPlanMode surfaces the plan for user approval. No delegation happens until the user signs off. If the plan needs revision after feedback, re-enter plan mode — revisions deserve the same structured exploration as the original.
Goal — One sentence restating what the user wants, from Ideation (Step 1).
Tasks — A numbered list of small, specific tasks. Each task specifies:
Execution order — Which tasks run in parallel (independent) and which run sequentially (dependent). Maximize parallelism — independent tasks launch simultaneously.
Expected outcome — What the user will have when all tasks complete.
Collection plan — Where work docs will be written after delegation completes. Specify the task directory path and list which subtask .json files will be created. This ensures Collection (Step 5) has a clear target.
Start from the deliverable, work backward. What does the user need? What pieces make up that deliverable? Each piece is a candidate task.
Split by domain, not by file. Assign tasks by specialist expertise, not by which files they touch. Domain expertise matters more than file boundaries.
Make tasks self-contained. Each task should make sense on its own without reading the other tasks. The agent receiving it should understand the full scope from the task description alone.
Keep tasks small. If a task description uses "and" to join two unrelated concerns, split it. If an agent would need to context-switch between different subsystems, split it.
Name the agent and skills explicitly. For each task, state the agent type (from .claude/agents/), the skills to load, and any project docs to read.