root-cause-analysis

A root-cause analysis method for investigating recurring problems, bugs, failures, and other system issues using the Five Whys technique.

In plain words
What is it for?
Analyzing incidents, performance or security issues, architecture defects, deployment failures, and repeated bugs, then suggesting solutions and prevention steps.
Why use it?
It separates symptoms from underlying causes and considers technical, process, environment, and dependency problems.

Cursor rule

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/mr-chen-05/rules-2.1-optimized/root-cause-analysis
Clone the repo
git clone --depth 1 https://github.com/Mr-chen-05/rules-2.1-optimized
Per session 4,960 This file is loaded in full into every session.
When invoked 4,960 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.04960 $0.04960
Opus 5 $0.02480 $0.02480
Sonnet 5 $0.00992 $0.00992
Haiku 4.5 $0.00496 $0.00496

Measured 2d ago against content hash 97d903fbfb7d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

root-cause-analysis scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

project-rules/root-cause-analysis.mdc · 701 lines

How it starts

The opening of the file, as written. The whole thing — 701 lines — stays where its author put it; the contents beside it link to each section on GitHub.

🔍 Root Cause Analysis - 智能根因分析

AI驱动的根因分析系统,集成五个为什么方法论、智能问题分类和解决方案推荐引擎。

🧠 AI Intelligence Core - AI智能核心

智能激活条件

自动激活场景:
  - 检测到重复性问题或Bug
  - 用户执行 "/root-cause" 命令
  - code-quality-check发现严重问题
  - 系统故障或异常发生
  - 超级大脑系统推荐根因分析

智能分析维度:
  - 问题复杂度和影响范围 (30%)
  - 历史问题模式匹配 (25%)
  - 系统关联性分析 (20%)
  - 解决方案可行性 (15%)
  - 预防措施有效性 (10%)

🚀 Commands - 智能命令

  • /root-cause - AI智能根因分析(推荐)
  • /root-cause --issue <description> - 分析指定问题
  • /root-cause --five-whys - 使用五个为什么方法
  • /root-cause --pattern - 模式识别分析
  • /root-cause --solution - 生成解决方案建议
  • /root-cause --prevent - 生成预防措施

✨ AI-Powered Features - AI驱动功能

🤖 智能问题分析引擎

问题识别:
  技术问题:
    - 代码Bug和逻辑错误
    - 性能瓶颈和资源问题
    - 安全漏洞和风险
    - 架构设计缺陷
    - 依赖冲突和版本问题

  流程问题:
    - 开发流程不规范
    - 测试覆盖不足
    - 部署流程问题
    - 团队协作障碍
    - 文档维护不及时

  环境问题:
    - 开发环境配置
    - 生产环境差异
    - 第三方服务依赖
    - 网络连接问题
    - 硬件资源限制

智能分类:
  - 根本原因 vs 表面现象
  - 系统性问题 vs 偶发问题
  - 技术问题 vs 管理问题
  - 内部问题 vs 外部依赖

🔧 五个为什么方法论

AI增强的五个为什么:
  Why 1 - 现象识别:
    - 详细描述问题现象
    - 收集相关数据和日志
    - 确定问题影响范围
    - 建立问题时间线

  Why 2 - 直接原因:
    - 分析直接触发因素
    - 识别相关系统组件
    - 检查配置和设置
    - 分析用户操作

  Why 3 - 系统原因:
    - 分析系统设计缺陷
    - 检查流程和规范
    - 识别架构问题
    - 分析依赖关系

  Why 4 - 管理原因:
    - 分析管理流程
    - 检查团队协作
    - 识别资源分配
    - 分析决策过程

  Why 5 - 根本原因:
    - 识别根本性问题
    - 分析文化和理念
    - 检查组织结构
    - 确定改进方向

📊 智能模式识别

历史模式分析:
  - 相似问题识别
  - 问题发生频率分析
  - 解决方案效果评估
  - 预防措施有效性

关联性分析:
  - 问题间的因果关系
  - 系统组件关联性
  - 时间序列相关性
  - 环境因素影响

预测性分析:
  - 潜在问题预警
  - 风险评估和量化
  - 影响范围预测
  - 解决时间估算

🔄 AI Workflow Process - AI工作流程

Phase 1: 问题收集阶段

Step 1 - 问题定义:
  - 收集问题描述和现象
  - 整理相关日志和数据
  - 确定问题严重级别
  - 建立问题档案

Step 2 - 环境分析:
  - 分析问题发生环境
  - 检查系统配置状态
  - 收集相关依赖信息
  - 建立环境快照

Step 3 - 数据收集:
  - 收集错误日志和堆栈
  - 获取性能监控数据
  - 收集用户操作记录
  - 整理相关文档

Phase 2: 智能分析阶段

Step 4 - AI分析:
  - 执行智能问题分类
  - 进行模式匹配分析
  - 识别关联性和依赖
  - 生成分析假设

Step 5 - 五个为什么:
  - 引导式问题深挖
  - AI辅助原因推理
  - 验证分析假设
  - 确定根本原因

Step 6 - 验证分析:
  - 验证根因分析结果
  - 检查逻辑一致性
  - 评估解决方案可行性
  - 确认分析完整性

Read the full file on GitHub · 701 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 701 lines · 4,960 tokens per session scan A 97d903fbfb7d

Subscribe to this mod's changes

root-cause-analysis is a cursor rule published in the GitHub repository Mr-chen-05/rules-2.1-optimized (172 stars, last pushed 9mo ago), licensed MIT. It adds 4,960 tokens to every session, about $0.0248 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.