Skills · Content & docs

Writing Plans

Unverified31/40

Use when you have a spec or requirements for a multi-step task, before touching code

Originally by obra · MIT

Claude CodePartialHas SKILL.md but declares no allowed-tools — Claude Code will ask for permission each time
Cursor·UnknownWe have not crawled the repo tree, so we will not guess
Codex·UnknownWe have not crawled the repo tree, so we will not guess
Gemini CLI·UnknownThe spec defines no detection rule for Gemini
Copilot·UnknownWe have not crawled the repo tree, so we will not guess
npx agentalley add writing-plans

This command does not work yet — the CLI is still being built. Until then, use Raw in the reader below to take the file.

Who is stuck, and on what

Use when you have a spec or requirements for a multi-step task, before touching code

The whole source

No sign-in, no blur, nothing truncated
writing-plans/SKILL.md172 lines6.9 KBRawView on GitHub
Frontmatter — 2 properties
namewriting-plans
descriptionUse when you have a spec or requirements for a multi-step task, before touching code
1---
2name: writing-plans
3description: Use when you have a spec or requirements for a multi-step task, before touching code
4---A5No allowed-tools declared — no way to tell what this skill may touch
5 
6# Writing Plans
7 
8## Overview
9 
10Write 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.
11 
12Assume 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.
13 
14**Announce at start:** "I'm using the writing-plans skill to create the implementation plan."
15 
16**Context:** If working in an isolated worktree, it should have been created via the `superpowers:using-git-worktrees` skill at execution time.
17 
18**Save plans to:** `docs/superpowers/plans/YYYY-MM-DD-<feature-name>.md`
19- (User preferences for plan location override this default)
20 
21## Scope Check
22 
23If the spec covers multiple independent subsystems, it should have been broken into sub-project specs during brainstorming. If it wasn't, suggest breaking this into separate plans — one per subsystem. Each plan should produce working, testable software on its own.
24 
25## File Structure
26 
27Before defining tasks, map out which files will be created or modified and what each one is responsible for. This is where decomposition decisions get locked in.
28 
29- Design units with clear boundaries and well-defined interfaces. Each file should have one clear responsibility.
30- You reason best about code you can hold in context at once, and your edits are more reliable when files are focused. Prefer smaller, focused files over large ones that do too much.
31- Files that change together should live together. Split by responsibility, not by technical layer.
32- In existing codebases, follow established patterns. If the codebase uses large files, don't unilaterally restructure - but if a file you're modifying has grown unwieldy, including a split in the plan is reasonable.
33 
34This structure informs the task decomposition. Each task should produce self-contained changes that make sense independently.
35 
36## Task Right-Sizing
37 
38A task is the smallest unit that carries its own test cycle and is worth a
39fresh reviewer's gate. When drawing task boundaries: fold setup,
40configuration, scaffolding, and documentation steps into the task whose
41deliverable needs them; split only where a reviewer could meaningfully
42reject one task while approving its neighbor. Each task ends with an
43independently testable deliverable.
44 
45## Bite-Sized Task Granularity
46 
47**Each step is one action (2-5 minutes):**
48- "Write the failing test" - step
49- "Run it to make sure it fails" - step
50- "Implement the minimal code to make the test pass" - step
51- "Run the tests and make sure they pass" - step
52- "Commit" - step
53 
54## Plan Document Header
55 
56**Every plan MUST start with this header:**
57 
58```markdown
59# [Feature Name] Implementation Plan
60 
61> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
62 
63**Goal:** [One sentence describing what this builds]
64 
65**Architecture:** [2-3 sentences about approach]
66 
67**Tech Stack:** [Key technologies/libraries]
68 
69**Spec:** [path to the spec/design doc this plan implements — the plan
70argues from the spec, so the spec travels with it; executors read both]
71 
72## Global Constraints
73 
74[The spec's project-wide requirements — version floors, dependency limits,
75naming and copy rules, platform requirements — one line each, with exact
76values copied verbatim from the spec. Every task's requirements implicitly
77include this section.]
78 
79---
80```
81 
82## Task Structure
83 
84````markdown
85### Task N: [Component Name]
86 
87**Files:**
88- Create: `exact/path/to/file.py`
89- Modify: `exact/path/to/existing.py:123-145`
90- Test: `tests/exact/path/to/test.py`
91 
92**Interfaces:**
93- Consumes: [what this task uses from earlier tasks — exact signatures]
94- Produces: [what later tasks rely on — exact function names, parameter
95 and return types. A task's implementer sees only their own task; this
96 block is how they learn the names and types neighboring tasks use.]
97 
98- [ ] **Step 1: Write the failing test**
99 
100```python
101def test_specific_behavior():
102 result = function(input)
103 assert result == expected
104```
105 
106- [ ] **Step 2: Run test to verify it fails**
107 
108Run: `pytest tests/path/test.py::test_name -v`
109Expected: FAIL with "function not defined"
110 
111- [ ] **Step 3: Write minimal implementation**
112 
113```python
114def function(input):
115 return expected
116```
117 
118- [ ] **Step 4: Run test to verify it passes**
119 
120Run: `pytest tests/path/test.py::test_name -v`
121Expected: PASS
122 
123- [ ] **Step 5: Commit**
124 
125```bash
126git add tests/path/test.py src/path/file.py
127git commit -m "feat: add specific feature"
128```
129````
130 
131## No Placeholders
132 
133Every step must contain the actual content an engineer needs. These are **plan failures** — never write them:
134- "TBD", "TODO", "implement later", "fill in details"
135- "Add appropriate error handling" / "add validation" / "handle edge cases"
136- "Write tests for the above" (without actual test code)
137- "Similar to Task N" (repeat the code — the engineer may be reading tasks out of order)
138- Steps that describe what to do without showing how (code blocks required for code steps)
139- References to types, functions, or methods not defined in any task
140 
141## Self-Review
142 
143After writing the complete plan, look at the spec with fresh eyes and check the plan against it. This is a checklist you run yourself — not a subagent dispatch.
144 
145**1. Spec coverage:** Skim each section/requirement in the spec. Can you point to a task that implements it? List any gaps.
146 
147**2. Placeholder scan:** Search your plan for red flags — any of the patterns from the "No Placeholders" section above. Fix them.
148 
149**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.
150 
151If 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.
152 
153## Execution Handoff
154 
155After saving the plan, offer execution choice:
156 
157**"Plan complete and saved to `docs/superpowers/plans/<filename>.md`. Two execution options:**
158 
159**1. Subagent-Driven (recommended)** - I dispatch a fresh subagent per task, review between tasks, fast iteration
160 
161**2. Inline Execution** - Execute tasks in this session using executing-plans, batch execution with checkpoints
162 
163**Which approach?"**
164 
165**If Subagent-Driven chosen:**
166- **REQUIRED SUB-SKILL:** Use superpowers:subagent-driven-development
167- Fresh subagent per task + two-stage review
168 
169**If Inline Execution chosen:**
170- **REQUIRED SUB-SKILL:** Use superpowers:executing-plans
171- Batch execution with checkpoints for review
172 

Reviews

Installed this one?Write the first review and take the Trailblazer badge.

Reviews only open after a real install, so this is empty — and we leave it empty rather than invent one.

Alternatives

Also in Content & docs