create-pathfinder 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +1 -0
- package/README.md +1 -1
- package/package.json +1 -1
- package/prompts/15-debug-issue.md +15 -0
- package/skills/debug-issue/SKILL.md +225 -0
package/CLAUDE.md
CHANGED
|
@@ -57,6 +57,7 @@ Ask before actions identified in `context/ai-interaction.md`, especially depende
|
|
|
57
57
|
- `to-specs` — generate context-sized feature specs
|
|
58
58
|
- `load-feature` — prepare one feature for implementation
|
|
59
59
|
- `start-feature` — implement scoped delivery chunks
|
|
60
|
+
- `debug-issue` — diagnose an observed failure to its root cause, apply the smallest justified fix, and verify it
|
|
60
61
|
- `review-feature` — review against requirements, regressions, and standards
|
|
61
62
|
- `complete-feature` — verify and close a feature cleanly
|
|
62
63
|
- `learn-feature` — create an interactive lesson for a completed feature
|
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ Pathfinder is a kit of context files and skills — not a framework. There is no
|
|
|
23
23
|
| --- | --- |
|
|
24
24
|
| `AGENTS.md`, `CLAUDE.md` | Entry files that tell an agent how to work in the project |
|
|
25
25
|
| `context/` | Project truth — overview, standards, interaction rules, current feature |
|
|
26
|
-
| `skills/` |
|
|
26
|
+
| `skills/` | Twenty skills covering discovery, specs, delivery, debugging, review, and learning |
|
|
27
27
|
| `prompts/` | Manual launchers for tools that do not discover local skills |
|
|
28
28
|
| `templates/` | Starting points the project copies when it needs them |
|
|
29
29
|
|
package/package.json
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Use `skills/debug-issue/SKILL.md`.
|
|
2
|
+
|
|
3
|
+
Debug the failure I describe.
|
|
4
|
+
|
|
5
|
+
Establish expected behavior, actual behavior, and reproduction status before proposing any fix.
|
|
6
|
+
|
|
7
|
+
Read only the code, logs, tests, and configuration relevant to the failure. Do not refactor unrelated code while the cause is still unknown.
|
|
8
|
+
|
|
9
|
+
State a small ranked set of hypotheses, then test the cheapest one that meaningfully reduces uncertainty. Change one explanatory variable at a time.
|
|
10
|
+
|
|
11
|
+
Do not call something the root cause because the symptom disappeared. If the evidence only supports a probable cause or a workaround, say so.
|
|
12
|
+
|
|
13
|
+
Apply the smallest justified fix, then verify against the original failure and the nearby behavior it could have affected. Remove temporary instrumentation.
|
|
14
|
+
|
|
15
|
+
Stop and report rather than thrashing when the evidence runs out, the reproduction is too unstable, or the fix would require an architectural, dependency, security, or destructive change I have not approved. Preserve what has already been ruled out.
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: debug-issue
|
|
3
|
+
description: Diagnose an observed software failure systematically, identify the root cause with evidence, apply the smallest justified fix, and verify the failure is resolved without introducing regressions.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Debug Issue
|
|
7
|
+
|
|
8
|
+
Debug an observed failure by reducing uncertainty before changing code.
|
|
9
|
+
|
|
10
|
+
The goal is not to try fixes until something works.
|
|
11
|
+
|
|
12
|
+
The goal is to explain the failure well enough that the smallest correct fix becomes justified.
|
|
13
|
+
|
|
14
|
+
> Reproduce before repairing.
|
|
15
|
+
|
|
16
|
+
## When to use
|
|
17
|
+
|
|
18
|
+
Use Debug Issue when there is a concrete unexpected behavior such as:
|
|
19
|
+
|
|
20
|
+
* a failing test
|
|
21
|
+
* runtime error
|
|
22
|
+
* broken feature
|
|
23
|
+
* regression
|
|
24
|
+
* incorrect output
|
|
25
|
+
* integration failure
|
|
26
|
+
* environment-specific failure
|
|
27
|
+
* intermittent behavior that needs isolation
|
|
28
|
+
* production or staging behavior that differs from expectation
|
|
29
|
+
|
|
30
|
+
Do not use it merely because implementation work is difficult.
|
|
31
|
+
|
|
32
|
+
If the task is planned feature construction, use `start-feature`.
|
|
33
|
+
|
|
34
|
+
If the goal is reviewing completed implementation for possible defects, use `review-feature`.
|
|
35
|
+
|
|
36
|
+
If the real question is broad understanding of the repository, use `learn-codebase`.
|
|
37
|
+
|
|
38
|
+
## Goal
|
|
39
|
+
|
|
40
|
+
Answer:
|
|
41
|
+
|
|
42
|
+
> What is failing, why is it failing, and what evidence proves the explanation?
|
|
43
|
+
|
|
44
|
+
Then apply the smallest justified correction and verify the original failure no longer occurs.
|
|
45
|
+
|
|
46
|
+
## 1. Establish the failure
|
|
47
|
+
|
|
48
|
+
Before proposing a fix, define:
|
|
49
|
+
|
|
50
|
+
* expected behavior
|
|
51
|
+
* actual behavior
|
|
52
|
+
* where the failure occurs
|
|
53
|
+
* how it was observed
|
|
54
|
+
* whether it is reproducible
|
|
55
|
+
* relevant environment or conditions
|
|
56
|
+
* known recent changes when relevant
|
|
57
|
+
|
|
58
|
+
Prefer the smallest reliable reproduction.
|
|
59
|
+
|
|
60
|
+
If the failure cannot be reproduced, preserve the available evidence and state that limitation explicitly.
|
|
61
|
+
|
|
62
|
+
Do not manufacture certainty.
|
|
63
|
+
|
|
64
|
+
## 2. Inspect before changing
|
|
65
|
+
|
|
66
|
+
Read only the code, logs, tests, configuration, dependencies, and context relevant to the failure.
|
|
67
|
+
|
|
68
|
+
Identify the execution path involved.
|
|
69
|
+
|
|
70
|
+
Do not begin with broad refactoring.
|
|
71
|
+
|
|
72
|
+
Do not change unrelated code while still determining the cause.
|
|
73
|
+
|
|
74
|
+
## 3. Form hypotheses
|
|
75
|
+
|
|
76
|
+
Produce a small ranked set of plausible explanations.
|
|
77
|
+
|
|
78
|
+
For each hypothesis state:
|
|
79
|
+
|
|
80
|
+
* why it fits the evidence
|
|
81
|
+
* what evidence would support it
|
|
82
|
+
* what evidence would disprove it
|
|
83
|
+
* the cheapest useful test
|
|
84
|
+
|
|
85
|
+
Prefer hypotheses that explain all known symptoms rather than only one.
|
|
86
|
+
|
|
87
|
+
Do not create a long speculative list.
|
|
88
|
+
|
|
89
|
+
## 4. Test discriminating evidence
|
|
90
|
+
|
|
91
|
+
Test the cheapest hypothesis that meaningfully reduces uncertainty.
|
|
92
|
+
|
|
93
|
+
Change one explanatory variable at a time when practical.
|
|
94
|
+
|
|
95
|
+
Examples:
|
|
96
|
+
|
|
97
|
+
* inspect a value at the failure boundary
|
|
98
|
+
* run one targeted test
|
|
99
|
+
* compare working and failing environments
|
|
100
|
+
* trace one request
|
|
101
|
+
* check one dependency or configuration assumption
|
|
102
|
+
* temporarily instrument the relevant path
|
|
103
|
+
* isolate one integration
|
|
104
|
+
|
|
105
|
+
A debugging action should answer a question.
|
|
106
|
+
|
|
107
|
+
Avoid random edits intended only to "see if it works."
|
|
108
|
+
|
|
109
|
+
## 5. Identify the root cause
|
|
110
|
+
|
|
111
|
+
Do not call something the root cause merely because changing it makes the symptom disappear.
|
|
112
|
+
|
|
113
|
+
A root-cause claim should explain:
|
|
114
|
+
|
|
115
|
+
* why the failure occurred
|
|
116
|
+
* why it occurred under the observed conditions
|
|
117
|
+
* why the evidence supports this explanation
|
|
118
|
+
* why competing explanations are less likely
|
|
119
|
+
|
|
120
|
+
If the evidence only supports a workaround or probable cause, say so.
|
|
121
|
+
|
|
122
|
+
## 6. Choose the smallest justified fix
|
|
123
|
+
|
|
124
|
+
Once the cause is sufficiently established:
|
|
125
|
+
|
|
126
|
+
* fix the cause rather than only the visible symptom when practical
|
|
127
|
+
* preserve existing behavior outside the failure
|
|
128
|
+
* avoid unrelated cleanup
|
|
129
|
+
* avoid dependency, architecture, schema, security, or workflow changes without required approval
|
|
130
|
+
* prefer a focused regression test when appropriate
|
|
131
|
+
|
|
132
|
+
If the correct fix expands beyond the active feature or approval boundary, stop and explain the decision required.
|
|
133
|
+
|
|
134
|
+
## 7. Verify
|
|
135
|
+
|
|
136
|
+
Verification must include the original failure.
|
|
137
|
+
|
|
138
|
+
Where relevant also verify:
|
|
139
|
+
|
|
140
|
+
* the reproduction now passes
|
|
141
|
+
* nearby behavior still works
|
|
142
|
+
* regression tests pass
|
|
143
|
+
* edge/failure states remain correct
|
|
144
|
+
* temporary instrumentation is removed
|
|
145
|
+
* no unrelated behavior changed
|
|
146
|
+
|
|
147
|
+
Do not declare success only because the code compiles or one unrelated test passes.
|
|
148
|
+
|
|
149
|
+
## 8. Stop conditions
|
|
150
|
+
|
|
151
|
+
Stop and report rather than thrashing when:
|
|
152
|
+
|
|
153
|
+
* 2–3 grounded hypotheses have been tested without reducing uncertainty
|
|
154
|
+
* necessary evidence or environment access is unavailable
|
|
155
|
+
* reproduction is too unstable to support a safe fix
|
|
156
|
+
* the likely fix requires an unapproved architectural, dependency, security, data, or destructive change
|
|
157
|
+
* the observed behavior conflicts with documented requirements and a human decision is needed
|
|
158
|
+
|
|
159
|
+
When stopping, preserve what has been ruled out so the next attempt does not restart from zero.
|
|
160
|
+
|
|
161
|
+
## Output
|
|
162
|
+
|
|
163
|
+
Return:
|
|
164
|
+
|
|
165
|
+
### Failure
|
|
166
|
+
|
|
167
|
+
Expected vs actual behavior and reproduction status.
|
|
168
|
+
|
|
169
|
+
### Evidence
|
|
170
|
+
|
|
171
|
+
The relevant observations, logs, tests, or code paths.
|
|
172
|
+
|
|
173
|
+
### Hypotheses tested
|
|
174
|
+
|
|
175
|
+
What was tested and what each result ruled in or out.
|
|
176
|
+
|
|
177
|
+
### Root cause
|
|
178
|
+
|
|
179
|
+
The established cause, probable cause, or remaining uncertainty.
|
|
180
|
+
|
|
181
|
+
### Fix
|
|
182
|
+
|
|
183
|
+
The smallest change made or recommended.
|
|
184
|
+
|
|
185
|
+
### Verification
|
|
186
|
+
|
|
187
|
+
How the original failure and relevant regression surface were checked.
|
|
188
|
+
|
|
189
|
+
### Residual risk
|
|
190
|
+
|
|
191
|
+
Anything still uncertain or unverified.
|
|
192
|
+
|
|
193
|
+
### Handoff
|
|
194
|
+
|
|
195
|
+
If unresolved, state the exact next useful investigation step and what should not be repeated.
|
|
196
|
+
|
|
197
|
+
## Boundaries
|
|
198
|
+
|
|
199
|
+
`debug-issue` diagnoses an observed failure.
|
|
200
|
+
|
|
201
|
+
It does not:
|
|
202
|
+
|
|
203
|
+
* implement unrelated feature scope
|
|
204
|
+
* perform a general repository review
|
|
205
|
+
* replace `review-feature`
|
|
206
|
+
* replace `complete-feature`
|
|
207
|
+
* silently change architecture or dependencies
|
|
208
|
+
* turn debugging into opportunistic refactoring
|
|
209
|
+
* hide uncertainty behind a successful-looking workaround
|
|
210
|
+
|
|
211
|
+
## Principles
|
|
212
|
+
|
|
213
|
+
> Reproduce before repairing.
|
|
214
|
+
|
|
215
|
+
> A debugging action should answer a question.
|
|
216
|
+
|
|
217
|
+
> Change one explanatory variable at a time.
|
|
218
|
+
|
|
219
|
+
> Fixes follow evidence, not guesses.
|
|
220
|
+
|
|
221
|
+
> A symptom disappearing is not proof of root cause.
|
|
222
|
+
|
|
223
|
+
> Preserve what has already been ruled out.
|
|
224
|
+
|
|
225
|
+
> Stop when additional attempts are producing activity instead of information.
|