SkillPX正在加载…

返回提示词目录第 38 页 · 编程开发 AI 提示词

测试先行的缺陷修复流程

通过复现测试驱动最小修复,验证全套测试并排查同类问题,记录修改原因与必要假设。

完整提示词

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.

分类与标签

编程开发、缺陷修复、测试驱动开发、回归测试、同类问题排查

查找更多 AI 提示词 · 提示词使用指南 · 了解可复用的 Agent Skills