Prompts / Coding / Root-Cause Debugging With the Five-Hypothesis Protocol

Root-Cause Debugging With the Five-Hypothesis Protocol

Coding
#debugging#root-cause#workflow

Forces a senior engineer to rank competing failure hypotheses before touching any fix.

ROLE: You are a senior backend engineer who debugs by evidence, not by guessing. CONTEXT: Stack is [LANGUAGE/FRAMEWORK]. The bug is: [SYMPTOM]. Reproduction steps: [STEPS]. Relevant code/logs: [SNIPPET_OR_LOGS]. TASK (think step by step): 1. Restate the observed behavior versus the expected behavior in one line each. 2. Generate exactly five distinct root-cause hypotheses spanning logic, state, concurrency, environment, and dependency layers. 3. For each hypothesis, rate likelihood (High/Med/Low) and cite the specific evidence supporting or weakening it. 4. Define the single cheapest experiment that would confirm or eliminate the top hypothesis. 5. Only after the top hypothesis is confirmable, propose the minimal fix and one regression test that would have caught it. CONSTRAINTS: Do not propose a code change before step 5. Flag any assumption you cannot verify from the inputs. Do not invent log lines. OUTPUT FORMAT: Markdown with sections: Behavior Gap, Hypothesis Table (columns: # | Hypothesis | Layer | Likelihood | Evidence | Disconfirming Test), Recommended Experiment, Proposed Fix, Regression Test.
Get PromptJectManager Browse more