关于 debug-council
debug-council 是用于单一正确答案问题的调试技能:多个 Agent 独立处理原始用户提示,再通过多数投票选出方案。它要求先询问 Agent 数量,并强调不预先探索或共享上下文。
主要功能
- 01使用相同的原始提示
- 02并行启动 3 至 10 个 Agent
- 03Agent 独立探索与分析
- 04按核心方案多数投票
- 05依据获胜方案实施并报告
适用场景
- 01定位只有一个正确答案的 Bug
- 02独立验证代码问题的根因
- 03处理准确性优先于速度的关键故障
安装
复制下面的命令,在终端中运行。
npx skills add https:/ / github.com/ michaelboeding/ skills --skill debug-council安装后在 Claude Code 中输入/debug-council确认已加载。
详细介绍
调试评审团:与研究结论一致的自一致性
对自一致性(Wang 等,2022)的纯实现。每个 Agent 都会收到用户的原始提示词,并独立探索和调试。不进行预处理,也不共享上下文。通过多数投票选出答案。
适用于只有一个正确答案的 Bug 和问题。
步骤 0:询问用户需要多少个 Agent
开始任何操作之前,先询问用户要使用多少个求解 Agent:
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.
等待用户回复。如果用户指定了数量(例如“调试评审团,5 个”),就使用该数量。
最少:3 个 Agent | 最多:10 个 Agent
关键:与研究结论一致的纯实现
这意味着什么
- 不由编排器进行探索——生成 Agent 之前,不要读取文件或收集上下文
- 向所有 Agent 提供原始用户提示词——每个 Agent 收到的都是未经修改的用户原始请求
- 每个 Agent 独立探索——由 Agent 自行探索代码库
- 真正的独立性——不共享上下文,也不互相影响
为什么这很重要
研究表明,独立样本会收敛到正确答案。如果我们进行预处理或共享上下文,就会:
- 引入编排器偏差
- 降低独立性
- 可能错过个别 Agent 会发现的问题
工作流
步骤 1:捕获用户的原始提示词
逐字照录用户的请求。不要:
- ❌ 先读取文件
- ❌ 探索代码库
- ❌ 添加上下文
- ❌ 改写或优化提示词
只需记录用户说的话。
步骤 2:使用原始提示词并行生成 Agent
同时生成所有 Agent。每个 Agent 收到的都是完全相同的原始提示词:
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)
不要修改提示词。不要添加上下文。只使用用户的原话。
步骤 3:Agent 独立工作
每个 Agent 将:
- 阅读并理解用户的请求
- 使用自己的工具(Read、Grep、Glob、LS)探索代码库
- 找出根本原因
- 推理解决方案(思维链)
- 生成完整的修复方案
每个 Agent 完全独立工作——看不到其他 Agent 正在做什么或发现了什么。
步骤 4:跟踪进度并收集解决方案
Agent 完成后,向用户显示进度:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
AGENT PROGRESS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
☑ Agent 1 - Complete
☑ Agent 2 - Complete
☑ Agent 3 - Complete
☐ Agent 4 - Working...
☐ Agent 5 - Working...
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
每个 Agent 完成后都更新此显示。全部完成后:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
AGENT PROGRESS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
☑ Agent 1 - Complete ✓
☑ Agent 2 - Complete ✓
☑ Agent 3 - Complete ✓
☑ Agent 4 - Complete ✓
☑ Agent 5 - Complete ✓
All agents finished! Analyzing solutions...
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
收集所有输出以供投票。
步骤 5:多数投票
按解决方案的核心方法/答案分组:
- 找出每个解决方案中的关键决策
- 将作出相同关键决策的解决方案分到一组
- 统计选择每种方法的 Agent 数量
投票规则:
- 明确多数(≥50%):选择该解决方案,置信度高
- 相对多数(最高比例 < 50%):选择该解决方案,置信度中等
- 没有明确胜出方案:分析分歧,置信度低
步骤 6:实施胜出方案
实施多数票选出的方案。不要综合或合并——原样采用胜出答案。
步骤 7:报告结果
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
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]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
配置
| 模式 | Agent 数量 | 使用场景 |
|---|---|---|
debug council of 3 | 3 | 更快,同时仍然可靠 |
debug council of 5 | 5 | 良好的平衡 |
debug council of 7 | 7 | 高置信度 |
debug council of 10 | 10 | 最高置信度 |
如果用户只说 debug council,请让他们选择。
研究依据
基于《Self-Consistency Improves Chain of Thought Reasoning in Language Models》(Wang 等,2022):
| 原则 | 我们的实现 |
|---|---|
| 向所有 Agent 提供相同提示词 | 未经修改的用户原始提示词 |
| 独立样本 | 每个 Agent 独立探索 |
| 不共享上下文 | 编排器不进行预处理 |
| 思维链 | Agent 使用 ultrathink |
| 多数投票 | 统计各方法的票数,选出多数方案 |
为什么速度较慢(以及为什么这没关系)
每个 Agent 都会独立地:
- 探索代码库
- 阅读相关文件
- 分析问题
- 生成解决方案
这比共享上下文的方法慢 3-10 倍,但能带来:
- 真正的独立性——没有协调器偏见
- 多样化的探索——Agent 可能会发现不同的内容
- 与研究保持一致——与论文完全一致
- 最高可靠性——适用于准确性最重要的情况
适用于那些答对比答快更重要的关键问题。
Agent
agents/ 目录中有 10 个相同的调试求解 Agent:
debug-solver-1到debug-solver-10
所有 Agent 都:
- 使用相同的指令
- 使用相同的温度(0.7)
- 使用相同的工具(Read、Grep、Glob、LS)
- 使用 ultrathink(扩展思考)
- 专注于找到唯一正确的答案
多样性来自采样随机性和独立探索,而非不同的提示词。