Plans must follow this structure at <plan-directory>/<task-name>-plan.md.
Status: READY_FOR_EXECUTION | ABSTAIN | REPLAN_REQUIRED
Agent: Planner
schema_version: 1.2.0
Complexity Tier: TRIVIAL | SMALL | MEDIUM | LARGE
Confidence: 0.0–1.0 (e.g. 0.95; values below 0.9 trigger PlanAuditor escalation)
Abstain: is_abstaining: false — set true with reasons array if Planner cannot produce a safe plan
Summary: High-level description of the task and approach.
- Current state of relevant code/systems.
- Key constraints and requirements.
- Architecture decisions and rationale.
Mandatory for all plans. Record explicit answers to each dimension before phase decomposition.
- Key architecture decisions and rationale for this task.
- System boundary changes, new actors, or modified integration points.
- If no boundary changes: "No boundary changes identified."
- Execution order, parallel paths, approval gates, review loops, retries, or conditional branches.
- For MEDIUM/LARGE plans, reference or embed a Mermaid
sequenceDiagramhere.
- Design constraints that apply to this task.
- Trade-offs considered and decisions made.
- Objective: What this phase accomplishes.
- Executor Agent: Primary subagent Orchestrator must dispatch for this phase. Required in the JSON plan and must match the supported executor set in
plans/project-context.md. - Wave: Execution wave number (phases in the same wave run in parallel).
- Dependencies: Prerequisites (files, decisions, prior phases by ID).
- Files: Files to create/modify.
- Tests: Tests to add or update.
- Acceptance Criteria: Measurable conditions that define successful completion of this phase (required by schema; minimum one entry).
- Example: The target behavior is observable via automated test X.
- Quality Gates: Gates that must pass before this phase is considered done. Select from:
tests_pass,lint_clean,schema_valid,safety_clear,human_approved_if_required. - Failure Expectations: Likely failure modes with classification (transient/fixable/needs_replan/escalate) and mitigation.
- Steps:
- Step description in prose (no code blocks in plan).
- ...
- Objective: What this phase accomplishes.
- Executor Agent: Primary subagent.
- Wave: Execution wave number.
- Dependencies: Prerequisites.
- Files: Files to create/modify.
- Tests: Tests to add or update.
- Acceptance Criteria: Measurable conditions for successful phase completion (required by schema).
- Example: All targeted tests pass and build is green.
- Quality Gates: Select from:
tests_pass,lint_clean,schema_valid,safety_clear,human_approved_if_required. - Failure Expectations: Likely failure modes with classification and mitigation.
- Steps:
- ... ...
Define data and interface contracts between phases that have dependencies:
- From Phase → To Phase: Description of interface/data contract.
- Format: Expected output format from the upstream phase.
- Validation: How the downstream phase verifies the contract is met.
- Items requiring clarification before or during execution.
- Identified risks with mitigation strategies.
Mandatory checklist — evaluate every category. Non-applicable entries must still appear with applicability: not_applicable.
| Category | Applicability | Impact | Evidence Source | Disposition |
|---|---|---|---|---|
| data_volume | applicable / not_applicable / uncertain | HIGH/MEDIUM/LOW/UNKNOWN | file or query | resolved / open_question / research_phase_added / not_applicable |
| performance | ... | ... | ... | ... |
| concurrency | ... | ... | ... | ... |
| access_control | ... | ... | ... | ... |
| migration_rollback | ... | ... | ... | ... |
| dependency | ... | ... | ... | ... |
| operability | ... | ... | ... | ... |
- Measurable criteria for plan completion.
Required for READY_FOR_EXECUTION plans. Maps to the top-level handoff field in schemas/planner.plan.schema.json.
- Target Agent: The agent receiving the plan for review and execution (typically
Orchestrator). - Prompt: Concise handoff prompt pointing to the saved plan artifact path and requesting execution start. Do NOT inline the plan content here.
Example:
target_agent: Orchestrator
prompt: "Plan saved at plans/my-task-plan.md. Please begin PLAN_REVIEW and dispatch Phase 1 when ready."- Recommended execution order and parallelization opportunities.
- Wave assignments and dependency graph.
executor_agentis the authoritative per-phase routing field. Optional delegation notes may name supporting agents, but must not conflict with the declared primary executor.- Max parallel agents recommendation (default: 10, reduce if resource-intensive phases).
- Failure expectations summary per wave.
Tier-gated rules (mandatory):
- Baseline: Plans with 3+ phases MUST include a phase dependency DAG in Mermaid format (
flowchart TD). - MEDIUM: Plans with MEDIUM complexity that involve non-trivial orchestration flow (review loops, parallel waves, approval gates) MUST also include a Mermaid
sequenceDiagram. - LARGE: Plans with LARGE complexity MUST always include a Mermaid
sequenceDiagramin addition to the DAG.
Allowed diagram types:
flowchart TD— Phase dependency DAG showing execution order and wave grouping.sequenceDiagram— Temporal flow: inter-agent delegation, approval gates, review loops, parallel dispatch.stateDiagram-v2— State machine visualization for complex branching or lifecycle logic.
When no explicit Architecture Visualization section is used, the DAG appears inline with the phases. Place the Mermaid diagram block directly beneath the relevant phase or in the #### Temporal Flow subsection of Design Decisions.
Keep diagrams compact. Each diagram should fit within 30 lines of Mermaid source.
- NO code blocks inside the plan — describe changes in prose.
- NO manual testing steps — all verification must be automatable.
- Each phase must be incremental and self-contained with TDD approach.
- Phase count: 3–10 (decompose further if >10 phases needed).
Every plan must satisfy all 11 standards (apply judgment on TRIVIAL plans):
- Incremental — Each phase produces a working, testable state.
- TDD-driven — Tests are specified before implementation steps.
- Specific — File paths, function names, and change descriptions are concrete.
- Testable — Success criteria are objectively verifiable.
- Practical — Phase count is 3–10; decompose further if exceeding 10.
- Parallelizable — Phases that can run independently MUST be assigned the same wave number. Sequential-only when there is a real data dependency.
- Routable — Every phase MUST specify exactly one
executor_agentso Orchestrator can dispatch it without inference. - Visualized — Plans with 3+ phases MUST include a phase dependency DAG. MEDIUM plans with non-trivial orchestration flow also include a
sequenceDiagram. LARGE plans always include asequenceDiagram. - Failure-aware — Each phase includes failure expectations with classification and mitigation strategies.
- Executable — Each phase MUST specify concrete file paths, input/output contracts, verification commands, test specifics, and the owning
executor_agent. - Risk-reviewed — Every plan MUST include a populated
risk_reviewarray for all 7 semantic risk categories. AnyHIGH-impactopen_questionentry must trigger a research phase before implementation.
When revising an active plan, adhere to the hybrid editing policy:
- Revision Modes: Specify
revision_mode: in_place_updatefor minor adjustments (progress updates, typo fixes), orrevision_mode: new_artifact_supersessionfor major architectural pivots or unrecoverable cascaded failures. - Supersession: If using
new_artifact_supersession, create a new document. The new document MUST includerevision_ofpointing to the original superseded plan. - Revision Log: Maintain an active revision-log (e.g.,
### Revision Log) documenting the changes, iteration index, andtrace_idfor each update. - Artifact-First Handoff: Planner authors/edits the plan document directly to disk and then hands off the artifact path to a read-only reviewer (Orchestrator). Ensure Orchestrator is provided with the
trace_idand iteration metadata in the handoff. - No Fenced Code Blocks: Planners are strictly prohibited from embedding fenced raw code blocks inside plan artifacts or templates to prevent context window bloat. Use descriptive prose instead.
These practices are recommended for plans that span multiple sessions or require recovery from partial execution. They complement the 11 Plan Quality Standards above and are especially valuable for MEDIUM and LARGE plans.
A well-structured plan file acts as its own cold-start reference. A resuming agent reads the plan, identifies the next incomplete phase by its acceptance criteria and quality gates, and continues without requiring prior session state. To preserve this:
- Write phase steps as prose instructions that remain accurate after earlier phases complete.
- Keep acceptance criteria tied to observable outcomes, not in-session state.
- Resolve or explicitly defer all open questions before
READY_FOR_EXECUTIONstatus is set. - Assign every phase a single
executor_agentso dispatch does not require inference from memory.
Supporting evidence that does not belong in the plan document itself goes in plans/artifacts/<task-slug>/. This directory is the task-episodic layer for the plan and may contain:
- Research summaries and source-provenance notes produced by research phases.
- Intermediate validation outputs that downstream phases depend on.
- Rollback notes when enforcement is downgraded or a decision is intentionally deferred.
- Phase-specific context packets needed for cold-start dispatch when an executor requires injected evidence.
This keeps the plan file concise and artifact-linkable while ensuring a resuming executor can reconstruct phase context without live session memory.
These guidelines are recommended and are not enforced by the eval harness. Existing plans are not required to adopt this structure retroactively. The Codex plugin validator (validate-strict-artifacts.ps1) enforces a separate lifecycle section list for ControlFlow-Codex strict plans only; that enforcement does not apply to core VS Code Planner artifacts.
Use this structure ONLY when status is ABSTAIN or REPLAN_REQUIRED. Do NOT apply to READY_FOR_EXECUTION plans — use the Phase structure above instead.
Status: ABSTAIN | REPLAN_REQUIRED Summary: One sentence on what was attempted and why the plan cannot proceed to execution.
- Aspects of the task that were definitively understood before the blocker was reached.
List each blocker with evidence: inaccessible file, changed dependency, unresolvable ambiguity, reversed architectural decision.
Specific information needed to unblock (for ABSTAIN) or to produce a valid decomposition (for REPLAN_REQUIRED).
The single highest-value next action: load a specific file, clarify a specific question, or identify the replacement dependency.
Evaluate as many of the 7 risk categories as available evidence supports. Categories that cannot be assessed yet use applicability: uncertain.