Skip to main content

Anatomy of AI Incident Response Playbook

Runbooks, paging, mitigation, comms, war-room with AI copilots.

Incident Response

Runbooks, paging, mitigation, comms, war-room with AI copilots โ€” the Detect โ†’ Contain โ†’ Recover twin of the Postmortem anatomy.


TL;DRโ€‹

  • An incident response playbook turns chaos into a calm, repeatable process.
  • Seven phases: Detect โ†’ Declare โ†’ Contain โ†’ Mitigate โ†’ Recover โ†’ Resolve โ†’ Learn.
  • Severity drives behavior โ€” P0 pages everyone, P4 waits for backlog.
  • AI copilots act as Investigator, Correlator, Hypothesis Generator, Runbook Assistant, Comms Drafter, and Scribe โ€” not the decision-maker.
  • Runbooks beat memory. Short, actionable, tested, kept up to date.
  • Every incident closes with a blameless postmortem (see the Postmortem anatomy).

Why this mattersโ€‹

The first 15 minutes of an incident decide whether you're back in 30 minutes or 6 hours. Without a playbook you improvise, page the wrong people, miss the runbook, and the comms get worse than the outage. With one โ€” and an AI copilot stitching signals together โ€” your team detects faster, contains safely, recovers quickly, and learns continuously.

Bottom line: We improve the system, not the person. Curiosity over blame. Always.


The Big Picture โ€” Incident Lifecycleโ€‹

Principlesโ€‹

  • ๐Ÿ›ก๏ธ Safety first
  • ๐Ÿค Blameless
  • ๐Ÿ“Š Data-driven
  • ๐ŸชŸ Transparent
  • โฑ๏ธ Timely
  • โ™ป๏ธ Continuous

Bottom line: Move from first signal to full recovery with a calm, repeatable process โ€” every time.


Incident Severity Matrixโ€‹

Severity drives who, when, and how loud. Define it once, apply it consistently.

SeverityDefinitionExamplesResponse
๐Ÿ”ด P0Major outage or severe data/security riskTotal outage, data loss, security breachPage all, war-room, exec aware, 5 m
๐ŸŸ  P1Severe outage, high customer impactPartial outage, major performance degradationPage team, comms, 15 m target
๐ŸŸก P2Degraded service, medium impactMinor features down, elevated errorsTriage & fix, within 1 hour
๐ŸŸข P3Minor impact, limited scopeCosmetic issues, non-critical bugsNormal process, same day
๐Ÿ”ต P4Low impact, informationalDocs, small bugs, improvementsBacklog / regular

Severity decision factorsโ€‹

  • ๐Ÿ‘ฅ # of users affected
  • ๐Ÿ’ฐ Business impact (revenue, safety, SLAs)
  • ๐Ÿ” Data integrity & security
  • ๐ŸŒ Blast radius (systems, regions, services)
  • โฑ๏ธ Time sensitivity / escalation risk

Escalation rule of thumbโ€‹

  • ๐Ÿš€ Start conservative (declare higher).
  • โšก Escalate fast, de-escalate slow.
  • ๐Ÿ“ข Communicate every change in severity.

โš ๏ธ When in doubt, treat it as the next higher severity.


On-Call & Paging Flowโ€‹

Escalation stepsโ€‹

  1. Escalate to next on-call
  2. Notify team channel
  3. Notify IC / Tech lead
  4. Exec notified (P0/P1)

Paging policy (starter)โ€‹

  • P0: Primary on-call + secondary + tech lead + incident commander (IC).
  • P1: Primary on-call + team channel + tech lead.
  • P2: Primary on-call + team channel.
  • P3/P4: Team channel only.

๐Ÿ’ก Tip: Codify this in PagerDuty/Opsgenie escalation policies; do not rely on memory.


Runbook Template & Exampleโ€‹

A great runbook is short, actionable, tested, and kept up to date.

Runbook templateโ€‹

# Runbook: <symptom>

## Name & Symptom
What is happening? (one line)

## Impact
Who / what is affected, severity, business impact.

## Severity
P0 | P1 | P2 | P3 | P4

## Detection
How we know it's happening (alerts, dashboards).

## Immediate Actions
First 3 steps (5 minutes).

