Skip to content

About

Claude Code plugin: automated code review with independent reconstruction and review-revision loop

Resources

Stars

4 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

SWE-Review — Claude Code Plugin

Automated code review and issue resolution with a review-revision loop for Claude Code.

SWE-Review is a framework for closing the issue-resolution loop with agentic code review. A reviewer agent independently explores the repository, traces the root cause, and compares its own diagnosis against the submitted PR — turning one-shot patch generation into an iterative generate-review-revise loop. For full details, see the project page, paper, and code repository.

Demo

What It Does

Two skills that bring structured code review into your Claude Code workflow:

  • /swe-review:review — Independent reconstruction code review: finds root cause independently, then compares with the patch to detect symptom fixes, missing sibling fixes, and broken dependencies
  • /swe-review:resolve — End-to-end issue resolution: patchgen → independent review → revision, looping until approved or max rounds reached

How /swe-review:resolve Works

You: /swe-review:resolve fix the login timeout bug
  │
  ├─ Phase 1: Patchgen (Claude Code generates the fix)
  │
  ├─ Phase 2: Review (independent subagent, no anchoring bias)
  │    Independent reconstruction: understand issue → find root cause →
  │    propose own fix → THEN read patch → compare → report
  │
  ├─ Decision: approve → done
  │             request_changes → Phase 3
  │
  ├─ Phase 3: Revision (Claude Code addresses defects)
  │
  └─ Loop Phase 2-3 (max 3 rounds)

Key design choices:

  • Review runs as a subagent with no knowledge of the patchgen process, eliminating self-review anchoring bias
  • Independent reconstruction — reviewer finds root cause and proposes their own fix BEFORE reading the patch
  • Point-of-CREATION enforcement — patches that fix symptoms at point of USE instead of root cause at point of CREATION are rejected
  • No test suite required — review is the quality gate, designed for real-world repos
  • Structured output — JSON review reports with decision, defects, and actionable suggestions
  • Full traceability — all artifacts saved to ./docs/swe-review/{instance}_{timestamp}/

Installation

Step 1: Add the marketplace

In Claude Code, run:

/plugin marketplace add LegoX/cc-swe-review

Step 2: Install the plugin

/plugin install swe-review@cc-swe-review

Step 3: Verify

Start a new Claude Code session. You should see swe-review:review and swe-review:resolve in the available skills.

Usage

Review Code Changes

/swe-review:review                  # review uncommitted changes
/swe-review:review HEAD~3..HEAD     # review specific commit range

Outputs a structured review report:

{
  "decision": { "recommendation": "approve|request_changes", "confidence": 0.0-1.0 },
  "summary": { "problem": "...", "solution": "...", "overall_assessment": "..." },
  "defects": [{ "severity": "high|medium|low", "location": {...}, "description": "...", "suggestion": "..." }]
}

Resolve an Issue

/swe-review:resolve <issue description>
/swe-review:resolve --no-review <issue description>
/swe-review:resolve --max-rounds 5 <issue description>
Flag Default Meaning
--no-review (not set) Skip review loop, only run patchgen
--max-rounds N 3 Maximum review-revision rounds

The skill will:

  1. Create a workspace directory under ./docs/swe-review/
  2. Explore the codebase and generate a fix
  3. Launch an independent review subagent
  4. Revise based on feedback if needed
  5. Loop until approved or max rounds reached
  6. Save all artifacts (issue, diffs, review reports, summary)

Review Report Schema

Field Description
decision.recommendation "approve" or "request_changes"
decision.confidence 0.0 to 1.0
summary.problem Root cause in one sentence
summary.solution What the patch does
defects[].severity "high" (blocks approval), "medium", "low"
defects[].category correctness, compatibility, security, performance, maintainability
defects[].location File path + line range
defects[].suggestion Specific fix recommendation

Architecture

┌─────────────────────────────────────────────┐
│  /swe-review:resolve (main agent)           │
│                                             │
│  1. Parse issue                             │
│  2. Patchgen → git commit                   │
│  3. Launch review subagent ──────────┐      │
│  4. Parse review report              │      │
│  5. Revision (if needed)             │      │
│  6. Loop 3-5                         │      │
└──────────────────────────────────────│──────┘
                                       │
                    ┌──────────────────▼──────┐
                    │  Review Subagent         │
                    │  (fresh context,         │
                    │   no anchoring bias)     │
                    │                          │
                    │  Independent review:     │
                    │  1. Read issue           │
                    │  2. Find root cause      │
                    │  3. Propose own fix      │
                    │  4. Read & compare patch │
                    │  5. Write report JSON    │
                    └─────────────────────────┘

Workspace Structure

Each /swe-review:resolve invocation creates:

./docs/swe-review/{instance}_{timestamp}/
├── issue.md              # Issue description
├── patch_round_0.diff    # Initial patchgen diff
├── patch_round_1.diff    # Diff after revision round 1
├── review_round_1.json   # Review report from round 1
├── review_round_2.json   # Review report from round 2
└── summary.md            # Final outcome

Related Resources

Resource Link
Paper SWE-Review: Closing the Loop on Issue Resolution with Agentic Code Review
Code & Reproduction LegoX/SWE-Review
SWE-Review-Bench HuggingFace
SWE-Review-Traj HuggingFace
SWE-Review-8B HuggingFace
SWE-Review-30B-A3B HuggingFace

About

Claude Code plugin: automated code review with independent reconstruction and review-revision loop

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors