Debugging Prompt — the Investigation Contract
"Fix this error" gets guesses. The investigation contract gets a ten-stage diagnosis: facts separated from assumptions, alternatives weighed, fixes justified.
Support says it happens; nobody can make it happen. Turn a vague bug report — symptoms, environment, expected vs actual — into a reproduction strategy.
A bug you can't reproduce is a bug you can't honestly fix. This setup starts from exactly what support tickets provide — the structured bug report fields: symptoms, environment, expected behavior, actual behavior — and no reproduction steps. The contract's honesty mechanism takes over: instead of pretending a repro exists, stage three becomes INFORMATION NEEDED TO REPRODUCE, demanding the missing specifics — which users, what state, what sequence — and the investigation works the occurrence pattern until the bug can be summoned on demand. Only then does diagnosis begin.
Feed the report as-is
Symptoms, environment, expected vs actual — the bug report structure IS the investigation input.
Let the contract demand specifics
INFORMATION NEEDED TO REPRODUCE lists the questions for support: which users, what state, what sequence.
Reduce before diagnosing
Once it reproduces, shrink to the minimal failing case — diagnosis on a minimal repro is half done.
Stage 3, INFORMATION NEEDED TO REPRODUCE, exists for exactly that: with no steps provided it lists what is needed to reproduce before diagnosing, and the contract says do not pretend a reproduction exists. Debugging Prompt Generator produces this prompt; you run it in your own assistant, which asks for the missing specifics instead of inventing them.
The EVIDENCE RULES force every statement to be labeled FACT, ASSUMPTION, or HYPOTHESIS, with assumptions verified or discarded and every hypothesis carrying its test. It also requires carrying at least two hypotheses until evidence separates them, so the investigation across the ten stages stays grounded rather than jumping to one story.
Not needed. This setup is built around the missing-steps case and stage 3's demand for reproduction information; the notFor says a bug that already reproduces should load the standard debugging setup and diagnose. Here the framework works the occurrence pattern until the failure can be summoned on demand, and only then does POSSIBLE CAUSES and root-cause work begin.
"Fix this error" gets guesses. The investigation contract gets a ten-stage diagnosis: facts separated from assumptions, alternatives weighed, fixes justified.
An exception is a symptom, not a diagnosis: trace from the throw site back to the root trigger, with the runtime checklist on the table.
Measure before reasoning: find WHERE the time goes, separate latency from memory from throughput, and think at production scale.
"Review this code" gets shallow comments. The review contract gets findings with severities, a checklist, and a verdict.
getByRole over CSS chains, auto-wait over sleep, web-first assertions — Playwright tests written the way Playwright wants.
"Refactor this code" invites silent behavior changes. The refactoring contract preserves business rules, outputs, and side effects — and flags uncertainty instead of deciding it.
Build debugging prompts from symptoms, environment, and reproduction steps — root cause first, fix second.
The order that actually finds bugs instead of guessing at them — so you end with a verified fix, not a plausible one that quietly returns next week.
Paste an error, say "fix this," and AI patches the first thing it sees — the symptom clears, the real cause stays. Here's how to run a debugging pass that works from symptoms and evidence to a root cause, and holds off on a fix until the evidence points at one.
You click the thing twenty times, it works every time, and you close the ticket "cannot reproduce" — while it keeps happening to users. Here is how to reproduce a bug with AI: turn a vague report into conditions that make the failure appear and disappear on demand, without inventing the ones you were not given.