skills/writing-plans/SKILL.md
Use when a spec or requirements exist for a multi-step task and an implementation plan needs to be written before touching code
npx skillsauth add sipengxie2024/superpower-planning writing-plansInstall 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.
Write comprehensive implementation plans assuming the engineer has zero context for our codebase and questionable taste. Document everything they need to know: which files to touch for each task, code, testing, docs they might need to check, how to test it. Give them the whole plan as bite-sized tasks. DRY. YAGNI. TDD. Frequent commits.
Assume they are a skilled developer, but know almost nothing about our toolset or problem domain. Assume they don't know good test design very well.
Announce at start: "I'm using the writing-plans skill to create the implementation plan."
Context: Optionally runs in a dedicated worktree (user chooses during brainstorming).
Save plans to: .planning/plan.md
If the spec covers multiple independent subsystems, stop and suggest splitting it into separate plans — one per subsystem. Each plan should produce working, testable software on its own.
Before defining tasks, map out which files will be created or modified and what each one is responsible for.
This file-structure pass should happen before task decomposition.
Before writing the plan, check for relevant historical archives:
${CLAUDE_PLUGIN_ROOT}/scripts/archive-search.sh "<keyword>"
summary.md, findings.md) and incorporate relevant lessons into the planEach step is one action (2-5 minutes):
Every plan MUST start with this header:
# [Feature Name] Implementation Plan
> **For Claude:** Execute this plan using the skill chosen during Execution Handoff (see end of plan).
> Planning dir: .planning/
**Goal:** [One sentence describing what this builds]
**Architecture:** [2-3 sentences about approach]
**Tech Stack:** [Key technologies/libraries]
---
### Task N: [Component Name]
**Files:**
- Create: `exact/path/to/file.py`
- Modify: `exact/path/to/existing.py:123-145`
- Test: `tests/exact/path/to/test.py`
- [ ] **Step 1: Write the failing test**
```python
def test_specific_behavior():
result = function(input)
assert result == expected
```
- [ ] **Step 2: Run test to verify it fails**
Run: `pytest tests/path/test.py::test_name -v`
Expected: FAIL with "function not defined"
- [ ] **Step 3: Write minimal implementation**
```python
def function(input):
return expected
```
- [ ] **Step 4: Run test to verify it passes**
Run: `pytest tests/path/test.py::test_name -v`
Expected: PASS
- [ ] **Step 5: Commit**
```bash
git add tests/path/test.py src/path/file.py
git commit -m "feat: add specific feature"
```
> **Note:** Log unexpected discoveries, technical decisions, and implementation insights to `.planning/findings.md` after each task.
Every step must contain the actual content an engineer needs. These are plan failures — never write them:
.planning/ DirectoryWhen writing a plan, automatically create the .planning/ directory if it does not already exist by running:
${CLAUDE_PLUGIN_ROOT}/scripts/init-planning-dir.sh
This creates progress.md and findings.md. The canonical template is at planning-foundation/templates/progress.md. Delegated role planning directories (agents/) are created when needed.
Note: The plan in
.planning/plan.mdis the single source of truth for plan content. Execution status is tracked via the Task Status Dashboard inprogress.md.
Every plan MUST include a parallelism analysis after the task list. Identify which tasks can run in parallel (no shared files, no sequential dependencies) and group them:
### Parallelism Groups
- **Group A** (parallel): Task 1, Task 2, Task 3
- **Group B** (after Group A): Task 4, Task 5
- **Group C** (after Group B): Task 6
**Parallelism score:** 3/6 tasks can run in parallel in the first group
Tips for maximizing parallelism:
The parallelism score helps the user choose the right execution mode.
After writing the complete plan, review it yourself with fresh eyes. This is a checklist you run inline — not delegated dispatch.
1. Spec coverage: Skim each section/requirement in the spec. Can you point to a task that implements it? List any gaps.
2. Placeholder scan: Search your plan for red flags — any of the patterns from the "No Placeholders" section above. Fix them.
3. Type consistency: Do the types, method signatures, and property names you used in later tasks match what you defined in earlier tasks? A function called clearLayers() in Task 3 but clearFullLayers() in Task 7 is a bug.
4. Evidence gaps: Are [NEEDS-EVIDENCE] items from the design tracked and properly timed in the Evidence Gap Summary?
If you find issues, fix them inline. No need to re-review — just fix and move on. If you find a spec requirement with no task, add the task.
Before writing tasks, scan the design doc (.planning/design.md) for all [NEEDS-EVIDENCE] markers. For each one:
Include an Evidence Gap Summary section in the plan:
### Evidence Gap Summary
| # | Decision | Evidence Needed | Timing | Task |
|---|----------|----------------|--------|------|
| 1 | ... | ... | Before impl | Task 0 |
| 2 | ... | ... | During impl | Task 3 |
If no [NEEDS-EVIDENCE] markers exist in the design, skip this section silently.
.planning/findings.md"After saving the plan and completing the self-review, you MUST present exactly these three options using AskUserQuestion. Do NOT omit, replace, or invent options. All three MUST always be shown regardless of your analysis.
Use AskUserQuestion with these exact options:
1. Claude Code Dynamic Workflow — Native workflow execution for large, parallel, or cross-checked work. Best when the plan has independent task groups, broad review/audit needs, or would otherwise require many Claude workers.
2. Codex-Driven (this session, sequential) — superpower-planning:subagent-driven-codex. Best when the user wants a second model to implement and review bounded tasks through Codex CLI.
3. Manual Batch Session — superpower-planning:executing-plans. Best when dynamic workflows are unavailable or the user wants explicit checkpoint summaries between batches.
Include your recommendation in the question text based on the logic below, but never remove options.
Recommendation logic (add "(Recommended)" to the best option's label):
If Claude Code Dynamic Workflow chosen:
.planning/plan.md (include the word "workflow" in the request so Claude writes one), or switch to /effort ultracode when the user wants automatic workflow orchestration..planning/design.md, .planning/plan.md, and .planning/findings.md as source context..planning/findings.md and .planning/progress.md.If Codex-Driven chosen:
superpower-planning:subagent-driven-codexIf Manual Batch Session chosen:
superpower-planning:executing-plansdata-ai
Use when about to claim work is complete, fixed, or passing, before committing or creating PRs.
data-ai
Use when executing implementation plans with parallel task groups or individual tasks too heavy for subagent context limits.
development
Use when implementing any feature or bugfix, before writing implementation code
data-ai
Use when executing an implementation plan in this session, sequentially, dispatching one Claude subagent per task with two-stage review.