3 +A structured debate tool for stress-testing ideas against a devil's advocate. Designed to reduce sycophancy by forcing critical examination of decisions before commitment.
11 +/devil we should switch to microservices
14 +Or call the tool directly with parameters.
18 +##
Pi User Implications 22 +| Aspect | Behavior |
23 +|--------|----------|
24 +| **Session state** | Debates are stateless. Each call is independent. |
25 +| **Conversation history** | Debate results are NOT automatically added to the conversation. |
26 +| **Model** | Uses the currently selected model (or configured model). |
27 +| **Context** | Does NOT automatically include current conversation context. You must pass it explicitly. |
28 +| **API credentials** | Uses current session's API keys. |
29 +| **Tool results** | Displayed inline, stored in tool details, but not in conversation history unless you add them. |
34 +- Before implementing architectural decisions
35 +- When you're unsure about a direction and want pushback
36 +- After getting too much agreement (sign of sycophancy)
37 +- To document concerns for stakeholders
40 +- Quick questions (overhead too high)
41 +- When you already have strong disagreement (you don't need a devil)
42 +- Sensitive topics where disagreement feels personal
44 +###
Integration with Workflow 47 +1. You're working on something
48 +2. You get suspicious agreement → /devil <your idea>
49 +3. Review blocking issues
50 +4. Decide: proceed, revise, or abandon
51 +5. Continue with confidence (or a better idea)
56 +Because debates don't auto-include conversation context:
61 + idea:
"Add authentication to this endpoint",
63 + current_approach:
"API key in query params",
64 + security_requirements:
"Need OAuth for third-party access",
65 + timeline:
"Must ship by Friday" 71 + idea:
"Add authentication" 79 +Add to `~/.pi/agent/settings.json`:
84 + "model":
"anthropic/claude-haiku-4-5",
86 + "stoppingConditions":
"consensus",
87 + "concessionThreshold":
0.7,
88 + "onBlocking":
"surface" 93 +###
Settings Reference 95 +| Setting | Type | Default | Description |
96 +|---------|------|---------|-------------|
97 +| `model` | string | current model | Model for debates. Use cheaper models for speed. |
98 +| `maxRounds` | number | 5 | Maximum debate rounds (1-10). |
99 +| `stoppingConditions` | string | "consensus" | When to stop debating. |
100 +| `concessionThreshold` | number | 0.7 | How much concession triggers early stop (0.0-1.0). |
101 +| `onBlocking` | string | "surface" | What to do with blocking issues. |
103 +###
Stopping Conditions 105 +| Value | Behavior |
106 +|-------|----------|
107 +| `consensus` | Stop after 2 consecutive rounds with significant resolutions. |
108 +| `blocking_found` | Stop as soon as no blocking issues remain. |
109 +| `max_rounds` | Always run full `maxRounds`. |
110 +| `user_stops` | (Future: user-controlled stopping.) |
112 +###
On Blocking Behavior 114 +| Value | Behavior |
115 +|-------|----------|
116 +| `surface` | Always show blocking issues in output. |
117 +| `escalate` | Add warning if blocking issues found. |
118 +| `ignore` | Don't flag blocking issues (not recommended). |
129 + maxRounds?: number,
130 + stakeholder?: string,
131 + stoppingConditions?: string,
132 + concessionThreshold?: number,
133 + onBlocking?: string,
138 +###
Stakeholder Focus 142 +| `security` | Security concerns, attack vectors, vulnerabilities |
143 +| `cost` | Cost, ROI, resource implications, scaling costs |
144 +| `ux` | User experience, accessibility, friction points |
145 +| `implementation` | Technical complexity, dependencies, maintenance |
146 +| `ethics` | Ethical concerns, societal impact, fairness |
147 +| `skeptical` | General skepticism, challenged assumptions |
153 +###
Challenge Classification 155 +Each challenge is classified:
157 +| Classification | Meaning | Action |
158 +|---------------|---------|--------|
159 +| **blocking** | Would prevent the idea from working | Must address first |
160 +| **addressable** | Valid concern with known mitigations | Consider mitigations |
161 +| **assumed** | Based on premises that may not hold | Verify assumptions |
162 +| **minor** | Aesthetic or edge case | Not worth debating |
168 +| `proceed` | No blocking issues, idea holds up |
169 +| `proceed_with_caution` | Addressable concerns exist |
170 +| `revise` | Blocking issues require design changes |
171 +| `abandon` | Fundamental flaws identified |
178 +**Recommendation:** proceed_with_caution
180 +### Blocking Issues (must address first)
181 +- Vendor lock-in → Use abstraction layer or multi-cloud strategy
183 +### Addressable Concerns (valid concerns with mitigations)
184 +- Migration complexity → Use migration tooling (Alembic, Flyway)
186 +### What Survived Scrutiny
187 +- SQLite handles our current read/write volume
188 +- Simple deployment model reduces ops burden
190 +### What Was Conceded
191 +- WAL mode limits concurrent read performance at scale
193 +### Recommended Next Steps
194 +1. Define cloud abstraction layer
195 +2. Benchmark with production data volume
196 +3. Prototype migration strategy
198 +*Debate: 3 rounds | Blocking: 1*
209 + idea: "We should migrate from REST to GraphQL"
217 + idea: "Use SQLite as primary database",
219 + scale: "10k concurrent users",
220 + team_size: "5 developers",
221 + requirement: "ACID compliance required",
222 + timeline: "MVP by Q2"
227 +###
Focused Challenge 231 + idea: "Add real-time notifications",
232 + stakeholder: "implementation",
233 + stoppingConditions: "blocking_found"
237 +###
Full Debate with All Parameters 241 + idea: "Implement OAuth2 authentication",
243 + current: "API keys in headers",
244 + users: "1000 monthly active",
245 + security_level: "medium"
247 + model: "anthropic/claude-sonnet-4-5",
249 + stakeholder: "security",
250 + stoppingConditions: "consensus",
251 + concessionThreshold: 0.8,
252 + onBlocking: "escalate",
261 +###
Writing Good Ideas 264 +- "Add rate limiting to the API"
265 +- "Use event sourcing for order management"
266 +- "Implement dark mode across all screens"
269 +- "Improve performance" (vague)
270 +- "Make it better" (unmeasurable)
271 +- "Add auth" (missing context)
273 +###
Providing Context 275 +Context is critical for relevant challenges:
278 +// Include relevant constraints
280 + current_approach: "What you're doing now",
281 + constraints: "What limits you",
282 + requirements: "What must be preserved",
283 + timeline: "When it needs to ship"
287 +###
Interpreting Results 289 +- **Multiple blocking issues**: Revise the idea significantly
290 +- **Addressable concerns only**: Proceed with mitigations planned
291 +- **Survived full debate**: Good confidence in the idea
292 +- **Early stop (consensus)**: Either the idea is solid or concessions were too easy
298 +1. **No conversation memory**: Each debate is independent
299 +2. **LLM classification**: Challenge classification depends on model interpretation
300 +3. **Concession detection**: Keyword matching can be fooled
301 +4. **No escalation actions**: Blocking issues are surfaced, not acted upon
302 +5. **Model-dependent quality**: Challenge quality varies by model
308 +###
"No model available" 309 +- Select a model first with `/model`
310 +- Or configure `devilsAdvocate.model` in settings
312 +###
"Debate took too long" 313 +- Reduce `maxRounds`
314 +- Use a faster model (haiku vs opus)
315 +- Use `stoppingConditions: "blocking_found"`
317 +###
"Challenges aren't relevant" 318 +- Provide more specific `context`
319 +- Use `stakeholder` to focus the challenge domain
320 +- Refine your `idea` to be more specific
322 +###
"Too many minor challenges" 323 +- Use `stakeholder: "skeptical"` for priority concerns
324 +- Add `context.constraints` to narrow scope
330 +- `/compact` - Summarize conversation (use after debate)
331 +- `/tree` - Review decision history
332 +- `/fork` - Branch on different decisions