Skip to the content.

Superpowers Workflow for AI Coding Agents: Scope, Plan in Slices, Test First, Review, Ship

A disciplined, repeatable workflow for building software with AI coding agents such as Claude Code and Codex, packaged as Agent Skills. Instead of “write me a feature” and hoping, the agent moves through five stages: scope the problem into a brief, plan thin vertical slices, build each slice test-first, review the result with fresh eyes, and ship. Every stage leaves a small Markdown file behind, so work survives context resets and a new session can pick up exactly where the last one stopped.

It is for developers who already use an AI coding agent and want fewer half-finished features, fewer “it said the tests pass” surprises, and changes small enough to review.

Last reviewed: December 2026. An independent, community workflow; not affiliated with any agent vendor.

Contents

Why a workflow at all

Coding agents are fast at producing code and weak at the same things junior developers are weak at: building the wrong thing because nobody pinned down the requirement, making one giant change that cannot be reviewed, declaring victory without running the tests, and quietly drifting from the plan. They also forget: once the context window is compacted or a session ends, the reasoning is gone.

A workflow fixes this with three simple mechanisms:

  1. Gates. No code before an approved brief and plan (for non-trivial work). No “done” without a test run in this session.
  2. Small steps. Work is cut into slices that each end with green tests and one commit.
  3. Written state. The brief, plan checkboxes and review notes live in files, not in the conversation.

None of this is new. It is ordinary good engineering practice (clarify requirements, vertical slices, test-driven development, code review) written down so that an agent follows it every time.

The five stages

  request
     |
     v
 1. SCOPE  ---- brief.md ----> user approves
     |
     v
 2. PLAN   ---- plan.md -----> user approves slices
     |
     v
 3. BUILD  -- per slice: failing test -> code -> green -> commit -> [x]
     |            ^                    |
     |            +---- unstick <------+  (when stuck)
     v
 4. REVIEW ---- review.md ---> must-fix items become new slices
     |
     v
 5. SHIP   ---- PR, STATUS=done
Stage Skill Produces Gate to move on
Scope scope-the-work brief.md You approve the brief
Plan plan-in-slices plan.md You approve the slices
Build build-slice + test-first Commits, ticked slices Each slice’s tests pass
Review self-review + fresh-eyes-reviewer agent review.md No open must-fix
Ship ship Pull request Merged or handed off
Any unstick Notes in the conversation Root cause found or honestly escalated
Entry workflow A decision about where to start -

Install

Claude Code (plugin)

claude plugin marketplace add Ralpberry-Labs/superpowers-workflow
claude plugin install superpowers-workflow@ralpberry-workflow

Skills are then available as /superpowers-workflow:scope-the-work, /superpowers-workflow:build-slice and so on, and Claude loads them automatically when your request matches. The plugin also adds:

Claude Code (copy the skills)

