{"id":21502,"plugin_id":"plugins_6aaeb2c568208191bd71d62167ba2ba3","kind":"skill","collection_source":null,"comparison_source":null,"observed_at":"2026-09-30T23:16:58.212Z","digest":"06e89fa4e3bda6b061e045dd00f855848a32e6665fe5e45d11a09e70ddadc716","against":null,"payload":{"description":"Apply when debugging. Trace each symptom to its root cause and fix it there; reproduce first, ask why until you reach it, resist nil-check guards that silence crashes.","included_files":[],"name":"principle-fix-root-causes","skill_md_contents":"---\r\nname: principle-fix-root-causes\r\ndescription: \"Apply when debugging. Trace each symptom to its root cause and fix it there; reproduce first, ask why until you reach it, resist nil-check guards that silence crashes.\"\r\nuser-invocable: false\r\ndisable-model-invocation: true\r\n---\r\n\r\n# Fix Root Causes\r\n\r\nWhen debugging, do not paper over symptoms. Trace every problem to its root cause and fix it there.\r\n\r\n**Why:** Symptom fixes accumulate. Each workaround makes the system harder to reason about, and the real bug remains. Root-cause fixes are slower upfront but reduce total debugging time.\r\n\r\n**Pattern:**\r\n- Reproduce first (if you can't reproduce it, you can't verify your fix)\r\n- Ask \"why\" until you hit the root cause\r\n- Resist the urge to add guards (adding a nil check to silence a crash is a symptom fix)\r\n- If a workaround needs a paragraph-long comment to justify it, the code is wrong (fix the code, not the comment)\r\n- Check for the pattern, not just the instance (grep for the same pattern, fix all instances)\r\n- When stuck, instrument. Don't guess (add logging, read the actual error)\r\n\r\n**Restart bugs: suspect state before code**\r\n\r\nCode doesn't change between runs. State does. When something \"fails after restart,\" suspect stale persistent state first: config files, caches, lock files, serialized state. If clearing a state file restores behavior, prioritize state validation as the fix.\r\n"},"changes":[],"summary":"First saved snapshot. No earlier version is available for comparison.","summary_kind":"deterministic","summary_metadata":{}}