claude-review-loop

AI audits your code, you triage the findings, a swarm fixes what you approve. Repeat until clean.

When agents write hundreds of lines of complex logic, subtle hallucinations, unhandled edge cases, and architectural drift creep in. An agent that just spent an hour writing code has built context full of its own reasoning — asking it to review its own work in the same session invites confirmation bias. This plugin automates the fix: fresh adversarial reviewers, human triage, then a swarm to remediate.

Review, swarm, repeat

1

Audit

Spawns 4 specialist agents from the PR Review Toolkit in parallel — code-reviewer, silent-failure-hunter, pr-test-analyzer, and type-design-analyzer — each examining your branch diff with confidence scoring and zero prior context.

2

Triage

Each finding is presented interactively with the reviewer's suggested fixes as selectable options. Pick a fix, defer, dismiss, or type your own approach. Your engineering judgement stays in the loop.

3

Swarm

A fixer team remediates approved findings in parallel. You review the plan before any code is touched.

4

Repeat

Automatically loops back to audit the fixed code. Catches regressions and verifies fixes until the code is clean or you decide to stop.

Why

Defeat confirmation bias

A fresh session reviews your code with zero prior context. No assumptions, no defending past choices — just adversarial scrutiny.

PR Review Toolkit agents

Leverages the official PR Review Toolkit's specialist agents with confidence scoring, structured output, and project-aware context. Each runs in parallel hunting a different class of defect.

Human in the loop

Nothing gets fixed without your approval. You skim false positives rather than miss hallucinations or logic gaps.

Minimal setup

Pure markdown skill — no build step, no runtime. Just install the plugin and the PR Review Toolkit, then run /review-loop.

Get started

Install and run:

# Install the plugins /plugin install pr-review-toolkit /plugin install claude-review-loop # Run from any branch with changes /review-loop

Required in ~/.claude/settings.json (agent teams must be enabled):

{ "env": { "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1" }, "permissions": { "allow": ["Bash(git *)", "Bash(date *)", "Read(*)", "Write(*)", "Edit(*)", "Glob(*)"] } }