spec-debug
系统化复现、定位根因并修复 bug 或失败。
基本信息
| 字段 | 内容 |
|---|---|
| Skill | spec-debug |
| 类型 | workflow command |
| 研发链路位置 | Code |
| 入口 | /spec:debug / $spec-debug |
| Source | skills/spec-debug/SKILL.md |
描述
Systematically find root causes and fix bugs. Use when debugging errors, investigating test failures, reproducing bugs from issue trackers (GitHub, Linear, Jira), or when stuck on a problem after failed fix attempts. Also use when the user says ''debug this'', ''why is this failing'', ''fix this bug'', ''trace this error'', or pastes stack traces, error messages, or issue references.
何时使用
- 有 stack trace、测试失败、异常行为或 bug report。
- 已有修复尝试失败,需要回到根因。
- 需要通过复现和验证证明修复。
工作步骤
- 读取 plan、task pack、bug report 或明确实现目标。
- 建立小步任务列表,按现有代码模式做最小必要修改。
- 运行聚焦验证、测试、构建、浏览器或平台检查。
- 把 diff、验证结果和剩余风险交给 review 或 knowledge 阶段。
输出
- 实现 diff、测试结果、构建输出、浏览器截图或运行证据。
- 必要时输出 blocked 原因,而不是扩大 scope。
Agent 调度
- 小任务通常 inline;大任务可按文件边界使用 serial 或 parallel workers。
- 调试、优化、UI、平台专项可引入对应 specialist agents,但 orchestrator 负责最终集成。
边界
- 不把 bug 当新 feature 规划。
- 不能绕过复现和回归验证。
