Red Team — Adversarial Debate Engine
Stress-test any decision by having AI agents with conflicting worldviews debate it.
Prerequisites
One of these coding agent CLIs (uses your existing subscription — no API key needed):
- Claude Code (default):
claude — npm i -g @anthropic-ai/claude-code
- Codex:
codex — npm i -g @openai/codex
- Gemini:
gemini — npm i -g @google/gemini-cli
No Python dependencies beyond the standard library.
Quick Start
# Basic 3-persona debate (uses Max subscription via claude CLI)
python3 ~/.openclaw/skills/red-team/scripts/red-team.py \
--question "Should we do X?" \
--personas "bull,bear,operator"
# Full debate with context and output file
python3 ~/.openclaw/skills/red-team/scripts/red-team.py \
-q "Should we invest $50k in this deal?" \
-p "bull,bear,cash-flow,local-realist" \
-r 3 \
-c /path/to/deal-data.md \
-o /tmp/red-team-result.md
# Use a different model
python3 ~/.openclaw/skills/red-team/scripts/red-team.py \
-q "Should we launch this product?" \
-p "bull,customer,operator" \
-m opus
# List all available personas
python3 ~/.openclaw/skills/red-team/scripts/red-team.py --list-personas
How to Use (as OpenClaw Agent)
When the user asks you to "red team" something, "stress test" an idea, play "devil's advocate", or asks "what could go wrong":
- Identify the question/decision from the user's message
- Choose appropriate personas (default: bull,bear,operator — adjust based on domain)
- Run the script and save output
- Summarize the key findings to the user, share the full report if requested
Persona selection guide:
- Investment/financial decisions → bull, bear, cash-flow, economist
- Product/startup ideas → bull, customer, operator, technologist
- Legal/compliance questions → regulator, bear, operator
- Strategy/direction → contrarian, economist, historian, bull
- General "should we do X?" → bull, bear, operator (good default)
Available Personas
| Key |
Name |
Worldview |
| bull |
The Bull |
Optimistic, opportunity-focused |
| bear |
The Bear |
Risk-averse, capital preservation |
| contrarian |
The Contrarian |
Oppositional, consensus-challenging |
| operator |
The Operator |
Execution-focused pragmatist |
| economist |
The Economist |
Macro trends, opportunity cost |
| local-realist |
The Local Realist |
Ground truth, local specifics |
| cash-flow |
The Cash Flow Analyst |
Income, carrying costs, IRR |
| regulator |
The Regulator |
Compliance, legal risk |
| technologist |
The Technologist |
Automation, scalability |
| customer |
The Customer |
End-user demand, willingness to pay |
| ethicist |
The Ethicist |
Moral implications, stakeholder impact |
| historian |
The Historian |
Historical patterns, precedent |
Custom Personas
Create a JSON file:
{
"my-persona": {
"name": "The Skeptic",
"description": "Questions everything, trusts nothing",
"system": "You are The Skeptic — you question every assumption..."
}
}
Use with --custom-personas /path/to/file.json. Custom personas merge with built-ins.
CLI Options
| Flag |
Default |
Description |
--question, -q |
required |
The question to debate |
--personas, -p |
bull,bear,operator |
Comma-separated persona keys |
--rounds, -r |
2 |
Number of critique rounds |
--output, -o |
stdout |
Output file path |
--context-file, -c |
none |
Additional context file |
--custom-personas |
none |
Custom personas JSON |
--model, -m |
sonnet |
Model alias (sonnet, opus, haiku, gpt-4o, etc.) |
--backend, -b |
claude |
CLI backend: claude, codex, or gemini |
--list-personas |
— |
List personas and exit |
Output Structure
The output is a markdown document with:
- Initial Proposals — Each agent's independent take
- Critique Rounds — Agents critique each other
- Refinement — Agents update positions based on critiques
- Conviction Scores — Each agent scores all positions (0-100)
- Synthesis & Decision Brief — Neutral agent produces:
- Executive summary
- Consensus points
- Key disagreements
- Risk matrix
- Conviction score summary
- Synthesized recommendation
- Next steps
When to Use
✅ Good for: Important decisions, investment analysis, product strategy, "go/no-go" calls, pre-mortems, challenging groupthink
❌ Not for: Simple factual questions, time-sensitive emergencies, decisions already made, emotional/personal choices
Integration Tips
- Save output to memory files for future reference
- Create BEADS tasks from the "Next Steps" section
- Feed context files from Obsidian or project docs
- Re-run with different personas for different perspectives
- Use
--rounds 1 for quick takes, --rounds 3 for deep analysis
1---
2name: red-team
3description: >
4 Adversarial multi-agent debate engine for stress-testing decisions, ideas, and strategies.
5 Orchestrates multiple AI agents with conflicting worldviews (bull, bear, operator, contrarian, etc.)
6 to debate a question through structured rounds, then synthesizes results into a decision brief.
7 Use for: red team analysis, adversarial debate, stress testing ideas, devil's advocate,
8 "what could go wrong" analysis, decision validation, pre-mortem exercises.
9metadata:
10 source: https://skillmd.com/skills/modbender/red-team
11---
12
13# Red Team — Adversarial Debate Engine
14
15Stress-test any decision by having AI agents with conflicting worldviews debate it.
16
17## Prerequisites
18
19One of these coding agent CLIs (uses your existing subscription — no API key needed):
20- **Claude Code** (default): `claude` — `npm i -g @anthropic-ai/claude-code`
21- **Codex**: `codex` — `npm i -g @openai/codex`
22- **Gemini**: `gemini` — `npm i -g @google/gemini-cli`
23
24No Python dependencies beyond the standard library.
25
26## Quick Start
27
28```bash
29# Basic 3-persona debate (uses Max subscription via claude CLI)
30python3 ~/.openclaw/skills/red-team/scripts/red-team.py \
31 --question "Should we do X?" \
32 --personas "bull,bear,operator"
33
34# Full debate with context and output file
35python3 ~/.openclaw/skills/red-team/scripts/red-team.py \
36 -q "Should we invest $50k in this deal?" \
37 -p "bull,bear,cash-flow,local-realist" \
38 -r 3 \
39 -c /path/to/deal-data.md \
40 -o /tmp/red-team-result.md
41
42# Use a different model
43python3 ~/.openclaw/skills/red-team/scripts/red-team.py \
44 -q "Should we launch this product?" \
45 -p "bull,customer,operator" \
46 -m opus
47
48# List all available personas
49python3 ~/.openclaw/skills/red-team/scripts/red-team.py --list-personas
50```
51
52## How to Use (as OpenClaw Agent)
53
54When the user asks you to "red team" something, "stress test" an idea, play "devil's advocate", or asks "what could go wrong":
55
561. Identify the question/decision from the user's message
572. Choose appropriate personas (default: bull,bear,operator — adjust based on domain)
583. Run the script and save output
594. Summarize the key findings to the user, share the full report if requested
60
61**Persona selection guide:**
62- Investment/financial decisions → bull, bear, cash-flow, economist
63- Product/startup ideas → bull, customer, operator, technologist
64- Legal/compliance questions → regulator, bear, operator
65- Strategy/direction → contrarian, economist, historian, bull
66- General "should we do X?" → bull, bear, operator (good default)
67
68## Available Personas
69
70| Key | Name | Worldview |
71|-----|------|-----------|
72| bull | The Bull | Optimistic, opportunity-focused |
73| bear | The Bear | Risk-averse, capital preservation |
74| contrarian | The Contrarian | Oppositional, consensus-challenging |
75| operator | The Operator | Execution-focused pragmatist |
76| economist | The Economist | Macro trends, opportunity cost |
77| local-realist | The Local Realist | Ground truth, local specifics |
78| cash-flow | The Cash Flow Analyst | Income, carrying costs, IRR |
79| regulator | The Regulator | Compliance, legal risk |
80| technologist | The Technologist | Automation, scalability |
81| customer | The Customer | End-user demand, willingness to pay |
82| ethicist | The Ethicist | Moral implications, stakeholder impact |
83| historian | The Historian | Historical patterns, precedent |
84
85## Custom Personas
86
87Create a JSON file:
88
89```json
90{
91 "my-persona": {
92 "name": "The Skeptic",
93 "description": "Questions everything, trusts nothing",
94 "system": "You are The Skeptic — you question every assumption..."
95 }
96}
97```
98
99Use with `--custom-personas /path/to/file.json`. Custom personas merge with built-ins.
100
101## CLI Options
102
103| Flag | Default | Description |
104|------|---------|-------------|
105| `--question`, `-q` | required | The question to debate |
106| `--personas`, `-p` | bull,bear,operator | Comma-separated persona keys |
107| `--rounds`, `-r` | 2 | Number of critique rounds |
108| `--output`, `-o` | stdout | Output file path |
109| `--context-file`, `-c` | none | Additional context file |
110| `--custom-personas` | none | Custom personas JSON |
111| `--model`, `-m` | sonnet | Model alias (sonnet, opus, haiku, gpt-4o, etc.) |
112| `--backend`, `-b` | claude | CLI backend: claude, codex, or gemini |
113| `--list-personas` | — | List personas and exit |
114
115## Output Structure
116
117The output is a markdown document with:
1181. **Initial Proposals** — Each agent's independent take
1192. **Critique Rounds** — Agents critique each other
1203. **Refinement** — Agents update positions based on critiques
1214. **Conviction Scores** — Each agent scores all positions (0-100)
1225. **Synthesis & Decision Brief** — Neutral agent produces:
123 - Executive summary
124 - Consensus points
125 - Key disagreements
126 - Risk matrix
127 - Conviction score summary
128 - Synthesized recommendation
129 - Next steps
130
131## When to Use
132
133✅ **Good for:** Important decisions, investment analysis, product strategy, "go/no-go" calls, pre-mortems, challenging groupthink
134
135❌ **Not for:** Simple factual questions, time-sensitive emergencies, decisions already made, emotional/personal choices
136
137## Integration Tips
138
139- Save output to memory files for future reference
140- Create BEADS tasks from the "Next Steps" section
141- Feed context files from Obsidian or project docs
142- Re-run with different personas for different perspectives
143- Use `--rounds 1` for quick takes, `--rounds 3` for deep analysis