Skip to main content

Anatomy of AI-Powered Postmortem

Blameless retros with AI: timelines, RCA, contributing factors.

Postmortem

Blameless retros with AI-augmented timelines, root-cause analysis, contributing-factor analysis, and learning loops โ€” turning every incident into a net improvement in reliability, safety, and team effectiveness.


TL;DRโ€‹

  • A modern postmortem turns an incident into an opportunity โ€” never a witch hunt.
  • The flow: Detect โ†’ Contain โ†’ Investigate โ†’ Analyze โ†’ Decide โ†’ Act โ†’ Learn.
  • Be blameless, curious, data-driven, clear, actionable, and timely.
  • AI is your investigator, analyst, writer, and coach โ€” not the decision-maker.
  • Distinguish a single Root Cause from the many Contributing Factors.
  • Close the loop with evaluations that prove your fixes actually worked.

Why this mattersโ€‹

Systems fail. People are human. The real question after an incident isn't "who screwed up?" โ€” it's "what about our system made this failure possible, and how do we make it impossible (or harmless) next time?" AI shortens the gap between "something broke" and "we've learned and improved" from days to hours โ€” without diluting the human judgment that matters most.

Bottom line: "We don't rise to the level of our goals. We fall to the level of our systems." โ€” James Clear


The Big Picture โ€” The Postmortem Lifecycleโ€‹

Principlesโ€‹

  • ๐Ÿค Blameless โ€” investigate the system, not the people.
  • ๐Ÿ” Curious โ€” assume there's always something deeper.
  • ๐Ÿ“Š Data-driven โ€” evidence beats opinion.
  • ๐ŸชŸ Clear โ€” anyone in the company can read it.
  • โœ… Actionable โ€” every finding maps to an owner + due date.
  • โฑ๏ธ Timely โ€” draft within 48 hours; publish within a week.

Bottom line: A postmortem that takes a month is a postmortem nobody reads.


AI Superpowers Throughoutโ€‹

Use AI as a force multiplier at every stage of the lifecycle.

CapabilityWhat AI doesWhere it helps
๐Ÿงฉ AggregateCollect logs, metrics, traces, chats, changes automaticallyInvestigate
๐Ÿ”— CorrelateLink signals across systems & time with trace_idsInvestigate / Analyze
โœ๏ธ SummarizeCondense noise into readable narratives & key factsAnalyze / Draft
๐Ÿง  AnalyzeFind patterns, anomalies, likely causesAnalyze
๐Ÿ’ก RecommendSuggest actions, owners, preventionDecide

๐Ÿ’ก Tip: AI is your investigator, analyst, writer, and coach โ€” not the decision-maker. Humans own truth, accountability, and tone.


AI-Augmented Incident Timeline (example)โ€‹

AI builds the timeline in seconds by stitching logs, metrics, deploys, and chat.

Time (UTC)EventSourceDetail
๐Ÿ”ด 14:02:18Error rate spikeDatadog5xx jumped from 0.2% โ†’ 12%
๐ŸŸก 14:02:21Latency increaseDatadogP95 latency 120 ms โ†’ 2.3 s
๐Ÿ”ด 14:02:34DB connection errorsPostgres"too many connections"
๐Ÿ”ต 14:03:05Deploy startedGitHub ActionsRelease 2025.05.20-1
๐ŸŸ  14:03:47Feature flag enabledLaunchDarklynew_checkout_flow=true
๐ŸŸฃ 14:04:02DB CPU > 95%Datadogdb-primary-01
๐ŸŸข 14:05:10Rollback deployGitHub ActionsReverted to 2025.05.19-4
๐ŸŸข 14:07:12Error rate normalizingDatadog5xx < 1%
๐ŸŸข 14:10:45Incident stabilizedOpsMonitoring stable for 10 m

๐Ÿ’ก Tip: A single shared trace_id makes this stitch-up trivial. Without it, expect hours of grep.


Postmortem Template (AI-Assisted)โ€‹

AI can draft 80% of this in minutes. Humans decide the truth, actions, and tone.

