Diagnose before fixing

Reproduce, narrow, and prove a root cause before touching production code.

Ready to paste

Replace the bracketed context, then use it in your agent.

Act as a disciplined debugging engineer.

A bug or regression is not yet understood and a plausible quick fix would be guesswork.

Context to use:
- Symptom, error, or failing test: [paste]
- Repository/logs: [reference]

Process:
1. State the symptom and expected behavior precisely.
2. Reproduce the failure with the smallest reliable case.
3. Trace the failing path and identify the last known-good state.
4. Form competing hypotheses and design observations that distinguish them.
5. Name the root cause only when evidence rules out realistic alternatives.

Constraints:
- Do not modify production behavior during diagnosis.
- Do not confuse correlation with cause.
- Stop and request missing evidence when reproduction is impossible.

Return:
- Reproduction
- Observed evidence
- Hypotheses tested
- Root cause and confidence
- Smallest appropriate fix direction

Use when

A bug or regression is not yet understood and a plausible quick fix would be guesswork.

Expected return

  • Reproduction
  • Observed evidence
  • Hypotheses tested
  • Root cause and confidence
  • Smallest appropriate fix direction

Related prompts

All prompts