## Mitigation
How to stop the bleeding.

## Recovery
How to restore service.

## Verification
How to confirm it's fixed.

## Roll Forward / Back
Options & commands.

## Escalation
Who to escalate to, when.

## Comms
What to communicate, where, how often.

## References
Dashboards ยท PRs ยท tickets ยท related runbooks.

Example runbook โ€” "Database errors"โ€‹

# Symptom
High 5xx errors, DB connection errors.

## Impact
~50% of checkout users impacted; ~$5k/min revenue loss.

## Severity
P1

## Detection
- Datadog: error_rate > 5% for 2m
- Postgres: "too many connections" in logs

## Immediate Actions (first 5 min)
1. Check dashboard: ai-overview
2. Check DB connections: `psql -c "select count(*) from pg_stat_activity;"`
3. Enable connection pool protection.

## Mitigation
1. Disable `new_checkout_flow` flag (LaunchDarkly).
2. Restart app pods (rolling).
3. Increase DB pool size (if safe; cap at 200).

## Recovery
1. Gradually re-enable flag: 5% โ†’ 25% โ†’ 100%.
2. Monitor metrics for 10 min at each step.

## Verification
- 5xx < 1%
- P95 latency < 500 ms
- No new errors in app logs

## Escalation
Page @sre lead after 15 min if not mitigated.

## References
- Dashboard: ai-overview
- Tickets: DB-123, INC-2025-05-20

๐Ÿ’ก Tip: Short. Actionable. Tested. Keep commands up to date.


AI Copilots in the War-Roomโ€‹

AI is your force multiplier during an incident โ€” for speed, scale, and signal. Humans own judgment and empathy.

CopilotRoleWhat it does
๐Ÿ”ฌ InvestigatorEvidence gathererPulls logs, metrics, traces, events
๐Ÿ”— CorrelatorPattern finderLinks signals; builds timeline; finds patterns
๐Ÿ’ก Hypothesis GeneratorLikely-cause proposerRanks likelihood; asks clarifying questions
๐Ÿ“’ Runbook AssistantRight-runbook routerFinds matching runbooks; suggests next actions
๐Ÿ’ฌ Comms DraftingUpdate writerDrafts updates for incident channel, status page
๐Ÿ–Š๏ธ ScribeMemory keeperCaptures decisions, actions, timeline events

Sample war-room AI commandsโ€‹

/incident start <severity> <symptom>
/timeline โ€” show evolving timeline
/hypotheses โ€” top 5 likely causes with evidence
/runbook <symptom> โ€” find matching runbook
/comms draft <internal|status-page> โ€” draft update text
/scribe note <decision> โ€” record a decision in the ledger
/postmortem draft โ€” auto-draft after resolution

๐Ÿ’ก Tip: AI accelerates. Humans decide. Every AI suggestion must be reviewable, with sources.


Detection Signals We Monitorโ€‹

Correlate signals to reduce noise, alert on impact.

SignalWhy it matters
โŒ Error rate (โ†‘ 5xx, 4xx)Most direct user-pain proxy
โฑ๏ธ Latency (P95, P99)UX & timeout cliffs
๐ŸŽฏ SLO / SLA burn rateCompliance & promises
๐Ÿšฆ Traffic (surges / drops)Capacity / outage hints
๐Ÿ—„๏ธ DB / infra (CPU, mem, I/O)Resource exhaustion
๐Ÿ“จ Queues (backlog, lag)Pipeline health
โญ AI quality (eval score)Silent quality drift
๐Ÿ›ก๏ธ Security (alerts, scans)Breach indicators

๐Ÿ’ก Tip: Pair every alert with a runbook link in the alert itself.


AI-Augmented Timeline (example)โ€‹

Time (UTC)EventSourceDetail
๐Ÿ”ด 14:02:18Error rate spikeDatadog5xx from 0.2% โ†’ 12%
๐ŸŸก 14:02:21Latency increaseDatadogP95 latency 120ms โ†’ 2.3s
๐Ÿ”ด 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: AI stitches logs, metrics, deploys, flags, and chat into a clear shared timeline โ€” within seconds.


Root Cause & Contributing Factors (preview)โ€‹

The handoff to the postmortem starts during the incident.

5 Whys (example)โ€‹