SectionWhat it captures
๐Ÿ“Œ Executive SummaryWhat happened, impact, duration, status.
๐Ÿ’ฅ ImpactWho was affected, what was impacted, severity.
โฑ๏ธ TimelineChronological sequence of key events.
๐Ÿงช What HappenedTechnical narrative of the incident.
๐ŸŽฏ Root CauseThe one thing that, if fixed, prevents recurrence.
๐Ÿงฉ Contributing FactorsThe conditions that made it possible.
โœ… What Went WellWhat worked. Be proud of it.
โš ๏ธ What Didn't Go WellWhat didn't work. What we'll improve.
๐Ÿ“‹ Action ItemsActions, owners, priority, due dates.
๐Ÿ›ก๏ธ Preventive ActionsSystemic changes to prevent recurrence.
๐Ÿ” Follow-up & Success CriteriaHow we'll verify the fix & measure success.
๐Ÿ”— ReferencesLinks to dashboards, PRs, docs, tickets.

AI-Assisted Postmortem Workflowโ€‹

StepAI doesOutcome
๐Ÿšจ TriggerCollects initial signals & context.Incident channel + ledger started
๐Ÿ“Š Data CollectionAggregates & normalizes all data.Single artifact for the timeline
โฑ๏ธ TimelineBuilds chronological timeline with correlations.Verified shared narrative
๐Ÿ”ฌ AnalysisProposes root cause + contributing factors with evidence.Hypotheses to validate
๐Ÿ“ Draft PostmortemGenerates first draft. Highlights gaps.Working document for the team
๐Ÿ‘ฅ Review & ValidateAnswers questions. Suggests clarifications.Final, human-owned report
๐Ÿš€ Publish & TrackCreates tasks. Tracks progress & impact.Closed-loop learning

๐Ÿ’ก Tip: AI accelerates the process. Humans ensure accuracy, empathy, and action.


Data Sources AI Pulls Fromโ€‹

The more sources you correlate, the more accurate your analysis.

SourceExamples
๐Ÿ‘๏ธ ObservabilityMetrics, logs, APM, traces
๐Ÿšจ AlertsPagerDuty, Opsgenie, Datadog, Sentry
๐Ÿš€ DeploymentsGitHub Actions, ArgoCD, Terraform
๐ŸŽš๏ธ Feature FlagsLaunchDarkly, Unleash
๐Ÿ’ฌ Chat / CommsSlack, Teams, incident channel
๐ŸŽซ Tickets / IssuesJira, Linear, GitHub Issues
๐Ÿ“’ RunbooksRead or write actions taken
๐Ÿ› ๏ธ InfrastructureCloudWatch, GCP, Azure logs

๐Ÿ’ก Tip: More sources = better accuracy. Correlated signals beat single logs.


Root Cause & Contributing Factor Analysisโ€‹

Two ideas, often confused:

Root Causeโ€‹

The fundamental issue that, if fixed, would have prevented the incident.

Example: "A database connection leak in the new checkout service caused connection pool exhaustion, leading to cascading failures."

Contributing Factorsโ€‹

The conditions and decisions that made the incident possible โ€” or made it worse.

  • New feature flag enabled without load test
  • Insufficient connection pool sizing
  • Missing alert on connection utilization
  • No auto-scaling on DB tier
  • Incomplete runbook for rollback

Classic techniques (AI accelerates each one)โ€‹

5 Whysโ€‹

1. Why did checkout fail? โ€” DB couldn't accept new connections.
2. Why? โ€” Connection pool was exhausted.
3. Why? โ€” Connections weren't returned after use.
4. Why? โ€” Recent code missed a `client.release()` path.
5. Why? โ€” No integration test exercised the error branch.
โ†’ Root cause: missing `release()` on error path.
โ†’ Contributing: no test, no pool-utilization alert, no canary.

Fishbone (Ishikawa) โ€” categories of contributing factorsโ€‹

  • People โ€” On-call training, handoff quality.
  • Process โ€” Change-management, runbooks.
  • Technology โ€” Connection pool, autoscaler, monitoring.
  • Environment โ€” Traffic surge, dependent service.
  • Tools โ€” Feature-flag visibility, deploy speed.
  • Measurement โ€” Missing alert, eval gaps.

๐Ÿ’ก Tip: Focus on the system. Improve the system. A culture of asking "why?" five times is worth more than any AI tool.


Evaluations for Incident Responseโ€‹

Run evals on every P1/P2 incident. Learn and improve the process.

EvalQuestionsGoal
โฑ๏ธ TimelinessWere we alerted quickly? Time to acknowledge? Detection coverage?Detect in < X minutes
๐Ÿ›ก๏ธ Mitigation effectivenessTime to mitigate? Blast radius contained? Customer impact reduced?MTTR < X minutes
๐Ÿ’ฌ CommunicationUpdates timely & clear? Right channels used? Stakeholders informed?Clear & empathetic
๐Ÿ“ Postmortem qualityRoot cause accurate? Actions specific & measurable? Learning captured?Actionable & specific

