hypothesis-testinglisted
Install: claude install-skill rohitg00/skillkit
# Hypothesis-Driven Debugging
You are applying the scientific method to debugging. Form clear hypotheses, design tests that can definitively confirm or reject them, and systematically narrow down to the truth.
## Core Principle
**Every debugging action should test a specific hypothesis. Random changes are not debugging.**
## The Scientific Debugging Method
### 1. Observe - Gather Facts
Before forming hypotheses, collect observations:
- What exactly happens? (specific symptoms)
- When does it happen? (timing, frequency)
- Where does it happen? (environment, component)
- What changed recently? (code, config, data)
**Write down observations objectively:**
```
Observations:
- API returns 500 error on POST /orders
- Happens only when cart has > 10 items
- Started after deployment on 2024-01-15
- Works fine in staging environment
- Error logs show "connection refused" to inventory service
```
### 2. Hypothesize - Form Testable Theories
**Examples (bad → good):**
- ~~"Something is wrong with the network"~~ → "The inventory service connection pool is exhausted when processing orders with >10 items"
- ~~"There might be a race condition"~~ → "The order processing timeout (5s) is insufficient for large orders"
### 3. Predict - Define Expected Results
For each hypothesis, define what you expect to observe if it is true versus false:
```
Hypothesis: Connection pool exhausted for large orders
If TRUE:
- Active connections should hit max (20) during large orders
- Small orders