principle-fix-root-causes

Guides debugging by tracing symptoms to root causes instead of applying symptom-level workarounds.

3|2|Updated Aug 28, 2026
One-click install
npx skills add https://github.com/adjohn/pstack --skill principle-fix-root-causes-adjohn
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: principle-fix-root-causes
Source: https://github.com/adjohn/pstack/tree/main/skills/principle-fix-root-causes
Command: npx skills add https://github.com/adjohn/pstack --skill principle-fix-root-causes-adjohn

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Debugging often produces quick patches that silence symptoms while the real bug survives, accumulating fragile workarounds across the codebase. This Skill enforces a disciplined debugging methodology that traces every failure to its root cause before writing a fix. ## Core Features & Use Cases - Reproduce-First Discipline: Requires reproducing the bug before attempting a fix, since an unreproducible bug cannot be verified as fixed. - Root-Cause Tracing: Applies iterative "why" questioning to move past symptoms, and explicitly rejects nil-check guards that merely silence crashes. - Pattern-Wide Fixes: Greps for the same defective pattern across the codebase and fixes all instances, not just the reported one. - Restart-Bug Heuristic: Directs investigation toward stale persistent state (config files, caches, lock files, serialized state) when failures appear only after restarts. - Use Case: A crash disappears after adding a nil check, but reappears elsewhere. This Skill pushes you to find why the value was nil in the first place and fix the source. ## Quick Start Apply the fix-root-causes principle to debug this failing test and trace the error back to its actual source before changing any code.

Frequently Asked Questions about principle-fix-root-causes

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find the root cause of a bug instead of patching symptoms?▼

Reproduce the bug first, then repeatedly ask why the failure occurs until you reach the originating cause. Avoid adding guards that silence errors, and verify the fix resolves the reproduction case.

Why is adding a nil check to stop a crash considered a bad fix?▼

A nil check that silences a crash treats the symptom, not the cause. The unexpected nil still exists upstream, so the underlying defect remains and typically resurfaces elsewhere in the system.

Why does my app fail after a restart but work otherwise?▼

Code does not change between runs, but state does. Suspect stale persistent state such as config files, caches, lock files, or serialized state, and if clearing a state file restores behavior, prioritize state validation as the fix.

What should I do when I cannot reproduce a bug?▼

Do not attempt a fix, since an unreproducible bug cannot be verified as fixed. Instead, instrument the code with logging and read the actual error output rather than guessing at causes.

When is a workaround acceptable instead of a root-cause fix?▼

This principle treats workarounds as a smell: if a workaround needs a paragraph-long comment to justify it, the code itself is wrong. The guidance is to fix the code rather than document around the defect.