Debugging And Refactoring
# 03. Debugging & Refactoring Prompts
*(Use these prompts when the AI gets stuck in an error-loop, hallucinates bad code, or you need to untangle a massive architectural mess.)*
---
## Recipe: The "Halt and Explain" Protocol
**Why it works:** When an agent (like Claude Code) tries to fix a syntax error 5 times and keeps failing, its reasoning is corrupted. You must stop it and force it to vocalize its understanding.when to use it
Community prompt sourced from the open-source GitHub repo bluegalaxy111/awesome-vibe-coding (CC0-1.0). A "Debugging And Refactoring" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
codingcommunitydeveloper
source
bluegalaxy111/awesome-vibe-coding · CC0-1.0
more in Coding
Coding✓ tested
Senior code review (strict mode)
senior staff engineer running a merciless but fair review
Coding✓ tested
Debug by hypothesis, not by guessing
debugging partner who forms theories before touching code
Coding✓ tested
Generate tests from described behavior
test engineer who writes tests that would actually catch regressions