๐Ÿ’ก Tip: Score yourselves honestly. Trends matter more than any single number.


Drift & Regression Detectionโ€‹

Even after the fix, watch for regressions:

  • ๐Ÿ“Š Metric drift โ€” error rate (7-day avg)
  • โœ… Quality drift โ€” eval score (7-day avg)
  • ๐Ÿค– Behavior drift โ€” hallucination rate, response shape

๐Ÿ’ก Tip: Detect early. Alert fast. Prevent the next incident.

(See the Anatomy of AI Observability poster for the full drift-detection toolkit.)


Alerting & Auto-Responseโ€‹

Pair each alert with a runbook and an auto-response where safe.

Alert examplesโ€‹

  • ๐Ÿ”ด Critical: Error rate > 3% for 5 m
  • ๐Ÿ”ด Critical: Latency P95 > 3 s for 5 m
  • ๐ŸŸก Warning: Eval score drop > 10%
  • ๐ŸŸก Warning: Spike in hallucinations
  • ๐Ÿ”ต Info: New model deployed
  • ๐Ÿ”ต Info: Large config change

Auto-response playbookโ€‹

  1. Page on-call (with runbook link).
  2. Triage with AI copilot (/incident).
  3. Mitigate (rollback, disable flag, scale).
  4. Communicate status.
  5. Create incident & timeline.
  6. Draft postmortem.
  7. Track actions to completion.

Step-by-Step Setupโ€‹

1. Standardize the incident channelโ€‹

Every incident gets a Slack/Teams channel named inc-YYYY-MM-DD-summary with a pinned ledger.

2. Wire the data sourcesโ€‹

Connect Datadog/Sentry/PagerDuty/GitHub/LaunchDarkly to your AI postmortem agent via MCP or webhooks.

3. Drop in the templatesโ€‹

  • docs/postmortems/_template.md
  • runbooks/_template.md

4. Add a /postmortem slash commandโ€‹

---
description: Generate the first draft of a postmortem
usage: /postmortem <incident_id>
permissions:
allow: ["Read", "WebSearch", "MCP:datadog", "MCP:github", "MCP:slack"]
deny: ["Write"]
---
You are an SRE writing a blameless postmortem.
1. Pull all signals for {{incident_id}} (alerts, logs, traces, deploys, chat).
2. Build an event timeline.
3. Propose Root Cause + Contributing Factors with evidence.
4. Draft the report using docs/postmortems/_template.md.
5. Highlight gaps where humans must verify.
Tone: respectful, curious, system-focused.

5. Ship a /timeline and /runbook commandโ€‹

  • /timeline โ†’ reconstruct the timeline only.
  • /runbook <symptom> โ†’ suggest matching runbook.

6. Add a @postmortem-writer subagentโ€‹

name: postmortem-writer
description: Drafts blameless postmortems with evidence.
model: claude-sonnet-4
tools: [Read, WebSearch, Bash, Grep]
system_prompt: |
You are an SRE. Be blameless, curious, data-driven, clear.
Never name people; refer to roles or teams.
Distinguish Root Cause from Contributing Factors.
Cite sources for every claim.
permissions:
allow: ["Read", "WebSearch"]
deny: ["Write", "Bash(rm -rf *)"]
triggers: ["postmortem", "incident", "RCA"]

7. Define the eval suite for postmortemsโ€‹

postmortem_quality:
- clarity_score: weight: 0.25
- root_cause_accuracy: weight: 0.25
- action_specificity: weight: 0.25
- blameless_tone: weight: 0.15
- timeliness: weight: 0.10

Run it on every published postmortem; trend the scores.

8. Close the loopโ€‹

A monthly review meeting reads the action-item completion rate + eval trend.


Variants for Different Team Settingsโ€‹

๐Ÿ‘ค Solo developerโ€‹

  • Use /postmortem for any outage > 30 min.
  • Single Markdown file + Git history is your "ledger."
  • 1 action item per incident, completed within a week.

๐Ÿ‘ฅ Small team (2โ€“10)โ€‹

  • Incident channel + /postmortem draft + 30-min review meeting.
  • Weekly action-item review.
  • Shared docs/postmortems/ folder.