1. Why did checkout fail? โ†’ DB connections exhausted.
2. Why? โ†’ Connections not returned.
3. Why? โ†’ Code missed release on error path.
4. Why? โ†’ Recent change covered error path poorly.
5. Why? โ†’ No test covering error path.
โ†’ Root cause: missing connection release on error path.

Contributing factors (Ishikawa)โ€‹

  • People: On-call not familiar with new feature.
  • Process: No pre-prod load test.
  • Technology: Pool size too small; no pool-usage alert.
  • Environment: Traffic surge.
  • Tools: Limited visibility in flags dashboard.
  • Measurement: No alert on connection utilization.

Focus on systems. Improve systems. (Full treatment lives in the Postmortem anatomy.)


Actions, Tracking & Closeupโ€‹

Every incident closes with specific, owned, time-bound actions.

#ActionOwnerPriorityDueStatusSuccess metric
1Add connection-release@eng/authP0May 25In progressNo leaks in 7d
2Add integration test@eng/testP0May 23TodoTest covers error path
3Add pool-usage alert@eng/obsP1May 26TodoAlert fires in staging
4Load test new flow@eng/perfP1May 27TodoLoad test passes
5Runbook update@sreP1May 23DoneRunbook v1.2

๐Ÿ’ก Tip: Verify fixes. Measure impact. Close the loop.


Communications Templatesโ€‹

Internal โ€” incident channel (first 5 minutes)โ€‹

๐Ÿšจ INCIDENT DECLARED โ€” P1
Title: <one-line symptom>
Started: <time UTC>
Impact: <users / business>
IC: @ic Tech Lead: @tl Comms: @comms
Runbook: <link>
Channel: #inc-2025-05-20-checkout-5xx

Status page โ€” public-facing (concise, empathic)โ€‹

Investigating โ€” Some users may experience errors when checking out.
We're investigating and will share an update by HH:MM UTC.

Update cadence (defaults)โ€‹

  • P0/P1: Every 15 minutes until mitigated; then every 30 minutes.
  • P2: Every hour.
  • P3/P4: On status change.

Resolution noteโ€‹

Resolved โ€” At HH:MM UTC, we restored service.
Cause: <plain-language summary>.
Customer impact: <numbers>.
Next steps: We'll publish a postmortem within 5 business days.

๐Ÿ’ก Tip: Right message, right time. Be honest, specific, and brief.


Roles in the War-Roomโ€‹

RoleJob in 1 line
๐ŸŽ™๏ธ Incident Commander (IC)Owns the response; drives decisions.
๐Ÿง  Tech Lead (TL)Owns technical strategy & fix.
๐Ÿ’ฌ Communications LeadOwns internal + external updates.
๐Ÿ“ ScribeOwns the timeline + decisions ledger.
๐Ÿ› ๏ธ RespondersExecute the runbook; report findings.
๐Ÿค Liaison(s)Support, legal, exec, key customers.

๐Ÿ’ก Tip: One person, one role. The IC does not type fixes.


Step-by-Step Setupโ€‹

1. Define severity & paging policyโ€‹

  • Write a one-page docs/incident-severity.md.
  • Codify P0โ€“P4 in PagerDuty/Opsgenie escalation policies.

2. Create the runbook libraryโ€‹

  • runbooks/_template.md (from above).
  • Convert each top alert into a runbook; link it in the alert payload.

3. Ship the AI copilotsโ€‹

Create slash commands:

  • .claude/commands/incident.md โ€” start, status, comms
  • .claude/commands/runbook.md โ€” find runbook by symptom
  • .claude/commands/timeline.md โ€” reconstruct timeline
  • .claude/commands/comms.md โ€” draft updates

4. Add a @incident-commander subagentโ€‹

name: incident-commander
description: Coordinates incident response with calm, decisive prompts.
model: claude-sonnet-4
tools: [Read, WebSearch, Bash, Grep]
permissions:
allow: ["Read", "WebSearch"]
deny: ["Write", "Bash(rm -rf *)"]
system_prompt: |
You are an Incident Commander.
Be calm, concrete, and time-aware.
Always cite sources. Distinguish facts from hypotheses.
Drive decisions; surface tradeoffs; never assign blame.
triggers: ["incident", "outage", "P0", "P1"]

