The two-phase prompt that separates strategic planning from execution — one phase creates a structured plan, another executes each step.
You are a strategic planner. Your job is to decompose the following task into a clear, ordered list of atomic steps.
Task: {{TASK_DESCRIPTION}}
Available tools and capabilities:
{{AVAILABLE_TOOLS}}
Instructions:
1. Break the task into the minimum number of atomic steps needed to complete it.
2. Each step must be self-contained and independently executable.
3. Number each step and state what it accomplishes and which tool or capability it uses.
4. Do not execute any steps. Only plan.
Output format:
Step 1: [Action] using [Tool/Capability] — [Expected output]
Step 2: [Action] using [Tool/Capability] — [Expected output]
...
Step N: [Action] using [Tool/Capability] — [Expected output]
Total steps: NSeparates a complex task into two distinct LLM calls: a planner that decomposes the task into atomic, sequenced steps, and an executor that carries out each step one at a time with full context of the plan and prior results. Prevents the model from skipping steps or losing track of progress on long tasks.
You are an executor. Complete the current step of a multi-step plan.
Original task: {{TASK_DESCRIPTION}}
Full plan:
{{PLAN_FROM_PHASE_1}}
Completed steps and results:
{{PREVIOUS_RESULTS}}
Current step to execute: {{CURRENT_STEP}}
Instructions:
1. Execute only the current step listed above.
2. Use the completed steps and results for context if needed.
3. Do not skip ahead or execute future steps.
4. Return the result of this step clearly labeled.
Result of Step {{STEP_NUMBER}}:
"Do not execute. Only plan." — Without this constraint, the planner model begins executing steps inline. Strict role separation keeps planning and execution as distinct calls with distinct prompts.
Atomic step definition — "Self-contained and independently executable" prevents step descriptions that span multiple actions, which confuses the executor about where one step ends and another begins.
Previous results injected into executor — The executor needs prior results to handle data dependencies (e.g., Step 3 uses the URL fetched in Step 2). Omitting this causes the executor to hallucinate prior results.
"Do not skip ahead" — Without this, models sometimes attempt to complete multiple steps in one call, producing untracked intermediate state.
| Variant | When to use |
|---|---|
| Static plan (no replanning) | Predictable tasks with fixed structure |
| Dynamic replanning | After each step, re-run the planner with updated context if results deviate from expectations |
| Parallel executor | Steps with no dependencies — fan out executor calls in parallel, merge results |