๐Ÿข Enterprise / regulatedโ€‹

  • Incident commander role.
  • Full audit trail (immutable, signed).
  • Compliance & legal review gate for severity โ‰ฅ P1.
  • Quarterly trend analysis across incidents.
  • Tie postmortem quality to engineering performance review goals (not individual blame).

๐ŸŒ Open-source / communityโ€‹

  • Public postmortems for outages affecting users.
  • Anonymized contributor names.
  • Crowdsourced action items via GitHub Issues.

Bottom line: Same lifecycle, escalating governance.


Anatomy of a Single Section โ€” Zoom In on "What Happened"โ€‹

A great "What Happened" section answers three questions, with citations.

## What Happened

**Trigger.** At 14:02 UTC, link enabled the
`new_checkout_flow` flag for 100% of traffic. The new code path opens
a database connection per request but never releases it on the
404-handler branch.

**Propagation.** Within 90 seconds, the primary checkout DB's
connection pool was exhausted. New requests began failing with
HTTP 5xx (link). Dependent services
(cart, recommendations) backed up because they share the pool.

**Detection & response.** PagerDuty paged the on-call at 14:03:50.
The on-call disabled the feature flag at 14:04:42 and triggered a
rollback at 14:05:10. Error rate normalized by 14:07:12.

**Customer impact.** Approximately 41,000 checkout attempts failed
(8.2% of the window). Revenue impact estimated at ~$28k.

Notice: no names, every claim cited, specific numbers, plain language.


Common Patterns & Recipesโ€‹

Pattern 1 โ€” /postmortem one-linerโ€‹

/postmortem inc-2025-05-20-checkout-5xx

Pattern 2 โ€” Blameless rewriteโ€‹

Rewrite the following section in a blameless tone.
Refer to roles, not names. Focus on systems.
<paste section>

Pattern 3 โ€” Contributing-factor brainstormโ€‹

Given this timeline + root cause, list 5โ€“7 contributing factors
across people, process, technology, environment, tools, measurement.
For each: evidence, severity, and a candidate preventive action.

Pattern 4 โ€” Action-item SMART checkโ€‹

Critique each action item: is it Specific, Measurable, Assigned,
Realistic, Time-bound? Suggest improvements.

Pattern 5 โ€” Eval-driven quality checkโ€‹

Score this postmortem 0โ€“1 against:
clarity, root-cause accuracy, action specificity, blameless tone, timeliness.
Explain each score with 1 line of evidence.

Pattern 6 โ€” Pattern detection across incidentsโ€‹

Across the last 10 postmortems in docs/postmortems/, list:
- recurring root-cause themes
- top 3 systemic gaps
- proposed program-level initiatives

Pattern 7 โ€” Postmortem-as-runbook seedโ€‹

Generate a runbook seed from this postmortem:
- Symptom detection
- First 3 mitigation steps
- Verification checks
- Communication template

Best Practices โœ…โ€‹

  • ๐Ÿค Be blameless and curious โ€” always.
  • ๐Ÿ“ Write for learning, not for politics.
  • ๐ŸŽฏ Make actions specific & measurable.
  • ๐Ÿ” Review postmortems for trends (quarterly).
  • ๐Ÿชž Close the loop: measure action impact.
  • ๐Ÿ†” Instrument everything with trace_ids.
  • โœ๏ธ Use consistent templates.
  • ๐Ÿค– Let AI draft; let humans decide.

Anti-Patterns โŒโ€‹

  • ๐Ÿšซ Naming individuals as causes.
  • ๐Ÿšซ Postmortems with no action items.
  • ๐Ÿšซ Single root cause forced when many factors contributed.
  • ๐Ÿšซ Publishing weeks late (insights are stale).
  • ๐Ÿšซ Same incident, repeat causes (no learning loop).
  • ๐Ÿšซ AI hallucinations taken as fact without verification.
  • ๐Ÿšซ Closed-door process for non-sensitive incidents.

Key Metrics Dashboardโ€‹

MetricTarget
โฑ๏ธ MTTR (mean time to resolve)42 m or less
๐Ÿ” MTTD (mean time to detect)< 6 m
๐Ÿ” Change failure rate< 2.1%
โญ Eval score (avg postmortem quality)> 0.92
๐Ÿค– Hallucination rate in drafts< 1%
๐Ÿ“Š Weekly incidentsTrend โ†“
โœ… Action-item completion rate> 87%
๐Ÿ’ฐ Cost / incident (eng-hrs + $)Trend โ†“

