Text测试优先的缺陷修复流程
Text
测试优先的缺陷修复流程
引导编程助手先复现缺陷,再编写测试、实施最小修复并检查相关代码路径。
Prompt
I have a bug: ${bug}. Take a test-first approach: 1) Read the relevant source files and existing tests. 2) Write a failing test that reproduces the exact bug. 3) Run the test suite to confirm it fails. 4) Implement the minimal fix. 5) Re-run the full test suite. 6) If any test fails, analyze the failure, adjust the code, and re-run—repeat until ALL tests pass. 7) Then grep the codebase for related code paths that might have the same issue and add tests for those too. 8) Summarize every change made and why. Do not ask me questions—make reasonable assumptions and document them.
How to use
将 bug 变量替换成具体问题,让助手按步骤定位、修复并总结变更。
Details
- Type
- Text
- Source
- ilkerulusoy
- License
- CC0-1.0