diagnose
诊断 (Diagnose)
疑难 bug 的纪律。仅在有明确理由时才跳过阶段。
A discipline for hard bugs. Skip phases only when explicitly justified.
探索代码库时,使用项目的领域词汇表来建立相关模块的清晰心智模型,并检查你正在修改区域的 ADR。
When exploring the codebase, use the project's domain glossary to get a clear mental model of the relevant modules, and check ADRs in the area you're touching.
阶段 1 — 建立反馈循环 (Phase 1 — Build a feedback loop)
这才是核心技能。 其余都是机械操作。如果你拥有一个快速、确定性、agent 可运行的 pass/fail 信号来检测这个 bug,你就能找到原因——二分法、假设检验和埋点都只是在消费那个信号。如果没有,盯着代码看再多也无济于事。
This is the skill. Everything else is mechanical. If you have a fast, deterministic, agent-runnable pass/fail signal for the bug, you will find the cause — bisection, hypothesis-testing, and instrumentation all just consume that signal. If you don't have one, no amount of staring at code will save you.
在这里花不成比例的精力。要激进。要创造。拒绝放弃。
Spend disproportionate effort here. Be aggressive. Be creative. Refuse to give up.
More from ninehills/mattpocock-skills
to-issues
使用曳光弹垂直切片将计划、规格或 PRD 拆分为项目 issue 跟踪器上可独立认领的 issue。当用户想将计划转换为 issue、创建实现工单、或将工作拆分为 issue 时使用。 (Break a plan, spec, or PRD into independently-grabbable issues on the project issue tracker using tracer-bullet vertical slices. Use when user wants to convert a plan into issues, create implementation tickets, or break down work into issues.)
2tdd
红-绿-重构循环的测试驱动开发。当用户想使用 TDD 构建功能或修复 bug、提到"红-绿-重构"、想要集成测试、或要求测试先行开发时使用。 (Test-driven development with red-green-refactor loop. Use when user wants to build features or fix bugs using TDD, mentions "red-green-refactor", wants integration tests, or asks for test-first development.)
1handoff
将当前对话压缩为交接文档,供另一个 agent 接续工作。 (Compact the current conversation into a handoff document for another agent to pick up.)
1grill-me
对用户的计划或设计进行无情的访谈,直到达成共识,逐个解决决策树的每个分支。当用户想要压力测试计划、被质疑设计或提到"grill me"时使用。 (Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".)
1zoom-out
让 agent 拉远视角,对不熟悉的代码区域给出更广泛的上下文或更高层次的视角。当用户不熟悉某段代码或需要理解它如何融入更大图景时使用。 (Tell the agent to zoom out and give broader context or a higher-level perspective. Use when you're unfamiliar with a section of code or need to understand how it fits into the bigger picture.)
1caveman
>
1