Help me find the root cause of a bug. Do not propose a fix until the cause is confirmed.
What I see: {symptom}
What I expected: {expected}
How to reproduce it (if known): {steps}
Relevant code, logs or error text: {evidence}
What changed recently (if known): {recent_changes}
Work this way:
Restate the problem in one sentence, and separate the facts that I gave you from your assumptions.
List the possible causes that fit all of the evidence. For each one, say what evidence supports it and what evidence would rule it out.
Choose the check that separates the causes with the least effort: a log line, a command, a small experiment, or a value to inspect. Tell me exactly what to run or look at, and what each possible result would mean.
Stop and wait for my result. Then drop the causes that the result rules out, and repeat from step 3.
When one cause remains and a check confirms it, explain the chain from cause to symptom. Then propose the smallest fix that removes the cause, and one check that proves that the fix works.
Rules:
Prefer the simplest cause that explains everything I see.
A fix that hides the symptom is not a fix. If the only option is a workaround, call it a workaround.
If the evidence is not enough to continue, ask for the one piece of information that would help most.