/rca-investigation:rca-investigationfrom rca-investigation
Root Cause Analysis investigation for failures, outages, bugs, and process breakdowns. Enforces layered diagnosis (infrastructure before logic before process), timeline reconstruction, causal chain separation, and corrective action validation. Use when something failed and you need to understand why — not just what happened, but which layer broke and what evidence proves it. Triggers on "root cause", "RCA", "why did this fail", "hot wash", "post-mortem", "what went wrong", "failure analysis", "incident review". Modes: SYSTEM_FAILURE, PROCESS_FAILURE, SECURITY_INCIDENT, BUG_REGRESSION, GENERAL_INVESTIGATION.
Ships in rca-investigation. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Systematic failure diagnosis that enforces layered thinking, separates symptoms from causes, and validates corrective actions against the actual root cause — not the first plausible explanation.
When something fails, the natural response is to explain it immediately. This produces three systematic errors:
Layer confusion: Blaming application logic when infrastructure failed. Blaming process when tooling broke. Fixing the wrong layer wastes effort and leaves the real cause active.
Symptom-cause conflation: The visible failure is rarely the root cause. "The agent timed out" is a symptom. "The API had a service outage" is a cause. "We delegated complex tasks to agents" is a misattributed cause when the real cause was infrastructure.
Overcorrection: Changing strategy based on a misdiagnosed cause leads to abandoning approaches that were actually working. The cure becomes worse than the disease.
Auto-select based on input:
| Input Pattern | Mode |
|---|---|
| Service/system/tool failed or errored | SYSTEM_FAILURE |
| Process/workflow/loop underperformed | PROCESS_FAILURE |
| Security event or breach | SECURITY_INCIDENT |
| Bug reappeared or fix didn't work | BUG_REGRESSION |
| Ambiguous or mixed failure | GENERAL_INVESTIGATION |
Before ANY analysis, build the timeline. What happened, when, in what order.
| Time | Event | Source | Layer |
|------|-------|--------|-------|
| T1 | [what happened] | [how you know] | [infra/app/process/human] |
Rules:
CRITICAL: Walk the layers top-down. Do not skip to application/process layers without ruling out infrastructure first.
| Layer | Check | Examples | Diagnostic |
|---|---|---|---|
| L1: External Infrastructure | Third-party services, APIs, cloud providers | API outage, DNS failure, CDN down | Check status pages, error rates, token counts |
| L2: Local Infrastructure | Hardware, network, storage, OS | Drive disconnected, network dropped, OOM, reboot | Check dmesg, disk, connectivity, uptime |
| L3: Environment | Config, permissions, dependencies, state | Disk full, wrong version, missing file, stale cache | Check logs, file existence, env vars |
| L4: Tooling | The tools/agents/scripts used to do the work | Agent prompt was wrong, script had a bug, wrong tool chosen | Check tool output, compare to expected behavior |
| L5: Application Logic | The actual code or system under investigation | Bug, race condition, logic error | Code review, debugging, reproduction |
| L6: Process/Human | Workflow, decisions, prioritization, communication | Wrong priority, fixation, missed signal | Post-hoc analysis of decisions made |
The layer where the failure originated is the root cause layer. The layer where the failure was visible is the symptom layer. These are often different.
For each layer, collect:
| Evidence Type | What It Tells You |
|---|---|
| Positive evidence | Something happened that shouldn't have |
| Negative evidence | Something didn't happen that should have |
| Absence of evidence | Can't tell — need more data |
| Environmental evidence | Context that makes a cause more/less likely |
Token count heuristic for agent failures:
Distinguish:
ROOT CAUSE → PROXIMATE CAUSE → SYMPTOM → OBSERVED EFFECT
↓ ↓ ↓ ↓
API outage → Agent stream → "Agent timed → "Only 20 min
timeout out" of useful work"
The corrective action must target the root cause, not the symptom.
| Target | Example Good Fix | Example Bad Fix |
|---|---|---|
| Root cause | "Add retry logic for API failures" | — |
| Proximate cause | — | "Don't use agents for complex tasks" |
| Symptom | — | "Run more loop iterations" |
| Observed effect | — | "Work harder" |
After identifying the root cause, identify contributing factors that made the failure worse but didn't cause it:
For each proposed corrective action, validate:
| Check | Question |
|---|---|
| Layer match | Does this fix target the same layer as the root cause? |
| Proportionality | Is the fix proportional to the failure, or an overcorrection? |
| Side effects | Does this fix break something that was working? |
| Testability | Can you verify this fix would have prevented the failure? |
| Overcorrection test | Would you still propose this fix if the failure hadn't happened? If no → probably overcorrecting |
Use the same calibration as SAT:
| Term | Range | Usage |
|---|---|---|
| Almost Certain | 90-99% | Clear evidence at identified layer, alternatives ruled out |
| Highly Likely | 80-89% | Strong evidence, one layer clearly dominant |
| Likely | 65-79% | Preponderance points to one layer |
| Moderate | 50-64% | Multiple layers plausible |
| Uncertain | 20-49% | Insufficient evidence to isolate layer |
## RCA INVESTIGATION: [Title]
**Mode**: [Mode]
**Root Cause Layer**: L[N] — [Layer Name]
**Confidence**: [Term] ([X-Y%])
**Date**: [Date of analysis]
---
### TIMELINE
| Time | Event | Source | Layer |
|------|-------|--------|-------|
### FAILURE TAXONOMY WALKTHROUGH
| Layer | Checked | Finding | Evidence |
|-------|---------|---------|----------|
| L1: External Infra | ✓/✗ | [Clear/Suspect/Ruled Out] | [evidence] |
| L2: Local Infra | ✓/✗ | ... | ... |
| L3: Environment | ✓/✗ | ... | ... |
| L4: Tooling | ✓/✗ | ... | ... |
| L5: Application | ✓/✗ | ... | ... |
| L6: Process/Human | ✓/✗ | ... | ... |
### CAUSAL CHAIN
ROOT CAUSE: [what actually broke] → PROXIMATE CAUSE: [immediate trigger of visible failure] → SYMPTOM: [what was observed] → EFFECT: [business/mission impact]
### CONTRIBUTING FACTORS
| Factor | Layer | Impact | Independently fixable? |
|--------|-------|--------|----------------------|
### ROOT CAUSE STATEMENT
[One paragraph: what failed, at which layer, with what evidence]
### CORRECTIVE ACTIONS
| Action | Targets Layer | Proportional? | Overcorrection test |
|--------|--------------|---------------|-------------------|
### WHAT WOULD NOT HAVE HELPED
[Actions that seem obvious but don't address the root cause]
### ASSUMPTIONS
1. [Assumption]
### OPEN QUESTIONS
- [What you still don't know]
Focus on L1-L3. Check:
Focus on L4-L6 but only after ruling out L1-L3. Check:
Full layer sweep. Additionally:
Focus on L3-L5. Check:
| Anti-Pattern | Signal | Correction |
|---|---|---|
| Narrative fallacy | RCA reads like a story with a moral | Strip narrative, show evidence → conclusion |
| Hindsight bias | "We should have known" | What signals were actually available at decision time? |
| Overcorrection | Fix is bigger than the failure | Apply proportionality test |
| Layer skip | Jump to L5/L6 without checking L1-L3 | Walk taxonomy top-down |
| Single cause fixation | "It was X" with no alternatives considered | Generate ≥3 candidate causes |
| Blame assignment | RCA identifies a person, not a system gap | Systems fail, not people. What allowed the error? |
Before ANY output, verify:
Support iterative refinement:
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub dmaynor/dmaynor-skills-marketplace --plugin rca-investigation