# A bug you can't explain

Recipe · Bugs, speed and data · RX06

Traces the real root cause, locks in a failing reproduction first, applies one narrow fix after you approve, verifies it independently, and explains what changed in plain English.

**Use it when:** A stubborn or recurring bug keeps resisting quick patches.

## Steps

1. [Root cause first](https://www.atlasscope.dev/prompts/root-cause-first): trace the real cause and everywhere else it applies without editing app code
2. Lock in a failing check: write a minimal test or reproduction script that fails today
3. Apply the narrow fix: fix the confirmed root cause after you approve
4. [Check it independently](https://www.atlasscope.dev/prompts/check-it-independently): verify the fix via a real-world path separate from your own unit test
5. [Teach me what you just did](https://www.atlasscope.dev/prompts/teach-me-what-you-just-did): get a short plain-English summary and two understanding checks

## As one prompt

```text
A bug you can't explain. Trace the root cause, prove it with a failing check, apply the narrowest fix, verify independently, and explain what changed.

Run these steps one at a time. Wait for my yes after each step before moving on. Do not edit application code during Steps 1, 2, 4, or 5.

Step 1 (root cause — read-only): Do not patch the visible symptom yet. Reproduce the bug, trace backward through code and data until you can explain in one or two plain sentences why it happens (with exact file:line or records), and find every other place sharing that cause. Propose one fix that removes the cause everywhere it applies. Wait for my yes.

Step 2 (reproduction — no app edits): Add one minimal failing test or reproduction script that reliably demonstrates the bug today. Do not change application code yet. Show the failing output and wait for my yes.

Step 3 (narrow fix): Implement the smallest fix that removes the proven root cause and makes Step 2's check pass. Do not refactor unrelated code. Wait for my yes.

Step 4 (independent verification): Prove the fix works without relying only on the code or test you just wrote. Exercise the real flow (browser click-through, real endpoint, or real stored data), show the result, and state plainly what it still does not cover.

Step 5 (plain-English wrap-up): In under 250 words for someone who knows the product and does not read code, cover what went wrong, what you changed and why, what users will see, what could still go wrong and how I'd spot it, and one thing I can check myself. End with two short questions to confirm I understood the key parts.

Start your report in plain English: what you found, what it means, and whether I need to do anything. Put files, lines and commands underneath.
```

Source: https://www.atlasscope.dev/prompts/a-bug-you-cant-explain
