skills/plan-builder/SKILL.md
Creates dependency-ordered, wave-grouped executable plans from a goal + context. Produces markdown plans with parallel execution waves compatible with plan-runner. Use when you need to break a goal into sequenced, atomic work items before execution.
npx skillsauth add preetamnath/agent-skills plan-builderInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Creates dependency-ordered, wave-grouped executable plans from a goal description. Produces markdown plans with [ ] checkboxes organized into parallel execution waves that plan-runner can execute.
When you have a goal (feature, migration, refactor, cleanup) and need to break it into sequenced work items before starting. Not for requirements gathering — use the interview-me skill first if the goal is vague.
Before doing any planning work, check that the premise is solid. For each of the four preflight questions below, evaluate three sources in order before deciding to ask:
| Source | What counts | Evidence required |
|---|---|---|
| A. Referenced artifact | User passed an explicit path to a meta/workflows/interviews/... file | The artifact answers the question concretely |
| B. In-conversation context | Prior messages in this thread already discussed it | Cite the specific exchange — no "I think we covered this" |
| C. Ask the user | Neither A nor B applies | Run the question via AskUserQuestion |
If any questions are satisfied via Source A or B, present a single confirmation gate before continuing: "I'm treating Q1, Q2, Q4 as already answered based on [artifact / our conversation about X]. Does this match, or should I re-ask any of them?" If the user wants to re-answer one, that question fires now.
interview-me.interview-me.grill-me.interview-me.A "weak" answer means the user genuinely doesn't know — not one where the user clarifies on a follow-up.
interview-me or grill-me).interview-me. If Q3 (load-bearing assumption) is among the weak answers, also tell the user: "After interview-me writes the artifact, follow with grill-me to pressure-test the assumption before re-invoking plan-builder." — interview-me alone doesn't pressure-test assumptions, so Q3's specialist signal must be preserved separately.When routing out, tell the user explicitly: "After [interview-me/grill-me] writes the artifact, re-invoke plan-builder with the artifact path."
Before planning, read:
Identify: what exists today, what needs to change, what's fixed vs flexible.
After reading context, determine whether there are multiple viable implementation paths.
Single obvious path — one natural way to implement given existing code and constraints. Note it briefly and skip to Step 3. Most tasks land here — don't force exploration when there's nothing to explore.
Multiple viable paths — genuinely different approaches with real tradeoffs. Spawn the propose-alternatives agent (located at agents/propose-alternatives.md) to produce an AlternativesOutput conforming to the schema in references/alternatives-schema.md. The parent owns the judgment call of whether multi-path applies; the agent owns the analysis.
Inputs to propose-alternatives:
Present the structured output to the user via AskUserQuestion. Include a recommended choice with reasoning, but flag if confidence is low or tradeoffs depend on priorities you don't know.
Do not proceed to Step 3 until the user selects an approach. If the user proposes a different approach not in your list, validate it against the constraints from Step 1. If feasible, adopt it. If not, explain why and re-ask.
After approach selection, produce a concrete technical design that separates architectural decisions (types, schemas, signatures) from execution sequencing (waves). Scale depth to scope — a single-endpoint change needs less detail than a full-stack feature.
Output (include only sections relevant to the goal):
Must NOT include: implementation logic, wave sequencing, test strategy.
Present to user via AskUserQuestion with options: "Approve structure", "Adjust". Recommended: "Approve structure". Do not proceed until approved. This becomes the reference for subagents during execution.
After the structure outline names specific components, schemas, and signatures, verify they exist as expected. Always run.
Launch 1–4 Sonnet subagents in parallel, split by topic:
| Area | When relevant | What to verify | |---|---|---| | UI components | Outline references specific UI components or libraries | Component exists, props match outline, composition constraints | | External APIs | Outline depends on external API data | API capabilities, available fields, rate limits, gotchas | | Extension/plugin targets | Outline includes extension or plugin work | Target capabilities and constraints | | Existing codebase patterns | Always | Patterns referenced in outline match what's in the codebase |
Each subagent returns: exists (yes/no), capabilities, constraints, gotchas.
If any subagent flags issues, present to user via AskUserQuestion with options:
Do not proceed to Step 5 until feasibility issues are resolved or explicitly accepted.
Break the goal into atomic items for the chosen approach. Each item should be:
For each item, determine:
Order items so dependencies are satisfied. Then group into waves:
Wave assignment rules:
Checkpoint: Present the wave-grouped item list to the user via the AskUserQuestion tool with options: "Approve and write plan", "Adjust items". Recommended: "Approve and write plan". Include item titles, file paths, wave assignments, and dependency links so the user can verify before the file is written.
Write a markdown file to meta/workflows/plans/plan-NNN-<topic-slug>.md. Create the directory if missing. Find the highest existing number in the directory and increment by 1 (start at 001 if empty). Tell the user the file path.
Retry case: When invoked from Step 8's retry loop on an existing plan, OVERWRITE the existing plan file at its current path. Do NOT increment NNN — preserve the original path so plan-runner consumes the correct artifact.
# Plan: [goal summary]
**Goal**: [1-2 sentence description]
**Criteria**: [acceptance criteria or success conditions — preserved from input for downstream review/fix]
**Created**: [date]
## Constraints
- [fixed boundaries, assumptions, out-of-scope items]
## Approach
[1-2 sentences: what approach was chosen and why. Omit this section entirely if there was only one obvious path.]
## Structure Outline
[Types, schemas, signatures produced in Step 3. Subagents reference this during execution.]
## Wave 1: [short description]
- [ ] **T1: [short title]**
- [what to change, which files, why]
- [ ] **T2: [short title]**
- [what to change, which files, why]
## Wave 2: [short description]
- [ ] **T3: [short title]**
- [what to change, which files, why]
- Depends on: T1
- [ ] **T4: [short title]**
- [what to change, which files, why]
- Must land together with: T5
- [ ] **T5: [short title]**
- [what to change, which files, why]
- Must land together with: T4
## Out of scope
- [things explicitly not included and why]
After Step 7 writes the plan file, spawn the reviewer agent (located at agents/reviewer.md) to audit it. Always runs.
Inputs to reviewer:
Combined criteria:
Semantic (does the plan deliver the goal?):
Mechanical (is the plan well-formed?):
Depends on: T3) points to an item that exists in an earlier wave.Reviewer tagging instruction: Instruct the reviewer to populate each finding's criterion field with the exact tag from above (e.g., M3 or S1). Step 8's dispatch logic depends on the prefix (M* → mechanical, S* → semantic). Findings without a recognized tag are treated as semantic by default.
Action table for findings:
| Finding type | Action |
|---|---|
| No findings | Append - Plan review: 0 findings — clean to the plan file footer. Proceed silently. |
| Mechanical defect (M*) | Plan-builder auto-edits the plan file to fix. Re-run reviewer once. If still failing, escalate via AskUserQuestion with options: "Edit plan manually and re-review", "Accept defect with risk note in plan footer", "Abort". |
| Semantic gap (S*) | Present to user via AskUserQuestion with options: "Add wave items to address gap" (loops to Steps 5–6 for the gap → Step 7 to rewrite the plan with merged item IDs → Step 8 to re-review; cap at 1 retry per gap), "Amend criteria header", "Accept and document as known gap" (adds ## Known Gaps section to the plan), "Abort". |
Cap mechanical auto-fix at 1 retry per finding.
Use stable IDs (T1, T2, ...) not ordinal positions. These survive edits, discoveries, and reordering. Reference dependencies by ID.
Depends on:, Must land together with:) in indented sub-bullets below. Why: keeps the toggleable substring (- [ ] **Tn: ...**) short and stable so plan-runner can flip checkboxes without editing wrapped description text.development
Judge whether a candidate fact earns a durable-doc line: keep only what a future agent would get the wrong answer without; cut anything derivable from code, setup, breadcrumb, or a restated default. TRIGGER when: user asks 'does this belong in CLAUDE.md / a rule / the docs', 'is this worth keeping/writing down', 'should this be a comment'; vetting or pruning a fact before it's filed or shaped.
testing
Audit one instruction file by composing the durable-instruction lenses over it — vet-fact (WORTH: does each fact earn a line?), place-fact (PLACE: is it in the right home?), tighten-instruction (SHAPE: tighten the line). Pick the subset the file needs: shape-only, worth+shape, or worth+place+shape. A misplaced fact can be relocated to its right home on your approval, or deferred for a durable-docs-update batch. TRIGGER when: user wants a skill file or durable doc (CLAUDE.md, a rule, ARCHITECTURE.md) audited for what to keep, where it belongs, and how it reads; user says 'refine/audit this file', 'prune and tighten this doc', 'what here is worth keeping'. For shape-only tightening, tighten-file is the leaner sibling.
development
Route a kept fact to its durable home by delivery trigger and most-local-wins — across in-file comment, nested CLAUDE.md, path-scoped rule, root CLAUDE.md, ARCHITECTURE.md, or a skill. TRIGGER when: user asks 'where should this go', 'which file/rule/home does this belong in', 'is this in the right place', 'should this be a pointer'; placing or re-homing a fact already judged worth keeping.
development
Sequence a locked spec into dependency-ordered, wave-grouped tasks. TRIGGER when: user says 'build the plan' or 'sequence this'; a spec needs slicing into parallel-safe waves.