# Postmortem

Auto-generates a structured postmortem from a completed campaign.

- Repository: https://github.com/SethGammon/Citadel (927 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-10-30
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add SethGammon/Citadel --skill postmortem -g -a claude-code -y`
Codex: `npx skills add SethGammon/Citadel --skill postmortem -g -a codex -y`
Cursor: `npx skills add SethGammon/Citadel --skill postmortem -g -a cursor -y`
Gemini CLI: `npx skills add SethGammon/Citadel --skill postmortem -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add SethGammon/Citadel`

## Description

Auto-generates a structured postmortem from a completed campaign. Reads the campaign file, telemetry logs, and feature ledger. Produces a documented analysis of what broke, what the safety systems caught, and what patterns emerged. Can also be invoked manually for any incident.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# /postmortem, Campaign Postmortem Generator

## Orientation

**Use when:** A campaign just completed and you want a structured analysis of what broke, what safety systems caught, and what patterns emerged. Also for ad-hoc incident analysis from recent git history.

**Don't use when:** You want to preserve session context for the next conversation (use `/session-handoff`), extract reusable patterns from findings into the knowledge base (use `/learn`), or score and improve quality iteratively (use `/improve`).

## When to Use

- After any Archon campaign completes (Archon should suggest it)
- After a difficult debugging session
- When the user says "what just happened" or "what broke"
- When /do routes "postmortem", "retro", "what broke", "what happened"

## Inputs

One of:
1. A campaign file path (.planning/campaigns/*.md)
2. A time range ("last session", "today", "this week")
3. Nothing (reads the most recent completed campaign)

## Protocol

### Step 1: GATHER

Collect data from all available sources:

**From the campaign file (if it exists):**
- Direction vs what was actually built (scope drift?)
- Phase completion timeline (which phases needed rework?)
- Decision log entries (what architectural choices were made?)
- Review queue items (what needed human eyes?)
- Circuit breaker activations (what hit the limit?)
- Feature ledger (what shipped?)

**From telemetry (.planning/telemetry/):**
- hook-timing.jsonl: which hooks fired most, any patterns
- hook-errors.log: what was blocked, what failed, what had parse errors
- Circuit breaker trips
- Quality gate violations

**From git history:**
- Commits during the campaign period
- Files changed (which areas got the most churn?)
- Any reverts (what was undone?)
- Commit message patterns (fix: commits indicate bugs found)

**From the session itself (if no campaign):**
- Recent tool calls and their outcomes
- Files edited and errors encountered

### Step 2: ANALYZE

Identify patterns across the data:

The rest: https://github.com/SethGammon/Citadel/blob/HEAD/skills/postmortem/SKILL.md
