PromptSharp › Prompt Library › Dev & Engineering › Stack-trace triage: from a wall of errors to the two likeliest root causes
Stack-trace triage: from a wall of errors to the two likeliest root causes
Production is throwing and the trace is a mess. Narrow it to the two most probable causes and the fastest way to confirm each.
The prompt — copy and run it
You are a senior engineer triaging a failure — a reasoning aid whose hypotheses I will test, not trust. Produce: A) READ — a plain-English restatement of what the error and trace I pasted are actually saying, and where in the flow it breaks. B) HYPOTHESIS RANKING — the top 2-3 root causes ranked by likelihood given the evidence, each with the specific reason it fits AND the reason it might not. C) CONFIRM STEP — for the top hypothesis, the single fastest check (log line, test, value to inspect) that would confirm or kill it before I change any code. D) BLAST RADIUS — what else could be affected if this hypothesis is right, so the fix doesn't miss a sibling bug. Inputs: [PASTE ERROR + STACK TRACE] · [WHAT CHANGED RECENTLY] · [WHAT THE CODE IS DOING] · [ENVIRONMENT] Rules: Do not invent line numbers, functions, or causes not supported by the trace — mark speculation "unconfirmed". Don't propose a fix before the confirm step. Keep proprietary code and secrets out of consumer AI tools. This narrows the search; the diagnosis and fix stay yours. Verify anything uncertain against the source before relying on it.
Why this prompt works
Debugging goes sideways when you fix the first plausible cause without confirming it; ranking hypotheses with both the fit-reason and the counter-reason, then demanding a single cheap confirm step before any code change, enforces the discipline of testing before fixing — and the blast-radius prompt catches the sibling bug that a narrow fix would leave behind.
Want the daily version?
The PromptSharp Dev Brief delivers prompts like this every day. Honest status: sample stage — 50 waitlist signups start the free daily, and waitlist members see every issue first.
Frequently asked
When should I use this prompt?
Production is throwing and the trace is a mess. Narrow it to the two most probable causes and the fastest way to confirm each.
Why does this prompt work?
Debugging goes sideways when you fix the first plausible cause without confirming it; ranking hypotheses with both the fit-reason and the counter-reason, then demanding a single cheap confirm step before any code change, enforces the discipline of testing before fixing — and the blast-radius prompt catches the sibling bug that a narrow fix would leave behind.
What mistake does this prompt help you avoid?
{'code': 'PF02', 'note': 'Fixing the first plausible cause — hypotheses are ranked with counter-reasons and gated behind a cheap confirm step before any code change.'}
Related Dev & Engineering prompts
Root-cause interrogation: a hypothesis ladder from a bug report
Prod bug, vague repro, clock ticking. Structure the investigation before you start changing code at random.…
Design doc skeleton with the alternatives you'll actually be asked about
New system or big refactor. Draft the design doc with real alternatives and failure modes before the review meeting drafts it for …
All Dev & Engineering free prompts
The PromptSharp Dev Brief page — five full free prompts plus the ladder status.
PromptSharp Daily — free
The cross-vertical sampler: one sharp, copy-paste prompt each day, rotating across the roster. See what each vertical is like before you commit to one.
Double-opt-in. Unsubscribe anytime. No spam, ever.
Home · Prompt Library · Pricing · Archive · Privacy · Terms · Refunds
Finance · CPG · Marketing · Sales · Consulting & Strategy · Product Management · Dev & Engineering · C-suite · Law · Personal Finance · Career & Job Search · Focus & Productivity · Learning · Health & Fitness · Parenting