Skip to content
Development

Writing Plans: Turn a Spec into Bite-Sized Tasks

Turns a spec into a step-by-step implementation plan: exact files, signatures and tests, in small tasks. Plans an engineer can follow without guessing.

writing-plans/SKILL.md · English

SKILL.md preview

This is the exact file inside the .zip archive.
writing-plans/SKILL.md
---
name: writing-plans
description: Use when you have a spec or requirements for a multi-step task, before touching code. Produces an implementation plan of small tasks with exact files, interfaces and tests.
---

# Writing Plans

## Overview

Write implementation plans for an engineer who has not seen this codebase or this spec. Assume they write idiomatic code in the project's language once they know the exact interface and the exact test, and that they will make a reasonable choice wherever the plan leaves one open. What they cannot know is what you decided: which files, which names and signatures, which values from the spec, which tests prove each task. Document those. Give them the whole plan as bite-sized tasks. DRY. YAGNI. TDD. Frequent commits.

Save plans to `docs/plans/YYYY-MM-DD-<feature-name>.md` (the user's preferences for plan location override this default).

## Scope Check

If the spec covers several independent subsystems, suggest breaking it into separate plans, one per subsystem. Each plan should produce working, testable software on its own.

## File Structure

Before 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.

- Design units with clear boundaries and well-defined interfaces. Each file has one clear responsibility.
- 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.
- Files that change together should live together. Split by responsibility, not by technical layer.
- In an existing codebase, follow its established patterns. If a file you are modifying has grown unwieldy, including a split in the plan is reasonable.

## Task Right-Sizing

A task is the smallest unit that carries its own test cycle and is worth a fresh reviewer's gate. Fold setup, configuration, scaffolding and documentation steps into the task whose deliverable needs them. Split only where a reviewer could meaningfully reject one task while approving its neighbor. Each task ends with an independently testable deliverable.

## Step Granularity

Each step is one action with a checkable result:

- "Write the failing test": one step.
- "Run it and make sure it fails": one step.
- "Implement the minimal code to make it pass": one step.
- "Run the tests and make sure they pass": one step.
- "Commit": one step.

## Plan Document Header

Every plan starts with this header:

```markdown
# [Feature Name] Implementation Plan

**Goal:** [One sentence describing what this builds]

**Architecture:** [2-3 sentences about the approach]

**Tech Stack:** [Key technologies and libraries]

**Spec:** [Path to the spec or design doc this plan implements. The plan argues from the spec, so the spec travels with it.]

## Global Constraints

[The spec's project-wide requirements (version floors, dependency limits, naming and copy rules, platform requirements), one line each, with exact values copied verbatim from the spec. Every task's requirements implicitly include this section.]

## Review Focus

[The five input classes or failure modes the spec implies but no task's tests exercise, which are most likely to bite a real user. One line each, naming the input or condition and the behavior a reasonable person would expect, most likely first. The spec says what the software must do, not everything it will meet; its silence on an input is not permission for that input to break the program. Write the list once, with the spec in front of you. Then add the test that pins each line to the task that owns the code.]

---
```

## Task Structure

```markdown
### 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`

**Interfaces:**
- Consumes: [what this task uses from earlier tasks, with exact signatures]
- Produces: [what later tasks rely on: exact function names, parameter and return types. An implementer sees only their own task, so this block is how they learn the names and types of neighboring tasks.]

- [ ] **Step 1: Write the failing test**

    def test_specific_behavior():
        result = function(input)
        assert result == expected

- [ ] **Step 2: Run the test to verify it fails**

Run: `pytest tests/path/test.py::test_name -v`
Expected: FAIL with "function not defined"

- [ ] **Step 3: Implement `function(input: InputType) -> ResultType` in `exact/path/to/file.py`**

One line on the approach when the signature and the test leave a choice (which library call, which data structure). A code block only for an algorithm they do not determine.

- [ ] **Step 4: Run the test to verify it passes**

Run: `pytest tests/path/test.py::test_name -v`
Expected: PASS

- [ ] **Step 5: Commit**

Run: `git add tests/path/test.py src/path/file.py` then `git commit -m "feat: add specific feature"`
```

## What a Step Contains

A step is done when the implementer can write exactly one reasonable thing from it. That is the whole requirement: unambiguous, not complete. Each kind of step carries what makes it unambiguous and nothing more:

- **A test step:** the test's name and its assertions, as code, with the spec's exact values in them.
- **A code step:** the exact signature (name, parameters, return type), the file it lives in, and the specific values the spec pins. The implementer writes the body. A body appears only for an algorithm the signature and tests do not determine, or for exact copy the spec fixes.
- **A verification step:** the command to run and the output that means it passed.
- **A reference to another task:** that task's Interfaces block says what to use; the plan does not repeat that task's code.

A plan is the set of decisions the implementer cannot make alone. A plan longer than the code it describes has written the code instead. Lines that decide nothing ("TBD", "handle edge cases", "add appropriate validation", "write tests for the above", a type or function no task defines) are the opposite failure, and the self-review catches both.

## Self-Review

After writing the complete plan, look at the spec with fresh eyes and check the plan against it. This is a checklist you run yourself.

1. **Spec coverage:** skim each section and requirement of the spec. Can you point to a task that implements it? List any gaps.
2. **Step scan:** every step must let the implementer write exactly one reasonable thing, and no step may carry more than that. A line that decides nothing is a gap; a function body the signature and tests already determine is a transcript. Fix both.
3. **Type consistency:** do the types, method signatures and property names 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. **Review Focus:** for each input class or failure mode the spec implies, is there a task whose tests exercise it? The five uncovered ones most likely to bite a person go in the Review Focus section, and each line gets its test added to the owning task. An empty section means you checked and found none, not that you skipped the check.
5. **Proportion:** compare the plan's length to the spec's. A plan several times longer than the spec is a transcript of the program, not a plan. If code blocks are most of the document, replace bodies with signatures, test names and assertions, and check that each step is still unambiguous.

If you find issues, fix them inline and move on. If you find a spec requirement with no task, add the task.

## Handoff

After saving and self-reviewing the plan, link it for the user to read. Ask them to review it and confirm it captures what they want, and wait for that review before implementing. If no execution method has been chosen, offer two:

- **Task-by-task with independent review:** a fresh helper implements each task and a fresh reviewer checks it before the next one starts, then the whole branch is reviewed at the end. Most thorough, but costs a fresh context per task.
- **All in one session:** you implement every task yourself, then one fresh reviewer checks the whole branch. Cheapest and fastest, with no independent review until the end.

Recommend one of the two and give a one-sentence reason from the plan itself: how much the tasks depend on each other's interfaces, how many there are, and what a shipped mistake would cost.

---

## Author and license

- Author: Jesse Vincent (obra)
- License: MIT

Adapted version: references to extra files, other skills and the commands of the original repository were removed or rewritten.

```text
MIT License

Copyright (c) 2025 Jesse Vincent

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```

How to use it

Claude Pro / Desktop

  1. 1Click “Download .zip for Claude” on the skill page.
  2. 2Open Plugins and click “Add” → “Upload plugin” (in some versions: Customize → Skills → “+” → “Create skill” → “Upload a skill”).
  3. 3Select the .zip file. The skill turns on automatically when your request matches it.

Claude Code

  1. 1Download the .zip and unpack it.
  2. 2Move the folder to ~/.claude/skills/ (personal) or .claude/skills/ in your project.
  3. 3Restart Claude Code. The skill is picked up automatically.

ChatGPT · Gemini · YandexGPT · GigaChat

  1. 1Click “Copy system prompt”.
  2. 2Paste it into Custom Instructions, a custom GPT, a Gem or the system prompt of your assistant.
  3. 3Start a new chat and describe your task.

← Back to catalog