Research-aligned self-consistency for debugging. Spawns independent solver agents that each explore and debug the problem from scratch. Uses majority voting. Based on "Self-Consistency Improves Chain of Thought Reasoning" (Wang et al., 2022). Use for critical bugs, algorithms, or when other approaches have failed.
Pure implementation of self-consistency (Wang et al., 2022). Each agent receives the raw user prompt and explores/debugs independently. No pre-processing, no shared context. Majority voting selects the answer.
Use this for bugs and problems with ONE correct answer.
Before doing anything else, ask the user how many solver agents to use:
How many debug agents would you like me to use? (3-10)
Recommendations:
- 3 agents: Faster, still reliable
- 5 agents: Good balance
- 7 agents: High confidence
- 10 agents: Maximum confidence (critical bugs)
Note: Each agent will independently explore the codebase and find the bug.
This takes longer but provides true independence per the research.
Wait for the user's response. If they specified a number (e.g., "debug council of 5"), use that.
Minimum: 3 agents | Maximum: 10 agents
The research shows that independent samples converge on correct answers. If we pre-process or share context, we:
Take the user's request exactly as stated. Do NOT:
Just capture what the user said.
Spawn ALL agents simultaneously. Each gets the exact same raw prompt:
Task(agent: "debug-solver-1", prompt: "[USER'S EXACT WORDS]")
Task(agent: "debug-solver-2", prompt: "[USER'S EXACT WORDS]")
Task(agent: "debug-solver-3", prompt: "[USER'S EXACT WORDS]")
... (all in the SAME batch - parallel execution)
DO NOT modify the prompt. DO NOT add context. Raw user words only.
Each agent will:
Each agent works in complete isolation - they cannot see what other agents are doing or have found.
As agents complete, show progress to the user:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
AGENT PROGRESS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
☑ Agent 1 - Complete
☑ Agent 2 - Complete
☑ Agent 3 - Complete
☐ Agent 4 - Working...
☐ Agent 5 - Working...
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Update this display as each agent finishes. When all complete:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
AGENT PROGRESS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
☑ Agent 1 - Complete ✓
☑ Agent 2 - Complete ✓
☑ Agent 3 - Complete ✓
☑ Agent 4 - Complete ✓
☑ Agent 5 - Complete ✓
All agents finished! Analyzing solutions...
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Collect all outputs for voting.
Group solutions by their core approach/answer:
Voting rules:
Implement the majority solution. Do NOT synthesize or merge - use the winning answer as-is.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
DEBUG COUNCIL RESULTS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
## 📊 Voting Summary
| Approach | Description | Agents | Votes |
|----------|-------------|--------|-------|
| ✅ A | [description] | 1, 2, 4, 5, 7 | **5/7** |
| B | [description] | 3, 6 | 2/7 |
**Winner: Approach A** (71% consensus)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
## 🔍 What Each Agent Found
### Agent 1
- Files explored: [list]
- Root cause identified: [summary]
- Solution: [brief]
### Agent 2
- Files explored: [list]
- Root cause identified: [summary]
- Solution: [brief]
... (for each agent)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
## 🧠 Reasoning Highlights
### Why majority chose Approach A:
- Agent 1: "[key insight]"
- Agent 2: "[key insight]"
- Agent 4: "[key insight]"
### Why minority chose differently:
- Agent 3: "[different perspective]"
### Valuable minority insight:
[Any good ideas from minority that might be worth noting]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
## 📈 Confidence: HIGH/MEDIUM/LOW
[Explanation based on voting distribution and reasoning quality]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
## ✅ Selected Solution
[The complete winning solution]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
## 🔧 Implementation
[The actual code change being made]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
| Mode | Agents | Use Case |
|------|--------|----------|
| debug council of 3 | 3 | Faster, still reliable |
| debug council of 5 | 5 | Good balance |
| debug council of 7 | 7 | High confidence |
| debug council of 10 | 10 | Maximum confidence |
If user just says debug council, ask them to choose.
Based on "Self-Consistency Improves Chain of Thought Reasoning in Language Models" (Wang et al., 2022):
| Principle | Our Implementation | |-----------|-------------------| | Same prompt to all | Raw user prompt, unmodified | | Independent samples | Each agent explores independently | | No shared context | No orchestrator pre-processing | | Chain-of-thought | Agents use ultrathink | | Majority voting | Count approaches, select majority |
Each agent independently:
This takes 3-10x longer than shared-context approaches, but provides:
Use this for critical problems where getting it right matters more than getting it fast.
10 identical debug solver agents in agents/ directory:
debug-solver-1 through debug-solver-10All agents:
Diversity comes from sampling randomness and independent exploration, not different prompts.
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer