What does this code assume is true for it to work?
Examples: required fields, auth state, network availability, non-null data, timing.
Here is the code:
[paste code]
Then tell me which assumptions are most likely false given this symptom: [describe symptom].
I am stuck. I will describe what I see, and you ask me one question at a time until we find the cause.
Start by asking for the minimum info you need.
Symptom: [describe]
Environment: [browser, OS, device, local vs deployed]
Error (if any): [paste]
This is useful when you do not know what to paste yet.
Here is the feature and code:
Feature: [what it does]
Code:
[paste]
List unusual but realistic cases that could break it (empty input, double clicks, slow network, weird characters, time zones, permissions). For each case, tell me how to reproduce and how to guard against it.
We fixed the bug: [describe the fix].
How do I prevent this class of bug in the future?
Suggest: validation, better error messages, logging, tests, and UI safeguards.
Keep changes small and show code examples where possible.
Ask for a minimal “guardrail” first, then add tests if you have time.
Pick one broken behavior and run prompts #2 and #3 with the exact error and reproduction steps. That usually narrows the problem to one file and one change.