Debug a problem systematically with AI
A reproduce → isolate → hypothesise → verify debugging session ending in a root cause and fix.
This is a practical, copy-paste process for an error or wrong behaviour you cannot explain.. Use it when you want a clear structure, then add your own details and the linked evidence.
Published by Deepstory Research. Reviewed Sep 2026.
How to use this method
- 1. Copy or downloadCopy the prompt below, or download the method file and attach it to your chat.
- 2. Paste into any AIChatGPT, Claude, Gemini or Copilot. Replace each [PLACEHOLDER] with your details, or let the AI ask you.
- 3. Add evidenceAttach the evidence files listed on this page so the AI works from sourced numbers, not guesses.
The prompt
Paste it as-is. The AI will ask for anything still in [BRACKETS].
# Debug a problem systematically with AI Method by Deepstory Research: deepstoryresearch.com/method/debug-with-ai You are a debugging specialist. Follow the method below step by step. Goal: A reproduce → isolate → hypothesise → verify debugging session ending in a root cause and fix. ## My inputs - Symptom and error message: [SYMPTOM_AND_ERROR_MESSAGE] (example: paste stack trace) - Expected vs actual: [EXPECTED_VS_ACTUAL] (example: describe) - Environment: [ENVIRONMENT] (example: versions, OS) - Relevant code: [RELEVANT_CODE] (example: paste) Before you start: if any input above is still in [BRACKETS] or missing, ask me for it in one short numbered list and wait. Do not guess. If I attached files (data, briefs, Deepstory evidence files), treat them as the primary source. ## Steps to follow 1. Restate the bug precisely. 2. Propose how to reproduce minimally. 3. List hypotheses ranked by likelihood. 4. Give a test to confirm or eliminate each. 5. Once confirmed, propose the fix and a regression test. ## Deliver the output in this structure - Bug statement - Repro steps - Hypotheses & tests - Root cause - Fix - Regression test ## Quality rules - Do not guess a fix before evidence narrows the cause. - Label every number as FACT (with source and date), ESTIMATE (show the calculation) or ASSUMPTION. - If a Deepstory evidence file is attached, use its figures as the reference values and cite its source references; tag claims that are not from it as [UNVERIFIED]. - End with: the 3 assumptions that matter most, what would change the answer, and the single best next step.
What you need to give the AI
| Input | Placeholder | Example |
|---|---|---|
| Symptom and error message | [SYMPTOM_AND_ERROR_MESSAGE] | paste stack trace |
| Expected vs actual | [EXPECTED_VS_ACTUAL] | describe |
| Environment | [ENVIRONMENT] | versions, OS |
| Relevant code | [RELEVANT_CODE] | paste |
Use it when
- An error or wrong behaviour you cannot explain.
What you get
- Bug statement
- Repro steps
- Hypotheses & tests
- Root cause
- Fix
- Regression test
The procedure, step by step
Read this before you run it, so you can check the AI actually followed the method.
Restate the bug precisely.
Propose how to reproduce minimally.
List hypotheses ranked by likelihood.
Give a test to confirm or eliminate each.
Once confirmed, propose the fix and a regression test.
Quality checks built into the prompt
- • Do not guess a fix before evidence narrows the cause.
- • Every number labelled FACT, ESTIMATE or ASSUMPTION; claims outside attached evidence tagged [UNVERIFIED].
Evidence for this method
This method runs on your own material: your files, brief or code. If your task needs market or economic numbers, attach a sourced context file from the evidence library alongside the prompt.
Browse evidenceRun next
Methods that chain well after this one.
Deepstory methods are process guidance for AI tools. Review AI output before relying on it; legal, tax, medical and investment decisions need a qualified professional.