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

FieldValue
Command/brewtools:debate
Arguments[topic] [-m challenge|strategy|critic] [-n 2-5] [-r max-rounds] [--review]
Modelopus
Agents2–5 dynamic debaters + secretary + judge (main session)
Outputdiscovery.md, decisions.md, summary.md, debate-log.jsonl

When to use

ScenarioCommand
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

ModeGoalAgent setup
Challenge (default)Select the best variant from competing optionsDefenders argue FOR, critics attack; judge declares winner
StrategySynthesize the strongest approach from independent proposalsAll agents are strategists; goal is convergence, not a winner
CriticFind every weakness, risk, and flawAll 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

  1. 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 via AskUserQuestion before doing anything else.

  2. 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.

  3. 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.md and injected into every debater’s context.

  4. 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.

  5. Summary and decision

    A secretary agent writes summary.md with key arguments, turning points, and agreement areas. The judge then writes decisions.md: winning position (or synthesized result), decisive arguments, minority opinions, confidence level, and recommended next steps.

  6. Final output

    Status table: mode, rounds used, outcome (consensus / partial / none), top 3–5 decision bullets, and links to all four artifact files. If —review was set, triggers /brewcode:review on the output.

Internals: phases, Discovery rules, JSONL schema, agent prompt composition

Phases (SKILL.md)

PhaseWhat happens
0 — ValidationRuns validate.sh; stops on failure. Loads archetypes.md into context.
1 — ParseReads $ARGUMENTS; blocks until user picks mode if -m omitted.
2 — InitRuns init-log.sh; captures REPORT_DIR and LOG_FILE.
3 — InterviewAskUserQuestion to confirm or adjust mode, agent count, rounds, custom profiles.
4 — Agent profilesGenerates team from setup-flow.md; user confirms before proceeding.
5 — DiscoveryParallel research agents per discovery-flow.md; saves discovery.md.
6 — DebateMode-specific flow from challenge-flow.md / strategy-flow.md / critic-flow.md.
7 — SummarySecretary agent writes summary.md from full log + discovery.
8 — DecisionJudge (main session) writes decisions.md.
9 — OutputDisplays 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:

  1. Base template — agents/debater-template.md
  2. Role overlay — agents/{role}-template.md (defender / critic / strategist)
  3. Character traits — from archetypes.md for the assigned archetype
  4. Evidence base — full contents of discovery.md injected as context

Auto-detect keywords (when -m is omitted and topic is unambiguous)

Keywords in topicDetected mode
compare, choose, vs, best, pick, which, selectchallenge
strategy, approach, plan, how to, designstrategy
critique, weakness, risk, flaw, review, auditcritic
(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

Use /brewtools:plugin-update to check and update the brewcode plugin suite in one command. See the FAQ for details.