aboutsummaryrefslogtreecommitdiffstats
path: root/modules/development/pi-coding-agent/skills/debugging/SKILL.md
blob: 05c2de06c4fb7397cbec9cd45787be5d0ef6f35e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
---
name: debugging
description: "A systematic workflow; reproduce -> inspect logs/errors -> isolate cause -> form hypothesis -> test -> fix -> regression test."
---

# Debugging Skill

A systematic workflow: reproduce -> inspect logs/errors -> isolate cause -> form hypothesis -> test -> fix -> regression test.

## Workflow

### 1. Reproduce
- Create minimal reproduction case
- Document exact steps
- Verify consistent failure

### 2. Inspect
- Read error messages fully
- Check logs and stack traces
- Examine relevant code paths

### 3. Isolate
- Narrow down the failing component
- Use binary search if needed
- Add temporary logging

### 4. Hypothesize
- Form specific, testable hypotheses
- Prioritize by likelihood
- Consider recent changes

### 5. Test
- Verify each hypothesis
- Use debuggers, prints, or tests
- Document findings

### 6. Fix
- Make minimal targeted change
- Address root cause, not symptom
- Follow existing patterns

### 7. Regression Test
- Run existing test suite
- Add test for the bug
- Verify fix doesn't break other things