Skill · Coding

write-implementation-plan

Turns an approved design or spec into an ordered plan another agent or developer can execute: small steps with files to touch, the test to write first, exact commands, done criteria, dependency order, parallel groups, risks and rollback. Use when asked to write an implementation plan, break a spec into steps or tickets, plan the build, or 'how should we implement this'.

The skill itself. Agents read the name and description first and load the rest only when a task matches.

write-implementation-plan/SKILL.md
---
name: write-implementation-plan
description: "Turns an approved design or spec into an ordered plan another agent or developer can execute: small steps with files to touch, the test to write first, exact commands, done criteria, dependency order, parallel groups, risks and rollback. Use when asked to write an implementation plan, break a spec into steps or tickets, plan the build, or 'how should we implement this'."
---

# Write an implementation plan

Turn an approved design or spec into ordered steps that another agent or developer can execute without asking you.

## Steps

1. Read the spec and the code it touches. List the files, modules and commands (test, lint, typecheck, build, migrate) that apply, taken from package scripts, the Makefile or CI config. If there is no spec, or it has open questions, stop and list them.
2. Break the work into steps that are each one commit: one behavior or one mechanical change, leaving the code working and checkable on its own.
3. For each step, write:
   - Goal: one sentence.
   - Files: paths to create or change.
   - Test first: the test name and what it asserts.
   - Commands: the exact commands to run.
   - Done when: an observable result (test passes, endpoint returns 201, page shows the empty state).
   - Depends on: earlier step numbers, or none.
4. Order steps by dependency. Mark groups that can run in parallel ("Group B: steps 4 to 6, independent of each other, no shared files").
5. Add a risks and rollback section: migrations, config or env changes, feature flags, and how to undo each risky step.
6. End with an execution checklist.
7. Save it where the repo keeps plans (look for docs/plans/ or similar), otherwise at `docs/plans/<feature>.md`, unless the user asked for it inline.

## Rules

- No vague verbs: "handle", "improve", "clean up", "support", "refactor as needed". Say what changes and how you'll know.
- Every step names at least one file and one check.
- No step depends on a later step. Steps in a parallel group don't touch the same files.
- Don't redesign. If the spec has a gap, list it under open questions instead of deciding silently.
- Use real paths and commands from the repo. Mark anything you couldn't confirm as unverified.

## Example output

```
### Step 3: Reject expired coupons
Goal: applyCoupon refuses coupons past their end date.
Files: src/cart/coupon.ts, src/cart/coupon.test.ts
Test first: "rejects a coupon past its end date" expects CouponExpiredError
Commands: npm test -- coupon.test.ts
Done when: the new test passes and existing coupon tests still pass
Depends on: Step 2

Execution checklist
- [ ] Each step's test seen failing before code is written
- [ ] Each step's done-when checked
- [ ] Full suite, lint and typecheck pass after the last step
- [ ] Rollback confirmed for every migration
```