5. Wire data sources via MCPโ€‹

GitHub Actions, PagerDuty/Opsgenie, Datadog/Sentry, LaunchDarkly, Slack/Teams.

6. Drill itโ€‹

  • Quarterly chaos / game-day exercises.
  • After each drill, update runbooks and policies.

7. Close the loopโ€‹

After every P0/P1: a blameless postmortem (see the Postmortem anatomy).


Variants for Different Team Settingsโ€‹

๐Ÿ‘ค Solo developerโ€‹

  • Severities: just P1 / P3.
  • One runbook file with a section per symptom.
  • "War-room" = a tmux window + /incident command.

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

  • Severities: P0โ€“P3.
  • One incident channel per outage; pinned ledger.
  • IC rotation; weekly runbook review.

๐Ÿข Enterprise / regulatedโ€‹

  • Full IC role; comms lead; legal/compliance liaison.
  • Status page + customer comms templates approved by Legal.
  • Audit trail (immutable storage; signed actions).
  • Major incidents โ†’ exec briefing within 30 min.

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

  • Public status page; transparent updates.
  • Community responders welcomed; clear contributor guidelines.
  • Coordinated disclosure for security incidents.

Bottom line: Same lifecycle, escalating governance.


Anatomy of the First 15 Minutes (zoom-in)โ€‹

00:00 Alert fires (PagerDuty)
00:01 On-call acks; opens #inc-2025-05-20-checkout-5xx
00:02 /incident start P1 "checkout 5xx spike"
00:03 AI investigator pulls dashboards, latest deploys, flag flips
00:05 IC assigned; tech lead joins; comms lead joins
00:07 /runbook "checkout 5xx" โ†’ "Database errors" runbook surfaced
00:08 Mitigation step 1: disable feature flag (LaunchDarkly)
00:10 Error rate falling; status page update posted
00:13 Mitigation step 2: rolling restart of app pods
00:15 Stabilization confirmed; monitoring window begins

๐Ÿ’ก Tip: Most incidents are won or lost in the first 15 minutes. Practice them.


Common Patterns & Recipesโ€‹

Pattern 1 โ€” One-command war-roomโ€‹

/incident start P1 "<symptom>"

Creates the channel, pages roles, opens a ledger, starts the timeline.

Pattern 2 โ€” AI-suggested next actionโ€‹

Given current state, propose the top 3 next mitigation steps,
ranked by expected impact and risk, with sources.

Pattern 3 โ€” Status-page draftโ€‹

Draft a status-page update in 50 words.
Be empathic; commit to a next update in 15 min.

Pattern 4 โ€” Hypothesis treeโ€‹

Build a hypothesis tree for "<symptom>" with:
- evidence for/against
- ranked probability
- cheapest disproving experiment

Pattern 5 โ€” Action SMART checkโ€‹

Critique each action item: Specific, Measurable, Assigned, Realistic, Time-bound.

Pattern 6 โ€” Multi-source mergeโ€‹

Merge today's deploys, flag changes, and error spikes into a single
deduped timeline. Cite each row.

Pattern 7 โ€” Cross-incident pattern detectionโ€‹

Across the last 10 incidents, list:
- top 3 recurring symptoms
- top 3 systemic gaps
- proposed program-level initiatives

Best Practices โœ…โ€‹

  • ๐Ÿ›ก๏ธ Severity drives behavior. Define it; honor it.
  • ๐Ÿงท Pair every alert with a runbook link in the payload.
  • ๐Ÿ†” Use shared trace_ids across logs, metrics, and chat.
  • ๐Ÿ“ Scribe in real time โ€” decisions and timestamps.
  • ๐Ÿงช Practice with game days quarterly.
  • ๐Ÿค– Let AI accelerate, never decide.
  • ๐Ÿชž Close the loop with a blameless postmortem.

Anti-Patterns โŒโ€‹

  • ๐Ÿšซ Skipping severity ("we'll figure it out").
  • ๐Ÿšซ One channel for everything (incident noise drowns signal).
  • ๐Ÿšซ Trusting AI hypotheses without verification.
  • ๐Ÿšซ Blaming individuals.
  • ๐Ÿšซ No runbooks, or stale runbooks.
  • ๐Ÿšซ Status-page silence.
  • ๐Ÿšซ No drills.

