multi-agent-debate-review
Skill2 starsChanged 11 months agoMITView on GitHub
Launch parallel specialized agents to review a codebase, then synthesize findings through adversarial debate. Use when user says "debate review", "multi-agent review", "codebase review", "full review", or asks for a comprehensive code/architecture/security audit. Also use proactively before major releases, after large refactors, or when preparing production deployments. Supports two modes: "direct" (you coordinate) and "delegated" (a single general-purpose agent coordinates everything autonomously).
In this repository5 other files it gives its agents.
- docs-fetcherSkill
- fastapi-code-reviewSkill
- hpe-copyrightSkill
- jira-workflowSkill
- skill-creatorSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 8 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈8
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Run 6+ specialized agents in parallel against a codebase, compare findings, re-invoke agents on points of disagreement, and produce a …
- Distinctive: line 21
Ask the user which mode to use, or infer from context:
- Very specific: line 59
Always include code-reviewer, database-reviewer, and architect regardless of language.
- Very specific: line 64
Use the model parameter on each agent to assign different models.
- Distinctive: line 78
Diversity-optimized: Use different model families to get genuinely different perspectives.
- Distinctive: line 92
Ask the user which strategy they prefer, or default to cost-optimized.
- Distinctive: line 96
After collecting results, insert all findings into a SQL table:
- Very specific: line 114
SINGLE_AGENT: Only one agent found it (may be novel or false positive)
- Distinctive: line 119
Look for these patterns:
- Distinctive: line 142
Update the findings table with resolved positions.
- Very specific: line 163
Use agent_type: "general-purpose" — this is the only agent type that can spawn sub-agents.
- Distinctive: line 190
No interactive discussion between phases — user gets final report only
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Multi-Agent Debate Review
Run 6+ specialized agents in parallel against a codebase, compare findings, re-invoke agents on points of disagreement, and produce a consolidated report with prioritized actions.
Mode Selection
Ask the user which mode to use, or infer from context:
- Direct mode (default): You coordinate — launch agents, collect results, run debates, write report. More interactive, allows user to discuss findings between phases.
- Delegated mode: Launch a single
general-purposeagent that coordinates the entire debate autonomously. Hands-off — user gets a final report. Use when user says "run it hands-off", "do it all automatically", or wants minimal interaction.
Direct Mode
Step 1: Load Standards
Load relevant skills to give agents better baselines. Select based on project language:
- Go:
coding-standards,golang-patterns,security-review,backend-patterns - Python:
coding-standards,python-patterns,security-review - TypeScript/JS:
coding-standards,frontend-patterns,security-review
Step 2: Launch Agents in Parallel
Launch all agents with mode: "background". Each agent gets a focused prompt
with explicit instructions to provide severity ratings, file references, and
suggested fixes.
Select agents based on the project. See references/agent-configs.md for the
full prompt templates for each agent type.
- Go projects: go-reviewer, go-security-reviewer, go-refactor-cleaner, code-reviewer, database-reviewer, architect
- Python projects: python-reviewer, python-security-reviewer, python-refactor-cleaner, code-reviewer, database-reviewer, architect
- JS/TS projects: code-reviewer, js-security-reviewer, js-refactor-cleaner, database-reviewer, architect
Always include code-reviewer, database-reviewer, and architect regardless
of language.
Model Selection
Use the model parameter on each agent to assign different models. Two
strategies:
Cost-optimized (default): Match model capability to task complexity.
| Role | Model | Rationale |
| Security reviewer | claude-opus-4.6 | Deep reasoning for exploit scenarios |
| Architect | claude-sonnet-4-5 | Good balance for system-level thinking |
| Code reviewer | claude-sonnet-4-5 | Standard code review |
| Refactor/cleaner | claude-haiku-4.5 | Mechanical analysis, fast/cheap |
| Database reviewer | claude-sonnet-4-5 | Schema analysis |
| Debate re-invocations | claude-opus-4.6 | Nuanced position changes need strong reasoning |
Diversity-optimized: Use different model families to get genuinely different perspectives. Model diversity reduces shared blind spots — if Claude and GPT both flag the same issue independently, confidence is very high. If only one flags it, the debate round is more informative.
| Role | Model | Rationale |
| Code reviewer | claude-sonnet-4-5 | Claude perspective |
| Security reviewer | gpt-5.2-codex | GPT perspective |
| Architect | gemini-3-pro-preview | Gemini perspective |
| Database reviewer | gpt-5.2 | GPT perspective |
| Refactor/cleaner | claude-haiku-4.5 | Fast/cheap for mechanical work |
| Debate re-invocations | claude-opus-4.6 | Strongest model resolves ties |
Ask the user which strategy they prefer, or default to cost-optimized.
Step 3: Track Findings
After collecting results, insert all findings into a SQL table:
CREATE TABLE findings (
id TEXT PRIMARY KEY,
category TEXT NOT NULL, -- SECURITY, DATABASE, CODE, OBSERVABILITY, etc.
severity TEXT NOT NULL, -- CRITICAL, HIGH, MEDIUM, LOW
title TEXT NOT NULL,
agents_agreeing TEXT NOT NULL, -- comma-separated agent names
agents_disagreeing TEXT DEFAULT '',
status TEXT DEFAULT 'open',
consensus TEXT DEFAULT 'pending' -- UNANIMOUS, RESOLVED, SINGLE_AGENT, UNRESOLVED
);Mark consensus:
- UNANIMOUS: 3+ agents independently flagged the same issue
- SINGLE_AGENT: Only one agent found it (may be novel or false positive)
- UNRESOLVED: Agents actively disagree
Step 4: Identify Debates
Look for these patterns:
- Severity disagreement: One agent says CRITICAL, another says it's fine
- Approach conflict: One says "remove X", another says "keep X"
- Scope tension: One says "fix now", another says "fix later"
Step 5: Re-invoke Disagreeing Agents
For each debate, re-invoke the agents with the opposing position stated explicitly.
Prompt template:
You are participating in a multi-agent debate review.
[Agent A] found: [their position with reasoning]
[Agent B] found: [opposing position with reasoning]
Review the actual code at [path]. Then give your FINAL POSITION with reasoning
in 3-8 sentences. Acknowledge what the other agent got right.Update the findings table with resolved positions.
Step 6: Consolidated Report
Structure the final report in this order:
- Executive Summary — overall grade, agent scores table
- Unanimous Findings — issues 3+ agents agree on (highest confidence)
- Resolved Debates — disagreements settled through re-invocation
- Unresolved Trade-offs — genuine tensions with no clear winner
- Unique Insights — single-agent findings worth noting
- Prioritized Action Plan — grouped by urgency with effort estimates
- Strengths — what all agents praised (important for morale/context)
Save the report to the session artifacts directory.
Delegated Mode
Launch a single general-purpose agent that acts as debate coordinator. This
agent has full access to the task tool and can launch sub-agents itself.
Use agent_type: "general-purpose" — this is the only agent type that can spawn
sub-agents.
Prompt the coordinator with the full workflow. See
references/delegated-coordinator-prompt.md for the complete prompt template.
Key points for the coordinator prompt:
- Tell it which agent types to launch (based on project language)
- Tell it to launch all review agents in parallel using
mode: "background" - Tell it to collect all results via
read_agent - Tell it to identify disagreements and re-invoke with opposing positions
- Tell it to produce the consolidated report in the standard format
- Give it the codebase path and any project-specific context
The coordinator runs autonomously — it launches reviewers as sub-agents, collects findings, runs the debate rounds, and returns the final consolidated report.
When to Prefer Delegated Mode
- User wants a fully autonomous review with no interaction
- Context window is getting full and you want to offload the work
- Running as part of an automated pipeline (e.g., pre-push hook, CI trigger)
Limitations of Delegated Mode
- No interactive discussion between phases — user gets final report only
- Coordinator context window is separate, so it won't have prior conversation history
- Coordinator must be given all relevant context in its prompt (project language, paths, focus areas)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

