Adversarial PR Review
An orchestrator pulls a pull request from GitHub, a primary reviewer proposes findings, and a challenger on a different model disputes them — arbitrated into one calibrated approve, comment, or request-changes decision.
The full canvas, before you import it
Click any node to see its config.
Click a node to select it — same as the Heym editor; the panel shows its settings.
5 nodes · Free & source-available
Adversarial PR Review
A multi-agent, adversarial pull request reviewer. An orchestrator pulls the real change from GitHub, delegates to a primaryReviewer that proposes findings, then to a challenger on a different model vendor that disputes those findings and hunts for missed bugs. The orchestrator arbitrates both sides into one calibrated decision — approve, comment, or request changes — instead of dumping every issue a single model noticed.
Built from the pipeline in our guide: AI Code Review: A Multi-Agent, Adversarial Guide.
What this workflow does
- prInput takes a pull request URL (or POST
{"text":"<pr-url>"}to the workflow) - orchestrator uses the GitHub MCP to read the PR diff, commits, comments, and CI status, plus a Sequential Thinking MCP to reason step by step
- primaryReviewer (Claude Opus) returns structured findings, each with a severity from S0–S4, a confidence score, a file and line, and a suggested fix
- challenger (GPT, a different vendor) critiques every finding — accept, reject, or needs-more-evidence — flags wrong severities, and adds high-impact issues the reviewer missed
- The orchestrator merges both sides, drops rejected findings, applies agreed severity changes, and writes a final decision plus a suggested PR comment to finalReview
Why adversarial
A lone reviewer is confident, agreeable, and biased toward quick wins, so it both invents problems and misses real ones. Giving the challenger the explicit job of disputing the primary reviewer — on a different model so they do not share blind spots — filters weak findings and surfaces what a single pass would miss. The structure, not any single model, is what improves the output.
Use cases
- Self-hosted PR review that keeps proprietary code on your own infrastructure
- High-stakes merges where a missed bug costs more than the extra tokens
- Cutting false-positive noise from a single-agent reviewer
Setup
- Add an LLM credential to orchestrator, primaryReviewer, and challenger — mix vendors so the challenger differs from the reviewer
- Provide a GitHub token: the GitHub MCP reads it from the global variable
githubPat - Replace
your-github-usernamein the orchestrator prompt with your handle - (Optional) Add web-search and website-loader sub-workflows to the orchestrator for external context (CVEs, library status, linked RFCs)
- Run on a real PR, then open the Traces tab to see every tool call, each sub-agent, tokens and latency, and where the two agents disagreed
Notes
The reviewer and challenger return structured JSON; the orchestrator's merge policy decides the verdict (any surviving S0/S1 finding means request changes). Swap models per role to trade cost against depth.
How to import this template
- 1Click Import → Copy JSON on this page.
- 2Open your Heym and navigate to a workflow canvas.
- 3PressCmd+V/Ctrl+V— nodes appear instantly.
- 4Add your API keys in the node config panels and click Run.
Discover more automations
- Dev & IT OpsCursor Post NotifierMonitor the Cursor blog on a schedule and Slack-notify your team when a new post goes live.
- Dev & IT OpsClaude Blog MonitorMonitor the Anthropic blog on a schedule and Slack-notify your team on new Claude posts.
- Dev & IT OpsGitHub Release RadarCompare the latest GitHub release tag against Redis and notify Slack when a project ships a new version.
- Dev & IT Opsweb.dev Article MonitorCron + crawler + Redis dedupe + Slack: get notified when Google's web.dev blog publishes a new article.
- Dev & IT OpsResilient HTTP + Error HandlerAttach an Error Handler node to an HTTP call and Slack-notify your team the moment a request fails.
- Dev & IT OpsPlaywright Visual AI MonitorTake a full-page screenshot on a schedule, analyse it with an LLM for anomalies, and Slack-alert when something looks off.
- Dev & IT OpsRealtime WebSocket Alert RelayListen to an external WebSocket feed, audit critical events, and forward them to another realtime channel.
- Dev & IT OpsAsync Sub-workflow DispatcherValidate an incoming brief and dispatch a reusable sub-workflow in the background without a response node.
- Dev & IT OpsRabbitMQ Delayed PublisherPublish a release message to RabbitMQ with an optional delivery delay for downstream consumers.
- Dev & IT OpsSelf-stopping Status MonitorPoll an incident endpoint until it resolves, then automatically disable the polling trigger for future runs.
- Dev & IT OpsEjentum Code ReviewerA 4-agent MAS that refuses to rubber-stamp PRs: architect orchestrates three cross-lab specialists (reasoning, code, anti-deception), each backed by the Ejentum Logic API.
- Dev & IT OpsCoding Agent with GitHub IntegrationReceive a plain-English coding task, plan with Sequential Thinking, write and commit code via GitHub MCP, then post a Slack summary.