Troubleshootingโ€‹

SymptomLikely causeFix
Slow detectionNoisy alertsReduce, refine, add severity-based routing
Long mitigationNo runbookConvert top 5 alerts into runbooks this week
Comms chaosNo comms lead roleAssign one; use templates
Same incident repeatsPostmortem actions not shippedMonthly action-review meeting
AI hallucinates causesUngrounded promptsForce "cite source" in subagent prompts
Confusion over severityNo matrixAdopt the severity matrix above
Drills failUntested runbooksQuarterly game days + update runbooks

Quick-Start Checklistโ€‹

  • โœ… Severity matrix documented and adopted
  • โœ… Paging policy codified in PagerDuty/Opsgenie
  • โœ… runbooks/ library seeded for top 5 alerts
  • โœ… /incident, /runbook, /timeline, /comms slash commands
  • โœ… @incident-commander subagent shipped
  • โœ… Status-page templates approved
  • โœ… Quarterly game-day on the calendar
  • โœ… Postmortem template + auto-draft wired

๐Ÿง  Mantra: Detect faster ยท Contain safely ยท Communicate clearly ยท Recover quickly ยท Learn continuously.


Starter Configsโ€‹

.claude/commands/incident.mdโ€‹

---
description: Start, status, or close an incident
usage: /incident <start|status|close> [--sev <P0|P1|P2|P3|P4>] [--title "<symptom>"]
permissions:
allow: ["Read", "WebSearch", "MCP:datadog", "MCP:github", "MCP:slack", "MCP:pagerduty"]
deny: ["Write"]
---
You are an Incident Commander assistant. Do exactly what the user asks.

If `start`:
1. Open a channel: `#inc-YYYY-MM-DD-<slug>`
2. Page roles by severity (P0/P1: IC + TL + Comms).
3. Open a ledger in `docs/incidents/<id>.md` with the template.
4. Build the initial timeline from observability + deploys + flags.

If `status`:
- Summarize current state in 5 lines.
- List open mitigation actions and owners.
- Suggest next update message + cadence.

If `close`:
- Verify recovery against runbook checklist.
- Generate the postmortem draft seed.

runbooks/_template.mdโ€‹

# Runbook: <symptom>

## Name & Symptom
## Impact
## Severity
## Detection
## Immediate Actions
## Mitigation
## Recovery
## Verification
## Roll Forward / Back
## Escalation
## Comms
## References

.claude/commands/comms.mdโ€‹

---
description: Draft an incident communication
usage: /comms draft <internal|status-page|exec> [--minutes <n>]
---
Write a {{internal|status-page|exec}} update for the current incident.
Tone: clear, honest, empathetic.
Constraints: โ‰ค 80 words; specific impact; next update in {{minutes=15}} min.
End with a commitment to the next update.

Glossaryโ€‹

  • Incident Commander (IC) โ€” Owns the response; drives decisions.
  • Tech Lead (TL) โ€” Owns the technical strategy and fix.
  • Severity (P0โ€“P4) โ€” Standardized incident impact tier.
  • Runbook โ€” Step-by-step response for a known symptom.
  • Mitigation โ€” Action that reduces or stops impact (not yet a full fix).
  • Recovery โ€” Restoring full service.
  • Resolution โ€” Confirmed recovery + incident closed.
  • MTTD / MTTR โ€” Mean Time to Detect / Resolve.
  • Blast radius โ€” Scope of users / systems affected.
  • Status page โ€” Public-facing service health portal.

Further Readingโ€‹

  • Search: "Google SRE incident management workbook"
  • Search: "PagerDuty incident response guide"
  • Search: "chaos engineering game days"
  • Search: "AI copilots for SRE incident response"

๐Ÿช™ Promise, Goal, Approachโ€‹

  • ๐Ÿค Our promise: We improve the system, not the person. Curiosity over blame. Always.
  • ๐ŸŽฏ Our goal: Fast detection, safe containment, rapid recovery, lasting learning.
  • ๐Ÿค– AI + humans: AI for speed, scale, and signal. Humans for judgment and empathy.
  • โ™ป๏ธ 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