git clone https://github.com/Ralpberry-Labs/superpowers-workflow
cp -r superpowers-workflow/skills/* ~/.claude/skills/        # personal
# or: cp -r superpowers-workflow/skills/* .claude/skills/    # this project only
cp superpowers-workflow/agents/fresh-eyes-reviewer.md ~/.claude/agents/

Without the plugin there is no ${CLAUDE_PLUGIN_ROOT}, so the workflow skill falls back to listing docs/work/ itself; the status script still runs by hand: python3 scripts/workflow_status.py.

OpenAI Codex and other agents

Copy the skill folders into .agents/skills/ (Codex project skills) or your agent’s skills directory. The skills use only standard name and description frontmatter. The subagent file is Claude Code-specific; elsewhere, ask the agent to “review the diff against brief.md as if you had never seen it” in a fresh session.

Quick start

You:   Add rate limiting to the public API. Use the workflow.
Agent: (workflow) This touches every route and needs a design choice, so I'm starting at Scope.
       (scope-the-work) Reads middleware, config, Redis usage. Asks 3 questions with defaults.
You:   Per API key, Redis is fine, health checks exempt.
Agent: Writes docs/work/api-rate-limiting/brief.md, asks for approval.
You:   Approved.
Agent: (plan-in-slices) Writes plan.md with 6 slices, riskiest first. Asks for approval.
You:   Go, build S1-S3 and report after each.
Agent: (build-slice x3) failing test -> code -> green -> commit -> tick, with test output quoted.
...
Agent: (self-review) Fresh-eyes reviewer finds a missing Retry-After on one path -> new slice S7.
Agent: (ship) Full suite green, PR description drafted from brief and plan. Push?

Next morning, a new session starts with:

Active work items (superpowers-workflow, docs/work/):
- api-rate-limiting: stage=build | 3/6 slices | next: S4: RateLimit-* headers on success

The skills

workflow (entry point)

Checks docs/work/ for existing items, sizes the request (trivial / small / bigger), and routes to the right stage. Trivial work skips the process entirely; small work gets an inline brief and a 1-3 slice plan. It also holds the ground rules every stage follows.

scope-the-work

Reads the relevant code before asking anything, then asks at most three questions per message, each with a proposed default. Compares two or three approaches (including “do less”) and writes a one-page brief: problem with evidence, outcome, testable acceptance criteria in given/when/then form, constraints, chosen and rejected approaches, out of scope, open questions. Stops for approval.

plan-in-slices

Turns the brief into thin vertical slices ordered by risk, starting with a walking skeleton. Every slice names the failing test to write first, the files to change, and the exact command that proves it is done. Every acceptance criterion must map to a slice. No “add tests later” slices and no “refactor everything” slices.

test-first

The red-green-refactor loop with the details that matter for agents: the test must fail for the right reason; simplest code to pass; refactor only on green; deterministic tests (fake clocks, seeded randomness, no sleeps); mock only at system boundaries; bugs start with a reproducing test; never weaken an existing test without saying so; never claim a pass without quoting the command and result.

build-slice

Takes the next unchecked slice, re-reads the files (code may have changed since planning), runs the test-first loop, stays inside the slice (new ideas go into the plan as notes), runs lint/typecheck, ticks the box, makes one commit per slice, and reports in a few lines. Stops and proposes a plan change when reality disagrees with the plan.

unstick

For when a test fails mysteriously or two fixes in a row did not work: write down the facts, reproduce reliably (measure flakiness), shrink the problem, git bisect run when a regression range is known, test one hypothesis at a time with the cheapest observation first, fix the root cause, and escalate honestly with what was ruled out if the cause stays unknown.

self-review and the fresh-eyes-reviewer subagent

First, a read-only subagent reviews the diff against the brief without the author’s reasoning, which is the point: it cannot be talked into seeing what was intended. Then a checklist pass: brief coverage, scope creep, error paths and edge cases, secrets and input validation, reversible migrations, docs and changelog, full suite green. Findings are written to review.md; must-fix items become new test-first slices.

ship

Fresh final verification, a PR description assembled from the work files (why, what changed per slice, how it was verified, risks), confirmation before pushing, and a clean close-out (STATUS set to done, follow-ups listed).

Work files: the memory between sessions

docs/work/
  api-rate-limiting/
    brief.md     # stage 1 output
    plan.md      # stage 2 output; checkboxes updated during build
    review.md    # stage 4 output
    STATUS       # optional override: scope|plan|build|review|ship|done

The stage is inferred automatically: no brief means scope; brief but no slices means plan; unchecked slices mean build; all checked means review; review written means ship; STATUS overrides all of that.

python3 scripts/workflow_status.py                   # all items
python3 scripts/workflow_status.py api-rate-limiting # one item with its slices

Why files instead of the conversation:

If your team does not want them committed, add docs/work/ to .gitignore; the workflow works the same.

A worked example

examples/rate-limiter/ contains a real-sized brief and plan for adding per-API-key rate limiting to an API with two instances and Redis. Things to notice:

Choosing the right amount of process

Change Process
Typo, copy change, version bump, one-line config None. Do it, run the relevant check.
Small bug with a clear cause Reproducing test, fix, run tests. (test-first only)
Small feature, one obvious design Inline brief (5 lines in chat), 1-3 slices, build, quick self-review
Feature touching several modules, or any design choice Full workflow
Unclear problem (“checkout feels slow”) Scope first, possibly ending in “no code needed”
Large migration or refactor Full workflow, with characterization tests as the first slices

The process should feel lighter than the cost of getting it wrong. If it does not, use less of it.

Habits that make agents reliable

These apply with or without the skills:

  1. Ask for the plan before the code. Plan mode in Claude Code (Shift+Tab or /plan) is a natural fit for stages 1-2.
  2. Approve small things often. Five approvals of a one-page brief, a slice list and three small diffs beat one approval of a 2,000-line diff.
  3. Demand evidence. “Tests pass” means nothing without the command and the summary line.
  4. Keep sessions focused. One work item per session; /clear between unrelated tasks. The work files make that cheap.
  5. Make the agent write things down. Decisions in the brief, surprises in plan notes, findings in review.md.
  6. Use a fresh context for review. The agent that wrote the code is the worst reviewer of it.
  7. Make “stuck” a normal outcome. An agent allowed to say “I do not know yet, here is what I ruled out” stops inventing fixes.

How this compares with other ways of working with agents

Approach What it is Strength Weakness Combine with this workflow?
Prompt and iterate Ask, review, re-prompt Fast for small things Drifts on anything big; no memory Use for trivial work (the workflow skips itself)
Plan mode only Agent plans, you approve, it executes Catches bad approaches early One big execution; no per-step verification Plan mode is a natural home for stages 1-2
Spec-first documents Detailed spec before code Thorough requirements Heavy; specs go stale The brief is a one-page spec; keep it short
Autonomous long runs Agent works for hours unattended Throughput Hard to review, easy to go off track Use slices and the Stop-hook test gate to keep runs honest
This workflow Brief, slices, test-first, fresh review, ship Small verified steps, resumable state A few minutes of overhead per feature -

Stage outputs at a glance

File Written by Read by Size
brief.md scope-the-work Every later stage, the reviewer, the PR One page
plan.md plan-in-slices build-slice, status script, ship One section per slice
review.md self-review ship, the human reviewer Findings list
STATUS You or ship Status script One word

Anti-patterns this workflow prevents

Anti-pattern Prevented by
Building the wrong thing confidently Scope stage with acceptance criteria and approval
One enormous unreviewable diff Vertical slices, one commit each
Tests written after, shaped to pass the code Test-first, failure must be observed first
“All tests pass” without running them Quote command and result; done-when commands
Scope creep and drive-by refactors Out-of-scope list; ideas go into plan notes, not code
Thrashing on a bug with random edits unstick hypothesis loop and two-attempt rule
Losing the thread after compaction Work files plus the SessionStart status hook
Self-review that only confirms intent Fresh-context reviewer given only the brief and the diff

Customizing

Using it with other agents

The skills are plain instructions plus one stdlib Python script, so they work anywhere skills are supported. Without skills support, paste the relevant SKILL.md into the conversation or reference it from AGENTS.md:

## Workflow
For any non-trivial change, follow docs/workflow/*.md in order:
scope-the-work -> plan-in-slices -> build-slice (with test-first) -> self-review -> ship.
Track state in docs/work/<slug>/.

FAQ

Is this slower? For trivial changes it is skipped. For real features the time spent on a brief and plan is usually recovered several times over by not rebuilding the wrong thing and by reviews that take minutes instead of hours.

Can the agent build several slices without stopping? Yes: “build S1-S4 and report after each”. The gates that matter are the brief and plan approvals and the per-slice test runs, not a human click per slice.

What if I disagree with the plan halfway? Edit plan.md (or ask the agent to). The plan is a living document; the rule is only that changes are explicit.

Does this need the plugin? No. The plugin adds namespaced commands, the session-start status line and the reviewer agent. The skills alone carry the method.

Repository layout and tests

.claude-plugin/        plugin.json and marketplace.json
skills/                workflow, scope-the-work, plan-in-slices, test-first,
                       build-slice, unstick, self-review, ship
agents/                fresh-eyes-reviewer.md
hooks/hooks.json       SessionStart status hook
scripts/workflow_status.py
examples/rate-limiter/ brief.md, plan.md
tests/                 unit tests (stdlib only)
python3 -m unittest discover -s tests -v
claude plugin validate .     # if Claude Code is installed

Where to go next

Contributing

PRs are welcome: sharper skill wording, checklists for specific stacks, more worked examples, and fixes to the status script with tests. Please keep the skills short and concrete, keep claims about agent behavior accurate, and test any script change with the standard library only.

If this helped you, a star helps others find it.

More free resources

Part of the Ralpberry Labs open-source collection. See also Top 100 Open Source.