agentleFS
REPOZYREPOZY/superpowers-optimized/skills/writing-plans/SKILL.md

writing-plans

Skill146 starsChanged 7 months agoMITView on GitHub

MUST USE after design approval to decompose requirements into executable task plans with verification commands and TDD ordering. Triggers on: "write a plan", "break this down", "plan the implementation", after brainstorming approval. Routed by brainstorming as the next step.

187 other projects use a version of this, 75 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use chinese-code-review, chinese-commit-conventions and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • Leodorareluctant259Skill

    chinese-code-review

    中文代码审查规范——在保持专业严谨的同时,用符合国内团队文化的方式给出有效反馈

    Also in 8 projects that use this

  • Leodorareluctant259Skill

    chinese-commit-conventions

    中文 Git 提交规范 — 适配国内团队的 commit message 规范和 changelog 自动化

    Also in 8 projects that use this

  • ryanportfolioSkill

    addskill

    Create, import, update, or install repo or personal skills: runtime ownership, resources, discovery checks.

    Also in 6 projects that use this

  • ryanportfolioSkill

    apply-firmware

    Bring current folder (plain folder, existing repo, old or partial firmware copy) up to full Harness Firmware in place. Mirror external repo → adopt-repo.

    Also in 6 projects that use this

  • +2 more from Leodorareluctant259
  • +6 more from ryanportfolio

The file

Show its rules and text

We split this skill into the rules it gives an agent

19 rules. 0 are common, 17 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 169 edited versions we read keep these.

  • 17

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create an implementation plan another agent can execute with minimal ambiguity.

    line 12
  2. Distinctive:

    If the spec covers multiple independent subsystems, it should have been broken into sub-project specs during brainstorming.

    line 51
  3. Distinctive:

    Before defining tasks, map out which files will be created or modified and what each one is responsible for.

    line 55
  4. Distinctive:

    Prefer smaller, focused files over large ones that do too much — you reason best about code you can hold in context at once, and your edits …

    line 58
  5. Distinctive:

    Keep tasks independent when possible.

    line 66
  6. Distinctive:

    Keep each step to one action with a checkable result.

    line 67
  7. Distinctive:

    Use exact file paths.

    line 68
  8. Distinctive:

    Use TDD ordering when code behavior changes.

    line 70
  9. Distinctive:

    No vague steps like "update logic".

    line 142
  10. Distinctive:

    No hidden dependencies between distant tasks.

    line 143
  11. Distinctive:

    Call out migrations, feature flags, and rollback checks when relevant.

    line 144
  12. Distinctive:

    Prefer small vertical slices over large horizontal phases.

    line 145
  13. Distinctive:

    After writing the complete plan, look at the spec with fresh eyes and check the plan against it.

    line 149
  14. Distinctive:

    5. Scope-reduction scan: Search the plan for: "v1", "basic", "simple", "for now", "placeholder", "initial version", "minimal".

    line 159
  15. Distinctive:

    If you find issues, fix them inline.

    line 163
  16. Distinctive:

    After saving the plan and completing self-review, auto-select the execution approach using the logic below, then output the ready message …

    line 167
  17. Distinctive:

    Stop here: Do not invoke any execution skill until the user replies.

    line 182
  18. Very specific:

    REQUIRED SUB-SKILL: Use superpowers-optimized:subagent-driven-development

    line 187
  19. Very specific:

    REQUIRED SUB-SKILL: Use superpowers-optimized:executing-plans

    line 191

“Common” is measured: kept by at least 6 in 10 of the 169 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Writing Plans

Create an implementation plan another agent can execute with minimal ambiguity.

Write 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 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. The plan records those decisions. It is not a transcript of the code.

Output Path

Save to docs/plans/YYYY-MM-DD-<feature-name>.md.

  • User preferences for plan location override this default.

Plan Header

# <Feature Name> Implementation Plan

> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers-optimized:subagent-driven-development (recommended) or superpowers-optimized:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.

**Goal:** <single sentence>
**Architecture:** <2-4 sentences>
**Tech Stack:** <languages/libraries/tools>
**Spec:** <path to the design doc this plan implements, or `none` if there isn't one. The plan argues from the spec, so the spec travels with it — executors read both, and plan conflicts resolve against the spec.>
**Assumptions:** <list the key assumptions this plan rests on. For each, state what it excludes: "Assumes X — will NOT work if Y."> *(skip only if the plan contains zero conditional logic)*

## Global Constraints

<The project-wide requirements every task is bound by — version floors, dependency limits, naming and copy rules, platform requirements, exact values — one line each, copied verbatim from the spec. Every task's requirements implicitly include this section. Write `none` if there genuinely are none.>

## Review Focus

<Up to five input classes or failure modes the spec implies but no task's tests exercise — the ones most likely to bite a real user, most likely first. One line each: name the input or condition, and the behavior a reasonable person would expect.

A spec is a vision document. It says what the software must do; it does not enumerate every input the software will meet, and its silence about an input is not permission for that input to crash the program.

Write this list once, with the spec in front of you. Then, for each line, add the test that pins it to the task that owns that code, in that task's own step style. An empty section means you checked and found none — not that you skipped the check.>

