feat: add systematic-debugging skill — 4-phase root cause protocol #5

Merged
magnus merged 1 commit from feat/systematic-debugging-skill into main 2026-05-21 22:48:38 -04:00
Contributor

Summary

4-phase root cause debugging protocol adapted from obra/superpowers (Jesse Vincent, MIT) with significant real-world expansion.

Files

systematic-debugging/
├── SKILL.md                                             # 451 lines (~4,340 tokens)
└── references/
    ├── dependency-source-example.md                     # Dev fork schema drift walkthrough
    └── macos-sandbox-debug-example.md                   # Apple Books.app import debugging

The Four Phases

  1. Root Cause Investigation — read errors, reproduce, check recent changes, gather evidence across component boundaries, check schema/environment divergence, check exception type specificity, progressive characterization, check dependency source, web research protocol, macOS sandbox debugging
  2. Pattern Analysis — find working examples, compare, identify differences
  3. Hypothesis & Testing — single hypothesis, minimal test, verify before continuing
  4. Implementation — failing test first, single fix, Rule of Three, question architecture

Key Heuristics

  • Rule of Three: 3+ failed fixes means the architecture is wrong, not the approach
  • Progressive Characterization Grid: isolate retrieval/API failures variable by variable
  • Dependency Source Detection: always check pip show before patching library code
  • Investigation Flow: keep pushing, don't break momentum to ask questions

Attribution

Core 4-phase structure adapted from obra/superpowers (Jesse Vincent, MIT). All sub-steps, heuristics, worked examples, and the Investigation Flow section are original additions from real-world debugging production systems.

Signed-off-by: Jasper magnus@groktop.us

## Summary 4-phase root cause debugging protocol adapted from obra/superpowers (Jesse Vincent, MIT) with significant real-world expansion. ## Files ``` systematic-debugging/ ├── SKILL.md # 451 lines (~4,340 tokens) └── references/ ├── dependency-source-example.md # Dev fork schema drift walkthrough └── macos-sandbox-debug-example.md # Apple Books.app import debugging ``` ## The Four Phases 1. **Root Cause Investigation** — read errors, reproduce, check recent changes, gather evidence across component boundaries, check schema/environment divergence, check exception type specificity, progressive characterization, check dependency source, web research protocol, macOS sandbox debugging 2. **Pattern Analysis** — find working examples, compare, identify differences 3. **Hypothesis & Testing** — single hypothesis, minimal test, verify before continuing 4. **Implementation** — failing test first, single fix, Rule of Three, question architecture ## Key Heuristics - **Rule of Three**: 3+ failed fixes means the architecture is wrong, not the approach - **Progressive Characterization Grid**: isolate retrieval/API failures variable by variable - **Dependency Source Detection**: always check `pip show` before patching library code - **Investigation Flow**: keep pushing, don't break momentum to ask questions ## Attribution Core 4-phase structure adapted from obra/superpowers (Jesse Vincent, MIT). All sub-steps, heuristics, worked examples, and the Investigation Flow section are original additions from real-world debugging production systems. Signed-off-by: Jasper <magnus@groktop.us>
Adapted from obra/superpowers (Jesse Vincent, MIT) and expanded with
real-world debugging patterns from production use. Core additions:

Phase 1 sub-steps for common failure modes:
- Schema/environment divergence (test vs production schema diffing)
- Exception type specificity (sibling exception traps in Pyhton)
- Progressive characterization grid (isolate retrieval failures variable by variable)
- Dependency source detection (editable dev forks causing schema drift)
- Systematic web research protocol (structured search before guessing)
- macOS sandboxed app debugging (containers, XPC, TCC, iCloud sync)
- Trace data flow upstream from the symptom

Key heuristics:
- Rule of Three: 3+ failed fixes = question the architecture
- Red Flags table: 12 rationalizations to catch yourself making
- Investigation Flow: keep pushing, don't break momentum to ask questions

Includes two worked example references (dev fork detection, macOS Books.app).

Signed-off-by: Jasper <magnus@groktop.us>
jasper left a comment

Jasper (automated review)

Summary

Clean PR adding a well-structured 4-phase debugging protocol skill with two worked examples.

Files

  • systematic-debugging/SKILL.md (451 lines) — Core protocol with the Iron Law, 4 phases, Red Flags, Investigation Flow, and Common Rationalizations table
  • references/dependency-source-example.md — Walkthrough of detecting an editable dev fork causing schema drift
  • references/macos-sandbox-debug-example.md — Complete Apple Books.app import debugging case study

What's good

  • Proper attribution: Source clearly marked as adapted from obra/superpowers (Jesse Vincent, MIT) in both frontmatter and description, with expansion clearly delineated
  • Sign-off present: DCO sign-off included in commit
  • Investigation Flow section: Strong anti-friction pattern — keep pushing, don't break momentum — reflects real debugging experience
  • Progressive Characterization Grid: Well-designed table format that isolates variables one at a time
  • Exception Type Specificity: Technically correct sibling-class analysis (OperationalError/IntegrityError both inherit from DatabaseError)
  • Reference examples are real: Both examples are grounded in actual debugging sessions, not synthetic scenarios

Minor observations

  • Inline YAML array (tags: [debugging, ...]) — valid but block format is more conventional for skill frontmatter (inline comment left)
  • Cross-references maintained: The Rule of Three is consistently referenced between Phase 4 step 4 and the Red Flags section

Verdict

No security issues, logic errors, or structural problems. Ready to merge.

Signed-off-by: Jasper (automated review) magnus@groktop.us

## Jasper (automated review) ### Summary Clean PR adding a well-structured 4-phase debugging protocol skill with two worked examples. ### Files - **systematic-debugging/SKILL.md** (451 lines) — Core protocol with the Iron Law, 4 phases, Red Flags, Investigation Flow, and Common Rationalizations table - **references/dependency-source-example.md** — Walkthrough of detecting an editable dev fork causing schema drift - **references/macos-sandbox-debug-example.md** — Complete Apple Books.app import debugging case study ### What's good - **Proper attribution**: Source clearly marked as adapted from obra/superpowers (Jesse Vincent, MIT) in both frontmatter and description, with expansion clearly delineated - **Sign-off present**: DCO sign-off included in commit - **Investigation Flow section**: Strong anti-friction pattern — keep pushing, don't break momentum — reflects real debugging experience - **Progressive Characterization Grid**: Well-designed table format that isolates variables one at a time - **Exception Type Specificity**: Technically correct sibling-class analysis (OperationalError/IntegrityError both inherit from DatabaseError) - **Reference examples are real**: Both examples are grounded in actual debugging sessions, not synthetic scenarios ### Minor observations - **Inline YAML array** (tags: [debugging, ...]) — valid but block format is more conventional for skill frontmatter (inline comment left) - **Cross-references maintained**: The Rule of Three is consistently referenced between Phase 4 step 4 and the Red Flags section ### Verdict No security issues, logic errors, or structural problems. Ready to merge. Signed-off-by: Jasper (automated review) <magnus@groktop.us>
magnus merged commit 0fd760b89c into main 2026-05-21 22:48:38 -04:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
magnus/agent-skills!5
No description provided.