Test-Driven Bug Hunting With Reproduction Agents prompt

Coding51.2K

四阶段协议:复现、假设、并行修复、合并

A strict four-phase protocol for reproducing and fixing bugs.

Full prompt
Bug报告:${bug}。遵循以下严格协议:阶段1(复现):编写基于mock的失败测试,复现报告中的确切场景——此时不要编辑任何生产代码。把失败的测试输出给我看。阶段2(假设):列出所有可能的根因,按可能性排序,并通过Grep/Read从代码库中提供证据。阶段3(并行修复):通过Task工具为前3个假设各派生一个子代理;每个代理在独立的git worktree/分支上修复其假设,并报告失败测试现在是否通过,以及完整测试套件是否仍然全绿。阶段4(综合):推荐应合并哪个修复及其原因,然后提交。拒绝跳过任何阶段。
Fill in the blanks, then copy

How to use this prompt

  1. 1Copy the full prompt below
  2. 2Replace the [____] placeholders with your specifics
  3. 3Paste into DeepSeek / Claude / ChatGPT to run

Related Coding prompts