Structured incident investigation using Five Whys, Fishbone, blameless Postmortem, Fault Tree, Kepner-Tregoe, and FMEA — traces failures to systemic root causes
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-rootcauseanalysis-74eee7248cab ,按照其中的说明把「RootCauseAnalysis」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Before executing, check for user customizations at:
~/.claude/LIFEOS/USER/CUSTOMIZATIONS/SKILLS/RootCauseAnalysis/
If this directory exists, load and apply any PREFERENCES.md, configurations, or resources found there. These override default behavior. If the directory does not exist, proceed with skill defaults.
You MUST send this notification BEFORE doing anything else when this skill is invoked.
Send voice notification:
curl -s -X POST http://localhost:31337/notify \
-H "Content-Type: application/json" \
-d '{"message": "Running the WORKFLOWNAME workflow in the RootCauseAnalysis skill to ACTION"}' \
> /dev/null 2>&1 &
Output text notification:
Running the **WorkflowName** workflow in the **RootCauseAnalysis** skill to ACTION...
This is not optional. Execute this curl command immediately upon skill invocation.
Investigates why something failed — past the proximate cause, down to the contributing factors and latent conditions that actually made the failure possible. It offers five structured methods (5 Whys, Fishbone, Postmortem, Fault Tree, Kepner-Tregoe) and ends with actionable changes that prevent a whole class of failure, not just the one incident. Grounded in Toyota Production System, Ishikawa, Reason's Swiss Cheese model, Gano's Apollo method, and Google SRE / Etsy blameless culture.
The goal is not "the" root cause — that framing is almost always wrong. A good RCA ends with 3+ actionable, systemic contributing factors, named blamelessly, that prevent a class of failure — not a single blame target. Everything below is structure that pushes the analysis past the first plausible answer, past blame, and stops only at causes you can actually change.
Five axioms this skill operates on:
When to use:
What you win:
Default mental model: If the same failure class could happen again tomorrow, you haven't done RCA — you've done triage.
Route to the appropriate workflow based on the request.
| Workflow | Trigger | File |
|---|---|---|
| FiveWhys | "5 whys", "five whys", quick causal chain, ask why until root | Workflows/FiveWhys.md |
| Fishbone | "fishbone", "ishikawa", categorized cause map, 6 M's / 4 P's / 8 M's | Workflows/Fishbone.md |
| Postmortem | "postmortem", "incident review", "blameless postmortem", production incident | Workflows/Postmortem.md |
| FaultTree | "fault tree", "fta", top-down deductive, safety-critical, AND/OR logic | Workflows/FaultTree.md |
| KepnerTregoe | "kepner tregoe", "is/is-not", "what changed", distinction analysis, subtle defects | Workflows/KepnerTregoe.md |
Context files (loaded on demand):
Foundation.md — Toyoda, Ishikawa, Reason, Gano, Google SRE; canonical methodsMethodSelection.md — decision flow for which workflow to use| Situation | Preferred workflow |
|---|---|
| Single-thread incident, one clear failure point | FiveWhys |
| Multiple suspected categories (people, process, tools) | Fishbone |
| Production outage or security incident, needs formal review | Postmortem |
| Complex multi-path failure, safety-critical, need Boolean logic | FaultTree |
| Subtle defect, hard to reproduce, "why here and not there?" | KepnerTregoe |
For non-trivial incidents: Postmortem wraps the others. Start with a Postmortem structure, use 5 Whys / Fishbone / FTA inside it as investigation tools.
Depends on: nothing — standalone analytical skill.
Works well with:
Example 1: Production outage
User: "the payments service went down for 14 minutes last night"
→ Postmortem workflow
→ Timeline: deploy at 23:47 → health check passed → traffic shift 23:49 → p99 latency spike 23:51 → auto-rollback 00:01
→ 5 Whys inside: Why did p99 spike? Cold cache. Why cold? New pod group. Why no warm? No warm-up in deploy script. Why? Not in checklist. Why? Template predates the caching layer.
→ Contributing factors: deploy template stale (latent); no warm-up step (active); no cache-cold canary (latent)
→ Remediation: update deploy template, add warm-up step, add cold-cache canary gate
Example 2: Recurring defect
User: "users keep reporting the same kind of auth failure, we've fixed it 3 times"
→ Fishbone workflow
→ 6 M's expansion: People (ops auth rotates keys without notifying infra), Method (no key-rotation runbook), Machine (secret cache TTL exceeds rotation window), Material (shared key instead of per-service), Measurement (no key-expiry dashboard), Mother-Nature (none)
→ Root causes (multiple): Method + Material + Measurement all contribute. Single-point fix won't hold.
Example 3: Subtle defect
User: "this flaky test only fails in CI, not locally"
→ KepnerTregoe workflow
→ IS/IS-NOT table: fails on CI / passes locally; fails Tuesdays / not other days; fails on shared runners / not dedicated; fails with parallel test workers / not serial
→ Distinctions point to: time-zone + concurrency + shared file system
→ Hypothesis: test relies on local timezone assumption + race condition on shared /tmp — both only triggered in CI's environment.
Attribution: Frameworks drawn from Sakichi Toyoda (5 Whys, Toyota Production System), Kaoru Ishikawa (Guide to Quality Control, 1968; Fishbone diagram), James Reason (Human Error, 1990; Swiss Cheese model), Dean Gano (Apollo Root Cause Analysis, 2008), Charles Kepner & Benjamin Tregoe (The Rational Manager, 1965), Google SRE book, Etsy blameless postmortem culture (John Allspaw).
After completing any workflow, append a single JSONL entry:
echo '{"ts":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'","skill":"RootCauseAnalysis","workflow":"WORKFLOW_USED","input":"8_WORD_SUMMARY","status":"ok|error","duration_s":SECONDS}' >> ~/.claude/LIFEOS/MEMORY/SKILLS/execution.jsonl