| name | sp-debugging |
| description | Use when a bug needs root-cause diagnosis and a written fix plan before implementation. |
Bug Diagnosis and Fix Planning
Diagnose from evidence, then persist the diagnosis and fix plan in FlickNote. Do not implement the fix.
1. Confirm the Symptom
Restate the observed behavior, expected behavior, affected surface, and known reproduction. Ask one focused question if the report is ambiguous.
2. Find the Root Cause
- Reproduce the failure.
- Read the complete errors and logs.
- Check recent changes and working examples.
- Trace bad state backward across component boundaries.
- Form one hypothesis and test it with the smallest useful probe.
If three hypotheses fail, stop and question the model or architecture instead of stacking guesses.
Useful references in this directory:
root-cause-tracing.md
defense-in-depth.md
condition-based-waiting.md
3. Confirm the Diagnosis
Tell the user:
- Root cause and supporting evidence
- Proposed fix boundary
- Main risk or trade-off
Get alignment before writing a detailed plan when the fix direction is not already approved.
4. Write the FlickNote
Save one note in orientation:
flicknote add --project orientation
Structure:
Fix:
Symptom
Root cause
Evidence and reproduction
Fix strategy
Anti-goals
Implementation stages
Test strategy
Exit criteria
Risks
For behavior fixes, include TDD explicitly:
- Add a focused regression test.
- Run it and confirm it fails for the diagnosed reason.
- Implement the minimum fix.
- Run focused and broader tests.
- Refactor while green.
Each stage must name exact files, commands, expected results, and dependencies.
5. Worker-Eye Check
Re-read the note as the implementer. Fix missing paths, hidden assumptions, unclear ordering, and unresolved decisions with FlickNote edits.
Return the FlickNote ID and a short diagnosis summary. Stop; do not start implementation or invoke another skill.