Multi Agent Debate banner
hakin19 hakin19

Multi Agent Debate

Development community

Description

Claude Code slash command: structured multi-agent debates between Claude and Codex for collaborative problem solving

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Multi-Agent Debate

A structured debate protocol for AI coding agents. Two agents independently diagnose a problem, critique each other's work, and iterate toward consensus — producing better solutions than either agent alone.

The included implementation uses [Claude Code](https://docs.anthropic.com/en/docs/claude-code) and [Codex CLI](https://github.com/openai/codex) as the two agents, but the protocol is framework-agnostic and can be adapted to any combination of AI coding assistants.

Why Debate?

A single AI agent can miss things. Two agents reviewing each other's work catch more bugs, surface edge cases, and build confidence in the final fix — the same way human code review works. The structured protocol ensures agents engage critically rather than rubber-stamping each other's proposals.

How It Works

  1. Independent Diagnosis — Both agents independently investigate the problem, identify root causes, and propose fixes.
  2. Cross-Review — Each agent critically reviews the other's work, identifying agreements, disagreements, and missed issues.
  3. Iterative Revision — Agents revise their proposals based on critique, defending or updating their positions with evidence.
  4. Consensus or Escalation — The loop continues until both agents agree (consensus) or max rounds are reached (you decide).
  5. Implementation — The agreed-upon fix is implemented automatically.

All agent outputs are saved to a `.debate/` workspace for full auditability.

The Protocol

The debate follows a structured loop with clear prompt templates for each phase:

Phase What Happens
Diagnose Both agents independently read code and propose a root cause + fix
Review Each agent critiques the other's proposal
Check Facilitator checks if disagreements remain
Revise Agents update proposals based on critique (or defend their position)
Loop Repeat review → check → revise until consensus or max round