debate — Challenge, Strategy, Critic
Caution
Opinion without evidence is noise. Every debate starts with a mandatory Discovery phase: parallel research agents scan your codebase and the web. Arguments that don’t cite Discovery findings don’t count — the judge challenges them on the spot.
Tip
Three modes, one command. Challenge picks the best option from competing variants. Strategy synthesizes independent proposals into a plan. Critic finds every weakness in what you already have. The skill auto-asks which mode if you don’t specify.
Quick reference
| Field | Value |
|---|---|
| Command | /brewtools:debate |
| Arguments | [topic] [-m challenge|strategy|critic] [-n 2-5] [-r max-rounds] [--review] |
| Model | opus |
| Agents | 2–5 dynamic debaters + secretary + judge (main session) |
| Output | discovery.md, decisions.md, summary.md, debate-log.jsonl |
When to use
| Scenario | Command |
|---|---|
| Pick the best technology from several options | /brewtools:debate "React vs Vue vs Svelte" -m challenge |
| Design a migration or architecture plan | /brewtools:debate "monolith to microservices plan" -m strategy |
| Find all risks in an existing solution | /brewtools:debate "critique our JWT auth flow" -m critic |
| Extended analysis with more agents and rounds | /brewtools:debate "PostgreSQL vs DynamoDB" -n 4 -r 8 |
| Post-debate code review of output | /brewtools:debate "our deployment pipeline" -m critic --review |
Modes
| Mode | Goal | Agent setup |
|---|---|---|
| Challenge (default) | Select the best variant from competing options | Defenders argue FOR, critics attack; judge declares winner |
| Strategy | Synthesize the strongest approach from independent proposals | All agents are strategists; goal is convergence, not a winner |
| Critic | Find every weakness, risk, and flaw | All agents are critics with different perspectives; no defender |
Examples
# Challenge mode — compare options (default)
/brewtools:debate "React vs Vue vs Svelte for our new dashboard"
# Strategy mode — how to approach a problem
/brewtools:debate "Migration plan from monolith to microservices" -m strategy -n 4
# Critic mode — stress-test an existing plan
/brewtools:debate "Review our authentication flow" -m critic -n 5 --review
Flow
- Parse and interview
Extracts topic, mode (
-m), agent count (-n), and max rounds (-r) from your command. If mode is omitted, asks explicitly — no auto-guessing. Confirms setup viaAskUserQuestionbefore doing anything else. - Generate agent team
Assigns roles (defender / critic / strategist) based on mode, then selects character archetypes (Pragmatist, Skeptic, Visionary, Architect, Operator, and others) to create productive tension. Displays the full agent table and asks for confirmation before proceeding.
- Discovery — mandatory evidence phase
Two research agents run in parallel: Codebase Explorer scans your project for relevant code, patterns, and dependencies; Web Researcher fetches current best practices, official docs, and benchmarks. All findings — with file paths and URLs — are saved to
discovery.mdand injected into every debater’s context. - Debate rounds
Agents run sequentially; each reads the shared JSONL log before responding. Every argument must reference a Discovery finding — unsourced claims are challenged by the judge. The judge (main session) monitors for consensus, stalemate, or max rounds and can redirect mid-debate.
- Summary and decision
A secretary agent writes
summary.mdwith key arguments, turning points, and agreement areas. The judge then writesdecisions.md: winning position (or synthesized result), decisive arguments, minority opinions, confidence level, and recommended next steps. - Final output
Status table: mode, rounds used, outcome (consensus / partial / none), top 3–5 decision bullets, and links to all four artifact files. If
—reviewwas set, triggers/brewcode:reviewon the output.
Internals: phases, Discovery rules, JSONL schema, agent prompt composition
Phases (SKILL.md)
| Phase | What happens |
|---|---|
| 0 — Validation | Runs validate.sh; stops on failure. Loads archetypes.md into context. |
| 1 — Parse | Reads $ARGUMENTS; blocks until user picks mode if -m omitted. |
| 2 — Init | Runs init-log.sh; captures REPORT_DIR and LOG_FILE. |
| 3 — Interview | AskUserQuestion to confirm or adjust mode, agent count, rounds, custom profiles. |
| 4 — Agent profiles | Generates team from setup-flow.md; user confirms before proceeding. |
| 5 — Discovery | Parallel research agents per discovery-flow.md; saves discovery.md. |
| 6 — Debate | Mode-specific flow from challenge-flow.md / strategy-flow.md / critic-flow.md. |
| 7 — Summary | Secretary agent writes summary.md from full log + discovery. |
| 8 — Decision | Judge (main session) writes decisions.md. |
| 9 — Output | Displays status table; optionally invokes /brewcode:review. |
Discovery evidence mandate
Every argument in Phase 6 MUST cite at least one finding from discovery.md. Format: [Source: #N] where N is the discovery entry number. The judge tracks sourcing — unsourced claims are challenged and do not count toward consensus.
JSONL log schema
Each debate turn is one line in debate-log.jsonl:
{"ts":"2026-04-05T14:30:00","from":"agent-1","to":["agent-2"],"what":"React has larger ecosystem","why":"More packages, hiring pool [Source: #3]","type":"argument","mode":"challenge"}
{"ts":"2026-04-05T14:30:15","from":"agent-2","to":["agent-1"],"what":"Ecosystem size != quality","why":"Vue curated ecosystem avoids dependency hell [Source: #7]","type":"counter","mode":"challenge"}Entry types: argument, counter, proposal, agree, question, redirect.
Agent prompt composition (Phase 6)
Each agent’s prompt is built dynamically from four layers:
- Base template —
agents/debater-template.md - Role overlay —
agents/{role}-template.md(defender / critic / strategist) - Character traits — from
archetypes.mdfor the assigned archetype - Evidence base — full contents of
discovery.mdinjected as context
Auto-detect keywords (when -m is omitted and topic is unambiguous)
| Keywords in topic | Detected mode |
|---|---|
| compare, choose, vs, best, pick, which, select | challenge |
| strategy, approach, plan, how to, design | strategy |
| critique, weakness, risk, flaw, review, audit | critic |
| (none match) | asks user — never silently defaults |
Quorum review
Run /brewcode:review on debate output with the --review flag for a full quorum code review of the decision.
GitHub source
Source files: SKILL.md, archetypes, role templates, flow references, scripts.
Brewtools overview
All brewtools skills — text-optimize, secrets-scan, deploy, provider-switch, and more.
Updating plugins
/brewtools:plugin-update to check and update the brewcode plugin suite in one command.
See the FAQ for details.