Slash command: Implement Plan
Posted on
Prerequisites
Superpowers is an agentic skills framework & software development methodology that works.
https://github.com/obra/superpowers
Content
implement-plan.mdmd
---
description: Implement a Superpowers plan directory with parallel subagents in dependency waves (no commits)
argument-hint: [path to plan directory] [max subagents per wave - optional, default: auto]
allowed-tools: Read, Glob, Grep, Edit, Write, TodoWrite, Task, Bash(git status:*), Bash(git diff:*)
---
Implement the plan in this directory using parallel subagents: $1
The plan was written by /write-plan: a directory holding 00-overview.md plus one
file per task (01-*.md, 02-*.md, ...). Each task file is one TDD cycle and is
independently followable by someone who has read 00-overview.md and nothing else.
YOU (the orchestrator) own steps 1 and 3 alone. Only step 2 is parallel.
## 1. Build the waves from the index - do not re-derive them
1. Read 00-overview.md. Its Task index already gives, per task:
file | one-line goal | depends-on | files touched.
Use it as the dependency graph. Do not re-batch or re-split tasks.
2. Confirm against each task file's own "Depends on" and "Files" sections
(Create, Modify AND Test). If the index and a task file disagree, the task
file wins; note the discrepancy in the report.
3. Assign tasks to waves:
- A task goes in the earliest wave after all of its dependencies.
- Two tasks that touch any common file (source or test) never share a wave;
the higher-numbered one moves to the next wave.
4. Wave width: if $2 is given, run at most that many subagents per wave.
Otherwise cap at ~5. Overflow tasks move to the next wave in index order.
5. If every wave has one task (a pure chain), say so and run the tasks yourself
in order instead of spawning subagents.
State the wave plan before dispatching anything.
## 2. Run the waves
For each wave, dispatch all of its tasks in ONE message as parallel Task calls,
one task per subagent. Wait for every subagent to return before starting the next wave.
Each subagent prompt must be self-contained and include:
- the absolute paths to 00-overview.md and to its ONE task file (read both first)
- the list of files it owns (from its task file's Files section)
- these rules, verbatim:
- Follow the task file's steps in order, ticking nothing outside your file list.
- Edit ONLY the files you own. If a step seems to need another file, stop and
report it - do not edit it.
- TDD: write the failing test, run it and see it fail, implement, run it and see
it pass. Do not skip the failing run.
- Use the exact signatures under Interfaces; do not rename or extend them.
- Respect Global Constraints in 00-overview.md.
- Lint and format only the files you own.
- Do not commit, stage, stash, reset or switch branches.
- Final message: files changed, test command + result, anything you could not
do, deviations from the task file.
After each wave:
- Run the full test suite once. If something broke, fix it (yourself, or by
re-dispatching the owning task's subagent) before starting the next wave.
- Tick the completed tasks in your todo list.
## 3. Review once at the end
After the last wave, run the code-reviewer agent ONCE over the combined diff.
Give it 00-overview.md (especially Review Focus and the Interface Contract) and
tell it to check every task file's Review checkpoint bullets, plus the seams
between tasks that ran in parallel. Resolve findings, then run the full suite
one last time.
## Constraints
- Work directly on the current branch
- Do NOT commit any changes
- Never let two subagents write the same file concurrently - serialize on any conflict
- Do not edit the plan files, except to note a discrepancy in your report
## Report
- The wave plan: which tasks ran in which wave, and why any were pushed later
- Per task: the subagent's files changed and test result
- Index vs task-file discrepancies, if any
- Code-reviewer findings and how they were resolved
- Final test suite result
- Next step: suggest running the prepare-commits skill to group the changes into commits