com um clique
agent-debate
// Use when a consequential decision needs adversarial review, opposing agent arguments, a second opinion via debate, or explicit trade-off analysis before implementation.
// Use when a consequential decision needs adversarial review, opposing agent arguments, a second opinion via debate, or explicit trade-off analysis before implementation.
Use when the user asks to split a goal across Claude, Codex, or Gemini; plan a multi-agent run; break work into parallel agent tasks; or decompose a large task that needs bounded context handoffs. This is the **generic** multi-agent task splitter — writes `.coord/plan.yml` (a DAG) plus per-agent task files. NOT for research-domain routing that touches `.research/`, `.paper/`, or Zotero/Obsidian/NotebookLM ingest pipelines — for those, use `research-hub-multi-ai` instead (different artifact `.coord/multi_ai_plan.md`, research-hub-aware reconciliation).
Use when a multi-agent round needs a pre-merge gate, pre-commit check, verification before push, or a PASS/FAIL decision after reconciliation.
Use when multi-agent work risks context overflow, memory growth, noisy logs, oversized handoffs, cross-session continuation, or parallel Codex and Gemini execution.
Use when multiple agents have completed a round and the user asks to reconcile outputs, compare Codex and Gemini, synthesize run results, identify conflicts, or decide what should be retried.
Use when a task needs single-agent self-correction across multiple iterations — write plan, execute, critique own output, revise plan, re-execute, until convergence or budget exhausted. Different from `agent-debate` (which is 2 agents arguing pro vs con); this is 1 agent looping over its own work.
Use when the user asks to update shared memory, initialize multi-agent memory, summarize decisions so far, identify open questions, or prepare a fresh session primer.
| name | agent-debate |
| description | Use when a consequential decision needs adversarial review, opposing agent arguments, a second opinion via debate, or explicit trade-off analysis before implementation. |
Anti-consensus tool. Most LLM output collapses to a single "reasonable-sounding" answer that hides real trade-offs. For consequential decisions (you'll regret picking the wrong side), this skill stages an explicit pro/con debate between two agents, then makes the disagreement legible.
This is not for routine choices — variable naming, file layout, which library to use for a one-off script. It's for decisions where there's a real trade-off and the "obvious" answer might be wrong.
Trigger phrases:
<decision>."<topic>."Not for:
User must provide:
Restate the decision as a clear A vs B (or yes vs no). If the user gave an open-ended question, propose the framing back to them and get confirmation before spending tokens on a debate.
Example:
Default heuristic:
| Position character | Best argued by |
|---|---|
| "We should ship the simpler / less-surface option" | Claude (judgment-heavy, conservative bias) |
| "We should optimize for X performance / scale dimension" | Codex (concrete with numbers) |
| "We should consider edge cases X / Y / Z that the obvious answer misses" | Gemini (long-context, edge-case catching) |
| "We should follow the convention from " | Gemini (synthesizing from external sources) |
If the user explicitly assigns sides, use those. Otherwise propose the assignment and confirm.
.coord/debate_<topic>.md# Debate — <topic-slug>
**Decision:** <one-line A vs B framing>
**Rounds:** 2
**Side A** (argued by Codex): <position A>
**Side B** (argued by Gemini): <position B>
**Started:** 2026-04-28T...
---
## Round 1
### Side A — Codex
<task: read .coord/debate_<topic>.md, argue Side A from scratch>
<argument here>
### Side B — Gemini
<task: read .coord/debate_<topic>.md (which now contains Codex's
arg), argue Side B as a rebuttal>
<argument here>
---
## Round 2
### Side A — Codex
<task: read updated debate file, rebut Side B>
...
For each agent's turn, write a task file in their delegate-skill format:
.ai/codex_task_debate_<topic>_round1.md:
# Task: Argue Side A in debate on <topic>
## Context
- Repo: <path>
- Read: .coord/debate_<topic>.md (the debate transcript so far)
- Side A: <position A>
- Your role: argue Side A. Be specific. Reference real code / files
/ numbers. Don't hedge ("on the other hand" is forbidden).
- Do NOT touch any source files. This is argument-only.
## Goal
Write a 200-400 word argument for Side A, focused on:
- The strongest specific reason Side A is right.
- The most concrete failure mode of Side B (with a worked example
if possible).
- One thing Side B might say that you concede is a real cost of
Side A.
## Acceptance
- Append your argument under "## Round 1 / ### Side A — Codex" in
.coord/debate_<topic>.md.
- Keep argument 200-400 words. Longer = penalty.
- No "on the other hand" hedging.
Subsequent rounds: same template, but task file says "rebut Side B's Round N argument; concede any genuinely strong point but explain why Side A still wins net." Each round's task file references the previous rounds in the debate file as input.
Hand off to codex-delegate / gemini-delegate to execute each
agent's turn. They write into the debate file directly (the task
file says where to append).
After the final round, Claude (in-session, not delegated) reads the full debate transcript and writes the synthesis at the bottom:
---
## Synthesis (Claude as judge)
### Agreed facts (both sides accept)
- <facts that emerged from the debate as common ground>
### Contested points (genuine disagreement)
- <points where neither side conceded>
### Decision
- **Recommendation:** A or B (with one-paragraph rationale).
- **Confidence:** high / medium / low.
- **What would change my mind:** <falsifiable condition>.
Keep the synthesis under 250 words unless the user explicitly asks
for a longer decision record. If the recommendation is accepted,
promote only the final decision and rationale to .coord/memory.yml;
do not promote the full debate transcript.
[agent-debate]
Topic: <topic-slug>
Rounds: 2
Transcript: .coord/debate_<topic>.md
Synthesis: bottom of same file
Recommendation: <A or B>, confidence <high/medium/low>
Update .coord/memory.yml with this decision via agent-shared-memory
if you accept the recommendation.
.coord/memory.yml automatically. The
recommendation goes there only if the user accepts it. Use
agent-shared-memory separately to log the decision..coord/debate_<topic>.md; memory gets only the accepted
decision, if any.agent-acceptance-gate when debate is wired into a plan round)If the debate is referenced from .coord/plan.yml (i.e., recorded as a
formal task with agent: claude or similar), the acceptance gate
checks these caps against .coord/debate_<topic>.md:
| Field | Cap |
|---|---|
| Per-turn argument (Pro / Con) | 400 words |
| Total rounds | 3 (override requires explicit user opt-in in plan.yml debate_rounds) |
| Final synthesis section | 250 words |
| Total debate file size | 8 KB (~ 1200 words across all rounds + synthesis) |
If the debate is invoked ad-hoc (no plan.yml round), these caps are soft guidance — Claude should still respect them but no automated gate runs. For consequential decisions, always wire the debate into a formal round so the gate enforces the cap.
When caps are exceeded:
When: Debate enters round 3+, OR .coord/debate_<topic>.md
exceeds 4 KB.
Why: After 2-3 rounds, the full transcript is heavy. The judge synthesis is where the user actually consumes value. A subagent can read the entire transcript and return only the synthesis + verdict, so the main session never holds the full Pro/Con turns.
Pattern:
Spawn `general-purpose` subagent (read-only) with:
- Read .coord/debate_<topic>.md (entire transcript)
- Verify cap compliance: each turn ≤ 400 words, total ≤ 8 KB,
rounds ≤ 3 (or plan-declared override)
- Compose synthesis (≤ 250 words) covering: framing, strongest
Pro argument, strongest Con argument, recommended decision,
confidence level, conditions to revisit
- Return: synthesis text + cap-violation flags
Main session reads only the synthesis; if user accepts, `agent-shared-memory`
promotes the decision (NOT the transcript) to `.coord/memory.yml`.
Every agent boundary is a commit boundary (see global rule:
~/.claude/CLAUDE.md → "Commit Discipline for Multi-Agent Work"). This
makes multi-agent work auditable (commit log = agent log) and enables
surgical rollback via git revert <hash> of just one agent's commit.
Specific to this skill: each round (Pro turn, Con turn, judge verdict) is a commit. The full debate is then a commit-by-commit replay. If Pro and Con both edit the same file in a round, the second commit appears as the contested diff that the judge resolves in the third commit.