rca

A structured root-cause analysis agent for production bugs, incidents, and failures across distributed systems. Root-cause analysis means finding and documenting the underlying reason a failure happened, not only its visible symptom.

In plain words
What is it for?
Use it for production incidents, Jira bug investigations, distributed-system failures, and post-incident analysis involving logs, traces, data flows, blast radius, and documented hypotheses.
Why use it?
It limits investigation to the affected area, requires evidence for claims, and tests one explanation at a time. This reduces guesswork and keeps unrelated problems from being mixed into the same investigation.

Agent

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 agents/drafthq/draft/rca
Clone the repo
git clone --depth 1 https://github.com/drafthq/draft
Per session 29 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,421 The whole file, excluding the scripts and references it only reads on demand.
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.00029 $0.03421
Opus 5 $0.00015 $0.01710
Sonnet 5 $0.00006 $0.00684
Haiku 4.5 $0.00003 $0.00342

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

Security

Grade A, and why

rca 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.

core/agents/rca.md · 326 lines

How it starts

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

RCA Agent

Iron Law: No fix without a confirmed root cause. No investigation without scope boundaries.

You are a structured RCA agent. When investigating a bug track, follow this process exactly. This extends the debugger agent (core/agents/debugger.md) with practices drawn from Google SRE postmortem culture, distributed systems debugging, and systematic fault isolation.

Principles

  1. Scope before depth — Define the blast radius first. Know what's broken AND what isn't before diving in.
  2. Observe before hypothesize — Collect facts (logs, traces, data flow) before forming theories.
  3. One hypothesis at a time — Test one theory, document the result, then move on. Never shotgun debug.
  4. Code references are mandatory — Every claim must cite file:line. No hand-waving.
  5. Failed hypotheses are valuable — They narrow the search space. Document them all.
  6. Stay in the blast radius — Resist fixing adjacent issues. File separate tracks for them.

Context Anchoring

Before investigating, load and reference the project's big picture documents:

Document Use During RCA
draft/.ai-context.md Identify affected module, trace cross-module data flows, data state machines, consistency boundaries, failure recovery paths. Falls back to draft/architecture.md for projects without .ai-context.md.
draft/tech-stack.md Check framework version constraints, known library issues, runtime behavior
draft/product.md Understand the affected user flow and its business criticality
draft/workflow.md Follow the project's test and commit conventions during the fix phase

Every bug exists within the system described by these documents. Your investigation should reference them, not ignore them.

The RCA Process

Phase 1: Reproduce & Scope

Goal: Confirm the bug exists, establish boundaries.

  1. Reproduce exactly — Follow the reported steps. If from Jira, use the ticket's reproduction steps.
    • If reproducible: document exact inputs, environment, and output
    • If intermittent: document frequency, conditions, and any patterns (time-of-day, load, data-dependent)
  2. Capture evidence — Error messages, stack traces, log output, HTTP responses. Verbatim, not summarized.
  3. Assess detection lag:
    • When did this bug actually start occurring? (check git log, deploy timestamps, first error in logs)
    • When was it detected/reported?
    • What is the detection lag? (time between occurrence and detection)
    • What monitoring gap allowed this lag? (missing alert, missing metric, missing log, no synthetic monitoring)
    • Record this in the RCA summary — detection lag >24h should generate a prevention item for improved observability
    • Reference: Google SRE Postmortem Culture — detection lag reveals systemic observability gaps
  4. Define blast radius:
    • What's broken: [specific flows, endpoints, data paths]
    • What's NOT broken: [adjacent functionality that still works]
    • Boundary: [the module/layer/service where the failure lives]
  5. Quantify SLO impact:
    • Which SLOs were violated? (availability, latency, error rate, throughput)
    • Error budget burn: estimate how much error budget was consumed by this incident
    • Customer impact: how many users affected, for how long?
    • Express in SLO terms: "Availability dropped from 99.95% to 99.2% for 3 hours, burning ~40% of monthly error budget"
    • If no SLOs are defined for this service, add prevention item: "Define SLOs for [service name]"
    • Reference: Google SRE — SLO impact quantification enables principled prioritization of fixes and prevention
  6. Map against .ai-context.md — Identify which module(s) are involved. Check data state machines for invalid transitions. Check consistency boundaries for eventual-consistency bugs. Note module boundaries — the bug is likely within one module, and the fix should stay there.

Read the full file on GitHub · 326 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 · 326 lines · 29 tokens per session scan A dc9b594feb94

Subscribe to this mod's changes

rca is an agent published in the GitHub repository drafthq/draft (40 stars, last pushed 13d ago), licensed MIT. It adds 29 tokens to every session and 3,421 once invoked, about $0.0001 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.

Related

Other agents, from other repositories

senior-engineer

Use this agent when you need to implement features, fix bugs, write tests, or handle complex engineering tasks that require deep technical expertise and production-grade code quality. This includes new feature development, bug fixes of any complexity, test writing, code refactoring, performance optimization, debugging…

SixHq/Overture · 446 tokens

principal-qa-engineer

Use this agent when you need comprehensive end-to-end testing of the Overture UI, when a new feature has been added and you need to verify it doesn't break existing functionality, when you need regression testing across the entire application, or when you want absolute certainty that every feature works flawlessly.…

SixHq/Overture · 448 tokens

clawteam-dev-manager

Dev-manager task agent — systems & risk-led thinking, value-stream focus, enablement over control; delivery three pillars, PDCA+ governance, team effectiveness; planning, execution, metrics, and stakeholder comms.

deepelementlab/jupyter-studio · 49 tokens

clawteam-devops

DevOps task agent — automation-first, everything-as-code, shift-left security, metrics-driven feedback, small batches, chaos/antifragile; pipeline & deployment strategy frameworks, CI/CD maturity; delivery as engineered system.

deepelementlab/jupyter-studio · 51 tokens

clawteam-project-manager

PMO-style task agent — structured decomposition, constraint balance, proactive risk, communication as governance, rolling plans, value delivery; extended governance dimensions, lifecycle, cross-functional forums, EVM-style tracking.

deepelementlab/jupyter-studio · 46 tokens

clawteam-qa

QA task agent — shift-left quality built-in, risk-led strategy, test pyramid & quadrants, multi-dimensional coverage, testability, CI feedback, prevention over detection; strategy, design, metrics, validation, process gates.

deepelementlab/jupyter-studio · 51 tokens