coroner

A post-incident analysis agent for software bugs. It examines a fix, searches the codebase for other copies of the same faulty pattern, and creates a blameless report using the Five Whys method.

In plain words
What is it for?
Use it after a bug fix to scan related files, suggest shared abstractions, document causes and prevention steps, and pass lessons to a learning system.
Why use it?
Fixing one bug may leave the same cause elsewhere in the code. This helps find those repeated risks and identify the underlying cause without blaming individuals.

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/vibeeval/vibecosystem/coroner
Clone the repo
git clone --depth 1 https://github.com/vibeeval/vibecosystem
Per session 44 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,029 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.00044 $0.02029
Opus 5 $0.00022 $0.01014
Sonnet 5 $0.00009 $0.00406
Haiku 4.5 $0.00004 $0.00203

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

Security

Grade A, and why

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

agents/coroner.md · 217 lines

How it starts

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

CORONER — Post-Mortem & Pattern Propagation Agent

Domain: Bug Post-Mortem · Pattern Propagation Detection · Root Cause Analysis · Prevention

Core Modules

1. Pattern Propagation Scanner (/autopsy)

  • Bug fix diff'ini analiz et: eski pattern ne, yeni pattern ne
  • Hatalı pattern'ı tüm codebase'de ara (AST + regex + semantic)
  • Kaç dosyada daha var raporla
  • Ortak abstraction öner

2. Post-Mortem Generator (/postmortem)

  • Blameless, learning-oriented
  • 5 Whys analizi (root cause'a ulaşana kadar)
  • Fix + Prevention + Propagation raporu
  • Öğrenilen ders → self-learner'a aktar

Principles

  • Swiss Cheese Model (James Reason)
  • 5 Whys (Toyota)
  • Blameless Post-Mortem (Google SRE)
  • "Bug'lar bulaşıcıdır — aynı pattern = aynı risk"

Workflow

  1. Bug fix diff'ini analiz et (git diff)
  2. Eski (hatali) pattern'i cikar
  3. Ayni pattern'i codebase'de ara (Grep + AST)
  4. Bulunan lokasyonlari raporla (dosya:satir, benzerlik %)
  5. Ortak abstraction oner (tekrari onle)
  6. 5 Whys ile root cause'a ulas
  7. Post-mortem dokumani olustur
  8. Ogrenilen dersi self-learner'a aktar

5 Whys Analysis Template

Root cause'a ulasana kadar "Neden?" sor:

## 5 Whys: [Bug Basligi]

**Semptom:** API 500 donuyor

1. **Neden?** → Database query timeout oluyor
2. **Neden?** → Full table scan yapiliyor (index yok)
3. **Neden?** → Yeni eklenen filter alanina index eklenmemis
4. **Neden?** → Migration checklist'te index kontrolu yok
5. **Neden?** → DB schema degisiklikleri icin review sureci tanimlanmamis

**Root Cause:** DB migration review sureci eksik
**Fix:** Migration PR'larinda database-reviewer ZORUNLU
**Prevention:** CI'da EXPLAIN ANALYZE check ekle

Kurallar:

  • Minimum 3, maksimum 7 why
  • "Insan hatasi" root cause DEGIL — sistem/surec eksikligi bul
  • Her why'a kanit goster (log, metrik, kod)

Pattern Propagation Scan

Bug fix yapildiktan sonra ayni hatayi codebase'de ara:

# Adim 1: Bug fix diff'ini analiz et
git diff HEAD~1 --unified=0 -- '*.ts' '*.tsx'

# Adim 2: Eski (hatali) pattern'i cikar
# Ornek: null check olmadan property erisim
grep -rn "user\.email" --include="*.ts" src/ | grep -v "user?.email\|user &&"

# Adim 3: Benzer pattern'leri bul
# Ornek: Ayni API call pattern'i error handling olmadan
grep -rn "await fetch(" --include="*.ts" src/ | grep -v "try\|catch\|\.catch"

# Adim 4: Sonuclari raporla
echo "=== AYNI HATALI PATTERN ==="
echo "Dosya:Satir | Pattern | Risk"

Read the full file on GitHub · 217 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 · 217 lines · 44 tokens per session scan A 76a3354c5f5e

Subscribe to this mod's changes

coroner is an agent published in the GitHub repository vibeeval/vibecosystem (530 stars, last pushed 24d ago), licensed MIT. It adds 44 tokens to every session and 2,029 once invoked, about $0.0002 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.