I created this Claude Code plugin after reading about Anthropic’s agent-driven Bun rewrite, where separate agents performed adversarial reviews of changes. I first tried this manually by opening a new session and asking it to review changes adversarially. I liked the results, so I built a plugin to automate the workflow. The plugin runs a separate reviewer process without the implementation session’s context. Its goal is not to implement the plan, but to find bugs, missed requirements, security issues, and shortcuts in the implementation. The review is enforced rather than advisory: when Claude attempts to commit, the plugin reviews the exact prospective commit tree and blocks the commit if it finds actionable issues. Claude fixes them and retries. This works especially well for larger plans split into phases, with each phase reviewed and committed separately. Main features Blocks commits until the external review passes. Freezes the plan and phase descriptions so review scope cannot drift. Reviews the exact prospective commit tree, including staged, unstaged, deleted, renamed, and non-ignored untracked files. Supports Claude Code or OpenCode as the reviewer. Returns blocking findings to Claude so it can fix them and retry. Verifies that the approved tree is what actually landed in the commit. Supports pause, resume, stored reports, manual acceptance, and an optional final cumulative review. Has many unit tests and CI coverage on Linux and macOS. How to use it Requirements include Claude Code 2.1+, Python 3.12+, Git, and Bash. Stock macOS Python is too old, so macOS users need a newer Python from Homebrew or python.org. Install it: /plugin marketplace add leinardi/adversarial-review-loop /plugin install adversarial-review-loop Create a Markdown plan and start: /adversarial-review-loop:implement ~/.claude/plans/my-plan.md Claude freezes the phase list, implements each phase, and attempts a normal commit. The reviewer either approves the commit or returns findings for the next attempt. You can inspect progress and complete review reports with: /adversarial-review-loop:status /adversarial-review-loop:report [n] Cost Adversarial review is expensive. Each phase requires at least one additional model call, and retries require more, so this workflow can roughly double or exceed token usage. OpenCode support lets you use another configured provider, including OpenAI-backed or free models, depending on your setup. Personally, my Claude Code Max 5x subscription has been enough for my current usage, while the Pro subscription I previously used was not. I’ve been happy with the results on my own projects, so I’m sharing it in case others find it useful. Source code: https://github.com/leinardi/adversarial-review-loop submitted by /u/leinardi
Originally posted by u/leinardi on r/ClaudeCode
