The site worked until you changed a button. Now nothing responds. AI guesses cache, then dependencies. Several rounds later, there are more files and you cannot remember the first change.
Recover one small thing: can the same actions still produce the same failure?
A Reddit post about AI-agent workflows uses repeatable failures as a debugging starting point. Here is a small exercise for turning “it's broken” into a checkable description.
Describe three things
What did you do? What did you expect? What happened? For example: clicked Load; expected an article title; saw no title and a parsing error in the console. Add whether reloading and repeating still reproduces it.
Keep a copy of recent changes. A return point helps compare repairs. Remove passwords, tokens, and real user data from shared material. A minimal example usually needs neither those nor the whole website.
Preserve the error in a smaller input
This JavaScript is an invented demonstration. The sample title is localized for the English exercise:
const raw = '{"title":"Demo article",}';
const article = JSON.parse(raw);
The trailing comma after the final member makes the JSON invalid. The intended valid input is:
const raw = '{"title":"Demo article"}';
const article = JSON.parse(raw);
Error wording varies by environment. The expected check is simple: the first input fails to parse; the second produces an object whose title is “Demo article.”
Real projects are more complex. Remove irrelevant pieces gradually and see whether failure remains. If removing one piece makes it disappear, that difference is evidence.
Ask for an explanation before a repair
Supply the small example and your three-part description:
Explain which line uses which input and why the result occurs. Separate established causes from hypotheses requiring tests. Suggest the smallest change first, leaving unrelated structure alone. Explain how to verify using the original example.
If the reply immediately recommends reinstalling several programs, ask which hypothesis each operation tests and whether these two lines permit a smaller check. Connect suggestions to evidence rather than scattering effort.
AI explanations can be wrong. Run the JSON example or use an independent parser instead of judging only the fluency of the explanation.
Retest the failure and the expected behavior
Repeat the original action after the change. If the error disappears, check that the title actually appears. A quiet console does not establish correct output.
Then examine a neighboring case: an empty title, a missing title, or input that is not JSON. These are different requirements. Fixing a trailing comma does not justify silently returning empty results for every bad input.
Decide explicitly whether such cases need a message, an empty title, or rejection. The product's needs determine that; AI cannot invent the decision.
Leave a useful record
Keep four items: trigger, actual cause, adopted change, and verification. Retain a failed hypothesis briefly if it explains an important choice; the entire chat need not become project documentation.
If the small example behaves differently from the real site, record that. The reproduction remains incomplete. Narrow the difference instead of declaring the whole site fixed after one example passes.
AI can suggest investigations, explain code, and draft changes. Repeatable inputs make those contributions easier to verify. Next time, keep the two lines before hauling over a thousand lines of logs.
