Code prompts
Code prompt

Generate a debugging hypothesis tree (ranked by likelihood × cost)

Something is broken. You want a structured set of hypotheses with cheap verification steps, not a stack-overflow random walk.

Works best in: Claude

Debug by hypothesis, not by trial. Produce a ranked set of hypotheses ordered by likelihood × cheapness-to-verify, not by what's most interesting.

Symptom: {{exact error / observed vs expected behavior}}
Already tried: {{what you've ruled out}}
Context: {{stack, recent changes, environment}}

Produce:

1. **Restate the symptom** — one sentence, the actual observed-vs-expected gap. If the description is ambiguous, state the interpretation used and the alternative ruled out.
2. **Hypothesis tree** — 4–8 hypotheses, ranked. For each:
   - **Hypothesis** (specific, falsifiable — not "something with auth")
   - **Likelihood** (high / medium / low) + one-phrase reason
   - **Cheapest verification** (the literal command, log line, or file to check)
   - **What the result tells you**, including the negative case
3. **Recommended order** — by cost-of-check, not likelihood alone. Cheap-and-likely first, expensive-and-likely later, expensive-and-unlikely last.
4. **The thing the framing might hide** — one hypothesis that becomes invisible if the symptom description is slightly wrong. What to re-observe to surface it.

Don't suggest "add more logging" as a hypothesis. Don't list generic advice. Each hypothesis must point at a specific cause.
·Open in·Share
debugginghypothesisroot cause

More code prompts

All code prompts

Go deeper