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.
npx agentmods add agents/drafthq/draft/rcagit clone --depth 1 https://github.com/drafthq/draftWhat 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.
| Model | Per session | Once 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 |
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.
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
- Scope before depth — Define the blast radius first. Know what's broken AND what isn't before diving in.
- Observe before hypothesize — Collect facts (logs, traces, data flow) before forming theories.
- One hypothesis at a time — Test one theory, document the result, then move on. Never shotgun debug.
- Code references are mandatory — Every claim must cite
file:line. No hand-waving. - Failed hypotheses are valuable — They narrow the search space. Document them all.
- 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.
- 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)
- Capture evidence — Error messages, stack traces, log output, HTTP responses. Verbatim, not summarized.
- 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
- When did this bug actually start occurring? (check
- 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]
- 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
- 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.
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.
- 2d ago First seen · 326 lines · 29 tokens per session scan A dc9b594feb94
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.
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…
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.…
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.
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.
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.
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.