agentleFS
dafaalzdafaalz/agent-skills/skills/writing-plans/SKILL.md

writing-plans

Skill2 starsChanged 53 days agoMITView on GitHub

Use when creating phased implementation plans with test-first tasks from a design specification before writing code. Don't use for initial design ideation (use brainstorming), exploratory research (use recursive-research), direct code execution (use executing-plans), or multi-task plan verification and audit defense (use agent-planning).

187 other projects use a version of this, 108 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

16 rules. 0 are common, 15 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 169 edited versions we read keep these.

  • 15

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Write-Target Boundary. Write only to docs/superpowers/plans/ and .agents/state/writing-plans/.

    line 13
  2. Distinctive:

    Follow these four steps in sequence.

    line 32
  3. Distinctive:

    Verify subsystem boundaries.

    line 37
  4. Distinctive:

    Follow repository conventions.

    line 41
  5. Distinctive:

    Add the required plan document header at the top of the file.

    line 48
  6. Distinctive:

    Write the failing test.

    line 53
  7. Distinctive:

    Run the test and confirm failure.

    line 54
  8. Distinctive:

    Write minimal implementation code to pass the test.

    line 55
  9. Distinctive:

    Run the test and confirm success.

    line 56
  10. Distinctive:

    Commit changes with a descriptive message.

    line 57
  11. Distinctive:

    Ensure tasks remain self-contained with explicit inputs, outputs, and behavioral boundaries.

    line 60
  12. Distinctive:

    Verify specification coverage.

    line 67
  13. Distinctive:

    Verify signature consistency.

    line 69
  14. Distinctive:

    Wait for the user to choose an execution option before executing any tasks.

    line 81
  15. Distinctive:

    Every plan must start with this header block:

    line 89
  16. Distinctive:

    Every step must provide precise contract specifications without duplicating full implementation code in markdown:

    line 156

“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 implementation plans

Turn validated design specifications into phased implementation plans before writing code. Every task in the plan must produce working, testable software with clear file targets, behavioral test assertions, interface contracts, and deterministic verification commands.

Assume the implementer has no prior context of the codebase and requires explicit technical direction for every change.

<HARD-GATE> Write-Target Boundary. Write only to `docs/superpowers/plans/` and `.agents/state/writing-plans/`. Do not modify application source, tests, schemas, or build configuration while drafting or reviewing a plan. </HARD-GATE>

Save plans to docs/superpowers/plans/YYYY-MM-DD-<feature-name>.md as transient scaffolding artifacts unless the user specifies a different path. Implementation plans are transient execution scaffolding. The purge happens in executing-plans after final verification. This skill does not purge the plan file.

Modes

Select a planning mode before Step 1:

  • Author mode (default). Draft new implementation plans with test-first tasks from design specifications.
  • Review mode. Audit existing implementation plans against design specs and anti-slop rules without modifying plan status.

Boundary isolation

Writing plans produces transient execution scaffolding only (docs/superpowers/plans/). Never write production application code, modify existing tests, or alter repository code files while drafting implementation plans.

Precedence. This skill owns task content and plan structure. agent-planning owns the evidence seal and audit response.

Workflow

Follow these four steps in sequence.

Step 1. Scope audit and file mapping

Inspect the specification and repository structure before creating tasks:

  • Verify subsystem boundaries. If the specification covers multiple independent subsystems, split the work into separate plans for each subsystem.
  • Map target files. Identify every file to create, modify, or delete, along with its specific responsibility.
  • Enforce single responsibility. Design units with clear boundaries and well-defined interfaces. Keep files focused so an agent can reason about them within context.
  • Co-locate related logic. Group files by functional responsibility rather than technical layer. Files that change together belong together.
  • Follow repository conventions. Match existing file and directory patterns. If an existing file is already unwieldy, include a planned split into smaller modules.

Completion criterion. .agents/state/writing-plans/file-map.json exists with every target file, its responsibility, and its subsystem.

Step 2. Task decomposition and plan drafting

Draft the implementation plan using the templates in the reference section below:

  • Add the required plan document header at the top of the file.
  • Divide the work into bite-sized tasks. Each task touches at most 2 production files and 1 test file.
  • Tracer-bullet vertical slices. Build an end-to-end thin slice spanning all required layers first to prove integration before broadening feature breadth.
  • Declare blocking dependencies. Every task must declare its blocking dependencies (Depends on: Task X) to form an explicit Directed Acyclic Graph (DAG) for concurrent subagent execution across the ready frontier.
  • Enforce test-driven development order for every task:
    1. Write the failing test.
    2. Run the test and confirm failure.
    3. Write minimal implementation code to pass the test.
    4. Run the test and confirm success.
    5. Commit changes with a descriptive message.
  • Provide exact file paths, exported signatures, and test assertion contracts. Do not guess application implementation details that the compiler and language server validate.
  • Specify exact execution commands with expected exit codes or failure messages for every test step.
  • Ensure tasks remain self-contained with explicit inputs, outputs, and behavioral boundaries.

