Incident Response
Structured framework for handling production incidents with blameless postmortems.
When to Invoke
- Production incidents (P0-P3)
- Service degradation or outages
- Post-incident analysis and learning
- Improving incident response processes
Severity Classification
| Severity |
Impact |
Response Time |
Examples |
| P0 |
Complete outage, data loss risk |
Immediate (< 15 min) |
Service down, data corruption |
| P1 |
Major degradation, many users affected |
< 30 min |
Core feature broken, severe performance |
| P2 |
Partial degradation, some users |
< 2 hours |
Non-critical feature broken, slow queries |
| P3 |
Minor issue, workaround available |
< 1 business day |
UI glitch, minor performance |
Incident Workflow
1. Detect & Alert
- Automated monitoring triggers alert
- User reports issue
- On-call engineer acknowledges
2. Triage
- Classify severity (P0-P3)
- Assess blast radius (users, services, data)
- Identify incident commander
- Open communication channel
3. Diagnose
- Form hypotheses (use
debugging-protocol skill)
- Collect evidence (logs, traces, metrics)
- Identify root cause
- Document timeline
4. Mitigate
- Implement immediate fix (rollback, feature flag, hotfix)
- Verify mitigation effectiveness
- Communicate status to stakeholders
- Continue monitoring
5. Resolve
- Confirm service fully recovered
- Close incident
- Schedule postmortem (within 48 hours for P0-P2)
Postmortem Template
# Incident Postmortem: {title}
Date: {date}
Severity: P{0-3}
Duration: {start} → {resolved}
Author: {name}
## Summary
{1-2 sentence impact summary}
## Timeline
| Time | Event |
|---|---|
| HH:MM | {event description} |
## Root Cause
{description with evidence}
## Contributing Factors
- {factor with context}
## What Went Well
- {positive observation}
## What Could Be Improved
- {improvement area}
## Action Items
| Action | Owner | Due Date | Status |
|---|---|---|---|
| {specific action} | @{person} | YYYY-MM-DD | Open |
Principles
- Blameless — focus on systems and processes, not individuals
- Evidence-based — every claim backed by data (logs, traces, metrics)
- Action items are SMART — specific, measurable, assigned, realistic, time-bound
- Share learnings — postmortems are public within the organization
Pre-Mortem Analysis
Proactive failure analysis: imagine the feature has already failed, then work backward to identify why.
When to Invoke
- After DESIGN phase, before BUILD (in feature pipelines)
- For high-risk features (auth, payments, data migrations, public API changes)
- When requested as standalone risk assessment (Template L)
Pre-Mortem Protocol
Step 1: Assume Failure
The feature has launched and failed catastrophically. Work backward:
- "The auth system was bypassed" — how?
- "Data was corrupted during migration" — what went wrong?
- "The service went down under load" — where was the bottleneck?
Step 2: Failure Mode Identification
For each component in the DESIGN output, enumerate:
- What could break? — specific failure scenarios, not vague risks
- How likely? — based on complexity, blast radius, novelty
- How severe? — data loss, security breach, downtime, degraded UX
Step 3: Cross-Domain Risk Assessment
Each specialist brings a unique failure lens:
| Agent |
Risk Domain |
Example Findings |
| incident-responder |
Operational failures, cascade risks, recovery gaps |
"No rollback path for schema migration" |
| security-engineer |
Threat model, attack vectors, auth bypass |
"JWT validation missing on webhook endpoint" |
| performance-engineer |
Scalability limits, resource exhaustion |
"Unbounded query on user list with no pagination" |
| database-expert |
Data integrity, migration reversibility, concurrency |
"Non-idempotent migration with no down script" |
Include agents based on feature risk profile:
- Always: incident-responder (anchor)
- Auth/security-sensitive: + security-engineer
- High-traffic/scalable: + performance-engineer
- Data-heavy/migration: + database-expert
Step 4: Produce Findings
# Pre-Mortem: {feature name}
Date: {date}
Analysts: {agent list}
## Risk Assessment Summary
| Risk | Severity | Likelihood | Mitigation |
|------|----------|-----------|------------|
| {failure scenario} | Critical/High/Medium/Low | High/Medium/Low | {recommendation} |
## Failure Modes
### {failure scenario title}
- **Trigger**: {what causes this failure}
- **Blast Radius**: {what else breaks}
- **Detection**: {how would we know — monitoring, alerts, logs}
- **Recovery**: {rollback path, data recovery, feature flags}
- **Mitigation**: {what BUILD agents should do to prevent this}
## Monitoring Gaps
- {gap}: {recommendation for devops-engineer}
## Design Revision Recommendations
- {if any DESIGN changes are needed before BUILD proceeds}
Pre-Mortem Decision Flow
- Findings are advisory — BUILD proceeds with risk-aware context
- If any finding is Critical severity + High likelihood → escalate to user before BUILD
- Monitoring gap findings → forwarded to devops-engineer during or after BUILD
- Design revision recommendations → returned to architect for contract updates before BUILD
Related
- Debugging Protocol @.gemini/skills/debugging-protocol/SKILL.md
- Logging and Observability Principles @.gemini/skills/logging-and-observability-principles/SKILL.md
- Monitoring and Alerting Principles @.gemini/skills/monitoring-and-alerting-principles/SKILL.md
1---2name: incident-response3description: Structured incident workflow: severity classification, triage, diagnosis, mitigation, postmortem, and prevention. Template-driven with blameless review.4---56# Incident Response78Structured framework for handling production incidents with blameless postmortems.910## When to Invoke11- Production incidents (P0-P3)12- Service degradation or outages13- Post-incident analysis and learning14- Improving incident response processes1516## Severity Classification1718| Severity | Impact | Response Time | Examples |19|---|---|---|---|20| **P0** | Complete outage, data loss risk | Immediate (< 15 min) | Service down, data corruption |21| **P1** | Major degradation, many users affected | < 30 min | Core feature broken, severe performance |22| **P2** | Partial degradation, some users | < 2 hours | Non-critical feature broken, slow queries |23| **P3** | Minor issue, workaround available | < 1 business day | UI glitch, minor performance |2425## Incident Workflow2627### 1. Detect & Alert28- Automated monitoring triggers alert29- User reports issue30- On-call engineer acknowledges3132### 2. Triage33- Classify severity (P0-P3)34- Assess blast radius (users, services, data)35- Identify incident commander36- Open communication channel3738### 3. Diagnose39- Form hypotheses (use `debugging-protocol` skill)40- Collect evidence (logs, traces, metrics)41- Identify root cause42- Document timeline4344### 4. Mitigate45- Implement immediate fix (rollback, feature flag, hotfix)46- Verify mitigation effectiveness47- Communicate status to stakeholders48- Continue monitoring4950### 5. Resolve51- Confirm service fully recovered52- Close incident53- Schedule postmortem (within 48 hours for P0-P2)5455## Postmortem Template5657```markdown58# Incident Postmortem: {title}59Date: {date}60Severity: P{0-3}61Duration: {start} → {resolved}62Author: {name}6364## Summary65{1-2 sentence impact summary}6667## Timeline68| Time | Event |69|---|---|70| HH:MM | {event description} |7172## Root Cause73{description with evidence}7475## Contributing Factors76- {factor with context}7778## What Went Well79- {positive observation}8081## What Could Be Improved82- {improvement area}8384## Action Items85| Action | Owner | Due Date | Status |86|---|---|---|---|87| {specific action} | @{person} | YYYY-MM-DD | Open |88```8990## Principles91- **Blameless** — focus on systems and processes, not individuals92- **Evidence-based** — every claim backed by data (logs, traces, metrics)93- **Action items are SMART** — specific, measurable, assigned, realistic, time-bound94- **Share learnings** — postmortems are public within the organization9596## Pre-Mortem Analysis9798Proactive failure analysis: imagine the feature has already failed, then work backward to identify why.99100### When to Invoke101- After DESIGN phase, before BUILD (in feature pipelines)102- For high-risk features (auth, payments, data migrations, public API changes)103- When requested as standalone risk assessment (Template L)104105### Pre-Mortem Protocol106107#### Step 1: Assume Failure108The feature has launched and failed catastrophically. Work backward:109- "The auth system was bypassed" — how?110- "Data was corrupted during migration" — what went wrong?111- "The service went down under load" — where was the bottleneck?112113#### Step 2: Failure Mode Identification114For each component in the DESIGN output, enumerate:1151. **What could break?** — specific failure scenarios, not vague risks1162. **How likely?** — based on complexity, blast radius, novelty1173. **How severe?** — data loss, security breach, downtime, degraded UX118119#### Step 3: Cross-Domain Risk Assessment120Each specialist brings a unique failure lens:121122| Agent | Risk Domain | Example Findings |123|-------|------------|-----------------|124| incident-responder | Operational failures, cascade risks, recovery gaps | "No rollback path for schema migration" |125| security-engineer | Threat model, attack vectors, auth bypass | "JWT validation missing on webhook endpoint" |126| performance-engineer | Scalability limits, resource exhaustion | "Unbounded query on user list with no pagination" |127| database-expert | Data integrity, migration reversibility, concurrency | "Non-idempotent migration with no down script" |128129Include agents based on feature risk profile:130- **Always**: incident-responder (anchor)131- **Auth/security-sensitive**: + security-engineer132- **High-traffic/scalable**: + performance-engineer133- **Data-heavy/migration**: + database-expert134135#### Step 4: Produce Findings136137```markdown138# Pre-Mortem: {feature name}139Date: {date}140Analysts: {agent list}141142## Risk Assessment Summary143| Risk | Severity | Likelihood | Mitigation |144|------|----------|-----------|------------|145| {failure scenario} | Critical/High/Medium/Low | High/Medium/Low | {recommendation} |146147## Failure Modes148### {failure scenario title}149- **Trigger**: {what causes this failure}150- **Blast Radius**: {what else breaks}151- **Detection**: {how would we know — monitoring, alerts, logs}152- **Recovery**: {rollback path, data recovery, feature flags}153- **Mitigation**: {what BUILD agents should do to prevent this}154155## Monitoring Gaps156- {gap}: {recommendation for devops-engineer}157158## Design Revision Recommendations159- {if any DESIGN changes are needed before BUILD proceeds}160```161162### Pre-Mortem Decision Flow163- Findings are **advisory** — BUILD proceeds with risk-aware context164- If any finding is **Critical severity + High likelihood** → escalate to user before BUILD165- Monitoring gap findings → forwarded to devops-engineer during or after BUILD166- Design revision recommendations → returned to architect for contract updates before BUILD167168## Related169- Debugging Protocol @.gemini/skills/debugging-protocol/SKILL.md170- Logging and Observability Principles @.gemini/skills/logging-and-observability-principles/SKILL.md171- Monitoring and Alerting Principles @.gemini/skills/monitoring-and-alerting-principles/SKILL.md