agentleFS
saitarrunsaitarrun/Devforge-ai/skills/root-cause-analysis/SKILL.md

root-cause-analysis

Skill4 starsChanged 5 months agoApache-2.0View on GitHub

Hyper-scale root cause analysis (RCA), bisection, call-tree backtracking, and automated surgical remediation across massive million-file enterprise repositories.

17 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use adversarial-review and domain-modeling.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • MicrosoftSkill

    adversarial-review

    Adversarial review of a system design from 6 critical perspectives -- SRE, security, staff engineer, finance, operator, and developer advocate. Produces a unified risk assessment. Use for INTERACTIVE on-demand reviews during a design conversation (/adversarial-review). For RECIPE-DRIVEN reviews (where prior step context is needed), use the systems-design-critic agent instead.

    Also in 3 projects that use this

  • GoogleSkill

    domain-modeling

    Build and sharpen a project's domain model. Use when the user wants to pin down domain terminology or a ubiquitous language, record an architectural decision, or when another skill needs to maintain the domain model.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 16 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When a complex failure occurs (e.g., *"Insurance claim calculation is off by $124.50 on policy renewal"*):

    line 35
  2. Distinctive:

    Write an isolated unit or integration test recreating the exact claim payload before touching the production code.

    line 54
  3. Very specific:

    Run code_review_graph impact <target_file> to verify all other dependent insurance services (underwriting, billing, payout ledger).

    line 56
  4. Distinctive:

    Run the dedicated regression test suite, typechecks, and contract tests to ensure no secondary breakages across the enterprise system.

    line 60

“Common” is measured: kept by at least 6 in 10 of the 16 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Hyper-Scale Root Cause Analysis & Automated Remediation Skill

This skill defines the methodology for pinpointing bugs, subtle edge cases, data corruptions, and performance degradations across massive (1,000,000+ files) enterprise codebases (such as Insurance, Banking, HealthTech, and ERP systems).


1. The Hyper-Scale Funnel Strategy (1.5M Files -> 1 File)

In a 1,500,000-file repository, full text search or naive scans will freeze and consume millions of tokens. Follow the Hyper-Scale Funnel:

[Level 1: Domain & Service Isolation] (1.5M files → ~500 files)
  ↳ Match error logs, stack traces, tenant IDs, or insurance claim IDs to the specific Domain Module (e.g. `apps/claims-engine`, `libs/underwriting-rules`)
          ↓
[Level 2: AST Knowledge Graph Traversal] (~500 files → ~20 files)
  ↳ Query `code-review-graph` / LSP for the exact Execution Seam & Call Stack (e.g., `calculateClaimDeductible()`)
          ↓
[Level 3: Delta & State Flow Backtracking] (~20 files → 1-3 files)
  ↳ Trace inputs, mutations, and database transaction queries to isolate the failing logic line
          ↓
[Level 4: Surgical Automated Remediation] (Exact lines modified)
  ↳ Run Ralph Loop: Generate test harness -> Verify repro -> Apply fix -> Run regression suite

2. Deep Root-Cause Backtracking (5-Whys for Enterprise Code)

When a complex failure occurs (e.g., "Insurance claim calculation is off by $124.50 on policy renewal"):

  1. Symptom Isolation: Capture exact inputs (Policy schema, Claim items, State regulations) and actual vs expected output.
  2. Backtrack Execution Flow:
    • Ingress API: What endpoint accepted the payload?
    • Validation & Middleware: Did any claim sanitization alter the numbers?
    • Domain Calculation Engine: Where does the deductible formula execute?
    • Persistence & Database State: Is a stale exchange rate or cached tier rule being queried?
  3. Isolate Root Cause: Determine if the defect is:
    • Code Logic Error (e.g., rounding formula, boundary condition <= vs <).
    • State Drift / Stale Cache (e.g., Redis cache invalidation missing after policy update).
    • Schema / Migration Inconsistency (e.g., integer vs float precision mismatch).
    • Race Condition / Concurrency Lock (e.g., double claim submission without distributed lock).

3. Surgical Remediation & Safety Protocol

  1. Construct Minimal Reproducing Harness:
    • Write an isolated unit or integration test recreating the exact claim payload before touching the production code.
  2. Impact & Blast Radius Query:
    • Run code_review_graph impact <target_file> to verify all other dependent insurance services (underwriting, billing, payout ledger).
  3. Execute Minimal Targeted Fix:
    • Modify only the offending code block. Preserve backwards compatibility for active policies.
  4. End-to-End Regression Verification:
    • Run the dedicated regression test suite, typechecks, and contract tests to ensure no secondary breakages across the enterprise system.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.