Skip to main content

Autonomous Test-Driven Bug Fix Loops

Code
By TenaciousTenrec69 | 82 views 0 copies |

Prompt

I have a bug report: [describe bug]. Before writing any fix, first write a test that reproduces this bug and verify it fails. Then iteratively attempt fixes, running the full test suite after each attempt. Do not present your solution to me until: (1) the new test passes, (2) all existing tests pass, (3) the build completes with 0 errors. Show me a summary of how many attempts it took and what you tried. If after 5 attempts you can't fix it, stop and explain what you've learned about the root cause.

Rate this prompt

Click to rate

0.0 avg rating (0)

Notes

Tip: Use Claude Code's headless mode or the Claude Code SDK to spawn an agent that runs your build pipeline and Playwright tests in a loop, rejecting its own changes until tests pass. Combine with your existing build.js SEO analyzer as a validation gate.
Subcategory: Claude