From Superpowers
Creates executable implementation plans that break down designs into detailed tasks. This skill should be used when the user has completed a brainstorming design and asks to "write an implementation plan" or "create step-by-step tasks" for execution.
How this command is triggered — by the user, by Claude, or both
Slash command
/superpowers:SKILL design-folder-pathwriting-plans/Files this command reads when invoked
This command is limited to the following tools:
The summary Claude sees in its command listing — used to decide when to auto-load this command
# Writing Plans Create executable implementation plans that reduce ambiguity for whoever executes them — substantial Phase 1 → Phase 6 work, run wrapped in `/goal` (see below). ## Recommended: run wrapped in `/goal` **Launch it under Claude Code's built-in `/goal`** (v2.1.139+) so the run continues to a committed plan instead of stopping mid-phase: `/goal` is a **user-typed outer wrapper** (a skill cannot enable it for itself mid-run), and its evaluator judges only what Claude narrates in the transcript — phrase the condition against narrated output (the commit hash, the literal Phase...
Create executable implementation plans that reduce ambiguity for whoever executes them — substantial Phase 1 → Phase 6 work, run wrapped in /goal (see below).
/goalLaunch it under Claude Code's built-in /goal (v2.1.139+) so the run continues to a committed plan instead of stopping mid-phase:
/goal "Claude has narrated a successful plan commit (with commit hash) and reported the Phase 4 reflection sub-agent verdicts inline" /superpowers:writing-plans <design-path>
/goal is a user-typed outer wrapper (a skill cannot enable it for itself mid-run), and its evaluator judges only what Claude narrates in the transcript — phrase the condition against narrated output (the commit hash, the literal Phase 4 reflection summary), never filesystem state. Full semantics and condition phrasing: ../../skills/references/goal-wrapper.md.
Read bdd-specs.md from the resolved design folder. Count Scenario: occurrences. Bail out — do NOT decompose tasks — when EITHER:
bdd-specs.md < 3, OR2× BDD scenarios + 1 setup task, or prefer an explicit "Task Estimate" hint in the design _index.md)The OR-gate catches the "2 BDD + many setup tasks" shape an AND-gate lets through.
Bail-out response (output verbatim):
Design too thin for full task-decomposition pipeline (BDD < 3 OR estimated tasks < 5). Drafting a one-page lightweight plan inline instead. To force the full pipeline, re-invoke as
/superpowers:writing-plans --force <design-path>.
Then write a single _index.md (no per-task files, no Phase 4 reflection, no plan evaluator) and exit. The --force token (literal in $ARGUMENTS, case-sensitive, whole-token match) bypasses this check.
Read _index.md from the resolved design folder. Bail out — do NOT decompose tasks — when grep matches any of:
grep -nE "STATUS:.*NOT.JUSTIFIED|DESIGN-NOT-YET-JUSTIFIED|DESIGN-CONSIDERED-DEFERRED|DO NOT IMPLEMENT" "<resolved-design-folder>/_index.md"
This catches designs explicitly marked "not approved to advance" (full semantics: docs/retros/checklists/design-v1.md JUST-01; inciting case: docs/retros/2026-05-09-v3-considered-deferred.md).
On match, refuse deterministically (the marker is dispositive — do not interpret it away):
Refusing: <design-path>/_index.md:{N} is marked NOT-JUSTIFIED — '{matched text}'. Re-invoke /superpowers:brainstorming to revise the design, or pass --justify-override to bypass this gate.Override: Pass --justify-override (literal token in $ARGUMENTS, case-sensitive, whole-token match) to bypass this refusal and continue to First Action.
PROHIBITED: Do NOT conflate --force (bypasses the size gate only) with --justify-override (bypasses this justification gate only) — they are independent; --force on a thin design does not bypass a NOT-JUSTIFIED refusal.
$ARGUMENTS provides a path (e.g., docs/plans/YYYY-MM-DD-topic-design/), use it*-design/ folder whose basename sorts last under YYYY-MM-DD-*-design/ — highest date prefix in the name, not filesystem mtime: ls -1d docs/plans/*-design/ 2>/dev/null | sort | tail -1 (NOT ls -t — edited old folders outrank fresh ones by mtime). Use the result directly; do NOT pause to confirm.*-design/ folder exists in docs/plans/, refuse with: Refusing: no design folder found under docs/plans/. Run /superpowers:brainstorming first, or pass the design folder path explicitly. Then exit._index.md and bdd-specs.md. Consult the docs index before drafting: run bash "${CLAUDE_PLUGIN_ROOT}/lib/docs-index.sh" show <design-path>. If the status is expired:, REFUSE — output a one-line note citing the expired status and exit without creating a plan folder. Then consult memory: run bash "${CLAUDE_PLUGIN_ROOT}/lib/docs-index.sh" list --kind memory --status active and Read the top topically-relevant matches before Phase 1.bdd-specs.md completely. This is the source of truth for your tasks.Core Concept: Explicit over implicit, granular tasks, verification-driven, context independence.
MANDATORY: Unit-test tasks require external dependency isolation with test doubles (DB/network/third-party APIs). All other decomposition invariants are enforced by Phase 2 steps 1-7.
Define goal, architecture, constraints, and context.
bdd-specs.md from the design folder../references/structure-template.md to outline the plan.## Context in _index.md: why this work is needed (motivation, constraints, prior incidents); for existing-code changes add a current-state vs target-state comparison table (omit for greenfield work).## Global Constraints section in _index.md — the cross-task invariants every batch and every task must respect (these make parallel batches safe). One invariant per bullet, no prose; omit only when the design carries zero cross-cutting constraints (rare). Categories and examples: ./references/structure-template.md §Global Constraints.Break into small tasks mapped to specific BDD scenarios.
PROHIBITED: Do not ask the user to choose granularity, approve decomposition, or confirm the plan mid-process — apply steps 1-7 plus these additions automatically; Phase 4 reflection is the quality gate and the post-commit git show diff is the audit surface.
NNN before feature pairsbdd-specs.md, so the executor sees the complete scenario without switching files. Format: ./references/structure-template.md §BDD Scenario.npm test tests/login.spec.ts).task-NNN-<feature>-test) must precede its paired impl task (task-NNN-<feature>-impl) via depends-on.**depends-on** field listing only true technical prerequisites — tasks whose output is required before this task can start. PROHIBITED: chaining tasks just to impose execution order. Independence rules and examples: ./references/task-granularity-and-verification.md §Dependency Rules..md file per task. Filename pattern: task-<NNN>-<feature>-<type>.md (e.g. task-001-setup.md, task-002-feature-test.md / task-002-feature-impl.md — test and impl for the same feature share the NNN prefix; types: test, impl, config, refactor; full template: ./references/structure-template.md §Task Files).
task-001-setup is justified only when 2+ downstream tasks share its output; pseudo-independent setup tasks create false parallelism and inflate batch counts.## Interfaces section (after ## BDD Scenario) declaring the contracts this task exposes or consumes (function signatures, types, API endpoints, event names, CLI flags). depends-on-linked tasks connect through these blocks, so parallel batches can verify interface compatibility before merge.## Interfaces block define contracts, but never the body logic.Verify completeness, save, advance to Phase 4 in the same iteration.
docs/plans/YYYY-MM-DD-<topic>-plan/ folder.
_index.md MUST include "Execution Plan" section with inline YAML metadata_index.md MUST include "Task File References" section linking all task files_index.md MUST include "BDD Coverage" section confirming all scenarios are covered_index.md MUST include "Dependency Chain" section with visual dependency graph (will be populated in Phase 4)./references/structure-template.md §Execution PlanBefore committing, verify plan quality with parallel fresh sub-agents, each in an isolated context (no pollution from the main planning session).
Launch three sub-agents in parallel via the Agent tool, subagent_type=general-purpose (full prompt templates: ./references/reflection.md):
Additional sub-agents (launch as needed): Red-Green Pairing Review, File Conflict Review.
Integrate and Update:
_index.md "Dependency Chain"git show; do NOT pause for approvalOutput: Updated plan, dependency graph in _index.md, reflection summary inline — ready for Phase 5.
Mid-stream cancellation (only under /goal; user injects "abort"/"cancel"/"start over"): stop with a one-line note — no commit, no Phase 5; the user re-invokes with the new framing if they want to retry.
Multi-turn resumption (only when wrapped in /goal after an interrupted turn): do not restart from Phase 1 — Glob "docs/plans/*-plan/_index.md", read the in-progress plan folder, and resume at the phase the filesystem indicates: task files exist but _index.md lacks the YAML tasks: block or References/Coverage sections → Phase 3; _index.md complete but no "Dependency Chain" graph → Phase 4; plan complete, no commit → Phase 5; already committed → Phase 6.
The sub-agents are the sole plan-quality reviewer (no separate plan-mode evaluator; the user reviews post-commit via git show). They read docs/retros/checklists/plan-v{N}.md as their rubric. On any checklist-item FAIL, fix the offending plan files and rerun that sub-agent — do NOT commit a plan with an unaddressed FAIL.
Auto-seed checklist when missing: before spawning the reflection sub-agents, if no plan-v{N}.md exists, run bash "${CLAUDE_PLUGIN_ROOT}/lib/seed-checklists.sh" plan docs/retros/checklists/plan-v1.md (exit 0 = seeded, 3 = already exists → proceed, 1/2 = abort), then pass the resolved checklist path to each sub-agent prompt.
MUST: each reflection sub-agent prompt MUST include an instruction to read the resolved checklist file and apply each item as a binary PASS/FAIL rubric (the template in ./references/reflection.md §Checklist Binding carries this directive — do not strip it). A sub-agent without the checklist produces an unanchored opinion, not a verdict.
Commit the plan folder using git-agent (with git fallback).
Actions:
0. Upsert the plan into the docs index (before git add): run bash "${CLAUDE_PLUGIN_ROOT}/lib/docs-index.sh" upsert plan <new-plan-path> --status active --summary "<one-line>". CRITICAL do-not-defer — the index update lands in the same commit-group as the plan folder.
0.5. CRITICAL do-not-defer: Conditional memory-write step, gated on a Phase 4 sub-agent FAIL that required a fix-and-rerun (not a first-pass PASS) — if triggered, write docs/memory/pitfall_<slug>.md capturing the false-positive cause, then run bash "${CLAUDE_PLUGIN_ROOT}/lib/docs-index.sh" upsert memory docs/memory/pitfall_<slug>.md --status active --summary "<one-line>" --category pitfall. No-op if every sub-agent passed first try.
git add is denied by the git plugin's hook: git add docs/plans/YYYY-MM-DD-<topic>-plan/ && git-agent commit --no-stage --intent "add implementation plan for <topic>" --co-author "Claude <Model> <Version> <[email protected]>"--free flag/git:commit skill via the Skill tool; full ladder in ../../skills/references/git-commit.mdOutput:
Plan complete. To execute this plan, use
/superpowers:executing-plans.
PROHIBITED: Do NOT offer to start implementation directly.
Clear goal/constraints, decomposed tasks with file lists and verification, BDD steps, commit boundaries, no vague tasks, reflection complete with all FAILs addressed, git commit landed.
./references/structure-template.md - Plan and task file templates./references/task-granularity-and-verification.md - Task breakdown, verification, dependency rules./references/reflection.md - Sub-agent prompts for plan reflection../../skills/references/git-commit.md - Git commit patterns../../skills/references/goal-wrapper.md - /goal semantics and condition phrasing (shared)npx claudepluginhub daisycatts/dotclaude --plugin superpowers/SKILLEnables work verification for a task. Claude completes the work, verifies it, and appends a verified tag before session exit.
/SKILLResolves a GitHub issue by creating an isolated worktree, implementing a TDD fix, and opening a PR with auto-closing keywords.
/SKILLSurfaces the current session task from a state file and evaluates its clarity and completeness. Reports completion status or identifies remaining steps.