Hypothesis-driven debugging with instrumentation
Debugs code using hypothesis-driven approach with instrumentation and evidence-based fixes.
/plugin marketplace add harlan-zw/harlan-claude-code/plugin install harlan-claude-code@harlan-claude-codeDebug "$ARGUMENTS" using hypothesis-driven approach.
Generate 3-5 hypotheses about what could cause this bug:
## Hypotheses
1. **[Most likely]** Description - why this could cause it
2. **[Possible]** Description - why this could cause it
3. **[Less likely]** Description - why this could cause it
For each hypothesis, identify:
Add targeted logging to gather evidence:
// DEBUG: Hypothesis 1 - checking [condition]
console.log('[DEBUG H1]', { relevantVar, state })
Guidelines:
[DEBUG H1] to track which hypothesisAsk user to reproduce the bug:
Review the evidence:
Make targeted fix based on evidence:
vitest.sh auto-runs tests on each editpnpm testInitialize .claude/scratchpad.md:
## Goal
Debug: $ARGUMENTS
## Hypotheses
1. [ ] Hypothesis 1 - not tested
2. [ ] Hypothesis 2 - not tested
## Evidence
[Add findings here]
## Status
Investigating
Update as evidence is gathered. Mark ## DONE when bug is fixed and verified.