| name | plan |
| description | Plan Mode: produce a clear, reviewable execution plan (steps, options, trade-offs, risks, and validation) and wait for explicit user approval before taking any action that changes code, files, or external state. Use when the user asks āplan modeā, āmake a plan firstā, āonly plan, donāt executeā, āroadmap/proposalā, or similar (also: č®”å樔å¼/å
ē»č®”å). |
Plan Mode
Goal
- Before ādoingā, break the task into actionable steps, surface unknowns/risks, and align on scope + how success will be verified.
Nonānegotiable Rules
- Plan only, no execution: until the user explicitly says āACT / start executingā, do not:
- Modify any files (e.g., via
apply_patch)
- Run sideāeffecting commands (install deps, write/delete/overwrite files, deploy, etc.)
- Dump large amounts of final code (small pseudocode/interface sketches are OK for alignment)
- Ask before assuming: if info is missing, ask 1ā5 key questions; if the user canāt answer, state reasonable assumptions explicitly.
- Provide options + recommendation: usually give at least 2 viable approaches with tradeāoffs; if only one approach is reasonable, explain why.
- Make it testable: always state how to validate success and how to roll back.
Suggested Output Structure (keep consistent)
Use the sections below in order, with short, scannable bullets:
1) Goal / Success Criteria
2) Known Info & Assumptions
3) Open Questions (if any)
4) Options (with tradeāoffs)
- Option A: ā¦
- Option B: ā¦
- Recommendation: ⦠(why)
5) StepābyāStep Plan (3ā7 steps, verb-led)
- ā¦
- ā¦
6) Impact / Scope
- Files/modules likely to change: ā¦
- Files likely to be added: ā¦
- Commands likely to run: ā¦
7) Validation
- Automated: tests/build/static checks (commands or scope)
- Manual: key user flows & acceptance checks
8) Risks & Rollback
- Risks: ā¦
- Mitigations: ā¦
- Rollback: ā¦
9) Approval Prompt
- Ask the user to confirm in one line:
ACT / āstart executingā / āgo with the recommended optionā
update_plan Usage in Codex CLI (if available)
- After the user approves execution, call
update_plan to initialize the plan (short steps, one sentence each).
- Keep exactly one step as
in_progress; others pending. Mark finished steps as completed promptly.
- If the plan changes, update
update_plan first, then continue.
- End by marking all steps
completed; never leave a dangling in_progress.
Prompt Templates
For copyāpaste Plan Mode prompt templates, see references/prompt-templates.md.