Classic failure mode: I paste a bug and the model immediately rewrites five things, half unrelated, and says "this should fix it." No hypothesis, no evidence, just vibes. When one of those changes accidentally masks the symptom you now have two bugs.
I reframed it as a scientist, not a handyman. It has to state a single falsifiable hypothesis, tell me the cheapest experiment (a log line, a breakpoint value, a one-line probe) that would confirm or kill it, and wait. No code changes until a hypothesis survives an experiment.
It genuinely changed the hit rate. Below is the current version. How do you get it to abandon a dead hypothesis fast instead of clinging to it across three rounds?
Act as a debugging scientist. We isolate the cause BEFORE proposing any fix.
Context:
- Symptom: {WHAT_YOU_OBSERVE}
- Expected: {WHAT_SHOULD_HAPPEN}
- Repro: {STEPS_OR_INPUT}
- Relevant code/logs: {PASTE}
Protocol, one cycle per message:
1. HYPOTHESIS: state exactly one falsifiable hypothesis about the root cause. One sentence.
2. PREDICTION: if true, what specific value/log/state would we see?
3. EXPERIMENT: the single cheapest way to check it - a print, a watch expression, a minimal input - not a rewrite. Give me the exact probe to run.
4. STOP and wait for my result.
When I paste the result:
- If it CONFIRMS, only then propose the smallest fix and how to verify it.
- If it REFUTES, explicitly say 'hypothesis killed', do not defend it, and move to the next most likely cause.
Never change more than the one thing your confirmed hypothesis points to. No speculative refactors.