๐Ÿ’ก Tip: Measure what matters. Improve what you measure.


Troubleshootingโ€‹

SymptomLikely causeFix
Postmortems delayedNo template / no SLAAdopt the template; commit to draft in 48 h
Same root causes repeatAction items never shippedMonthly action-review meeting
Tone slips into blameNo coach / no reviewAdd "blameless tone" eval; pre-review by an SRE lead
Timeline is messySources not correlatedStandardize trace_id across systems
AI invents eventsNo groundingForce "cite source" in subagent system prompt
Actions vagueNo SMART checkAdd the SMART critique pass
No learningNo trends reviewQuarterly cross-incident retro

Quick-Start Checklistโ€‹

  • โœ… Incident channel naming convention
  • โœ… Standard postmortem template
  • โœ… /postmortem slash command
  • โœ… @postmortem-writer subagent
  • โœ… Wired data sources (alerts, deploys, chat, traces)
  • โœ… Eval suite for postmortem quality
  • โœ… Monthly action-review meeting
  • โœ… Quarterly cross-incident retro

๐Ÿง  Mantra: Blameless. Curious. Data-driven. Clear. Actionable. Timely.


Starter Configsโ€‹

docs/postmortems/_template.mdโ€‹

# Postmortem: <one-line summary>

**Incident ID:** inc-YYYY-MM-DD-slug
**Severity:** P{1|2|3}
**Status:** Draft | In Review | Published
**Duration:** HH:MM
**Author(s):** @role/@role
**Date Published:**

## Executive Summary
3โ€“5 sentences. What happened, impact, status.

## Impact
- Users:
- Revenue:
- SLO burn:

## Timeline
| Time (UTC) | Event | Source | Detail |
|---|---|---|---|

## What Happened
Trigger โ†’ propagation โ†’ detection โ†’ response โ†’ recovery.

## Root Cause
The one thing.

## Contributing Factors
- People:
- Process:
- Technology:
- Environment:
- Tools:
- Measurement:

## What Went Well
-

## What Didn't Go Well
-

## Action Items
| # | Action | Owner | Priority | Due |
|---|---|---|---|---|

## Preventive Actions
Systemic, not patch-level.

## Follow-up & Success Criteria
How will we verify the fix and measure success?

## References
- Dashboard: โ€ฆ
- PR: โ€ฆ
- Runbook: โ€ฆ
- Slack thread: โ€ฆ

Repo layoutโ€‹

observability/
โ””โ”€โ”€ otel-config.yaml
dashboards/
โ”œโ”€โ”€ ai-overview.json
โ””โ”€โ”€ incidents.json
alerts/
โ””โ”€โ”€ alerts.yaml
evaluations/
โ”œโ”€โ”€ cases/
โ”œโ”€โ”€ rubrics/
โ””โ”€โ”€ run-evals.sh
docs/
โ”œโ”€โ”€ runbooks/
โ””โ”€โ”€ postmortems/

Glossaryโ€‹

  • Postmortem โ€” A structured, blameless write-up of an incident.
  • Blameless โ€” Focus on systems and learning, not individuals.
  • Root Cause โ€” The fundamental issue that, fixed, prevents recurrence.
  • Contributing Factors โ€” Conditions that enabled or worsened the incident.
  • MTTD / MTTR โ€” Mean Time to Detect / Resolve.
  • Action Item โ€” Specific, owned, time-bound corrective work.
  • Runbook โ€” Step-by-step response for a known symptom.
  • Eval โ€” Scored test of a process or output.
  • Drift โ€” Slow regression of metrics, quality, or behavior.

Further Readingโ€‹

  • Search: "Google SRE blameless postmortem culture"
  • Search: "Etsy 'Debriefing Facilitation Guide'"
  • Search: "learning from incidents in software"
  • Search: "AI for incident response 2026"

๐Ÿช™ The Goal & Principlesโ€‹

  • ๐ŸŽฏ Goal: Turn every incident into a net improvement in reliability, safety, and team effectiveness.
  • ๐Ÿ™… Not about blame. We fix systems. People are human.
  • ๐Ÿงฑ Focus on systems. Systems fail; systems can be improved.
  • โ™ป๏ธ Learn continuously. Every incident is data. Every fix is a step forward.

"We don't rise to the level of our goals. We fall to the level of our systems." โ€” James Clear