SRC-8: Software Root-Cause 8-Step Protocol

July 10, 2026 · View on GitHub

SRC-8 is mcp-probe-kit's bug root-cause protocol for code + AI agent workflows.

It is inspired by Toyota Business Practice (TBP) and PDCA, not a literal translation of the manufacturing 8-step form. We inherit scientific-thinking discipline and elevate it with software-native concepts.

中文文档:src8-methodology.zh-CN.md


What we borrow from Toyota TBP

Reference: Toyota Business Practice — Art of Lean

TBP invariantSRC-8 inheritance
Problem = ideal − actual (gap)Step 1 Clarify gap
Break down; find priority pointStep 2 Narrow boundary
Set measurable target before RCAStep 3 Acceptance contract
Genchi genbutsu, 5 Why, factsStep 4 Root cause (worksheet)
Countermeasures vs symptomsStep 5 Countermeasures
Implement with monitoringStep 6 Implement
Evaluate results and processStep 7 Evaluate
Standardize & yokotenStep 8 Standardize (memorize + tests)

Classic TBP failure (we forbid): jumping straight to root-cause analysis without clarifying, breaking down, or setting a target.


Our elevation (beyond TBP)

DimensionManufacturing TBPSRC-8
ObservationShop floorRead code/logs/repro, code_insight
Decomposition4M / processSix attribution layers incl. agent_behavior
Root causeOften single chainSimple: causal sentence; complex: primary + contributing factors
Done definitionYield, cycle timeFailing test green, repro passes
Step 4 depth5 WhyWorksheet 4a–4e
StandardizeWork standardsTests + memorize_asset cross-repo
ExecutorHumansMCP guidance + Agent execution

The eight steps

#NamePDCAKey output
1Clarify gapPlanIdeal / actual / gap
2Narrow boundaryPlanTimeline, layer, priority point
3Acceptance contractPlanSMART acceptance criteria
4Root causePlanrootCauseAnalysis worksheet
5CountermeasuresPlanMinimal patch plan
6ImplementDoPatch after repro gate
7EvaluateCheckResults + process
8StandardizeActTests + memorize

Plan ~60–70% of effort; Step 4 is the core.


Step 4 worksheet (highlight)

fix_bug injects structuredContent.rootCauseWorksheet:

  • 4a Hypotheses (incl. agent_behavior)
  • 4b Exclusion matrix (evidence / counter-evidence / status)
  • 4c Fork point (or evidenceGaps without success sample)
  • 4d 5 Why chain (≥3 levels, fact-bound)
  • 4e Causal statement (simple or complex)

Gates: no countermeasures until worksheet closed; confidence: low blocks code changes.


Tool mapping

ToolRole
start_bugfixFull SRC-8 orchestration (metadata.plan delegated, same pattern as start_feature)
fix_bugSRC-8 delegated plan + root-cause worksheet for standalone analysis
code_insightsrc8-2 in plan: boundary / impact
gentestsrc8-7 in plan: regression tests
memorize_assetsrc8-8 in plan: bugfix memory

Delegated plan (v3.6.11+)

start_bugfix / fix_bug return structuredContent.metadata.plan with steps src8-1src8-8. Agents must follow plan.steps in order. MCP tool prompts embed the plan and gates without linking to this markdown file (not shipped in the npm package). This doc is for humans and the GitHub docs site.

Implementation: src/lib/src8-guidance.ts