postmortem

A blameless incident postmortem: a written record of what happened, when it happened, why it happened, and what should change. An incident is a service failure or near-miss that may require learning and follow-up work.

In plain words
What is it for?
Use it after outages, security events, data loss, significant degradation, on-call incidents, serious near-misses, or recurring failures to create a timeline, identify causes, and file follow-up tracker issues.
Why use it?
It turns a production problem into a shared understanding and tracked prevention work without blaming individuals. It also keeps the report from being marked final while the highest-priority actions remain open.

Command

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 commands/higoralves/orc/postmortem
Clone the repo
git clone --depth 1 https://github.com/HigorAlves/orc
Per session 40 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,549 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.00040 $0.01549
Opus 5 $0.00020 $0.00775
Sonnet 5 $0.00008 $0.00310
Haiku 4.5 $0.00004 $0.00155

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

Security

Grade A, and why

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

orc/commands/postmortem.md · 138 lines

How it starts

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

/orc:postmortem

Capture what happened, why it happened, and what changes to prevent recurrence.

Arguments

  • <short-slug> — optional. Brief incident identifier (e.g. db-failover-2026-05-01). Prompts if omitted.
  • --severity sev-1|sev-2|sev-3 — optional. If omitted, the workflow proposes a tier and confirms with the user.

Workflow

Phase 1 — Gate

Invoke orc:postmortem-writing. Confirm a postmortem is warranted:

  • customer-visible incident, OR
  • an on-call page fired, OR
  • near-miss with a real defect, OR
  • recurrence of the same incident type.

If borderline (e.g. caught in CI, no production impact), print the Gate headline (**⛔ Gate — postmortem-worthy?**, per orc:callouts), then AskUserQuestion:

  • "Write a full postmortem anyway"
  • "Write a one-paragraph near-miss note instead (no full template)"
  • "Skip — caught early, no learning to capture"

Phase 2 — Establish severity

If no --severity flag: propose a tier based on user description and confirm via AskUserQuestion:

  • SEV-1: total outage / data loss / security event
  • SEV-2: significant degradation / partial outage
  • SEV-3: edge-case impact / near-miss

If the project doesn't have severity definitions, note this — surface a suggestion to author them as an ADR / policy doc afterward.

Phase 3 — Initialize workspace

Register state: orc-state init --command postmortem --total-phases 7, then orc-state phase set 3 --label "severity-<tier>". Defer to orc:state-protocol for schema and rules.

Decide where the document lives via AskUserQuestion:

  • "In-repo at docs/postmortems/YYYY-MM-DD-<slug>.md"
  • "Shared doc tool (Notion / Confluence / Google Doc) — author in .orc/ first; you'll mirror it manually"

Phase 4 — Build the timeline FIRST

The timeline is the spine; everything else depends on it. Walk the user through:

  1. Detection (what fired, who saw it, when).
  2. Response (who ack'd, what they checked first, key dashboard URLs).
  3. Mitigation (what change actually stopped the bleeding).
  4. Resolution (when traffic / metrics returned to baseline).

Read the full file on GitHub · 138 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 · 138 lines · 40 tokens per session scan A 633f71975c6e

Subscribe to this mod's changes

postmortem is a command published in the GitHub repository HigorAlves/orc (6 stars, last pushed 5d ago), licensed MIT. It adds 40 tokens to every session and 1,549 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-31.