Triggers
- incident response
- production down
- service outage
- system failure
- security breach
- data loss
- performance degradation
- error rate spike
- P0 incident
- P1 incident
- rollback needed
- hotfix deployment
- post-mortem
- root cause analysis
- incident triage
- on-call alert
- system recovery
Instructions
Something is broken in production. Users are affected. Speed of response matters, but so does doing it right. This runbook covers detection through post-mortem. Duration: minutes to hours.
Severity Classification
| Level |
Definition |
Examples |
Response Time |
| P0 Critical |
Service completely down, data loss, security breach |
Database corruption, DDoS, auth failure |
Immediate |
| P1 High |
Major feature broken, significant degradation |
Payment down, 50%+ error rate, 10x latency |
< 1 hour |
| P2 Medium |
Minor feature broken, workaround available |
Search not working, non-critical API errors |
< 4 hours |
| P3 Low |
Cosmetic issue, minor inconvenience |
Styling bug, typo, minor UI glitch |
Next sprint |
Response Teams by Severity
P0 Critical (use organization_spawn with all):
- Infrastructure Maintainer: Incident commander — assess scope, coordinate
- DevOps Automator: Deployment/rollback execution
- Backend Architect: Root cause investigation (system)
- Frontend Developer: Client-side investigation
- Support Responder: Status page updates, user notifications
- Executive Summary Generator: Real-time executive updates
P1 High:
- Infrastructure Maintainer: Incident commander
- DevOps Automator: Deployment support
- Relevant Developer Agent: Fix implementation
- Support Responder: User communication
P2 Medium:
- Relevant Developer Agent: Fix implementation
- Evidence Collector: Verify fix
P3 Low:
- Sprint Prioritizer: Add to backlog
Step 1: Detection & Triage (0-5 minutes)
Trigger: Alert from monitoring / User report / Agent detection
Infrastructure Maintainer:
- Acknowledge alert
- Assess scope and impact (users affected, services impacted, data at risk?)
- Classify severity (P0/P1/P2/P3)
- Use
organization_spawn to activate appropriate response team
- Create incident channel/thread
Step 2: Investigation (5-30 minutes)
Parallel investigation via organization_delegate:
- Infrastructure Maintainer: Check system metrics (CPU, memory, network, disk), review error logs, check recent deployments, verify external dependencies
- Backend Architect (P0/P1): Check database health, review API error rates, check service communication, identify failing component
- DevOps Automator: Review deployment history, check CI/CD status, prepare rollback, verify infrastructure state
Output: Root cause identified or narrowed to component.
Step 3: Mitigation (15-60 minutes)
Decision tree:
- Caused by recent deployment: DevOps Automator executes rollback, Infrastructure Maintainer verifies recovery
- Caused by infrastructure issue: Infrastructure Maintainer scales/restarts/failovers, verify recovery
- Caused by code bug: Developer implements hotfix, Evidence Collector verifies, DevOps Automator deploys hotfix
- Caused by external dependency: Infrastructure Maintainer activates fallback/cache, Support Responder communicates to users
Throughout:
- Support Responder: Update status page every 15 minutes
- Executive Summary Generator: Brief stakeholders (P0 only)
Step 4: Resolution Verification (Post-fix)
- Evidence Collector: Verify fix resolves issue, screenshot evidence, confirm no new issues
- Infrastructure Maintainer: Verify metrics returning to normal, confirm no cascading failures, monitor 30 minutes post-fix
- API Tester (if API-related): Run regression on affected endpoints, verify response times, confirm error rates at baseline
Step 5: Post-Mortem (Within 48 hours)
Use organization_delegate to Workflow Optimizer:
- Timeline reconstruction (when introduced, detected, resolved, total impact duration)
- Root cause analysis (what failed, why, why not caught earlier, 5 Whys)
- Impact assessment (users affected, revenue impact, reputation, data impact)
- Prevention measures (monitoring improvements, testing improvements, process changes, infrastructure changes)
- Action items with owners and deadlines
Use knowledge_write to persist post-mortem report. Sprint Prioritizer adds prevention tasks to backlog.
Communication Templates
Status Page Update:
[TIMESTAMP] — [SERVICE NAME] Incident
Status: [Investigating / Identified / Monitoring / Resolved]
Impact: [Description of user impact]
Current action: [What we're doing]
Next update: [When to expect next update]
Executive Update (P0 only):
INCIDENT BRIEF — [TIMESTAMP]
SITUATION: [Service] is [down/degraded] affecting [N users/% of traffic]
CAUSE: [Known/Under investigation] — [Brief description if known]
ACTION: [What's being done] — ETA [time estimate]
IMPACT: [Business impact — revenue, users, reputation]
NEXT UPDATE: [Timestamp]
Escalation Matrix
| Condition |
Escalate To |
| P0 not resolved in 30 min |
Studio Producer (additional resources, vendor escalation) |
| P1 not resolved in 2 hours |
Project Shepherd (resource reallocation) |
| Data breach suspected |
Legal Compliance Checker (regulatory notification) |
| User data affected |
Legal Compliance Checker + Executive Summary Generator (GDPR/CCPA) |
| Revenue impact > threshold |
Finance Tracker + Studio Producer (business impact assessment) |
Deliverables
Success Metrics
- P0 detection to resolution: < 30 minutes
- P1 detection to resolution: < 2 hours
- P2 detection to resolution: < 4 hours
- Post-mortem completion rate: 100% for P0/P1
- Repeat incident rate: < 5%
- Status page update frequency during incident: every 15 minutes
- Mean time to detect (MTTD): < 5 minutes
- Mean time to resolve (MTTR): < 30 minutes
Verify
- The deploy command was actually run and the build/log output (or deploy URL) is captured
- The deployed URL was opened and returned a 2xx; key routes were sampled, not just the index
- Environment variables required by the app are present in the target environment; missing-var failures were ruled out
- A rollback plan (previous deployment ID, git SHA, or one-line revert command) is documented before promoting to production
- Health/observability check (logs, error tracker, status page) was inspected post-deploy; baseline error rate is recorded
- DNS / domain / SSL configuration was confirmed, not assumed to carry over from previous deploys
1---2name: runbook-incident-response3description: Incident response runbook — detection through post-mortem for production issues with severity-based response teams. Adapted from msitarzewski/agency-agents.4---56## Triggers78- incident response9- production down10- service outage11- system failure12- security breach13- data loss14- performance degradation15- error rate spike16- P0 incident17- P1 incident18- rollback needed19- hotfix deployment20- post-mortem21- root cause analysis22- incident triage23- on-call alert24- system recovery2526## Instructions2728Something is broken in production. Users are affected. Speed of response matters, but so does doing it right. This runbook covers detection through post-mortem. Duration: minutes to hours.2930### Severity Classification3132| Level | Definition | Examples | Response Time |33|-------|-----------|----------|--------------|34| P0 Critical | Service completely down, data loss, security breach | Database corruption, DDoS, auth failure | Immediate |35| P1 High | Major feature broken, significant degradation | Payment down, 50%+ error rate, 10x latency | < 1 hour |36| P2 Medium | Minor feature broken, workaround available | Search not working, non-critical API errors | < 4 hours |37| P3 Low | Cosmetic issue, minor inconvenience | Styling bug, typo, minor UI glitch | Next sprint |3839### Response Teams by Severity4041**P0 Critical** (use `organization_spawn` with all):42- Infrastructure Maintainer: Incident commander — assess scope, coordinate43- DevOps Automator: Deployment/rollback execution44- Backend Architect: Root cause investigation (system)45- Frontend Developer: Client-side investigation46- Support Responder: Status page updates, user notifications47- Executive Summary Generator: Real-time executive updates4849**P1 High**:50- Infrastructure Maintainer: Incident commander51- DevOps Automator: Deployment support52- Relevant Developer Agent: Fix implementation53- Support Responder: User communication5455**P2 Medium**:56- Relevant Developer Agent: Fix implementation57- Evidence Collector: Verify fix5859**P3 Low**:60- Sprint Prioritizer: Add to backlog6162### Step 1: Detection & Triage (0-5 minutes)6364Trigger: Alert from monitoring / User report / Agent detection6566Infrastructure Maintainer:671. Acknowledge alert682. Assess scope and impact (users affected, services impacted, data at risk?)693. Classify severity (P0/P1/P2/P3)704. Use `organization_spawn` to activate appropriate response team715. Create incident channel/thread7273### Step 2: Investigation (5-30 minutes)7475Parallel investigation via `organization_delegate`:7677- Infrastructure Maintainer: Check system metrics (CPU, memory, network, disk), review error logs, check recent deployments, verify external dependencies78- Backend Architect (P0/P1): Check database health, review API error rates, check service communication, identify failing component79- DevOps Automator: Review deployment history, check CI/CD status, prepare rollback, verify infrastructure state8081Output: Root cause identified or narrowed to component.8283### Step 3: Mitigation (15-60 minutes)8485Decision tree:86- **Caused by recent deployment**: DevOps Automator executes rollback, Infrastructure Maintainer verifies recovery87- **Caused by infrastructure issue**: Infrastructure Maintainer scales/restarts/failovers, verify recovery88- **Caused by code bug**: Developer implements hotfix, Evidence Collector verifies, DevOps Automator deploys hotfix89- **Caused by external dependency**: Infrastructure Maintainer activates fallback/cache, Support Responder communicates to users9091Throughout:92- Support Responder: Update status page every 15 minutes93- Executive Summary Generator: Brief stakeholders (P0 only)9495### Step 4: Resolution Verification (Post-fix)9697- Evidence Collector: Verify fix resolves issue, screenshot evidence, confirm no new issues98- Infrastructure Maintainer: Verify metrics returning to normal, confirm no cascading failures, monitor 30 minutes post-fix99- API Tester (if API-related): Run regression on affected endpoints, verify response times, confirm error rates at baseline100101### Step 5: Post-Mortem (Within 48 hours)102103Use `organization_delegate` to Workflow Optimizer:1041. Timeline reconstruction (when introduced, detected, resolved, total impact duration)1052. Root cause analysis (what failed, why, why not caught earlier, 5 Whys)1063. Impact assessment (users affected, revenue impact, reputation, data impact)1074. Prevention measures (monitoring improvements, testing improvements, process changes, infrastructure changes)1085. Action items with owners and deadlines109110Use `knowledge_write` to persist post-mortem report. Sprint Prioritizer adds prevention tasks to backlog.111112### Communication Templates113114**Status Page Update**:115```116[TIMESTAMP] — [SERVICE NAME] Incident117Status: [Investigating / Identified / Monitoring / Resolved]118Impact: [Description of user impact]119Current action: [What we're doing]120Next update: [When to expect next update]121```122123**Executive Update (P0 only)**:124```125INCIDENT BRIEF — [TIMESTAMP]126SITUATION: [Service] is [down/degraded] affecting [N users/% of traffic]127CAUSE: [Known/Under investigation] — [Brief description if known]128ACTION: [What's being done] — ETA [time estimate]129IMPACT: [Business impact — revenue, users, reputation]130NEXT UPDATE: [Timestamp]131```132133### Escalation Matrix134135| Condition | Escalate To |136|-----------|------------|137| P0 not resolved in 30 min | Studio Producer (additional resources, vendor escalation) |138| P1 not resolved in 2 hours | Project Shepherd (resource reallocation) |139| Data breach suspected | Legal Compliance Checker (regulatory notification) |140| User data affected | Legal Compliance Checker + Executive Summary Generator (GDPR/CCPA) |141| Revenue impact > threshold | Finance Tracker + Studio Producer (business impact assessment) |142143## Deliverables144145- [ ] Incident classified with severity level146- [ ] Response team activated within SLA147- [ ] Root cause identified148- [ ] Fix implemented and verified149- [ ] Status page updated throughout150- [ ] Stakeholders briefed (P0/P1)151- [ ] Post-mortem completed within 48 hours152- [ ] Prevention action items in backlog153154## Success Metrics155156- P0 detection to resolution: < 30 minutes157- P1 detection to resolution: < 2 hours158- P2 detection to resolution: < 4 hours159- Post-mortem completion rate: 100% for P0/P1160- Repeat incident rate: < 5%161- Status page update frequency during incident: every 15 minutes162- Mean time to detect (MTTD): < 5 minutes163- Mean time to resolve (MTTR): < 30 minutes164165## Verify166167- The deploy command was actually run and the build/log output (or deploy URL) is captured168- The deployed URL was opened and returned a 2xx; key routes were sampled, not just the index169- Environment variables required by the app are present in the target environment; missing-var failures were ruled out170- A rollback plan (previous deployment ID, git SHA, or one-line revert command) is documented before promoting to production171- Health/observability check (logs, error tracker, status page) was inspected post-deploy; baseline error rate is recorded172- DNS / domain / SSL configuration was confirmed, not assumed to carry over from previous deploys