Dev Review Loop

Automated development workflow using Superpowers skills: Brainstorming → Plan → Implement → Review → Fix → ... until PASS.

wyh2255 updated 1mo ago
Claude CodeGeneric
View source ↗
# Dev-Review-Fix Loop (with Superpowers)

Automated development workflow using Superpowers skills: Brainstorming → Plan → Implement → Review → Fix → ... until PASS.

## Usage

/dev-review-loop


## Workflow

This command orchestrates a continuous development loop with quality gates, using the Superpowers skill suite for the development phase.

### Phase 1: Development (Superpowers Flow)

The dev agent follows the complete Superpowers workflow:

1. **Brainstorming** (`superpowers:brainstorming`)
   - Explore project context
   - Ask clarifying questions one at a time
   - Propose 2-3 approaches with trade-offs
   - Present design and get user approval
   - Write design spec to `docs/superpowers/specs/`
   - Spec self-review and user review gate

2. **Writing Plans** (`superpowers:writing-plans`)
   - Create detailed implementation plan
   - Bite-sized tasks with TDD approach
   - Save to `docs/superpowers/plans/`

3. **Executing Plans** (`superpowers:subagent-driven-development` or `superpowers:executing-plans`)
   - Execute tasks according to plan
   - Run verifications at each step
   - Report Status: READY_FOR_REVIEW when done

### Phase 2: Review Loop

Repeat until `Verdict: PASS`:

1. Spawn the `reviewer` agent to analyze code
2. Wait for review verdict
3. If `Verdict: PASS` → Done! 🎉
4. If `Verdict: FAIL` or `CONDITIONAL_PASS` → Spawn `fixer` agent
5. Wait for `Status: FIXES_COMPLETE`
6. Loop back to step 1

### Safety Limits

- Maximum 5 review-fix cycles to prevent infinite loops
- If after 5 cycles still failing, stop and report status
- Each cycle logs findings to `progress.md`

## Implementation

When you receive a task description, follow this exact sequence:

### Step 1: Start Development with Superpowers

Spawn a dev agent with this task: [user's task description]

The dev agent MUST follow the Superpowers workflow:

  1. Invoke superpowers:brainstorming skill FIRST

    • Explore project context (files, docs, recent commits)
    • Ask user clarifying questions one at a time
    • Propose 2-3 approaches with trade-offs
    • Present design sections and get user approval
    • Write design spec to docs/superpowers/specs/YYYY-MM-DD--design.md
    • Perform spec self-review
    • Wait for user to review and approve the spec
  2. Invoke superpowers:writing-plans skill

    • Create implementation plan based on approved spec
    • Write plan to docs/superpowers/plans/YYYY-MM-DD-.md
    • Plan must have bite-sized tasks with TDD steps
  3. Invoke superpowers:subagent-driven-development (recommended) or superpowers:executing-plans

    • Execute tasks according to plan
    • Follow TDD: write failing test → implement → verify → commit
    • Run self-checks after each task
  4. Report Status: READY_FOR_REVIEW when all tasks complete


### Step 2: Review Loop (max 5 iterations)

After the dev agent reports `Status: READY_FOR_REVIEW`, start the review loop:

Iteration [N]:

  1. Spawn reviewer agent: "Review all recent changes in the repository. Run git diff, check tests, analyze for bugs/security/quality/performance. Report verdict: PASS, FAIL, or CONDITIONAL_PASS"

  2. Check verdict:

    • If PASS: Report success, save to progress.md, DONE
    • If FAIL/CONDITIONAL_PASS: Continue to step 3
  3. Spawn fixer agent: "Fix the following issues from the review: [paste review report] Verify fixes pass tests."

  4. Wait for Status: FIXES_COMPLETE

  5. Log iteration to progress.md:

    • Iteration number
    • Issues found
    • Issues fixed
    • Remaining issues
  6. Loop back to step 1


### Step 3: Final Report

After loop completes (either PASS or max iterations):

```markdown
## Dev-Review-Fix Loop Complete

### Task
[original task description]

### Iterations
- Total cycles: [N]
- Final verdict: [PASS/FAIL]

### Summary
- Issues found: [total]
- Issues fixed: [total]
- Issues remaining: [if any]

### Files Changed
- [list]

### Next Steps
- [if PASS: ready to merge]
- [if FAIL: manual intervention needed]

Progress Tracking

Create and update progress.md throughout:

# Dev-Review-Fix Progress

## Task: [description]
## Started: [timestamp]

### Phase 1: Superpowers Development

#### Brainstorming
- Context explored: [yes/no]
- Clarifying questions asked: [count]
- Approaches proposed: [count]
- Design approved: [yes/no]
- Spec written to: [path]
- Spec reviewed by user: [yes/no]

#### Planning
- Plan written to: [path]
- Tasks defined: [count]
- Plan reviewed: [yes/no]

#### Implementation
- Tasks completed: [count/total]
- TDD followed: [yes/no]
- Self-checks passed: [yes/no]

### Phase 2: Review Loop

#### Cycle 1
- Review: [verdict] - [N] issues found
- Fix: [N] issues fixed
- Remaining: [N] issues

#### Cycle 2
...

### Final Status: [PASS/FAIL]

Maintain Dev Review Loop?

Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.

[Dev Review Loop on getagentictools](https://getagentictools.com/loops/wyh2255-dev-review-fix-loop-with-superpowers?ref=badge)
npx agentictools info loops/wyh2255-dev-review-fix-loop-with-superpowers

The second line is the CLI lookup for this page — handy in READMEs and docs.