Postmortem

From nicepkg/ai-workflow · View interactive version

Postmortem is an AI agent skill from the GitHub repository nicepkg/ai-workflow. Use when analyzing failures, outages, incidents, or negative outcomes, conducting blameless postmortems, documenting root causes with 5 Whys or fishbone diagrams, identifying corrective actions with owners and timelines, learning from near-misses, establishing prevention strategies, or when user men

How to use this skill

Skill file

Postmortem

Table of Contents

  1. Purpose
  2. When to Use
  3. What Is It?
  4. Workflow
  5. Common Patterns
  6. Guardrails
  7. Quick Reference

Purpose

Conduct blameless postmortems that transform failures into learning opportunities by documenting what happened, why it happened, impact quantification, root cause analysis, and actionable preventions with clear ownership.

When to Use

Use this skill when:

Incident Context

Learning Goals

Timing

Do NOT use when:

What Is It?

Postmortem is a structured, blameless analysis of failures that answers:

Key Principles:

Quick Example:

Incident: Database outage, 2-hour downtime, 50K users affected

Timeline:

Impact: 2-hour outage, 50K users unable to access, estimated $20K revenue loss

Root Cause (5 Whys):

  1. Why outage? Bad config deployed
  2. Why bad config? Connection pool size set to 10 (should be 100)
  3. Why wrong value? Config templated incorrectly
  4. Why template wrong? New team member unfamiliar with prod values
  5. Why no catch? No staging environment testing of configs

Corrective Actions:

What Went Well: Alerts fired quickly, team responded within 5 minutes, good communication

Workflow

Copy this checklist and track your progress:

Postmortem Progress:
- [ ] Step 1: Assemble timeline and quantify impact
- [ ] Step 2: Conduct root cause analysis
- [ ] Step 3: Define corrective and preventive actions
- [ ] Step 4: Document and share postmortem
- [ ] Step 5: Track action items to completion

Step 1: Assemble timeline and quantify impact

Gather facts: when detected, when started, key events, when resolved. Quantify impact: users affected, duration, revenue/SLA impact, customer complaints. For straightforward incidents use resources/template.md. For complex incidents with multiple causes or cascading failures, study resources/methodology.md for advanced timeline reconstruction techniques.

Step 2: Conduct root cause analysis

Ask "Why?" 5 times to get from symptom to root cause, or use fishbone diagram for complex incidents with multiple contributing factors. See Root Cause Analysis Techniques for guidance. Focus on system failures (process gaps, missing safeguards) not human errors.

Step 3: Define corrective and preventive actions

For each root cause, identify actions to prevent recurrence. Must be specific (not "improve testing"), owned (named person), and time-bound (deadline). Categorize as immediate fixes vs. long-term improvements. See Corrective Actions for framework.

Step 4: Document and share postmortem

Create postmortem document using template. Include timeline, impact, root cause, actions, what went well. Share widely (engineering, product, leadership) to enable learning. Present in team meeting for discussion. Archive in knowledge base.

Step 5: Track action items to completion

Assign owners, set deadlines, add to project tracker. Review progress in standups or weekly meetings. Close postmortem only when all actions complete. Self-assess quality using resources/evaluators/rubric_postmortem.json. Minimum standard: ≥3.5 average score.

Common Patterns

By Incident Type

Production Outages (system failures, downtime):

Security Incidents (breaches, vulnerabilities):

Product/Project Failures (launches, deadlines):

Process Failures (operational, procedural):

By Root Cause Category

Human Error (surface cause, dig deeper):

Process Gap (missing or unclear procedures):

Technical Debt (deferred maintenance):

External Dependencies (third-party failures):

Systemic Issues (organizational, cultural):

Root Cause Analysis Techniques

5 Whys:

  1. Start with problem statement
  2. Ask "Why did this happen?" → Answer
  3. Ask "Why did that happen?" → Answer
  4. Repeat 5 times (or until root cause found)
  5. Root cause: Fixable at organizational/system level

Example: Database outage → Why? Bad config → Why? Wrong value → Why? Template error → Why? New team member unfamiliar → Why? No config review in onboarding

Fishbone Diagram (Ishikawa):

Fault Tree Analysis:

Corrective Actions Framework

Types of Actions:

SMART Actions:

Prioritization:

  1. High impact, low effort: Do immediately
  2. High impact, high effort: Schedule as strategic project
  3. Low impact, low effort: Do if spare capacity
  4. Low impact, high effort: Consider skipping (cost > benefit)

Prevention Hierarchy (from most to least effective):

  1. Eliminate: Remove hazard entirely (e.g., deprecate risky feature)
  2. Substitute: Replace with safer alternative (e.g., use managed service vs self-host)
  3. Engineering controls: Add safeguards (e.g., rate limits, circuit breakers, automated testing)
  4. Administrative controls: Improve processes (e.g., runbooks, checklists, reviews)
  5. Training: Educate people (least effective alone, combine with others)

Guardrails

Blameless Culture:

Root Cause Depth:

Actionability:

Impact Quantification:

Timeliness:

Quick Reference

Resources:

Success Criteria:

Common Mistakes:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.