red-green-proof
将疑似缺陷转化为已证实的缺陷。在声称原因之前对照现实验证原因,编写一个在当前代码上 FAILS 的测试,应用修复,观察其通过——然后回退修复并确认测试再次变红,因为双向都通过的测试证明不了任何东西。在调试对话后单独调用时,它从上下文获取目标而非询问。在修复缺陷、调查事件、加固不稳定区域,或被要求“添加能揭示缺陷的测试”时使用。触发词为“/red-green-proof”“证明缺陷”“红绿”“先让测试失败”“那个测试是否承重”“用测试揭示缺陷”。
机器翻译查看英文原文
Turns a suspected bug into a proven one. Verify the cause against reality before claiming it, write a test that FAILS on the current code, apply the fix, watch it pass — then revert the fix and confirm the test goes red again, because a test that passes both ways proves nothing. Invoked bare after a debugging conversation, it takes the target from context rather than asking. Use when fixing a bug, investigating an incident, hardening a flaky area, or when asked to "add tests that reveal the bug". Triggers on "/red-green-proof", "prove the bug", "red-green", "make the test fail first", "is that test load-bearing", "reveal the bug with a test".
适用对象:软件开发与测试。自动收录 · 待核查。
在 Cursor 中使用
该组合的专门教程待补充,尚未核实适配。
准备条件
- 本条仅收录原作者的技能元数据;请阅读完整说明,确认依赖、许可与使用条件。
选择已有说明的 AI 工具,或在页面加载后保存待办及提出教程请求。
查看原作者说明 ↗