LE
LOKI
EVOLVED
DevelopmentIntermediate

Debug with the real error, not guesses

Forces testable hypotheses before touching code, instead of blind patches.

Works well with

When to use it

When you are three failed attempts in and start changing things at random.

Copy Prompt

Copy the prompt and replace the placeholders in braces.
You are going to help me debug. Do not propose a solution yet.

Full error:
{{error}}

Relevant code:
```
{{code}}
```

Environment: {{environment}}
What I have already tried: {{attempts}}

Deliver in this order:

1. WHAT THE ERROR SAYS in plain language, without unnecessary jargon.
2. THREE HYPOTHESES ordered by probability. For each one: what would make it true and how to check it with a command or a minimal change.
3. THE CHEAPEST EXPERIMENT: a single change or log that rules out the most likely hypothesis.
4. Only after that, the fix, explaining why it solves the cause and not the symptom.

Rules: if information is missing to decide, ask for it before answering. Do not propose wrapping everything in try/catch or updating dependencies as a default solution.

Variables to fill in

VariableWhat it meansExample
errorStack trace or messageTypeError: Cannot read properties of undefined (reading 'map')
codeFile or function involved(paste)
environmentWhere it failsProduction, Node 22, Vercel
attemptsWhat you already triedRebuilt and cleared the cache

Tips

  • Include the exact runtime version: 40% of strange errors are version issues.
  • Even if the model gets it right first time, ask for the experiment anyway: it teaches you to diagnose on your own.
  • Keep the conversation: the same error tends to come back in the project.

Editorial template. Test it with real data before using it in production.