---

Scope Check

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

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 should have one clear responsibility.
  • Prefer smaller, focused files over large ones that do too much — you reason best about code you can hold in context at once, and your edits are more reliable when files are focused.
  • Files that change together should live together. Split by responsibility, not by technical layer.
  • 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.

This structure informs the task decomposition. Each task should produce self-contained changes that make sense independently.

Task Rules

  • Keep tasks independent when possible.
  • Keep each step to one action with a checkable result.
  • Use exact file paths.
  • Include exact verification commands and expected outcomes.
  • Use TDD ordering when code behavior changes.
  • For ambiguous features, ask clarifying questions before finalizing the plan rather than guessing.

Task Template

### Task N: <Name>

**Files:**
- Create: `<path>`
- Modify: `<path>`
- Test: `<path>`

**Interfaces:**
- Consumes: *(exact signatures this task uses from earlier tasks — function names, parameter and return types. Write `nothing` if it stands alone.)*
- Produces: *(exact signatures later tasks will rely on. Write `nothing` if no later task builds on this.)*

*This block is not optional bookkeeping. An implementer dispatched by `subagent-driven-development` sees only its own task text — never the plan, never its neighbours. This block is the only way it learns the names and types the tasks around it use. Omit it and the implementer invents a plausible name, which the next task then fails to import.*

**Security flag:** `none` *(set to `security` if this task handles auth, credentials, input validation, permissions, crypto, or data access boundaries — triggers pre-implementation security review before the implementer is dispatched)*

**Does NOT cover:** *(required when this task adds a condition, gate, trigger, or any "when X do Y" logic — state the scenarios the condition excludes. If an excluded scenario should be covered, revise this task before implementing.)*

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

```<lang>
<the test's name and its assertions, with the spec's exact values>
```

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

Run: `<command>`
Expected: FAIL with "<expected failure reason>"

- [ ] **Step 3: Implement `<exact signature>` in `<path>`**

<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 test to verify it passes**

Run: `<command>`
Expected: PASS

- [ ] **Step 5: Commit**

```bash
git add <files>
git commit -m "<message>"
```

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.
  • A content step (config, data, prose — including skill, doc, and manifest files): the exact text to write, or the exact before/after of the edit. There is no signature to derive it from, so the text itself is the decision.
  • 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. Never write "similar to Task N" or "same pattern as Task N" — the implementer sees only its own task brief, so a pointer to another task points at nothing. If two tasks share a pattern, state it in each.

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: that code was never run, and an implementer told to follow the plan will copy its bugs faithfully.

Lines that decide nothing are the opposite failure — never write them:

  • "TBD", "TODO", "implement later", "fill in details"
  • "Add appropriate error handling" / "add validation" / "handle edge cases"
  • "Write tests for the above" (without the test names and assertions)
  • References to types, functions, or methods not defined in any task

Quality Bar

  • No vague steps like "update logic".
  • No hidden dependencies between distant tasks.
  • Call out migrations, feature flags, and rollback checks when relevant.
  • Prefer small vertical slices over large horizontal phases.

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 — not a subagent dispatch.

1. Spec coverage: Skim each section/requirement in 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. Content steps are exempt from the transcript check — their exact text is the decision.

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. Check this against the Interfaces blocks: every name in a task's Consumes list must appear verbatim in some earlier task's Produces list.

4. Review Focus coverage: 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 user go in the Review Focus section, and each line there gets its test added to the owning task. An empty section means you checked and found none.

5. Scope-reduction scan: Search the plan for: "v1", "basic", "simple", "for now", "placeholder", "initial version", "minimal". For each hit, verify it was explicitly sanctioned by the user — not a quiet scope downgrade from what was requested. Fix any that weren't.

6. Proportion: Compare the plan's length to the spec's (or, with no spec, to the size of the change). A plan several times longer than the spec it implements 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, then re-check that each step is still unambiguous. The exact text of content steps does not count against this — a plan that edits prose or config legitimately carries that text.

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.

Execution Handoff

After saving the plan and completing self-review, auto-select the execution approach using the logic below, then output the ready message and stop. Do not invoke any execution skill until the user replies.

Selection Logic (evaluate in order)

  1. Current context window ≥ 60% full → Subagent-Driven (offload context pressure)
  2. Task count ≥ 5 → Subagent-Driven (fresh context per task)
  3. Tasks have heavy inter-task state sharing (each task depends on runtime state from the previous) → Inline
  4. Default → Subagent-Driven

Ready Message

Plan saved to `docs/plans/<filename>.md`. Ready to execute with **[Subagent-Driven / Inline Execution]** (<N> tasks[, <one-word reason>]). Reply to start, or say "inline" / "subagent" to switch.

Stop here. Do not invoke any execution skill until the user replies.

On User Reply

If Subagent-Driven:

  • REQUIRED SUB-SKILL: Use superpowers-optimized:subagent-driven-development
  • Fresh subagent per task + a per-task review returning both spec and quality verdicts

If Inline Execution:

  • REQUIRED SUB-SKILL: Use superpowers-optimized:executing-plans
  • Continuous execution with checkpoints for review

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.