repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

style(agent): apply caveman-ultra to devil prompts

b7e8de322d502b652fcffa50fa2aa03168397da8

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Abbreviate, strip articles, arrows for causality.
Faster prompts, same quality output.

Changed files (1)

pi/agent/extensions/devil/index.ts

Modified
30 30 import { complete, type Message } from "@mariozechner/pi-ai";
31 31 import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
33 -const DEVIL_SYSTEM_PROMPT = `You are a devil's advocate in a structured debate. Your goal is to STRESS TEST the proposer's idea by identifying blocking issues.
33 +const DEVIL_SYSTEM_PROMPT = `Devil advocate. STRESS TEST ideas. Find blocking issues.
35 -CLASSIFICATION GUIDE:
36 -- **blocking**: Would prevent the idea from working entirely. Must be addressed before proceeding.
37 -- **addressable**: Valid concern but has known mitigations or workarounds.
38 -- **assumed**: Based on premises that may not hold in all contexts.
39 -- **minor**: Aesthetic preference, stylistic choice, or edge case that won't affect success.
35 +CLASSIFICATION:
36 +- **blocking**: Prevents idea working. Must fix before proceeding.
37 +- **addressable**: Valid concern. Has mitigations.
38 +- **assumed**: Premise may not hold.
39 +- **minor**: Cosmetic. No functional impact.
41 41 EXAMPLES:
42 -- "This requires authentication that doesn't exist" → blocking
43 -- "Users might find this confusing" → addressable (can add onboarding)
44 -- "This assumes fast internet" → assumed (premise may not hold)
45 -- "The button should be blue not green" → minor (cosmetic, doesn't affect functionality)
42 +- "Req auth missing" → blocking
43 +- "Users confused" → addressable (add onboarding)
44 +- "Assumes fast net" → assumed (premise fragile)
45 +- "Blue vs green button" → minor
47 47 RULES:
48 -1. Lead with blocking concerns. Do not waste rounds on minor issues.
49 -2. Be specific: name the exact failure mode, not vague risks.
50 -3. If a defense successfully addresses a concern, acknowledge it and move on.
51 -4. Focus on what would actually break the idea, not theoretical concerns.
48 +1. Lead with blocking. Skip minor issues.
49 +2. Name exact failure modes. No vague risks.
50 +3. Acknowledge successful defenses.
51 +4. Focus on what BREAKS the idea.
53 -Format each challenge as:
54 -### [CLASSIFICATION] Challenge Title
55 -**The concern:** Clear statement of the problem
56 -**What would resolve it:** Specific conditions that would satisfy you
57 -**Current status:** outstanding / resolved / retracted`;
53 +FORMAT:
54 +### [CLASSIFICATION] Title
55 +**Concern:** [problem]
56 +**Fix:** [what resolves it]
57 +**Status:** outstanding / resolved / retracted`;
59 -const PROPOSER_SYSTEM_PROMPT = `You are presenting an idea for scrutiny. Your goal is to DEFEND it where valid and ACKNOWLEDGE where it's weak.
59 +const PROPOSER_SYSTEM_PROMPT = `Present idea. DEFEND where valid. ACKNOWLEDGE weaknesses.
61 61 RULES:
62 -1. Don't capitulate easily - require specific evidence against your idea
63 -2. Distinguish between "I don't know", "that doesn't apply", and "I've addressed that"
64 -3. If a concern is valid, acknowledge it and explain the mitigation
65 -4. Do not concede to blocking concerns without explaining how you'd address them
62 +1. Don't capitulate easily. Require specific evidence.
63 +2. Distinguish: "I don't know" vs "doesn't apply" vs "addressed that".
64 +3. If concern valid → acknowledge + explain mitigation.
65 +4. Never concede blocking issues without explaining fix.
67 -For each challenge, respond with:
68 -1. **Your defense**: What defeats or addresses this challenge
69 -2. **Concession** (if valid): Acknowledge what concern remains
67 +FOR EACH CHALLENGE:
68 +1. **Defense**: What defeats/challenges it
69 +2. **Concession** (if valid): What remains
70 70 3. **Status**: outstanding / resolved
72 -Be specific. "I addressed that" requires explaining how.`;
72 +Be specific. "Addressed that" requires HOW.`;
74 -const SYNTHESIS_SYSTEM_PROMPT = `Analyze this debate and produce an honest summary for a user who needs to make a decision.
74 +const SYNTHESIS_SYSTEM_PROMPT = `Analyze debate. Produce honest summary. Help user decide.
76 -CLASSIFICATION SUMMARY:
77 -- **blocking**: Must fix before proceeding
78 -- **addressable**: Valid but has mitigations
79 -- **assumed**: Depends on unverified premises
76 +CLASSIFICATION:
77 +- **blocking**: Must fix
78 +- **addressable**: Has mitigations
79 +- **assumed**: Premise unverified
80 80 - **minor**: Not worth fixing
82 -Output format:
82 +OUTPUT:
84 83 ## Summary
86 85 **Recommendation:** proceed / proceed_with_caution / revise / abandon
88 -### Blocking Issues (must address first)
89 -- [blocking concern] → [what would fix it]
87 +### Blocking Issues
88 +- [concern] → [fix]
91 -### Addressable Concerns (valid concerns with mitigations)
92 -- [concern] → [mitigation strategy]
90 +### Addressable Concerns
91 +- [concern] → [mitigation]
94 -### What Survived Scrutiny
95 -- [claims that held up under pressure]
93 +### Survived
94 +- [claims that held]
97 -### What Was Conceded
96 +### Conceded
98 97 - [acknowledged weaknesses]
100 -### Recommended Next Steps
101 -1. [action item]
102 -2. [action item]`;
99 +### Next Steps
100 +1. [action]
101 +2. [action]`;
104 103 // Default settings
105 104 const DEFAULT_MAX_ROUNDS = 5;
124 123 pi.registerTool({
125 124 name: "devils_advocate",
126 125 label: "Devil's Advocate",
127 - description: `A structured debate tool for stress-testing ideas against a devil's advocate.
129 -Run debates to surface blocking issues before committing to decisions.
126 + description: `Debate tool. STRESS TEST ideas. Surface blocking issues before committing.
131 128 Parameters:
132 -- idea: The idea/claim to debate (required)
133 -- context: Key-value pairs for background (optional)
134 -- model: Override model (optional)
135 -- maxRounds: Maximum rounds 1-10 (default: ${devilSettings.maxRounds ?? DEFAULT_MAX_ROUNDS})
136 -- stakeholder: security | cost | ux | implementation | ethics | skeptical
137 -- stoppingConditions: When to stop (default: ${devilSettings.stoppingConditions ?? DEFAULT_STOPPING_CONDITIONS})
138 -- output: full | summary_only (default: summary_only)`,
129 +- idea: Idea to debate (req)
130 +- context: Background kvpairs (opt)
131 +- model: Model override (opt)
132 +- maxRounds: 1-10 rounds (default: ${devilSettings.maxRounds ?? DEFAULT_MAX_ROUNDS})
133 +- stakeholder: security | cost | ux | impl | ethics | skeptical
134 +- stoppingConditions: When stop (default: ${devilSettings.stoppingConditions ?? DEFAULT_STOPPING_CONDITIONS})
135 +- output: full | summary_only`,
139 136 parameters: Type.Object({
140 137 idea: Type.String({
141 - description: "The idea, claim, or decision to debate. Be specific and concrete.",
138 + description: "Idea/claim/decision. Be specific.",
143 140 context: Type.Optional(
144 141 Type.Record(Type.String(), Type.String(), {