Detailed Execution Planner
Skill Purpose
Write detailed execution plans that are specific, test-gated, and aligned with requirements and technical specifications.
Use This Skill When
- The user asks to create a plan.
- The user asks to update or refine an existing plan.
- A task needs a step-by-step implementation sequence before coding starts.
- A workstream must explicitly follow BDD/TDD with functional testing.
Before Building Plan
Ask the user detailed questions about anything on which you are not 100% certain.
Ask questions one at a time.
Continue asking questions until you are sure you have all needed information and there are zero ambiguities.
Cursor Plan Frontmatter (Required)
Every generated plan must begin with YAML frontmatter that matches the Cursor plan shape so plans can be imported and tracked as todos.
name: short human-readable plan title (string).
overview: multi-line summary of goal, scope, and approach (YAML | block string).
todos: ordered list of steps; one todo per execution step, in the same order as the checklist under ## Execution Plan (see below).
Each todo entry must include:
id: stable unique id for that step (e.g. my-plan-step-001, incrementing).
content: same intent as the matching markdown checkbox line; must be as specific as the checkbox (commands, paths, test names - not shortened into vague summaries).
status: pending or completed (use pending for new plans unless the user marks work done).
dependencies: optional; for a linear plan, each step after the first should list the previous step's id so ordering is explicit.
- For parallel work, use the same dependency pattern only when the user asks for it.
Synchronization Rule
The number of items in todos, their order, and their meaning must match every - [ ] / - [x] line under ## Execution Plan (only those lines; section headings are not steps).
When you update the plan body, update todos in lockstep.
Flat Checklist Only: No Nested Step Bullets
Use a single flat list of top-level checkboxes for all work.
Do not nest checklist items under other checklist items.
Anti-Pattern Examples
- [ ] Higher-level step:
- [ ] Sub-step 1
- [ ] Sub-step 2
Preferred Pattern
Split into separate top-level steps (same content, no hierarchy under a parent checkbox):
- [ ] Higher-level step - sub-step 1 (describe concrete action).
- [ ] Higher-level step - sub-step 2 (describe concrete action).
Section headings (###, ####) still group work; only the checkbox list stays flat.
Explicit Step Wording (Required)
Every step (checkbox line and matching todos[].content) must be specific enough that an executor never has to guess what to run, open, or change.
What Each Step Must Name (When Applicable)
- Commands: the exact invocation (e.g.
just e2e, go test ./package/..., npx markdownlint-cli2 path), not "run tests" or "run the suite".
- Scopes: package paths, directories, or file globs (repo-relative paths in backticks).
- Tests: concrete test names, files, modules, tags, or BDD scenario titles - not "all tests", "the failing tests", or "all 3 tests" without naming which three.
- Code or docs: files or symbols to edit, or a clear discovery sub-step that lists them first.
- Artifacts: outputs to produce (e.g. report path, migration name) when the step is not obvious from the command alone.
If the exact names are unknown at plan time, the step must say how they will be identified (e.g. "list failing tests from go test ./... output and add each as its own step in the next plan revision") - not leave a vague single step in place of that work.
Ambiguous Wording to Avoid
- Steps that rely on unstated context: "Run all 3 tests", "run the new tests", "fix the handler", "update as needed".
- Counts or groups without identifiers: "run every E2E", "run the integration tests" (unless the repo has a single documented target and the step names it, e.g.
just integration).
Explicit Wording for Steps
Use imperative text plus identifiers: paths, commands, test IDs, or scenario names so the step is self-contained.
Core Rules
- Treat requirements as the source of truth, then technical specs, then current implementation.
- Before planning, read the relevant requirements, tech specs, and implementation context.
- If requirements or specs are missing, ambiguous, or contradictory, stop and call out the gap.
- Write the plan in markdown, using only top-level
- [ ] / - [x] lines for steps and headings to group them (see Flat Checklist Only: No Nested Step Bullets).
- Make the plan executable: each checkbox must be a concrete action with explicit scope, not a vague intention (see Explicit Step Wording (Required)).
Prefer short, imperative step text that still names what and where, and be explicit about files, tests, commands, and artifacts.
Vague phrases like "run all targeted tests" are not enough unless the plan already lists those targets by path or name.
- Use BDD/TDD explicitly:
- add or update behavior specs first
- write failing tests before implementation
- implement the smallest change to make tests pass
- refactor only after tests are green
- Include additional functional tests for user-facing or API-facing behavior.
- Task independence: each task has its own Requirements and Specifications list, Discovery steps, and Testing, so tasks can be read and executed independently with all steps needed to complete that task.
- Add validation gates after each task (within that task's Testing sub-section) and require them to pass before moving on.
- Do not allow a later task to start until the current task's validation steps are complete, and include explicit hold points that say so (e.g. "do not proceed until this passes", "do not start the next task until ...").
- Include Cursor Plan Frontmatter (Required) with
todos mirroring every checkbox under ## Execution Plan.
- Avoid filler sections and generic advice.
- When updating an existing plan, preserve completed work where possible and revise only what is still pending or invalidated.
Planning Workflow
Follow these phases in the order given when producing or revising a plan.
Gather Inputs
- Identify the user goal.
- Identify the relevant requirement documents.
- Identify the relevant technical specifications.
- Identify the current code, tests, and docs that will likely change.
- Identify missing information, assumptions, dependencies, and risks.
Define Scope and Constraints
Record the following:
- what must change
- what must not change
- required parity, compatibility, or migration constraints
- required test types
- completion criteria
Build the Execution Sequence
Order the plan as a sequence of tasks (phases of work).
Each task is self-contained and independently executable: it has its own discovery, implementation, and testing sub-sections so that the work in that task can be completed and validated without relying on later tasks.
Within each task, use this shape:
- Requirements and Specifications: include in the plan a list of the canonical requirement and spec documents for this task (so executors do not need to guess).
- Discovery steps: gather current implementation and context for this task (e.g. read the listed specs, inspect code and tests, identify gaps).
- Red phase: add or update specs and failing tests for this task.
- Green phase: implement the smallest change to make those tests pass.
- Refactor phase: refine implementation without changing behavior; keep tests green.
- Testing: validation gate for this task (targeted tests, lint, etc.); do not proceed until they pass.
- Closeout (Task N): generate a task completion report (what was done, what passed, any deviations or notes), then mark all completed steps in the plan with
- [x] as the last step in the task before starting the next task.
Add a final documentation and closeout task for cross-cutting docs and follow-up.
Add Mandatory Test Gates
The plan must explicitly require, within each task:
- spec or behavior definition updates before implementation (Discovery / Red)
- failing automated tests before code changes (Red)
- functional test coverage when behavior is user-facing or API-facing (Red)
- targeted validation in that task's Testing sub-section before moving to the next task
- closeout for each task: mark completed steps with
- [x] and generate a task completion report before starting the next task
- final verification in the last task (or a dedicated closeout task) before the plan is complete, including a final plan completion report
Update Plans Carefully
When updating an existing plan:
- read the whole current plan first
- keep completed items checked unless they are now invalid
- insert new steps at the correct point in sequence (within the right task and sub-section)
- update validation steps if scope or task boundaries changed
- ensure the revised plan still enforces task ordering and per-task validation
- update YAML
todos so it stays aligned with every checkbox line under ## Execution Plan
Default Plan Template
Use assets/plan-template.md unless the user asks for a different structure.
Read it before drafting, and follow its task shape: every task carries its own Requirements and Specifications list, Discovery steps, Red, Green, Refactor, Testing, and Closeout, so it can be executed and validated on its own.
After drafting the body, fill in todos so each entry's content matches one checkbox line in order (same specificity; do not shorten to vague summaries).
Set dependencies to chain linear steps (step N depends on step N-1) unless the user needs parallel tracks.
Quality Bar
Before finalizing a plan, verify that it:
- includes valid YAML frontmatter with
name, overview, and todos per Cursor Plan Frontmatter (Required)
- has one
todos entry per - [ ] / - [x] line under ## Execution Plan, in the same order, with ids and dependencies consistent with that sequence
- uses only flat checklist lines (no nested
- [ ] under another - [ ])
- is detailed enough for an executor to execute without guessing
- uses explicit step wording everywhere: no ambiguous shortcuts like "run all N tests" without naming which tests, files, or commands (see Explicit Step Wording (Required))
- includes in each task a Task N Requirements and Specifications list so executors do not need to guess (or calls out that they still need to be identified)
- includes BDD/TDD and functional testing where applicable
- gives each task its own Requirements and Specifications, Discovery steps, Testing, and Closeout (task completion report, then mark completed steps as the last step) so tasks are independently executable
- enforces validation within each task before the next task starts
- uses checkbox steps throughout the execution section
- stays concise and avoids unnecessary narrative
1---2name: detailed-execution-planner3description: Creates and updates detailed execution plans as markdown checklists. Use when the user asks to create, refine, expand, or update a plan. Invoke only when explicitly called by user. Intended only for Cursor (*.plan.md) or CAI plans.4---5# Detailed Execution Planner67## Skill Purpose89Write detailed execution plans that are specific, test-gated, and aligned with requirements and technical specifications.1011## Use This Skill When1213- The user asks to create a plan.14- The user asks to update or refine an existing plan.15- A task needs a step-by-step implementation sequence before coding starts.16- A workstream must explicitly follow BDD/TDD with functional testing.1718## Before Building Plan1920Ask the user detailed questions about anything on which you are not 100% certain.21Ask questions one at a time.22Continue asking questions until you are sure you have all needed information and there are zero ambiguities.2324## Cursor Plan Frontmatter (Required)2526Every generated plan **must** begin with YAML frontmatter that matches the **Cursor plan** shape so plans can be imported and tracked as todos.2728- `name`: short human-readable plan title (string).29- `overview`: multi-line summary of goal, scope, and approach (YAML `|` block string).30- `todos`: ordered list of steps; **one todo per execution step**, in the same order as the checklist under `## Execution Plan` (see below).3132Each todo entry must include:3334- `id`: stable unique id for that step (e.g. `my-plan-step-001`, incrementing).35- `content`: same intent as the matching markdown checkbox line; **must be as specific as the checkbox** (commands, paths, test names - not shortened into vague summaries).36- `status`: `pending` or `completed` (use `pending` for new plans unless the user marks work done).37- `dependencies`: optional; for a **linear** plan, each step after the first should list the **previous** step's `id` so ordering is explicit.38- For parallel work, use the same dependency pattern only when the user asks for it.3940### Synchronization Rule4142The number of items in `todos`, their order, and their meaning must match **every** `- [ ]` / `- [x]` line under `## Execution Plan` (only those lines; section headings are not steps).4344When you update the plan body, update `todos` in lockstep.4546## Flat Checklist Only: No Nested Step Bullets4748Use a **single flat list** of top-level checkboxes for all work.4950**Do not** nest checklist items under other checklist items.5152### Anti-Pattern Examples5354```markdown55- [ ] Higher-level step:56 - [ ] Sub-step 157 - [ ] Sub-step 258```5960### Preferred Pattern6162Split into separate top-level steps (same content, no hierarchy under a parent checkbox):6364```markdown65- [ ] Higher-level step - sub-step 1 (describe concrete action).66- [ ] Higher-level step - sub-step 2 (describe concrete action).67```6869Section headings (`###`, `####`) still group work; only the **checkbox list** stays flat.7071## Explicit Step Wording (Required)7273Every step (checkbox line and matching `todos[].content`) must be **specific enough that an executor never has to guess** what to run, open, or change.7475### What Each Step Must Name (When Applicable)7677- **Commands**: the exact invocation (e.g. `just e2e`, `go test ./package/...`, `npx markdownlint-cli2 path`), not "run tests" or "run the suite".78- **Scopes**: package paths, directories, or file globs (repo-relative paths in backticks).79- **Tests**: concrete test names, files, modules, tags, or BDD scenario titles - not "all tests", "the failing tests", or "all 3 tests" without naming which three.80- **Code or docs**: files or symbols to edit, or a clear discovery sub-step that lists them first.81- **Artifacts**: outputs to produce (e.g. report path, migration name) when the step is not obvious from the command alone.8283If the exact names are unknown at plan time, the step must say **how** they will be identified (e.g. "list failing tests from `go test ./...` output and add each as its own step in the next plan revision") - not leave a vague single step in place of that work.8485### Ambiguous Wording to Avoid8687- Steps that rely on unstated context: "Run all 3 tests", "run the new tests", "fix the handler", "update as needed".88- Counts or groups without identifiers: "run every E2E", "run the integration tests" (unless the repo has a single documented target and the step names it, e.g. `just integration`).8990### Explicit Wording for Steps9192Use imperative text plus **identifiers**: paths, commands, test IDs, or scenario names so the step is self-contained.9394## Core Rules95961. Treat requirements as the source of truth, then technical specs, then current implementation.972. Before planning, read the relevant requirements, tech specs, and implementation context.983. If requirements or specs are missing, ambiguous, or contradictory, stop and call out the gap.994. Write the plan in markdown, using **only top-level** `- [ ]` / `- [x]` lines for steps and headings to group them (see [Flat Checklist Only: No Nested Step Bullets](#flat-checklist-only-no-nested-step-bullets)).1005. Make the plan executable: each checkbox must be a concrete action with explicit scope, not a vague intention (see [Explicit Step Wording (Required)](#explicit-step-wording-required)).101 Prefer short, imperative step text that still names **what** and **where**, and be explicit about files, tests, commands, and artifacts.102 Vague phrases like "run all targeted tests" are not enough unless the plan already lists those targets by path or name.1036. Use BDD/TDD explicitly:104 - add or update behavior specs first105 - write failing tests before implementation106 - implement the smallest change to make tests pass107 - refactor only after tests are green1087. Include additional functional tests for user-facing or API-facing behavior.1098. **Task independence**: each task has its own Requirements and Specifications list, Discovery steps, and Testing, so tasks can be read and executed independently with all steps needed to complete that task.1109. Add validation gates after each task (within that task's Testing sub-section) and require them to pass before moving on.11110. Do not allow a later task to start until the current task's validation steps are complete, and include explicit hold points that say so (e.g. "do not proceed until this passes", "do not start the next task until ...").11211. Include [Cursor Plan Frontmatter (Required)](#cursor-plan-frontmatter-required) with `todos` mirroring every checkbox under `## Execution Plan`.11312. Avoid filler sections and generic advice.11413. When updating an existing plan, preserve completed work where possible and revise only what is still pending or invalidated.115116## Planning Workflow117118Follow these phases in the order given when producing or revising a plan.119120### Gather Inputs121122- Identify the user goal.123- Identify the relevant requirement documents.124- Identify the relevant technical specifications.125- Identify the current code, tests, and docs that will likely change.126- Identify missing information, assumptions, dependencies, and risks.127128### Define Scope and Constraints129130Record the following:131132- what must change133- what must not change134- required parity, compatibility, or migration constraints135- required test types136- completion criteria137138### Build the Execution Sequence139140Order the plan as a sequence of **tasks** (phases of work).141Each task is **self-contained** and independently executable: it has its own discovery, implementation, and testing sub-sections so that the work in that task can be completed and validated without relying on later tasks.142143Within each task, use this shape:1441451. **Requirements and Specifications**: include in the plan a list of the canonical requirement and spec documents for this task (so executors do not need to guess).1462. **Discovery steps**: gather current implementation and context for this task (e.g. read the listed specs, inspect code and tests, identify gaps).1473. **Red phase**: add or update specs and failing tests for this task.1484. **Green phase**: implement the smallest change to make those tests pass.1495. **Refactor phase**: refine implementation without changing behavior; keep tests green.1506. **Testing**: validation gate for this task (targeted tests, lint, etc.); do not proceed until they pass.1517. **Closeout (Task N)**: generate a **task completion report** (what was done, what passed, any deviations or notes), then mark all completed steps in the plan with `- [x]` as the **last step** in the task before starting the next task.152153Add a final **documentation and closeout** task for cross-cutting docs and follow-up.154155### Add Mandatory Test Gates156157The plan must explicitly require, **within each task**:158159- spec or behavior definition updates before implementation (Discovery / Red)160- failing automated tests before code changes (Red)161- functional test coverage when behavior is user-facing or API-facing (Red)162- targeted validation in that task's Testing sub-section before moving to the next task163- **closeout for each task**: mark completed steps with `- [x]` and generate a task completion report before starting the next task164- final verification in the last task (or a dedicated closeout task) before the plan is complete, including a final plan completion report165166### Update Plans Carefully167168When updating an existing plan:169170- read the whole current plan first171- keep completed items checked unless they are now invalid172- insert new steps at the correct point in sequence (within the right task and sub-section)173- update validation steps if scope or task boundaries changed174- ensure the revised plan still enforces task ordering and per-task validation175- update YAML `todos` so it stays aligned with every checkbox line under `## Execution Plan`176177## Default Plan Template178179Use [`assets/plan-template.md`](assets/plan-template.md) unless the user asks for a different structure.180Read it before drafting, and follow its task shape: every task carries its own Requirements and Specifications list, Discovery steps, Red, Green, Refactor, Testing, and Closeout, so it can be executed and validated on its own.181182**After drafting the body**, fill in `todos` so each entry's `content` matches one checkbox line in order (same specificity; do not shorten to vague summaries).183Set `dependencies` to chain linear steps (step N depends on step N-1) unless the user needs parallel tracks.184185## Quality Bar186187Before finalizing a plan, verify that it:188189- includes valid **YAML frontmatter** with `name`, `overview`, and `todos` per [Cursor Plan Frontmatter (Required)](#cursor-plan-frontmatter-required)190- has **one `todos` entry per** `- [ ]` / `- [x]` line under `## Execution Plan`, in the same order, with ids and dependencies consistent with that sequence191- uses **only flat** checklist lines (no nested `- [ ]` under another `- [ ]`)192- is detailed enough for an executor to execute without guessing193- uses **explicit step wording** everywhere: no ambiguous shortcuts like "run all N tests" without naming which tests, files, or commands (see [Explicit Step Wording (Required)](#explicit-step-wording-required))194- includes in each task a **Task N Requirements and Specifications** list so executors do not need to guess (or calls out that they still need to be identified)195- includes BDD/TDD and functional testing where applicable196- **gives each task its own Requirements and Specifications, Discovery steps, Testing, and Closeout** (task completion report, then mark completed steps as the last step) so tasks are independently executable197- enforces validation within each task before the next task starts198- uses checkbox steps throughout the execution section199- stays concise and avoids unnecessary narrative