root-cause-triage
Universal scientific bug triage, incident diagnosis, and root-cause analysis standard. Strictly enforces the 'Zero Speculative Edits' law: forbids modifying…
от hemanth17r★ 33 звезды на GitHub
Установить root-cause-triage в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Root-Cause Triage & Deterministic Incident Analysis Standard
The Prime Directive
NEVER make speculative code edits based on guesswork or superficial error messages.
Randomly changing lines of code, adding defensive if (x != null) checks to mask symptoms, or shotgun-debugging without proving the root cause creates technical debt, hides the real defect, and introduces catastrophic regressions.
Every bug fix must follow the Scientific Debugging Protocol: Reproduce $\to$ Isolate $\to$ Diagnose $\to$ Surgically Patch $\to$ Verify.
1. The 4-Step Scientific Triage Protocol
Whenever a bug, test failure, crash, or unexpected behavior is reported:
Step 1: Isolate (Extract Minimum Reproduction State)
- Strip away noisy logs, UI distractions, and unrelated subsystems.
- Identify the exact triad that produced the defect:
- Initial State ($S_0$): What was the exact state of the database, memory, or component before the event?
- Event / Payload ($E$): What exact user input, API payload, or network signal triggered it?
- Expected vs. Actual: What exact invariant, return value, or screen behavior failed?
Step 2: Reproduce (Write the Failing Test FIRST)
- The Non-Negotiable Law: Write a minimal, deterministic test case reproducing the failure before modifying a single line of application source code.
- Constraints for the Reproduction Test:
- Must run in $< 100\text{ms}$ with zero external network or disk I/O.
- Must explicitly assert the expected correct behavior.
- Run the test suite: The test MUST fail with the reported defect.
- If the test passes, your reproduction model is incomplete. Do not proceed to code editing until the test fails reliably.
Step 3: Diagnose (Identify the True Root Cause)
Trace the exact mechanical failure mode in the code:
- Is it an unhandled boundary condition (off-by-one, empty array, null pointer)?
- Is it an implicit type coercion or JSON serialization mismatch?
- Is it a race condition or stale closure state?
- Is it a missing invariant or corrupted state transition? Locate the single, exact line or function where the contract was broken.
Step 4: Surgical Patch & Verification Gate
- Apply the Minimal Surgical Fix:
- Modify only the code necessary to satisfy the contract.
- Do NOT rewrite unrelated functions or refactor adjacent architecture during a bug fix.
- Execute the Verification Gate:
- Run the reproduction test: Must turn GREEN.
- Run the entire existing test suite: 0 regressions allowed.
- The reproduction test remains permanently in the test suite as a regression guard.
2. The 3 Forbidden Anti-Patterns
- The Symptom Masker:
- ❌ Anti-Pattern: Adding
if (!data) return null;or wrapping the function in an emptytry/catchblock. - Why It Breaks: The error stops crashing, but downstream state becomes corrupted silently.
- ❌ Anti-Pattern: Adding
- Shotgun Debugging:
- ❌ Anti-Pattern: Modifying 5 different files simultaneously hoping one of them fixes the problem.
- Why It Breaks: You cannot determine what actually resolved the issue, and you introduce 3 new latent bugs.
- The Print-Statement Maze:
- ❌ Anti-Pattern: Scattering 20
console.log()orprint()statements across the codebase and leaving them committed. - Why It Breaks: Clutters production logs, slows down execution, and reveals lack of structured test harness.
- ❌ Anti-Pattern: Scattering 20
3. Triage Summary Format
When reporting triage completion, summarize using this structured format:
- Defect Identified: Root cause explanation in 1–2 sentences.
- Reproduction Test: Name and location of the new test case (
tests/...). - Surgical Fix: Exact file and line modified, explaining why this solves the root cause.
- Verification Proof: Test output showing the reproduction test passing and 0 regressions.
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл root-cause-triage?
Universal scientific bug triage, incident diagnosis, and root-cause analysis standard. Strictly enforces the 'Zero Speculative Edits' law: forbids modifying production code until a minimal, deterministic reproduction test is written and failing. Diagnoses the exact broken invariant or logic boundary, applies minimal surgical patches, and verifies regression safety. Trigger when asked to "debug this bug", "fix this issue", "root cause triage", "investigate error", "diagnose failure", "why is this failing", "debug failure", or "trace bug".
Как установить скилл root-cause-triage?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл root-cause-triage запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…