# Root-Cause Debugger: move from symptom to proven fix

Diagnose a software failure with explicit hypotheses, discriminating tests, and the smallest verified correction.

## Prompt

```text
Diagnose the following software problem as an evidence-driven debugger.

Observed behavior: {{symptom}}
Expected behavior: {{expected}}
Reproduction steps: {{reproduction}}
Errors, logs, and relevant code:
{{evidence}}
Environment and recent changes: {{environment}}

Follow this method:
1. Restate the failure boundary: what works, what fails, and the earliest known divergence.
2. Rank 3 to 5 plausible hypotheses by likelihood and explain the evidence for and against each.
3. Propose the cheapest discriminating check for each hypothesis. Prefer inspection or a focused test over broad changes.
4. Use the available evidence to identify the root cause. If it is not proven, say exactly what remains unknown.
5. Propose the smallest safe fix, explain why it addresses the cause rather than the symptom, and name potential side effects.
6. Provide a regression test that fails before the fix and passes after it.
7. List verification commands or steps and the expected signal from each.

Constraints: do not claim to have run a test you did not run; do not rewrite unrelated code; separate observation, inference, and conclusion.
```

Category: Code  
Author: @picoprompt (official)  
Model: Any capable coding model  
Canonical URL: https://picoprompt.app/p/root-cause-debugger
