root-cause-analysis — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited root-cause-analysis (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
MISSION: find the TRUE ROOT CAUSE — the single point where a fix prevents (not catches) the bug — by falsifying every conclusion before declaring it. Investigation only. NO code changes. Skipping any MANDATORY gate ⇒ INVALID DELIVERABLE → REDO.
Layering: skill = RCA-specific layer over CLAUDE.md doctrine. CLAUDE.md provides general adversarial toolkit (§4 Checkpoint, §6 Evidence ladder, §7 Devil's Advocate / Disconfirmation-First / Rubber Duck / IS-IS-NOT, §11 Pre-Send Checklist, §12 Repro Kernel, §13 Reflexion, P0 #1–16). NEVER duplicate CLAUDE.md rules here — cite §. Read CLAUDE.md first.
file:line + Phase 4 evidence weight, OR prefix **ASSUMPTION**:. Hallucinated file:line = #1 RCA failure → Phase 4.7 CoVe re-read MANDATORY gate.evidence_source: degraded; cap final confidence at MEDIUM. Never silently proceed.**ASSUMPTION**: OR perform the action now and quote the result. Same severity as hallucinated file:line (#2). Consolidates CLAUDE.md §18 anti-pattern + §11.9 Verification-claimed-not-run + FM-16.PLAN → 0 (Change) ▸ 1 (Symptom + Stack Reliability + 2-hop)
▸ 1.5 (IS/IS NOT) ▸ 1.6 (Repro Spec)
▸ 1.7 (Architecture Pre-Read — cross-layer ≥ 3 MANDATORY)
SOLVE → 2 (Context) ▸ 2.5 (Atlassian) ▸ 2.5.5 (Past RCA)
▸ 2.9 (Anti-anchor) ▸ 3 (Killer + H-Data + 5–7 + 6C+D + pre-commit)
▸ 4 (Discriminating-first → Bayesian asymmetric updates)
▸ 4.5.0 (Trace) ▸ 4.5 (Error Propagation / Tandem-FL)
VERIFY → 4.7 (CoVe re-read) ▸ 4.7.5 (Mutation Counterfactual)
▸ 4.7.7 (Backward Dataflow Spot Check) ▸ 4.8 (Repro consistency)
▸ 4.8.1 (Spec-Verification — fix → expected_pass)
▸ 5 (Root Cause + Invariant + Rubber Duck + Inconclusive Threshold)
▸ 5.5 (Devil's Advocate + Counterfactual Predictions)
▸ 5.7 (Defensive Depth)
REFLECT → 6 (Diagrams) ▸ 6.5 (Blast Radius / Forward Slice)
▸ 8 (Final Verification — chat only) ▸ Lessons (CLAUDE.md §13)Mode: LITE = default (Tier 0–1, single-layer, simple bugs) → 5 hypotheses, 3 diagrams, inline Repro, NO subagents. FULL = Tier 2+ / 3+ layers / production / financial / data-integrity / security boundary → 7 hypotheses, 6 diagrams, separate REPRO file, subagents per layer. When in doubt → FULL. Tier-up per CLAUDE.md §3.
Input (REQUIRED): Jira ID [A-Z]{2,10}-[0-9]+ / error / stack / file:line / symptom. Empty → exit with usage.
Path discovery (first turn touching context):
Glob("**/Domain_Glossary.md") → DOCS_ROOT = parent of containing dir.Glob("**/LOCAL-MEMORY") → OUTPUT_ROOT.Read order: CLAUDE.md (loaded) → Jira (if ticket present) via Atlassian MCP (atlassianUserInfo → getJiraIssue); store summary, description, status, components, comments, linked tickets, attachments → Domain_Glossary.md ONLY when domain term in play (P0 #2) → code (P0 #1: READ before any conclusion).
Output paths:
{OUTPUT_ROOT}/BUG-<id>-<slug>/RCA-YYYYMMDD-HHmm-<slug>.md{OUTPUT_ROOT}/CURRENT_TASK/RCA-YYYYMMDD-HHmm-<slug>.mdREPRO-YYYYMMDD-HHmm-<slug>.md.YAML frontmatter (MANDATORY per CLAUDE.md §9): artifact_type=RCA, producer=claude-code, state=draft, parent_artifact, inputs_consumed[file:line + sha256], fingerprint, created, tier, targets_failure_modes (FM-2/4/7/19/22 typical), verification block.
STOP rules: max 15 files (codebase-search-protocol); max 2 hypothesis revision cycles; NEVER save report until Phase 8 chat-verification emitted.
Cascade gate; stop at first SKIP.
file:line → SKIP.git log --oneline -n 3 --since="14 days ago" -- {file}. Empty → SKIP.git blame -L {line},{line} {file}. Extract commit, author, date.Regression Verdict (mandatory classification):
| Verdict | Meaning | Focus |
|---|---|---|
| NEW BUG | Never worked | Full hypothesis set |
| REGRESSION | Was working, now broken | Suspicious commit diff → seeds Killer |
| REINTRODUCTION | Prior fix reverted | Merge history, original ticket |
| UNKNOWN | Cannot determine | Standard hypothesis-driven |
REGRESSION + recent commit on error file → that commit = Killer Hypothesis seed (§9.1).
Deeper: reference.md § Regression Archaeology.
Extract: Exception type, message, stack, error file:line, ±20 lines context, input data, trigger.
Categorize: Null Ref / Type Mismatch / State Invalid / Data Validation / Concurrency / Configuration / Permission / Database / Data Integrity / External.
Stack-Trace Reliability Score — stack shows where error MANIFESTED, NOT where it ORIGINATED:
| Pattern | Reliability | Required action |
|---|---|---|
| Direct exception in business logic at non-trivial computation | HIGH | Trust top frame |
| NullRef in serialization / mapping (DTO, AutoMapper, JSON) | LOW | Bug upstream — ≥ 3-hop backward trace MANDATORY |
| Exception in framework / middleware / pipeline filter | LOW | Bug in caller's args — trace caller |
| Event handler / callback | MEDIUM | Check producer of event |
| Timeout / connection-refused downstream | LOW | Check caller's request shape |
| Aggregate / facade orchestrator | MEDIUM | Identify which sub-op produced bad value |
2-hop backward trace (MANDATORY): Hop 0 = error file:line; Hop 1 = caller; Hop 2 = caller's caller.
Backward-slice criterion (CONDITIONAL — value-propagation / NullRef / type-mismatch / wrong-value): record (error_stmt, failing_variable) for §12 Tandem-FL.
MANDATORY before Phase 3. Eliminates 30–50 % false hypotheses upfront.
| Dim | IS (affected) | IS NOT (could be but isn't) | Distinction |
|---|---|---|---|
| WHAT | [defective object/data] | [similar non-defective] | [diff] |
| WHERE | [defect location] | [could-be-but-isn't] | [diff] |
| WHEN | [defect time/window] | [no-defect time] | [diff] |
| EXTENT | [how much] | [how much could be] | [boundary] |
Output: 1-sentence Boundary Insight + Pre-Eliminated Hypotheses list.
⛔ NON-NEGOTIABLE: ≥ 2 IS NOT rows. Cannot fill 2 → STOP. Search the similar working case first ("Asset save works, WO doesn't — why?"); then return. Skipping = INVALID.
MANDATORY. LITE inline table; FULL emits REPRO-*.md per CLAUDE.md §12.
LITE table fields: Minimal input | Required preconditions | Steps | Expected | Actual (with file:line) | Reproduction confidence | Falsifier test (1 line: "Bug reproduced iff [X]").
Reproduction Confidence Rules:
| Confidence | Trigger | Effect |
|---|---|---|
| DETERMINISTIC | Reproduces every time on stated preconditions | ◆◆◆ default for state matching repro |
| FLAKY | Reproduces sometimes | Activate Timeline Reconstruction (reference.md); evidence weight capped ◆◆○ unless trace confirms |
| UNKNOWN | Cannot specify preconditions | evidence_source: degraded; cap final confidence at MEDIUM (Hard rule 7); recommend runtime verification before /bug.fix |
Trigger (ANY one):
Core/, BO/, or other core infrastructure layers; security boundary.MANDATORY before §9 Phase 3 hypothesis generation (skipping ⇒ INVALID):
context/01_Solution_Overview/Project_Overview.md — record top 3 dependencies relevant to error path.context/03_Projects/{ProjectName}.md (per CLAUDE.md §16).Code_Patterns_Index.md).Output recorded in §8 Phase 2.9 under ARCHITECTURAL CONTEXT column AND in report §1.7:
Empirical: agents that gather architecture context BEFORE hypothesizing solve cross-layer bugs ~2× more often (SWE-bench Verified, "Beyond Resolution Rates" 2026). Hypothesizing without architectural context = anchored on local cause; misses upstream root.
Use codebase-search-protocol skill once at Phase 2 start: CLASSIFY → LOCATE → FILTER → SCAN → EXPAND. Bug profile: start from stack-trace file:line; max 15 files; stop at 3+ evidence per hypothesis.
Multi-layer order: DB → ORM → BO → Core/Services → Web/API → UI. SKIP uninvolved layers.
Phase 2.5 — External (Atlassian): ticket detected ⇒ run parallel with Phase 2. Jira similar/component/recent-fix; Confluence architecture / known issues / constraints. External findings = SUGGESTIONS, NEVER conclusions; verify in Phase 4.
Phase 2.5.5 — Past RCA Lookup: Glob("**/RCA-*.md") over OUTPUT_ROOT → filter by Exception_Type + first-3-stack-frames → top-5 by similarity. Each surfaced past root cause = candidate hypothesis with prior boosted by similarity. PRIORS only, NEVER conclusions.
Phase 2.8 — Async Subagents (FULL only, 3+ layers): launch 2–4 Agent (subagent_type: Explore) per layer in parallel. Subagents READ and report; main agent WRITES (CLAUDE.md §14). NEVER spawn parallel writers.
Document before Phase 3, columns kept strictly separate:
Anchoring detector: ALL hypotheses align with code-read AND none touch UNKNOWN ⇒ ANCHORED. Force ≥ 1 hypothesis from UNKNOWN. Pre-commitment is the ONLY reliable counter to anchoring; CoT does NOT reduce it.
MANDATORY: hypotheses BEFORE deep code reading. Tree-of-Hypotheses, NOT a list.
MANDATORY. Before standard 5–7, ONE Killer:
"The single most likely cause given symptom + recent change + Past RCA is [statement]. If TRUE, fix at file:line. The single observation that would confirm: [observation]."Source priority: (1) most recent commit on error file; (2) top-1 Past RCA match; (3) most-cited Common Pattern (reference.md §1).
Investigate Killer FIRST. Fires (◆◆◆ + survives Mutation) → fast-path → §13 → §14. Fails → standard Phase 4 with full set.
IF symptom record-specific OR intermittent-per-user OR
IS/IS-NOT shows "only some records affected" OR
error category = Data Integrity:
→ H-Data investigated FIRST (after Killer; or Killer = H-Data).
→ ◆◆◆ corrupt record found ⇒ root cause = DATA. SKIP code investigation.
Recommend data fix + ETL/migration audit.
ELSE:
→ H-Data generated (MANDATORY) but follows debiasing order (start at H3/H4).H-Data score ≥ 4 OR posterior ≥ 60 % ⇒ H-Data Escalation (reference.md §2): PAUSE code investigation; request DB query / sample from user.
| Cat | Example |
|---|---|
| Code | Wrong calc, missing validation, off-by-one |
| Config | Feature flag, {YOUR_CONFIG_LAYER}, env var |
| Concurrency | Race, deadlock, async-before-init |
| Communication | API contract, format mismatch |
| Constraints | State machine, business rule, deleted entity |
| Context | Local OK / prod fails, env-specific |
| Data | Corrupt record, FK orphan, null-where-non-null (MANDATORY) |
### H[N]: [title]
**Statement**: [1 sentence]
**6C+D**: [category]
**Test (falsifiable)**: If TRUE, [specific X] observable at [file:line / trace span].
**If False**: [next investigation step]
**What would change my mind** (pre-commitment):
"Will UPDATE H[N] FROM <state> TO <state> IF I OBSERVE <evidence> AT <location>."
**Discriminating experiment**:
"The single observation that would most decisively falsify H[N]: [obs], because [why discriminates]."
**Evidence Needed**: [E1: ◆◆◆/◆◆○/◆○○] [E2: …] [E3: …]
**Probability** (initial prior): HIGH / MEDIUM / LOW
**If True**: [fix sketch — 1 line]Missing any field ⇒ INVALID hypothesis → REDO.
priority(H_i) = posterior(H_i) + sqrt(2 * ln(N_total) / N_attempts(H_i))4-column table: H | Posterior | Attempts | UCB. Update each round.
Investigate ALL hypotheses, in DISCRIMINATING-EXPERIMENT-FIRST order.
Per hypothesis (UCB priority):
file:line / trace span / DB record / commit that would most decisively falsify).| Weight | Definition |
|---|---|
| ◆◆◆ STRONG | Direct read at exact file:line; executable signal; quoted. Every ◆◆◆ MUST have file:line. No file:line ⇒ cannot be ◆◆◆. |
| ◆◆○ MODERATE | Pattern match, inference from related code/doc |
| ◆○○ WEAK | Speculation, analogy, circumstantial |
No hypothesis CONFIRMED on ◆○○ alone. MANDATORY ≥ 1 ◆◆◆ OR ≥ 2 ◆◆○.
Weighted score = (◆◆◆× 3 + ◆◆○× 2 + ◆○○× 1)<sub>support</sub> − (◆◆◆× 3 + ◆◆○× 2 + ◆○○× 1)<sub>refute</sub>.
| Score | Level | Action |
|---|---|---|
| ≥ 7 | ✅ CERTAIN | Proceed to root cause |
| 4–6 | 🟢 HIGH | Strong (BUT see Inconclusive Threshold §13.4) |
| 2–3 | 🟡 MEDIUM | More evidence |
| 0–1 | 🟠 LOW | Weak |
| < 0 | 🔴 ELIMINATED | More refute than support |
Conflict Flag: ◆◆◆ supports AND ◆◆◆ refutes ⇒ ⚠️ CONFLICTING regardless of net score; usually means root cause is partially correct but incomplete. Investigate WHY before verdict.
| Evidence | Update |
|---|---|
| ◆◆◆ supporting | P → P + 25 % (cap 95) |
| ◆◆○ supporting | P → P + 10 % |
| ◆◆◆ refuting | P → P × 0.3 (refute 2× stronger) |
| ◆◆○ refuting | P → P × 0.6 |
| ◆◆◆ conflicting | P unchanged — investigate FIRST |
Prior → Posterior table MANDATORY in report: H | Prior | Evidence summary | Posterior | Δ.
Before backward trace.
1. Look for trace_id in Jira / error context / user input.
2. trace_id present → telemetry-first path.
3. No trace_id but observability MCP connected (DataDog / AppInsights / OTel) →
query by error_message + timestamp + user/session.
4. Neither → mark `evidence_source: code-only` and proceed.Output 1-row table: trace available (Y/N) | trace_id | source | evidence_source flag (telemetry-first / code-only / degraded).
Telemetry-first rule: trace span present → ◆◆◆ default; code reading supplements.
Backward trace from error point: read ±30 lines → identify wrong/null variable → trace its source → cross-boundary → repeat → STOP at point where fix prevents (not catches).
Error Propagation Table — MANDATORY:
| Hop | Layer | File:Line | Component | Expected | Actual | Valid? | Note |
|---|---|---|---|---|---|---|---|
| 0 | [error] | f:l | class.method | should-be | is | ❌ | Symptom |
| 1 | [call] | f:l | class.method | exp | act | ❌ | Already bad |
| 2 | [src] | f:l | class.method | exp | act | ❌ | Source returned bad |
| 3 | [origin] | f:l | class.method | userId>0 | userId=0 | ✅→❌ | Corruption Point |
| 4 | [root] | f:l | class.method | valid User | null (soft-deleted) | ❌ | ROOT CAUSE |
Telemetry-augmented: trace available ⇒ Hop = span; ◆◆◆ default.
Tandem-FL (CONDITIONAL — 4+ hops OR data-flow bug): load white-box-trace skill (Phase 6R Tandem-FL) — SBFL top-N (Ochiai) ∩ dynamic backward slice from (error_stmt, failing_var) → narrows to ~15 % of code.
For each ◆◆◆ supporting CONFIRMED hypothesis:
Read tool — re-access exact file:line (forces real file access, NOT memory).| Claim | File:Line | Quoted code | Still supports? |
|---|---|---|---|
| [claim] | f:42 | [actual code] | ✅ / ❌ HALLUCINATED |
❌ Hallucinated ⇒ downgrade to ◆○○; recompute score; if drops < 4 → no longer CONFIRMED → revision loop.
Apply ≥ 3 mutation types to each ◆◆◆ for the root cause:
| Mutation | Specific mutation | Predicted obs | Differs from actual? | Survives? |
|---|---|---|---|---|
| Condition flip | if (x<=0) → if (x<0) | … | ✅ / ❌ | Y / N |
| Off-by-one | i<n → i<=n | … | ✅ / ❌ | Y / N |
| Wrong source | null came from B not A | … | ✅ / ❌ | Y / N |
| Reverse cascade | soft-delete on/off | … | ✅ / ❌ | Y / N |
| Operand swap | a&&b → a‖b | … | ✅ / ❌ | Y / N |
Decision: ≥ 1 mutation produces DIFFERENT observation → keep ◆◆◆. ALL mutations same observation → evidence NOT discriminating → downgrade to ◆◆○; seek another ◆◆◆.
⛔ No ◆◆◆ for root cause survives ⇒ NOT CONFIRMED. Refine, downgrade to MEDIUM, or mark "recommend runtime verification". NO exceptions.
Trigger: value-propagation root cause (NullRef / type mismatch / wrong-value). Skip for config / state / concurrency.
1. Take proposed root-cause variable V at file:line L.
2. Trace backward through DEFINITION sites only (assignments, returns, parameters); max 4 hops.
3. Build Definition Chain: V (at L) ← W1 (at L1) ← W2 (at L2) ← …
4. Compare end of chain to proposed root cause:
- Same source → root cause supported.
- Different source → root cause REFUTED (value comes from elsewhere).Output 4-column table: Hop | Variable | File:Line | Source expression / method.
Repro re-check: Does proposed root cause EXPLAIN actual output of Repro Spec under stated preconditions? NO → return to Phase 3 revision loop.
Inconclusive triggers (ANY one):
INCONCLUSIVE ⇒ document MOST LIKELY hypothesis with explicit uncertainty flag; list WHAT ADDITIONAL INFORMATION is needed; provide Investigation Continuation Plan; mark report ⚠️ INCONCLUSIVE. NEVER fabricate a CONFIRMED root cause when triggers fired.
§13.4 verifies one direction: root cause EXPLAINS actual. This gate verifies the symmetric direction: fix WOULD PRODUCE expected. Asymmetric verification ⇒ INVALID.
Q (MANDATORY answered in chat before §14): Would the proposed fix at §14.5 Primary Fix Box, applied to current code, produce the expected_pass value declared in Repro Spec §6 (or ticket acceptance criteria) under stated preconditions?
| Answer | Required content | Effect |
|---|---|---|
| YES | 1-sentence causal trace: "Fix at file:line restores invariant X (§14.2); under preconditions Y, code path Z now returns expected_pass." | Proceed to §14. |
| NO | Why the fix is incomplete | Primary Fix addresses contributing factor, NOT root. RETURN to Phase 3 revision. |
| UNKNOWN | Why expected_pass cannot be derived from fix | Cap confidence at MEDIUM; recommend runtime verification in Section 7. |
Tier 2+ / cross-layer ≥ 3 / security boundary / data-integrity ⇒ ESCALATION MANDATORY: hand off this RCA report to white-box-trace VIRTUAL mode; feed the RCA file as artifact; map verdict to Q answer — V_PASS ⇒ YES (anchored evidence); V_FAIL ⇒ NO (return to Phase 3 revision); V_INCONCLUSIVE ⇒ UNKNOWN (cap confidence at MEDIUM). Catches Mental-Reality-Gap fabrication (anchored ◆◆◆ ratio < 50 %) BEFORE /bug.fix consumes the RCA. Skipping this escalation on a Tier 2+ trigger ⇒ INVALID DELIVERABLE → REDO.
Closes the misalignment-with-actual-requirement gap. Empirical: counterfactual repair-and-verify lifts Top-1 fault localization 42.8 % vs 6.4 % SBFL (SemLoc). Skipping this gate while §13.4 passed is the most common form of HIGH-confidence-wrong RCA.
file:line at every level.flowchart TB.Choose by evidence, NOT habit. NEVER collapse multi-cause failures into a forced linear chain.
Every confirmed root cause states a violated system invariant:
| Field | Value |
|---|---|
| Invariant | What should ALWAYS be true (the rule that was broken) |
| Violation | How the invariant was broken |
| Invariant Test | If invariant held → bug would NOT occur? YES required |
| Restoration | How the proposed fix restores the invariant |
Cannot state the invariant ⇒ contributing factor at best, NOT root cause. Skipping = INVALID.
Explain in exactly 3 sentences:
ANY sentence vague / circular / hand-wavy ⇒ root cause incomplete → return to Phase 4.
Occam: simpler explanation that ALSO fits all evidence? Investigate first. Multiple causes when one suffices? Challenge.
Validation checklist (ALL ✅ required):
file:line)| Field | Value |
|---|---|
| File:Line | path/file.{ext}:123 |
| One-Sentence Fix | [verb + object] |
| Why This Fixes | [root cause in ≤ 5 words] |
| Confidence | CERTAIN / HIGH / MEDIUM / LOW / INCONCLUSIVE |
The box developers read first. Get this right or the rest is decoration.
Devil's Advocate: how could I be wrong? what evidence contradicts? if fix fails in prod, why?
Counterfactual Predictions — validate via predicted secondary symptoms:
| # | If root cause correct… | Should also observe… | Verified? |
|---|---|---|---|
| 1 | [statement] | [predicted secondary symptom] | ✅ / ❌ / ⚠️ |
| 2 | [statement] | [predicted in related component] | ✅ / ❌ / ⚠️ |
| 3 | [statement] | [predicted under similar conditions] | ✅ / ❌ / ⚠️ |
⛔ ANY ❌ ⇒ root cause incomplete → investigate before proceeding.
| Layer | Defense | Expected | Actual | Gap | Type |
|---|---|---|---|---|---|
| UI Input | Client validation | … | … | … | MISSING / WRONG / INSUFFICIENT / BYPASSED |
| API | Model validation | ||||
| Business | BO/Service rules | ||||
| DB | Constraints (FK / CHECK / NOT NULL) | ||||
| Error Handling | Try/catch policy | ||||
| Tests | Unit / integration coverage |
Drives Section 7.3 Preventive Action.
| # | Diagram | Type | When |
|---|---|---|---|
| 6.1 | Error Flow | sequenceDiagram | always |
| 6.2 | Data Flow | flowchart LR | data issue |
| 6.3 | State | stateDiagram-v2 | state issue |
| 6.4 | Error Propagation | sequenceDiagram | always |
| 6.5 | Fault Tree | flowchart TB | complex only |
| 6.6 | Defensive Depth | flowchart LR | moderate+ |
Min: simple 3 / moderate 4 / complex 6. Use mermaid-diagrams skill.
Search codebase for ALL locations where same root-cause pattern exists.
Grep (files-with-matches) across codebase — ≤ 10 matches.| Location | File:Line | Same? | Risk | Priority |
|---|---|---|---|---|
| [comp] | f:l | ✅ / ❌ / ⚠️ | H/M/L | Now / Later |
Forward slice (CONDITIONAL — root cause is specific statement propagating 2+ layers): load white-box-trace (Phase 5R Blast Radius); forward slice from (root_cause_stmt, affected_var) — captures transitive data-flow dependencies.
Negative Evidence Trail — MANDATORY: document ALL eliminated hypotheses, dead-end files/patterns, why eliminated (evidence + weight). Prevents future investigators from re-walking dead ends.
Per CLAUDE.md §11 + this skill's specifics. Emit visibly in chat before saving the RCA file. NEVER include in the file.
1. STOP — review for inconsistencies; list; fix.
2. Verify hypotheses have verdicts (CONFIRMED / ELIMINATED / NEEDS MORE).
3. Verify 5 Whys / Causal Graph complete with evidence at every level.
4. Run Self-Verification Checklist below.
5. Output verification section TO CHAT (NOT to file).
6. THEN save the RCA file (without verification section).**ASSUMPTION**:ANY unchecked ⇒ INVALID DELIVERABLE → REDO.
File name: RCA-YYYYMMDD-HHmm-<slug>.md at OUTPUT_ROOT/{BUG-<id>-<slug> | CURRENT_TASK}/. Timestamps mandatory. CLAUDE.md §9 frontmatter.
Concentrated structure — see report-template.md. ALWAYS front-loads:
Then: hypotheses summary, evidence, error propagation, root cause + invariant, defensive depth, blast radius, recommendations, negative evidence trail, related issues, completeness. Phase 8 verification ❌ NEVER in file.
Diff budget (CLAUDE.md §10): RCA modifies NO source code. Fix request → hand off to /bug.fix (uses Repro Spec as falsifier).
| Situation | Action |
|---|---|
| Codebase / file search | Load codebase-search-protocol once at Phase 2 start |
| Code analysis (blast radius, data journey, layers) | Load code-analysis |
| Data-flow / value-propagation bugs with 4+ hops | Load white-box-trace (Phase 6R Tandem-FL) |
| Blast radius across 2+ layers | Load white-box-trace (Phase 5R forward slice) |
| Self-falsify CONFIRMED RCA before `/bug.fix` handoff (Tier 2+ / cross-layer ≥ 3 / security boundary / data-integrity — MANDATORY) | Load white-box-trace VIRTUAL mode; feed THIS RCA report as artifact; V_FAIL ⇒ return to Phase 3 revision; V_INCONCLUSIVE ⇒ cap confidence at MEDIUM; V_PASS ⇒ proceed |
| Vague bug description (no stack, no exception) | Load requirements-analysis (clarify Given-When-Then) |
| Mermaid diagrams | Load mermaid-diagrams skill |
| Jira / Confluence | Atlassian MCP tools |
| Multi-agent layer investigation (3+ layers) | Agent (Explore) per layer; main agent writes |
| Web (CVEs, APIs, package versions) | WebSearch / WebFetch |
| Anti-pattern | Mandatory fix |
|---|---|
| Stop at symptom ("NullRef at f:42") | Trace ≥ 5 Whys to root; state Invariant violated |
| Skip Change Analysis | git log/blame FIRST — most bugs are regressions |
| Guess without evidence | Every claim has file:line + weight, OR **ASSUMPTION**: |
| Anchor on H1 | Start investigation with H3/H4 (after Killer + H-Data) |
| Confirm on ◆○○ alone | Require ≥ 1 ◆◆◆ or ≥ 2 ◆◆○ |
| Single-path investigation | 5–7 hypotheses across ≥ 3 of 6C+D |
| No invariant stated | State what should ALWAYS be true; test root cause against it |
| Declare without Mutation Challenge | ≥ 1 discriminating ◆◆◆ required; else MEDIUM |
| Verbal counterfactual on subtle bugs | Use executable counterfactual (trace as code, NOT paraphrase) |
| Linear 5 Whys forced on multi-cause | Switch to Causal Graph (Mode B) |
| Treat downstream effect as root | Test for surviving upstream causes; if any, NOT the root |
| Trust the stack with LOW reliability | ≥ 3-hop backward trace MANDATORY |
| HIGH score without ◆◆◆ surviving Mutation = CERTAIN | INCONCLUSIVE Threshold — NOT CERTAIN; recommend runtime verification |
| Fabricate root cause when evidence insufficient | Honest INCONCLUSIVE + Continuation Plan |
/bug.fix./howto.implement.code-analysis directly.FM-A — Stops at proximate cause (where exception thrown). Recovery: 5 Whys until fix prevents, NOT catches; force the Invariant statement — cannot state invariant ⇒ NOT root cause.
FM-B — Treats downstream effect as root (high in call chain, but caused by something further up). Recovery: for every confirmed cause, test whether it has surviving upstream causes that also passed Phase 4. The most upstream surviving cause — the one with NO surviving parents — is the actual root.
context/05_AI_Rules_And_Context/FAILURE-MODE-REGISTRY.md — FM tagging for Output Contract (Tier 2+).~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.