Completion criterion. The plan exists at docs/superpowers/plans/YYYY-MM-DD-<feature-name>.md with the mandatory header, test-first tasks, interface contracts, and exact verification commands.

Step 3. Plan self-review and validation

Audit the drafted plan against the source specification:

  • Verify specification coverage. Skim each section of the specification and verify that an explicit task implements it. Add tasks for any missing requirements.
  • Scan for placeholders. Confirm that the plan contains zero instances of TODO, TBD, vague validation rules, or undefined target interfaces.
  • Verify signature consistency. Confirm that function names, argument lists, and types match across all tasks.
  • Reviewer subagent. Dispatch a subagent with the prompt in references/plan-document-reviewer-prompt.md and fix every defect it reports in the plan file.

Completion criterion. .agents/state/writing-plans/audit.md exists with zero placeholders, one task per specification section, and consistent signatures.

Step 4. Execution handoff

Save the plan to disk and present execution options to the user:

  • State the saved path clearly.
  • Offer the two execution workflows:
    1. Subagent-driven execution (recommended). Dispatch a fresh subagent for each task with a review of its diff between tasks. Run every task through the harness subagent tool.
    2. Inline execution. Executes tasks batch-by-batch within the current session with review checkpoints. Requires executing-plans.
  • Wait for the user to choose an execution option before executing any tasks.

Completion criterion. Plan file written to disk and execution options presented to the user.

Reference templates and rules

Plan document header template

Every plan must start with this header block:

# [Feature Name] Implementation Plan

> **For agentic workers.** REQUIRED SUB-SKILL. Use `executing-plans` to implement this plan task by task. Steps use checkbox (`- [ ]`) syntax for tracking.

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

**Architecture.** [2 to 3 sentences about approach]

**Tech stack.** [Key technologies and libraries]

**Source spec.** [<absolute-or-repo-relative-path-to-spec-or-none>]

---

Task structure template

Structure each task with explicit file lists, dependencies, step checkboxes, interface contracts, and test commands:

### Task N. [Component name]

**Dependencies.** Depends on Task 1. Blocks Task 3.

**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 failure with missing implementation or failed assertion.

- [ ] **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 status is 0 errors, all assertions pass.

- [ ] **Step 5. Commit**

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

Task and interface precision standards

Every step must provide precise contract specifications without duplicating full implementation code in markdown:

  • Specify exact file paths and function signatures. Do not write placeholders like // TODO.
  • Define test assertions and expected inputs and outputs rather than speculative application bodies.
  • Rely on the compiler, linter, and test runner for syntax validation during execution.
  • Define imported symbols, method signatures, and error types within the plan.

Goal-driven execution standards

Transform abstract requirements into concrete, verifiable test goals:

  • Convert open-ended instructions into testable gates. For example, "add input validation" becomes "write tests asserting failure on invalid inputs, then make them pass".
  • Pair every multi-step action with an explicit verification check that defines the exact test command and expected outcome.

Anti-patterns

IDTitlePattern descriptionWhy it failsConcrete fix
WPA-1Phantom execution skillNames a skill directory that does not existHandoff fails at discoveryName an existing skill and confirm with test -d skills/<name>
WPA-2Unanchored task mapStep 1 ends with no file on diskThe next session cannot resumeWrite the file map to .agents/state/writing-plans/file-map.json
WPA-3Clock-based granularityBounds task size in minutes no step measuresAgents split work arbitrarilyBound by production file count and diff size
WPA-4Optional verificationMarks the plan audited while the reviewer is optionalUnreviewed plans pass the gateMake the reviewer mandatory or drop the audit claim
WPA-5Narration preambleAnnounces the skill in chat before any artifact existsWastes reader attentionDelete the announcement

Quick audit checklist

CheckPassing condition
Header structureMandatory plan header present with goal, architecture, and stack
Task granularityBite-sized 2 to 5 minute tasks with test-first sequence
Dependency graphEvery task declares explicit blocking dependencies (DAG) with tracer-bullet sequencing
Verification commandsExact test commands and expected exit codes or failure messages provided
Zero placeholdersZero instances of TODO, TBD, or speculative application logic
Reference isolationScaffolding plans placed under docs/superpowers/plans/

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.