skills/planning/SKILL.md
Builds and stress-tests implementation plans in two modes. Create mode scans code and docs, asks one question at a time with a recommended answer, runs a blindspot pass when the user is new to the area, then writes a plan file. Review mode scores completeness, feasibility, scope, testability, risk, and assumptions, verifies checkable claims, and writes resolutions back until every dimension reaches 5/5. Use when asked to "create a plan", "plan this feature", "I want to build X", "grill me", "think this through", "blindspot pass", "unknown unknowns", "this is new to me", "review my plan", "rubber duck this", "stress test this plan", "is this plan ready", "get this plan to 5/5", "what am I missing", "verify this claim", "prove this plan", "fact-check this plan", or when the user explicitly wants a plan artifact before implementation. For code review use pr-reviewer; for architecture briefs use define-architecture.
npx skillsauth add mblode/agent-skills planningInstall 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.
Build a plan by collaborative interrogation, then stress-test it adversarially, before coding. The deliverable is always a plan file, never code.
pr-creator), reviewing a code diff (use pr-reviewer), or writing an architecture brief (use define-architecture).Pipeline position: planning (create then review) -> implementation -> pr-reviewer -> pr-creator -> pr-babysitter.
Auto-detect; ask only if genuinely ambiguous:
pr-reviewer.Create hands off to Review; a plan is not ready for implementation until Review passes.
Use these to cut scope, sequence work, and challenge the plan. Turn each into a plan edit; never cite slogans.
Conflict rule: current requirements win first. Then as simple as possible, no simpler bounds KISS and YAGNI; duplication over wrong abstraction bounds DRY; tracer bullet beats horizontal foundation work unless the project cannot run without that foundation.
| File | Mode | Read when |
|------|------|-----------|
| references/interrogation-protocol.md | Create | Create Step 2: question decision tree, blindspot pass, reference-as-spec, recommended-answer format, fuzzy-term patterns, anti-rationalization table |
| references/doc-grounding.md | Create | Create Step 1, when design docs, RFCs, ADRs, or library/API docs are relevant: find them, extract the decisions they encode, grill the rationale |
| references/html-question-form.md | Create | Create Step 2, optional: batched HTML question form for large or greenfield specs instead of one-at-a-time chat |
| references/plan-quality-rubric.md | Review | Review Step 2 triage: 1-5 scoring criteria per dimension |
| references/questioning-framework.md | Review | Review Step 3: question templates and pushback patterns per dimension |
| references/dialogue-examples.md | Review | Before the Review dialogue: tone calibration, and the Verify move's claim/evidence/verdict block worked through |
| references/claim-verification.md | Review | When a claim is checkable against local code, docs, or specs, or the user asks to verify one |
Create progress:
- [ ] Step 1: Understand intent (read the request, scan code and docs, state findings)
- [ ] Step 2: Interrogate (one question at a time; end with the "radically simpler?" challenge)
- [ ] Step 3: Synthesize (write the plan file, format matched to scope)
- [ ] Step 4: Validate (run the four checks, emit the validation block)
- [ ] Step 5: Hand off to Review mode
Before asking, scan code and docs:
references/doc-grounding.md to find docs and extract their decisions and rationale.State findings in 2-3 sentences before the first question.
Load references/interrogation-protocol.md. Ask ONE question at a time. Every question carries a recommended answer grounded in Step 1: name the file, function, approach.
references/interrogation-protocol.md.Budget: 5-10 questions, then synthesize. Needing more than 10 is evidence the scope is too big for one plan; propose a split instead of continuing to ask.
Mandatory scope challenge (before synthesizing): ask "What can we cut without dropping a current requirement?" Carry a recommended cut list: removed extension points, setup collapsed into the first vertical slice, new code or dependencies a higher ladder rung already covers, abstractions kept only when they protect a shared invariant/owner/lifecycle, and safety gates preserved where "simpler" would drop correctness. Challenge the sum of the plan, not each piece.
Batch mode (optional): for large or greenfield specs with many independent questions, generate one local HTML form. Load references/html-question-form.md for the template and batch-vs-sequential table. Default to one-at-a-time when answers should shape later questions.
Escape hatch: if the user says "just write the plan", push back once via the anti-rationalization table, then respect their call and skip to Step 3.
Write the plan file to the active agent's native plan directory when one exists; otherwise to the user-specified path or the repo-local plan location set by project instructions. Match format to scope.
Lightweight (single file, clear approach): # Title, ## Context (one paragraph), ## Approach.
Standard (multiple files, decisions made): # Title, ## Context (problem, what prompted it, intended outcome), ## Approach (recommended only), ## Key decisions (brief rationale), ## Files to modify (grouped by purpose), ## Out of scope (related-looking things that must not change, each with a reason), ## Verification (each item a command plus expected result).
Order volatile-first: within Approach, Key decisions, and Files to modify, lead with the decisions the user is most likely to tweak (data model changes, new type interfaces, user-facing flows) and sink mechanical refactoring detail to the bottom. A reviewer should be able to stop reading once the tweakable decisions look right.
Keep plans scannable yet executable without re-reading the conversation. Record only the chosen approach; rejected alternatives become one-line rationale under Key decisions.
Handoff plans: when another agent or session will execute, the executor has not seen this conversation. Inline any code excerpts and conventions it needs (with file:line markers), and add a STOP conditions section: assumptions that, if false, mean stop and report back rather than improvise.
Name an implementation-notes file next to the plan and instruct the executor to keep it: every deviation the code forced on the plan gets logged under a ## Deviations heading as what the plan said, what the code required, and which option was taken. A deviation that is not a STOP condition never pauses the work; take the conservative option, log it, keep going. The notes file is what review reads afterwards, so a handoff without one loses every decision made during execution.
Fix failures in the plan directly; don't reopen the interrogation.
Then emit the validation block. Every row cites the plan section that satisfies its check, so a check with nothing to cite is a failure to fix before reporting rather than a claim to assert:
PLAN VALIDATION: <path>
Answers the request <section stating the intended outcome>
Answers landed <n of n interrogation answers; name any dropped>
Scope gate <section carrying the cut list; principles checked>
Assumptions explicit <section, or "none found">
Verification <the plan's Verification commands, copied>
Lightweight plans have no Verification section; cite the one check that proves the approach instead.
Offer Review: "Plan written to <path>. Stress-test it to 5/5 before implementation?"
Objective: drive all six dimensions to 5/5. Work each sub-5 dimension upward, re-scoring each round, until all are 5/5 or provably stalled on a decision only the user can make.
Review progress:
- [ ] Step 1: Load the plan
- [ ] Step 2: Triage: verify checkable claims, score all six dimensions
- [ ] Step 3: Rubber duck loop: drive each dimension <5 to 5/5 (max 2 pushes per question)
- [ ] Step 4: Re-score after each dimension; repeat the sweep until all 5/5 or stalled
- [ ] Step 5: Gap summary (before/after scores + residual blockers)
- [ ] Step 6: Confirm the plan file contains every resolution and unresolved annotation
If the user gives a path, read it. Otherwise list the active agent's native plan directory by modification time, pick the most recent, and confirm. Read the full plan; note its goal, structure, length. If it is a diff or code, stop and route to pr-reviewer.
Load references/plan-quality-rubric.md. Silently score each of the six dimensions 1-5. While scoring, mark every claim checkable against local code, docs, or specs; verify the load-bearing ones now (load references/claim-verification.md) and fold the verdicts into the scores. Never spend a dialogue turn on what the codebase can answer.
Output a triage table:
PLAN TRIAGE:
Completeness ███░░ 3/5 Missing error handling, no rollback
Feasibility ████░ 4/5 One unproven dependency
Scope ██░░░ 2/5 Premature abstractions
Testability █░░░░ 1/5 No verification strategy
Risk ███░░ 3/5 Blast radius unclear
Assumptions ██░░░ 2/5 Three unstated assumptions
State: "I'll work each dimension up to 5/5, starting with the weakest." If more than 3 dimensions start at 1-2, the plan needs rewriting, not review: switch to Create mode instead of grinding the loop.
Load references/questioning-framework.md and references/dialogue-examples.md. Each round:
references/claim-verification.md, gather evidence, quote the authoritative doc, return VERIFIED / NOT VERIFIED / INCONCLUSIVE, then continue informed. Prefer VERIFY over asking when evidence can settle it.Stay on the same dimension until it reaches 5/5 or stalls, then move to the next-lowest below 5.
Stall rule: after 2 pushes without a 5/5 answer, propose a concrete fix to accept or reject. If accepted, write it in and re-score. If the user defers, record what blocks 5/5 and move on. Don't keep re-asking in different words.
After each dimension closes or stalls, re-render the triage table so the climb is visible. Sweep again over any dimension below 5. The loop ends when all six are 5/5, the user invokes the escape hatch, or a full sweep makes no progress (summarize what blocks 5/5 and stop).
Lead with the final triage table (before and after). List residual gaps in three tiers; if every dimension reached 5/5, say so and leave "Must address" empty.
## Plan Review
### Must address before implementation
- [SCOPE] `## Data Migration`: no incremental path; what if migration fails halfway?
Resolved: NO
### Should address soon
- [ASSUMPTION] Plan assumes API rate limits won't be hit at projected scale
Resolved: YES (user confirmed 80/min is within the 100/min limit with headroom)
### Noted for awareness
- [RISK] Single dependency on third-party service with no fallback
Resolved: NO
Plan edits happen incrementally during the loop; this final pass confirms the file is the deliverable: every resolution inline where its gap was identified; every stalled dimension carries a <!-- UNRESOLVED: what blocks 5/5 --> comment; a Review Notes section appended with before/after triage scores and the date. Do not ask permission to edit; updating the plan is the point. If the plan arrived as pasted text with no file, output the full updated plan in a code block and offer to write it to the active agent's native plan directory or a user-specified path.
Pipeline: planning -> implementation -> pr-reviewer -> pr-creator -> pr-babysitter.
pr-reviewer: code review after implementation; route here the moment the input is code, not a plan.pr-creator: opens the PR once the plan is implemented.define-architecture: architectural decisions that feed into plans.development
Fans out four concurrent review agents over the current diff, then APPLIES fixes directly to the working tree and verifies the build. Mutates code; it does not produce a report. Covers reuse (duplicate logic, hand-rolled stdlib, reinvented platform features), quality (hacky patterns, React/TypeScript hygiene, over-memoisation, exhaustive-deps, `any`, dead code, `CLAUDE.md`/`AGENTS.md` violations), efficiency (unnecessary work, missed concurrency, hot-path bloat), and test discipline (bug fixes without a repro test, useless tests to delete, missing tests only when they prevent a named failure). Use when the user says "tidy this up", "simplify", "clean up this diff", "polish my changes", "check for duplication", or "any reuse opportunities?", i.e. when the intent is to have the changes made automatically. For a read-only report that lists findings without touching files, use `pr-reviewer` instead. This skill edits code; for the PR's title, description, or commit history, use `pr-creator`.
development
Decides what an interface should do before UI is built or audited: interaction choice, action scope and consequence, reachable states, resilience, and accessibility as task completion. Works from a brief, spec, mockup, intent, or existing UI. Use when asked "is this the right interaction", "design the flow", "what control should this use", "what should this action affect", "which states should this have", "make this resilient", or "what breaks here". For building or styling use ui-design; for built-code audits use ui-audit; for copy wording use copywriting.
tools
Audits the smallest relevant developer-facing surface of a library, CLI, SDK, or npm package across API contracts, errors, CLI behavior, public types, onboarding, and config. Uses candidate-first rule loading, bounded local evidence, and compact root-cause findings. Use when asked to "audit my CLI", "make this CLI agent-friendly", "is this API ergonomic", "review the developer experience", "improve these errors", "simplify first run", or "review my SDK". For end-user UI use ui-audit, for agentic-app trust use ax-audit, for docs prose use docs-writing, for README work use readme-creator, and for repo architecture use define-architecture. Inside a product that also ships a UI, this is the skill for the developer-facing half, so pick it when the complaint is about an import, command, error string, exported type, or config rather than a screen.
tools
Reviews the local diff or branch and returns a read-only, severity-tiered findings report. Modes cover standard bugs, structural quality, AI slop, and security audit. Use when asked to run /pr-reviewer, "review my changes", "code review", "thermo-nuclear review", "structural review", "deslop this", "clean up AI code", "security audit", "find vulnerabilities", or before commit, push, or handoff. For fixes use tidy; for PR creation use pr-creator; for CI or review comments use pr-babysitter; for frontend UX, accessibility, layout, state coverage, or rendered quality use ui-audit; for library, CLI, or SDK developer experience use dx-audit; for folder structure and module boundaries outside a diff use define-architecture; for plans use planning.