Ask for a testable diagnosis before changing code, with attention to reproducibility and regressions.
Investigate this bug in {{language or stack}}. Expected behavior: {{expected}}. Actual behavior: {{actual}}. Reproduction steps: {{steps}}. Relevant code and logs: {{evidence}}. First summarize what the evidence proves and what remains unknown. Then list the most likely causes, the smallest test that would distinguish them, and a minimal fix only if supported. Identify regression risks and tests to add. Do not invent files, APIs, or logs; ask for missing evidence.
Get a bounded debugging plan for a reproducible UI or API defect.