Declarative Flow (#1539): This flow's orchestration is now also expressed as a
declarative YAML Flow at flows/flow-incident-response.playbook.yaml (source of truth for the step
sequence + gates). This SKILL.md remains the discoverable trigger surface and prose
reference. See epic #1534.
Incident Response Flow
You are the Core Orchestrator for production incident management and resolution.
Your Role
You orchestrate multi-agent workflows. You do NOT execute bash scripts.
When the user requests this flow (via natural language or explicit command):
- Interpret the request and confirm understanding
- Read this template as your orchestration guide
- Extract agent assignments and workflow steps
- Delegate agents with the current provider-native orchestration mechanism in the correct sequence
- Synthesize results and finalize artifacts
- Report completion with summary
Incident Response Overview
Purpose: Rapid detection, triage, escalation, resolution, and learning from production incidents
Key Objectives:
- Minimize user impact through rapid response
- Follow ITIL tier escalation (Tier 1 → Tier 2 → Tier 3)
- Conduct blameless post-incident reviews
- Drive continuous improvement through preventive actions
Expected Duration: P0 = 1-2h resolution, P1 = 4h, P2 = 24h (orchestration: 5-10 minutes)
Natural Language Triggers
Users may say:
- "Handle incident"
- "Production issue detected"
- "Incident response"
- "P0 incident"
- "Service down"
- "System outage"
- "Critical production issue"
- "Emergency response"
You recognize these as requests for this orchestration flow.
Parameter Handling
--guidance Parameter
Purpose: User provides upfront direction to tailor incident response priorities
Examples:
--guidance "Security incident suspected, preserve forensics before mitigation"
--guidance "Performance degradation, focus on database query optimization"
--guidance "Payment processing down, revenue impact critical"
--guidance "Tight SLA window, prioritize fast rollback over investigation"
--guidance "First P0 for new team, need extra documentation and communication"
How to Apply:
- Parse guidance for keywords: security, performance, compliance, revenue, data-loss
- Adjust agent assignments (add security-gatekeeper for security incidents)
- Modify escalation paths (immediate executive notification for revenue impact)
- Influence mitigation strategy (rollback vs hotfix vs investigation)
- Prioritize documentation depth (standard vs comprehensive for learning)
--interactive Parameter
Purpose: You ask 5-8 strategic questions to understand incident context
Questions to Ask (if --interactive):
I'll ask 8 strategic questions to tailor incident response to your situation:
Q1: What is the observed user impact?
(e.g., complete outage, degraded performance, specific feature unavailable)
Q2: What percentage of users are affected?
(Helps me assign initial severity: P0 = >50%, P1 = 10-50%, P2 = <10%)
Q3: When did the issue start?
(Timeline helps identify triggering events: deployments, traffic spikes)
Q4: What recent changes occurred in the last 24 hours?
(Deployments, config changes, infrastructure updates - guides rollback decisions)
Q5: Is this security-related or involving data loss?
(Immediate escalation to security team, forensics preservation)
Q6: What is the business impact?
(Revenue loss, compliance risk, reputation damage - affects escalation urgency)
Q7: What is your on-call team's experience level?
(Helps me tailor runbook detail and escalation speed)
Q8: What is your current SLA status?
(Error budget remaining, time to SLA breach - affects mitigation strategy)
Based on your answers, I'll adjust:
- Severity classification (P0/P1/P2/P3)
- Escalation urgency (functional and hierarchical)
- Mitigation strategy priority (rollback vs investigation)
- Communication frequency (every 15 min vs hourly)
- Documentation depth (standard vs comprehensive PIR)
Synthesize Guidance: Combine answers into structured guidance string for execution
Artifacts to Generate
Primary Deliverables:
- Incident Record: Initial detection and classification →
.aiwg/incidents/{incident-id}/incident-record.md
- Incident Timeline: Chronological event log →
.aiwg/incidents/{incident-id}/timeline.md
- Triage Assessment: Impact and urgency analysis →
.aiwg/incidents/{incident-id}/triage-assessment.md
- Regression Analysis: Regression triage results →
.aiwg/incidents/{incident-id}/regression-analysis.md
- Root Cause Analysis: 5 Whys and fishbone →
.aiwg/incidents/{incident-id}/root-cause-analysis.md
- Mitigation Report: Resolution strategy and validation →
.aiwg/incidents/{incident-id}/mitigation-report.md
- Post-Incident Review (PIR): Blameless retrospective →
.aiwg/incidents/{incident-id}/post-incident-review.md
- Preventive Actions: Tracked action items →
.aiwg/incidents/{incident-id}/preventive-actions.md
Supporting Artifacts:
- Escalation logs (who, when, why)
- Communication templates (status page updates)
- Runbook updates (new troubleshooting steps)
- Knowledge base articles (lessons learned)
Multi-Agent Orchestration Workflow
Step 1: Incident Detection and Initial Logging
Purpose: Capture incident details immediately to enable rapid response
Your Actions:
Create Incident Directory:
# You do this directly (no agent needed)
mkdir -p .aiwg/incidents/{incident-id}/{logs,diagnostics,communications,actions}
Launch Detection and Logging Agent:
Task(
subagent_type="incident-responder",
description="Create incident record and initial classification",
prompt="""
Incident ID: {incident-id}
Reported symptoms: {user-provided description}
Create Incident Record:
**Incident ID**: {incident-id}
**Detection Time**: {YYYY-MM-DD HH:MM:SS UTC}
**Reporter**: {user/system/alert}
**Detection Method**: {automated-alert | user-report | monitoring | manual}
## Initial Description
{1-2 sentence summary of reported issue}
**User Impact**: {description of user-facing symptoms}
**Affected Systems**: {list systems/components based on description}
**Affected User Count**: {estimated count | UNKNOWN}
## Initial Classification
**Severity**: {P0 | P1 | P2 | P3 | TBD}
**Category**: {availability | performance | functionality | security | data-integrity}
## Assigned Team
**Incident Commander**: {TBD - to be assigned based on severity}
**On-Call Engineer**: {TBD - from on-call rotation}
**Status**: DETECTED
Save to: .aiwg/incidents/{incident-id}/incident-record.md
Also create initial timeline entry:
| Time | Event | Actor | Notes |
|------|-------|-------|-------|
| {HH:MM UTC} | Incident detected | {reporter} | {initial symptoms} |
Save to: .aiwg/incidents/{incident-id}/timeline.md
"""
)
Create Incident Communication Channel:
Task(
subagent_type="incident-responder",
description="Create incident alert and communication template",
prompt="""
Generate initial incident alert template:
## Incident Alert: {incident-id}
**Status**: DETECTED
**Severity**: {P0/P1/P2/P3}
**Time**: {HH:MM UTC}
**Issue**: {brief description}
**User Impact**: {high-level impact}
**Assigned**: {on-call engineer}
**Next Update**: {estimated time}
**Incident Channel**: #incident-{YYYY-MM-DD}-{ID}
**Incident Dashboard**: {link to monitoring dashboard}
Save to: .aiwg/incidents/{incident-id}/communications/initial-alert.md
"""
)
Communicate Progress:
✓ Incident {incident-id} logged
✓ Initial record created
⏳ Proceeding to regression triage...
Step 1.5: Regression Triage
Purpose: Determine if incident is a regression from recent changes to guide rollback decisions
Your Actions:
Launch Regression Detection Agent:
Task(
subagent_type="regression-analyst",
description="Determine if incident is a regression from recent changes",
prompt="""
Read incident record: .aiwg/incidents/{incident-id}/incident-record.md
Execute Regression Triage:
## Step 1: Identify Recent Deployments
Check for recent deployments/changes:
- Use command: /regression-check --baseline last-deployment
- Review git log for last 24-48 hours
- Check deployment history from CI/CD
- Review configuration changes
- Check infrastructure updates
Document all recent changes with timestamps.
## Step 2: Symptom Correlation
Compare incident symptoms against baseline:
**Symptom Pattern Matching**:
- Did this functionality work before? {YES | NO | UNKNOWN}
- When did it last work? {timestamp | UNKNOWN}
- What changed between working and broken? {specific change | UNKNOWN}
**Regression Indicators** (Check all that apply):
- [ ] Functionality worked in previous version
- [ ] Issue appeared immediately after deployment
- [ ] Issue correlates with specific commit/PR
- [ ] Similar pattern in staging/canary deployment
- [ ] Metrics show clear inflection point at deployment time
## Step 3: Regression Verdict
**Is this a regression?**: {CONFIRMED | LIKELY | POSSIBLE | UNLIKELY | NOT_REGRESSION}
**Confidence**: {HIGH (>90%) | MEDIUM (70-90%) | LOW (<70%)}
**Evidence**:
1. {evidence point 1}
2. {evidence point 2}
3. {evidence point 3}
Save initial assessment to: .aiwg/incidents/{incident-id}/regression-analysis.md (Step 1-3)
Append timeline:
| {HH:MM UTC} | Regression triage initiated | regression-analyst | Verdict: {CONFIRMED|LIKELY|POSSIBLE|UNLIKELY|NOT_REGRESSION} |
"""
)
If Regression Confirmed/Likely, Launch Regression Bisect:
# Only if regression verdict is CONFIRMED or LIKELY
Task(
subagent_type="regression-analyst",
description="Identify introducing change via bisect",
prompt="""
Read regression analysis: .aiwg/incidents/{incident-id}/regression-analysis.md
Since regression is {CONFIRMED|LIKELY}, identify introducing change:
## Step 4: Bisect to Find Introducing Commit
Use command: /regression-bisect
Execute bisect process:
- Start: {last-known-good-commit}
- End: {current-broken-commit}
- Test: {reproduction steps or test case}
Document bisect process and result:
**Bisect Results**:
- **Introducing Commit**: {SHA}
- **Author**: {name}
- **Timestamp**: {YYYY-MM-DD HH:MM:SS}
- **PR/MR**: {PR-number} - {PR-title}
- **Commit Message**: {message}
- **Files Changed**: {count} files
- **Risk Assessment**: {LOW | MEDIUM | HIGH based on scope}
**Commit Details**:
```
{git show {SHA} --stat output}
```
**Related Changes**:
- [ ] Code changes in affected component
- [ ] Configuration changes
- [ ] Database migrations
- [ ] Dependency updates
- [ ] Infrastructure changes
Append to: .aiwg/incidents/{incident-id}/regression-analysis.md (Step 4)
Append timeline:
| {HH:MM UTC} | Introducing commit identified | regression-analyst | Commit: {SHA}, PR: {PR-number} |
"""
)
Rollback Feasibility Assessment:
Task(
subagent_type="reliability-engineer",
description="Assess rollback feasibility and calculate blast radius",
prompt="""
Read regression analysis: .aiwg/incidents/{incident-id}/regression-analysis.md
Since introducing change identified, assess rollback options:
## Step 5: Rollback Feasibility
**Rollback Options**:
### Option A: Full Rollback to Previous Version
- **Target Version**: {version before introducing commit}
- **Feasibility**: {SAFE | RISKY | BLOCKED}
- **Risk Factors**:
- [ ] Database migrations in between (incompatible schema)
- [ ] External API contract changes (breaking)
- [ ] Data written in new format (can't be read by old version)
- [ ] Dependent services already updated (coordination required)
- **Rollback Time**: {estimated minutes}
- **Data Loss Risk**: {NONE | MINIMAL | SIGNIFICANT}
### Option B: Revert Specific Commit(s)
- **Commits to Revert**: {SHA1, SHA2, ...}
- **Feasibility**: {SAFE | RISKY | BLOCKED}
- **Conflicts**: {count} potential merge conflicts
- **Testing Required**: {minimal | moderate | extensive}
- **Revert + Deploy Time**: {estimated minutes}
### Option C: Feature Flag Disable
- **Applicable**: {YES | NO}
- **Feature Flags Involved**: {flag-names}
- **Disable Time**: {estimated minutes} (near-instant)
- **Partial Rollback**: {which features disabled}
### Option D: Hotfix Forward
- **Feasibility**: {VIABLE | NOT_VIABLE}
- **Fix Complexity**: {SIMPLE | MODERATE | COMPLEX}
- **Estimated Fix Time**: {minutes}
- **Testing Time**: {minutes}
- **Total Time**: {minutes}
**Recommended Option**: {A | B | C | D}
**Rationale**: {why this option is best given constraints}
## Step 6: Blast Radius Calculation
**Scope of Introducing Change**:
- **Components Affected**: {list all components touched by change}
- **Services Impacted**: {list all services}
- **Dependencies**: {downstream systems affected}
- **Users Impacted**: {estimated count or percentage}
- **Geographic Scope**: {all regions | specific regions}
- **User Segments**: {all users | specific segments}
**Rollback Impact Assessment**:
- **Services Affected by Rollback**: {list}
- **Data Loss Risk**: {NONE | MINIMAL | ACCEPTABLE | UNACCEPTABLE}
- **Downtime Required**: {NONE | <5 min | 5-15 min | >15 min}
- **Coordination Required**: {list teams/services needing notification}
**Blast Radius Score**: {LOW | MEDIUM | HIGH}
Append to: .aiwg/incidents/{incident-id}/regression-analysis.md (Steps 5-6)
Append timeline:
| {HH:MM UTC} | Rollback feasibility assessed | reliability-engineer | Recommended: {option}, Blast radius: {score} |
"""
)
Immediate Action Recommendation:
Task(
subagent_type="regression-analyst",
description="Recommend immediate action based on regression analysis",
prompt="""
Read complete regression analysis: .aiwg/incidents/{incident-id}/regression-analysis.md
## Step 7: Immediate Action Decision Matrix
Use decision matrix to recommend action:
| Regression Confidence | Rollback Risk | User Impact | Recommendation |
|-----------------------|---------------|-------------|----------------|
| CONFIRMED + HIGH | LOW | HIGH | **ROLLBACK IMMEDIATELY** |
| CONFIRMED + HIGH | LOW | MEDIUM | **ROLLBACK** |
| CONFIRMED + HIGH | MEDIUM | HIGH | **ROLLBACK with validation** |
| CONFIRMED + HIGH | HIGH | HIGH | **HOTFIX (rollback blocked)** |
| LIKELY + MEDIUM | LOW | HIGH | **ROLLBACK after quick validation** |
| LIKELY + MEDIUM | MEDIUM | HIGH | **INVESTIGATE + prepare rollback** |
| POSSIBLE + LOW | ANY | HIGH | **INVESTIGATE (parallel to Tier 1)** |
| UNLIKELY | ANY | ANY | **STANDARD TRIAGE (continue to Step 2)** |
**Current Situation**:
- Regression Confidence: {from Step 3}
- Rollback Risk: {from Step 5}
- User Impact: {from incident record}
**Recommended Immediate Action**: {action from matrix}
**Action Details**:
- **Action Type**: {ROLLBACK | HOTFIX | INVESTIGATE | STANDARD_TRIAGE}
- **Urgency**: {IMMEDIATE (<5 min) | URGENT (<15 min) | NORMAL (standard SLA)}
- **Prerequisites**: {any validation or approval needed}
- **Execution Steps**: {high-level steps}
- **Fallback Plan**: {if this action fails}
**Communication**:
- Notify Incident Commander: {key finding summary}
- Notify Deployment Manager: {rollback decision if applicable}
- Update status: "Regression {CONFIRMED|LIKELY|POSSIBLE}, {action} in progress"
Append to: .aiwg/incidents/{incident-id}/regression-analysis.md (Step 7)
Append timeline:
| {HH:MM UTC} | Immediate action recommended | regression-analyst | Action: {ROLLBACK|HOTFIX|INVESTIGATE|STANDARD_TRIAGE} |
"""
)
Update Regression Register:
Task(
subagent_type="regression-analyst",
description="Record regression in regression register",
prompt="""
If regression is CONFIRMED or LIKELY, update regression register:
Read regression analysis: .aiwg/incidents/{incident-id}/regression-analysis.md
Update regression register with incident:
**Regression Entry**:
```yaml
regression_id: REG-{YYYY-MM-DD}-{sequence}
incident_id: {incident-id}
detection_date: {YYYY-MM-DD}
severity: {P0|P1|P2|P3}
introducing_change:
commit_sha: {SHA}
pr_number: {PR-number}
author: {name}
merge_date: {YYYY-MM-DD}
deployment_date: {YYYY-MM-DD}
regression_category: {functional | performance | security | data-integrity}
affected_functionality:
component: {component-name}
feature: {feature-name}
user_facing: {YES|NO}
detection_gap:
escaped_testing: {unit | integration | e2e | manual | staging}
detection_time: {hours from deployment to detection}
reason: {why tests didn't catch this}
mitigation_action: {rollback | hotfix | feature-flag-disable}
mitigation_time: {minutes from detection to resolution}
preventive_actions:
- {action 1 to prevent recurrence}
- {action 2 to improve detection}
status: {OPEN | MITIGATED | ANALYZED | CLOSED}
```
Save to: .aiwg/regression/register/{regression-id}.yaml
Also update regression summary:
Append one-line entry to: .aiwg/regression/regression-register-summary.md
| {regression-id} | {incident-id} | {YYYY-MM-DD} | {P0|P1|P2} | {commit-SHA} | {category} | {status} |
Cross-reference in incident:
Append to: .aiwg/incidents/{incident-id}/regression-analysis.md
## Regression Register Entry
This incident has been registered as: **{regression-id}**
See: @.aiwg/regression/register/{regression-id}.yaml
Append timeline:
| {HH:MM UTC} | Regression registered | regression-analyst | Registered as: {regression-id} |
"""
)
Decision Flow:
Regression Triage Decision Tree:
1. Is this a regression?
├─ CONFIRMED/LIKELY → Proceed to rollback assessment
│ ├─ Rollback SAFE + HIGH user impact → Execute rollback immediately
│ ├─ Rollback RISKY or BLOCKED → Proceed to hotfix path
│ └─ Rollback SAFE + LOW user impact → Prepare rollback, investigate in parallel
│
├─ POSSIBLE → Continue standard triage in parallel with regression investigation
│
└─ UNLIKELY/NOT_REGRESSION → Continue to standard triage (Step 2)
Communicate Progress:
✓ Incident logged
⏳ Regression triage in progress...
✓ Recent deployments identified: {count} in last {hours}h
✓ Regression verdict: {CONFIRMED|LIKELY|POSSIBLE|UNLIKELY|NOT_REGRESSION}
{✓ Introducing commit identified: {SHA}, PR: {PR-number}}
{✓ Rollback feasibility: {SAFE|RISKY|BLOCKED}}
✓ Recommended action: {ROLLBACK|HOTFIX|INVESTIGATE|STANDARD_TRIAGE}
{✓ Regression registered: {regression-id}}
⏳ {Executing immediate rollback | Proceeding to hotfix development | Continuing to standard triage}...
Step 2: Triage and Severity Assessment
Purpose: Rapidly assess severity and assign priority using Impact × Urgency matrix
Your Actions:
Launch Triage Agents (parallel):
# Agent 1: Impact Assessment
Task(
subagent_type="incident-responder",
description="Assess incident impact (user effect)",
prompt="""
Read incident record: .aiwg/incidents/{incident-id}/incident-record.md
Assess Impact Level:
**User Impact Assessment**:
- Affected Users: {count or percentage}
- Severity of Effect: {complete outage | severe degradation | minor issue}
- Impact Level: {HIGH | MEDIUM | LOW}
Criteria:
- HIGH: Complete service outage OR >50% users affected OR data loss/corruption
- MEDIUM: Severe degradation OR 10-50% users affected OR critical feature unavailable
- LOW: Minor degradation OR <10% users affected OR cosmetic issue
**Business Impact**:
- Revenue Impact: {$amount | NONE}
- Compliance Risk: {YES | NO}
- Reputation Risk: {HIGH | MEDIUM | LOW}
- User Safety Risk: {YES | NO}
**Affected Systems**: {list all affected components, services, integrations}
Save to: .aiwg/incidents/{incident-id}/triage-assessment.md (Impact section)
"""
)
# Agent 2: Urgency Assessment
Task(
subagent_type="reliability-engineer",
description="Assess incident urgency (time sensitivity)",
prompt="""
Read incident record: .aiwg/incidents/{incident-id}/incident-record.md
Assess Urgency Level:
**Urgency Assessment**:
- Time Sensitivity: {immediate | hours | days}
- Worsening Trend: {rapidly degrading | stable | improving}
- Urgency Level: {HIGH | MEDIUM | LOW}
Criteria:
- HIGH: Immediate resolution required, worsening rapidly, SLA breach imminent
- MEDIUM: Resolution needed within hours, stable degradation
- LOW: Resolution can be scheduled, no time pressure
**SLA Breach Risk**:
- Current Availability: {percentage}%
- SLA Target: {percentage}%
- Error Budget Remaining: {percentage}%
- Time to SLA Breach: {estimated time}
Append to: .aiwg/incidents/{incident-id}/triage-assessment.md (Urgency section)
"""
)
Synthesize Priority Classification:
Task(
subagent_type="incident-responder",
description="Determine incident priority from Impact × Urgency",
prompt="""
Read triage assessment: .aiwg/incidents/{incident-id}/triage-assessment.md
Determine Priority using matrix:
| Impact/Urgency | High Urgency | Medium Urgency | Low Urgency |
|----------------|--------------|----------------|-------------|
| High Impact | P0 (Critical) | P1 (High) | P2 (Medium) |
| Medium Impact | P1 (High) | P2 (Medium) | P3 (Low) |
| Low Impact | P2 (Medium) | P3 (Low) | P3 (Low) |
**Priority**: {P0 | P1 | P2 | P3}
**Response SLA**:
- P0: Acknowledgment immediate, Engage 15 min, Resolve 1-2h, Updates every 15 min
- P1: Acknowledgment 5 min, Engage 30 min, Resolve 4h, Updates every 30 min
- P2: Acknowledgment 30 min, Engage 4h, Resolve 24h, Updates daily
- P3: Acknowledgment 1 business day, Standard backlog process
**Escalation Path**:
- P0: Page on-call → Incident Commander → Deployment Manager → Executive (30 min)
- P1: Alert on-call → Incident Commander → Component Owner → Management (2h)
- P2: Create ticket → On-call triage → Component Owner if needed
- P3: Standard backlog
**Incident Commander Assignment** (P0/P1 only):
- Assign Incident Commander: {name or role}
- Assign Technical Lead: {on-call engineer or component owner}
- Assign Communications Lead: {support lead or PM}
Update incident record with priority and assignments
Save to: .aiwg/incidents/{incident-id}/incident-record.md
Append timeline:
| {HH:MM UTC} | Triage complete, severity {P0/P1/P2/P3} assigned | incident-responder | Impact: {HIGH/MED/LOW}, Urgency: {HIGH/MED/LOW} |
| {HH:MM UTC} | Incident Commander assigned | {name} | {P0/P1 only} |
Append to: .aiwg/incidents/{incident-id}/timeline.md
"""
)
Communicate Progress:
✓ Incident detected
⏳ Assessing impact and urgency...
✓ Impact: {HIGH/MEDIUM/LOW}
✓ Urgency: {HIGH/MEDIUM/LOW}
✓ Priority assigned: {P0/P1/P2/P3}
✓ Incident Commander assigned: {name} (P0/P1)
⏳ Initiating functional escalation (Tier 1)...
Step 3: Functional Escalation (Tier 1 → Tier 2 → Tier 3)
Purpose: Engage appropriate expertise based on incident complexity
Your Actions:
Tier 1 Response (First 15-30 minutes):
Task(
subagent_type="reliability-engineer",
description="Tier 1 response: Runbook execution and data gathering",
prompt="""
Read incident record: .aiwg/incidents/{incident-id}/incident-record.md
Execute Tier 1 Response:
## Initial Actions (First 5 minutes)
- [ ] Acknowledge incident
- [ ] Confirm user impact (reproduce if possible)
- [ ] Check recent deployments/changes (last 24h)
- [ ] Review monitoring dashboards for anomalies
- [ ] Identify applicable runbook: deployment/runbook-{scenario}.md
## Data Gathering
Collect diagnostic data:
- System health (pods, nodes, services status)
- Recent deployments (git log, rollout history)
- Logs (last 500 lines from affected services)
- Metrics (error rate, latency, throughput)
- Database health (active connections, slow queries)
Document actions taken and results.
## Escalation Decision (Tier 1 → Tier 2)
Escalate if:
- Runbook not available OR issue unresolved after {15 min P0 | 30 min P1}
- Requires deep component knowledge or code changes
- Database, network, or infrastructure issue suspected
If escalation needed, document:
- Why escalating (specific reason)
- Data collected (attach logs, metrics)
- Hypotheses tested (what was tried)
Save diagnostic data to: .aiwg/incidents/{incident-id}/diagnostics/tier1-data.md
Append timeline with all actions taken.
"""
)
Tier 2 Response (If escalated):
Task(
subagent_type="component-owner",
description="Tier 2 response: Advanced troubleshooting and code review",
prompt="""
Read incident record: .aiwg/incidents/{incident-id}/incident-record.md
Read Tier 1 data: .aiwg/incidents/{incident-id}/diagnostics/tier1-data.md
Execute Tier 2 Response:
## Handoff from Tier 1
- Review incident summary and diagnostic data
- Review actions already taken by Tier 1
- Review relevant runbooks and recent changes
## Advanced Troubleshooting
- Deep log analysis (error patterns, stack traces)
- Code review for recent changes (git diff last 48h)
- Reproduce issue in non-prod environment (if possible)
- Check component dependencies (upstream/downstream services)
- Analyze performance profiles (CPU, memory, query execution plans)
## Root Cause Hypothesis
Formulate hypothesis:
**Hypothesis**: {statement of suspected root cause}
**Evidence**:
1. {log pattern or metric anomaly}
2. {recent deployment or config change}
3. {external dependency status}
**Test Plan**:
- [ ] {validation step 1}
- [ ] {validation step 2}
## Escalation Decision (Tier 2 → Tier 3)
Escalate if:
- Architectural issue or design flaw suspected
- Vendor/third-party dependency issue
- Unresolved after {30 min P0 | 1 hour P1}
- Emergency code fix required (hotfix approval needed)
Save hypothesis and findings to: .aiwg/incidents/{incident-id}/diagnostics/tier2-analysis.md
Append timeline with advanced troubleshooting results.
"""
)
Tier 3 Response (If escalated):
Task(
subagent_type="architecture-designer",
description="Tier 3 response: Architectural analysis and emergency decisions",
prompt="""
Read all prior diagnostics:
- .aiwg/incidents/{incident-id}/diagnostics/tier1-data.md
- .aiwg/incidents/{incident-id}/diagnostics/tier2-analysis.md
Execute Tier 3 Response:
## Architectural Analysis
- Review system design for fundamental issues
- Evaluate scalability/capacity constraints
- Consider architectural trade-offs (CAP theorem, consistency models)
- Engage vendor support if third-party dependency issue
## Emergency Decision Authority
Provide decisions on:
- Emergency architecture changes (approve/reject)
- Vendor escalation (initiate if needed)
- Hotfix deployment outside normal process (approve with conditions)
- Temporary workaround vs. full fix (recommend approach)
Document architectural assessment and decisions:
Save to: .aiwg/incidents/{incident-id}/diagnostics/tier3-architecture-assessment.md
Append timeline with architectural decisions.
"""
)
Communicate Progress:
✓ Priority assigned: {P0/P1/P2/P3}
⏳ Tier 1 response initiated...
✓ Runbook executed: {runbook-name}
✓ Diagnostic data collected
⚠️ Escalating to Tier 2 (reason: {escalation-reason})
⏳ Tier 2 response: Component Owner engaged...
✓ Root cause hypothesis: {hypothesis}
{✓ Hypothesis confirmed | ⚠️ Escalating to Tier 3}
Step 4: Hierarchical Escalation (Management / Executive)
Purpose: Notify leadership when business impact warrants executive involvement
Your Actions:
Management Notification (P0/P1):
Task(
subagent_type="project-manager",
description="Notify management per escalation matrix",
prompt="""
Read incident record: .aiwg/incidents/{incident-id}/incident-record.md
Determine if management notification required:
**Trigger**:
- P0: Within 30 minutes of detection (automatic)
- P1: Within 2 hours if unresolved
- P2: If user impact escalates or SLA breach imminent
Generate management notification:
Subject: [{P0 | P1} INCIDENT] {brief-title} - {status}
**Incident ID**: {incident-id}
**Severity**: {P0/P1}
**Start Time**: {HH:MM UTC}
**Duration**: {elapsed-time}
**User Impact**: {high-level description}
**Affected Users**: {count | percentage}
**Business Impact**: {revenue loss | compliance risk | reputation impact}
**Current Status**: {INVESTIGATING | MITIGATING | RESOLVED}
**Root Cause**: {hypothesis or confirmed}
**ETA to Resolution**: {estimated time | UNKNOWN}
**Incident Commander**: {name}
**Next Update**: {time}
Save to: .aiwg/incidents/{incident-id}/communications/management-notification.md
Append timeline: Management notified
"""
)
Executive Escalation (P0 Critical):
Task(
subagent_type="project-manager",
description="Notify executive leadership for P0 or major business impact",
prompt="""
Read incident record: .aiwg/incidents/{incident-id}/incident-record.md
Determine if executive notification required:
**Trigger**:
- P0: If unresolved after 2 hours OR major business impact
- Security breach or data loss (immediate)
- Public/media attention likely
- Regulatory reporting required
Generate executive notification:
Subject: [EXECUTIVE ALERT] P0 Incident - {brief-title}
**Business Impact Summary**:
- Revenue Impact: {$amount estimated}
- User Impact: {count} users / {percentage}% of user base
- Compliance Risk: {YES/NO - describe}
- Reputation Risk: {HIGH/MEDIUM/LOW}
**Incident Summary**:
{2-3 sentence summary of issue and response}
**Current Status**: {status}
**ETA to Resolution**: {time}
**Incident Commander**: {name}
**Executive Action Needed**:
{NONE | DECISION REQUIRED | AWARENESS ONLY}
**Next Update**: {time}
Save to: .aiwg/incidents/{incident-id}/communications/executive-notification.md
Append timeline: Executive leadership notified
"""
)
Status Page Communication (P0/P1):
Task(
subagent_type="incident-responder",
description="Generate status page update template",
prompt="""
Create public-facing status page update:
{YYYY-MM-DD HH:MM UTC} - Investigating
We are currently investigating an issue affecting {service/feature}.
Users may experience {specific symptoms}. We will provide updates every {15|30|60} minutes.
Save template to: .aiwg/incidents/{incident-id}/communications/status-page-update.md
Note: Update within 30 minutes for P0, 1 hour for P1
"""
)
Communicate Progress:
✓ Tier 2 analysis complete
⏳ Escalating per severity matrix...
✓ Management notified (P0/P1)
{✓ Executive notified (P0 >2h or critical business impact) | ⊘ Executive notification not required}
✓ Status page update template created
⏳ Proceeding to root cause analysis and mitigation...
Step 5: Root Cause Analysis
Purpose: Identify root cause using structured methodologies (5 Whys, Fishbone)
Your Actions:
- Launch RCA Agents (parallel):
# Agent 1: 5 Whys Analysis
Task(
subagent_type="incident-responder",
description="Conduct 5 Whys root cause analysis",
prompt="""
Read diagnostics:
- .aiwg/incidents/{incident-id}/diagnostics/tier1-data.md
- .aiwg/incidents/{incident-id}/diagnostics/tier2-analysis.md
- .aiwg/incidents/{incident-id}/diagnostics/tier3-architecture-assessment.md (if exists)
Conduct 5 Whys Analysis:
**Problem Statement**: {what happened}
1. **Why did {problem} occur?**
- Because {reason-1}
2. **Why did {reason-1} occur?**
- Because {reason-2}
3. **Why did {reason-2} occur?**
- Because {reason-3}
4. **Why did {reason-3} occur?**
- Because {reason-4}
5. **Why did {reason-4} occur?**
- Because {root-cause}
**Root Cause**: {final answer from 5th why}
**Validation**: {test to confirm root cause}
Save to: .aiwg/incidents/{incident-id}/root-cause-analysis.md (5 Whys section)
"""
)
# Agent 2: Contributing Factors (Fishbone)
Task(
subagent_type="reliability-engineer",
description="Identify contributing factors using Ishikawa diagram",
prompt="""
Read diagnostics and 5 Whys analysis
Analyze Contributing Factors:
**Problem**: {incident title}
### People
- {factor 1: e.g., insufficient training}
- {factor 2: e.g., on-call fatigue}
### Process
- {factor 1: e.g., inadequate testing}
- {factor 2: e.g., unclear runbook}
### Technology
- {factor 1: e.g., database connection pool exhaustion}
- {factor 2: e.g., monitoring gap}
### Environment
- {factor 1: e.g., traffic spike}
- {factor 2: e.g., resource constraints}
**Primary Root Cause**: {from 5 Whys}
**Contributing Factors**: {list key factors from above}
Append to: .aiwg/incidents/{incident-id}/root-cause-analysis.md (Contributing Factors section)
"""
)
Communicate Progress:
✓ Hierarchical escalation complete
⏳ Conducting root cause analysis...
✓ 5 Whys analysis: Root cause identified as {root-cause}
✓ Contributing factors analysis: {count} factors identified
✓ Root cause analysis complete: .aiwg/incidents/{incident-id}/root-cause-analysis.md
⏳ Implementing mitigation strategy...
Step 6: Mitigation and Resolution
Purpose: Implement workaround or fix to restore service and eliminate user impact
Your Actions:
Select Mitigation Strategy:
Task(
subagent_type="incident-responder",
description="Select mitigation strategy based on root cause",
prompt="""
Read root cause analysis: .aiwg/incidents/{incident-id}/root-cause-analysis.md
Evaluate Mitigation Options:
**Option 1: Rollback** (fastest, safest for deployment-related incidents)
- Use Case: Recent deployment caused issue, old version was stable
- Time to Mitigate: 5-15 minutes
- Risk: Low (return to known-good state)
**Option 2: Hotfix** (targeted code fix)
- Use Case: Bug fix required, rollback not viable
- Time to Mitigate: 30 minutes - 2 hours
- Risk: Medium (new code, limited testing)
**Option 3: Configuration Change** (parameter adjustment)
- Use Case: Resource limits, timeouts, feature flags
- Time to Mitigate: 10-30 minutes
- Risk: Low-Medium (no code change)
**Option 4: Workaround** (temporary user-side solution)
- Use Case: Fix requires significant time, need immediate relief
- Time to Mitigate: Immediate (communication)
- Risk: Low (no system change)
**Option 5: Infrastructure Scaling** (resource addition)
- Use Case: Capacity issue, traffic spike
- Time to Mitigate: 10-20 minutes
- Risk: Low-Medium (cost implications)
**Selected Strategy**: {option}
**Rationale**: {why this option was chosen}
**Implementation Plan**: {specific steps}
**Rollback Plan**: {if mitigation fails, how to revert}
Save to: .aiwg/incidents/{incident-id}/mitigation-report.md (Strategy section)
"""
)
Execute Mitigation (agent depends on strategy):
# If Rollback
Task(
subagent_type="devops-engineer",
description="Execute rollback procedure",
prompt="""
Execute rollback based on deployment strategy:
Use existing deployment command:
/flow-deploy-to-production --rollback
Document rollback execution:
- Rollback timestamp
- Previous version: {old-version}
- Rolled back to: {stable-version}
- Verification: smoke tests, metrics
Append to: .aiwg/incidents/{incident-id}/mitigation-report.md (Execution section)
Append timeline: Rollback executed
"""
)
# If Hotfix
Task(
subagent_type="devops-engineer",
description="Deploy emergency hotfix",
prompt="""
Execute hotfix deployment:
1. Create hotfix branch: hotfix/INC-{incident-ID}-{brief-description}
2. Implement minimal fix (code change already identified)
3. Test in staging (smoke tests, regression tests)
4. Deploy to production using standard flow
5. Monitor for 15 minutes (metrics validation)
Get Deployment Manager approval before production deploy.
Document hotfix deployment:
- Hotfix commit SHA
- Deployment timestamp
- Validation results
Append to: .aiwg/incidents/{incident-id}/mitigation-report.md (Execution section)
Append timeline: Hotfix deploye
…(truncated)
1---2namespace: aiwg3name: flow-incident-response4platforms: [all]5description: Orchestrate production incident triage, escalation, resolution, and post-incident review using ITIL best practices6commandHint:7 argumentHint: <incident-id> [severity] [project-directory] [--guidance "text"] [--interactive]8 allowedTools: Task, Read, Write, Glob, TodoWrite9 model: opus10 category: sdlc-orchestration11 orchestration: true12 modelRole: reasoning13 modelTier: premium14 modelRationale: Incident orchestration must preserve containment and evidence integrity.15---1617> **Declarative Flow (#1539):** This flow's orchestration is now also expressed as a18> declarative YAML Flow at `flows/flow-incident-response.playbook.yaml` (source of truth for the step19> sequence + gates). This SKILL.md remains the discoverable trigger surface and prose20> reference. See epic #1534.2122# Incident Response Flow2324**You are the Core Orchestrator** for production incident management and resolution.2526## Your Role2728**You orchestrate multi-agent workflows. You do NOT execute bash scripts.**2930When the user requests this flow (via natural language or explicit command):31321. **Interpret the request** and confirm understanding332. **Read this template** as your orchestration guide343. **Extract agent assignments** and workflow steps354. **Delegate agents with the current provider-native orchestration mechanism** in the correct sequence365. **Synthesize results** and finalize artifacts376. **Report completion** with summary3839## Incident Response Overview4041**Purpose**: Rapid detection, triage, escalation, resolution, and learning from production incidents4243**Key Objectives**:44- Minimize user impact through rapid response45- Follow ITIL tier escalation (Tier 1 → Tier 2 → Tier 3)46- Conduct blameless post-incident reviews47- Drive continuous improvement through preventive actions4849**Expected Duration**: P0 = 1-2h resolution, P1 = 4h, P2 = 24h (orchestration: 5-10 minutes)5051## Natural Language Triggers5253Users may say:54- "Handle incident"55- "Production issue detected"56- "Incident response"57- "P0 incident"58- "Service down"59- "System outage"60- "Critical production issue"61- "Emergency response"6263You recognize these as requests for this orchestration flow.6465## Parameter Handling6667### --guidance Parameter6869**Purpose**: User provides upfront direction to tailor incident response priorities7071**Examples**:72```73--guidance "Security incident suspected, preserve forensics before mitigation"74--guidance "Performance degradation, focus on database query optimization"75--guidance "Payment processing down, revenue impact critical"76--guidance "Tight SLA window, prioritize fast rollback over investigation"77--guidance "First P0 for new team, need extra documentation and communication"78```7980**How to Apply**:81- Parse guidance for keywords: security, performance, compliance, revenue, data-loss82- Adjust agent assignments (add security-gatekeeper for security incidents)83- Modify escalation paths (immediate executive notification for revenue impact)84- Influence mitigation strategy (rollback vs hotfix vs investigation)85- Prioritize documentation depth (standard vs comprehensive for learning)8687### --interactive Parameter8889**Purpose**: You ask 5-8 strategic questions to understand incident context9091**Questions to Ask** (if --interactive):9293```94I'll ask 8 strategic questions to tailor incident response to your situation:9596Q1: What is the observed user impact?97 (e.g., complete outage, degraded performance, specific feature unavailable)9899Q2: What percentage of users are affected?100 (Helps me assign initial severity: P0 = >50%, P1 = 10-50%, P2 = <10%)101102Q3: When did the issue start?103 (Timeline helps identify triggering events: deployments, traffic spikes)104105Q4: What recent changes occurred in the last 24 hours?106 (Deployments, config changes, infrastructure updates - guides rollback decisions)107108Q5: Is this security-related or involving data loss?109 (Immediate escalation to security team, forensics preservation)110111Q6: What is the business impact?112 (Revenue loss, compliance risk, reputation damage - affects escalation urgency)113114Q7: What is your on-call team's experience level?115 (Helps me tailor runbook detail and escalation speed)116117Q8: What is your current SLA status?118 (Error budget remaining, time to SLA breach - affects mitigation strategy)119120Based on your answers, I'll adjust:121- Severity classification (P0/P1/P2/P3)122- Escalation urgency (functional and hierarchical)123- Mitigation strategy priority (rollback vs investigation)124- Communication frequency (every 15 min vs hourly)125- Documentation depth (standard vs comprehensive PIR)126```127128**Synthesize Guidance**: Combine answers into structured guidance string for execution129130## Artifacts to Generate131132**Primary Deliverables**:133- **Incident Record**: Initial detection and classification → `.aiwg/incidents/{incident-id}/incident-record.md`134- **Incident Timeline**: Chronological event log → `.aiwg/incidents/{incident-id}/timeline.md`135- **Triage Assessment**: Impact and urgency analysis → `.aiwg/incidents/{incident-id}/triage-assessment.md`136- **Regression Analysis**: Regression triage results → `.aiwg/incidents/{incident-id}/regression-analysis.md`137- **Root Cause Analysis**: 5 Whys and fishbone → `.aiwg/incidents/{incident-id}/root-cause-analysis.md`138- **Mitigation Report**: Resolution strategy and validation → `.aiwg/incidents/{incident-id}/mitigation-report.md`139- **Post-Incident Review (PIR)**: Blameless retrospective → `.aiwg/incidents/{incident-id}/post-incident-review.md`140- **Preventive Actions**: Tracked action items → `.aiwg/incidents/{incident-id}/preventive-actions.md`141142**Supporting Artifacts**:143- Escalation logs (who, when, why)144- Communication templates (status page updates)145- Runbook updates (new troubleshooting steps)146- Knowledge base articles (lessons learned)147148## Multi-Agent Orchestration Workflow149150### Step 1: Incident Detection and Initial Logging151152**Purpose**: Capture incident details immediately to enable rapid response153154**Your Actions**:1551561. **Create Incident Directory**:157 ```158 # You do this directly (no agent needed)159 mkdir -p .aiwg/incidents/{incident-id}/{logs,diagnostics,communications,actions}160 ```1611622. **Launch Detection and Logging Agent**:163 ```164 Task(165 subagent_type="incident-responder",166 description="Create incident record and initial classification",167 prompt="""168 Incident ID: {incident-id}169 Reported symptoms: {user-provided description}170171 Create Incident Record:172173 **Incident ID**: {incident-id}174 **Detection Time**: {YYYY-MM-DD HH:MM:SS UTC}175 **Reporter**: {user/system/alert}176 **Detection Method**: {automated-alert | user-report | monitoring | manual}177178 ## Initial Description179 {1-2 sentence summary of reported issue}180181 **User Impact**: {description of user-facing symptoms}182 **Affected Systems**: {list systems/components based on description}183 **Affected User Count**: {estimated count | UNKNOWN}184185 ## Initial Classification186 **Severity**: {P0 | P1 | P2 | P3 | TBD}187 **Category**: {availability | performance | functionality | security | data-integrity}188189 ## Assigned Team190 **Incident Commander**: {TBD - to be assigned based on severity}191 **On-Call Engineer**: {TBD - from on-call rotation}192 **Status**: DETECTED193194 Save to: .aiwg/incidents/{incident-id}/incident-record.md195196 Also create initial timeline entry:197 | Time | Event | Actor | Notes |198 |------|-------|-------|-------|199 | {HH:MM UTC} | Incident detected | {reporter} | {initial symptoms} |200201 Save to: .aiwg/incidents/{incident-id}/timeline.md202 """203 )204 ```2052063. **Create Incident Communication Channel**:207 ```208 Task(209 subagent_type="incident-responder",210 description="Create incident alert and communication template",211 prompt="""212 Generate initial incident alert template:213214 ## Incident Alert: {incident-id}215216 **Status**: DETECTED217 **Severity**: {P0/P1/P2/P3}218 **Time**: {HH:MM UTC}219220 **Issue**: {brief description}221 **User Impact**: {high-level impact}222223 **Assigned**: {on-call engineer}224 **Next Update**: {estimated time}225226 **Incident Channel**: #incident-{YYYY-MM-DD}-{ID}227 **Incident Dashboard**: {link to monitoring dashboard}228229 Save to: .aiwg/incidents/{incident-id}/communications/initial-alert.md230 """231 )232 ```233234**Communicate Progress**:235```236✓ Incident {incident-id} logged237✓ Initial record created238⏳ Proceeding to regression triage...239```240241### Step 1.5: Regression Triage242243**Purpose**: Determine if incident is a regression from recent changes to guide rollback decisions244245**Your Actions**:2462471. **Launch Regression Detection Agent**:248 ```249 Task(250 subagent_type="regression-analyst",251 description="Determine if incident is a regression from recent changes",252 prompt="""253 Read incident record: .aiwg/incidents/{incident-id}/incident-record.md254255 Execute Regression Triage:256257 ## Step 1: Identify Recent Deployments258259 Check for recent deployments/changes:260 - Use command: /regression-check --baseline last-deployment261 - Review git log for last 24-48 hours262 - Check deployment history from CI/CD263 - Review configuration changes264 - Check infrastructure updates265266 Document all recent changes with timestamps.267268 ## Step 2: Symptom Correlation269270 Compare incident symptoms against baseline:271272 **Symptom Pattern Matching**:273 - Did this functionality work before? {YES | NO | UNKNOWN}274 - When did it last work? {timestamp | UNKNOWN}275 - What changed between working and broken? {specific change | UNKNOWN}276277 **Regression Indicators** (Check all that apply):278 - [ ] Functionality worked in previous version279 - [ ] Issue appeared immediately after deployment280 - [ ] Issue correlates with specific commit/PR281 - [ ] Similar pattern in staging/canary deployment282 - [ ] Metrics show clear inflection point at deployment time283284 ## Step 3: Regression Verdict285286 **Is this a regression?**: {CONFIRMED | LIKELY | POSSIBLE | UNLIKELY | NOT_REGRESSION}287288 **Confidence**: {HIGH (>90%) | MEDIUM (70-90%) | LOW (<70%)}289290 **Evidence**:291 1. {evidence point 1}292 2. {evidence point 2}293 3. {evidence point 3}294295 Save initial assessment to: .aiwg/incidents/{incident-id}/regression-analysis.md (Step 1-3)296297 Append timeline:298 | {HH:MM UTC} | Regression triage initiated | regression-analyst | Verdict: {CONFIRMED|LIKELY|POSSIBLE|UNLIKELY|NOT_REGRESSION} |299 """300 )301 ```3023032. **If Regression Confirmed/Likely, Launch Regression Bisect**:304 ```305 # Only if regression verdict is CONFIRMED or LIKELY306 Task(307 subagent_type="regression-analyst",308 description="Identify introducing change via bisect",309 prompt="""310 Read regression analysis: .aiwg/incidents/{incident-id}/regression-analysis.md311312 Since regression is {CONFIRMED|LIKELY}, identify introducing change:313314 ## Step 4: Bisect to Find Introducing Commit315316 Use command: /regression-bisect317318 Execute bisect process:319 - Start: {last-known-good-commit}320 - End: {current-broken-commit}321 - Test: {reproduction steps or test case}322323 Document bisect process and result:324325 **Bisect Results**:326 - **Introducing Commit**: {SHA}327 - **Author**: {name}328 - **Timestamp**: {YYYY-MM-DD HH:MM:SS}329 - **PR/MR**: {PR-number} - {PR-title}330 - **Commit Message**: {message}331 - **Files Changed**: {count} files332 - **Risk Assessment**: {LOW | MEDIUM | HIGH based on scope}333334 **Commit Details**:335 ```336 {git show {SHA} --stat output}337 ```338339 **Related Changes**:340 - [ ] Code changes in affected component341 - [ ] Configuration changes342 - [ ] Database migrations343 - [ ] Dependency updates344 - [ ] Infrastructure changes345346 Append to: .aiwg/incidents/{incident-id}/regression-analysis.md (Step 4)347348 Append timeline:349 | {HH:MM UTC} | Introducing commit identified | regression-analyst | Commit: {SHA}, PR: {PR-number} |350 """351 )352 ```3533543. **Rollback Feasibility Assessment**:355 ```356 Task(357 subagent_type="reliability-engineer",358 description="Assess rollback feasibility and calculate blast radius",359 prompt="""360 Read regression analysis: .aiwg/incidents/{incident-id}/regression-analysis.md361362 Since introducing change identified, assess rollback options:363364 ## Step 5: Rollback Feasibility365366 **Rollback Options**:367368 ### Option A: Full Rollback to Previous Version369 - **Target Version**: {version before introducing commit}370 - **Feasibility**: {SAFE | RISKY | BLOCKED}371 - **Risk Factors**:372 - [ ] Database migrations in between (incompatible schema)373 - [ ] External API contract changes (breaking)374 - [ ] Data written in new format (can't be read by old version)375 - [ ] Dependent services already updated (coordination required)376 - **Rollback Time**: {estimated minutes}377 - **Data Loss Risk**: {NONE | MINIMAL | SIGNIFICANT}378379 ### Option B: Revert Specific Commit(s)380 - **Commits to Revert**: {SHA1, SHA2, ...}381 - **Feasibility**: {SAFE | RISKY | BLOCKED}382 - **Conflicts**: {count} potential merge conflicts383 - **Testing Required**: {minimal | moderate | extensive}384 - **Revert + Deploy Time**: {estimated minutes}385386 ### Option C: Feature Flag Disable387 - **Applicable**: {YES | NO}388 - **Feature Flags Involved**: {flag-names}389 - **Disable Time**: {estimated minutes} (near-instant)390 - **Partial Rollback**: {which features disabled}391392 ### Option D: Hotfix Forward393 - **Feasibility**: {VIABLE | NOT_VIABLE}394 - **Fix Complexity**: {SIMPLE | MODERATE | COMPLEX}395 - **Estimated Fix Time**: {minutes}396 - **Testing Time**: {minutes}397 - **Total Time**: {minutes}398399 **Recommended Option**: {A | B | C | D}400 **Rationale**: {why this option is best given constraints}401402 ## Step 6: Blast Radius Calculation403404 **Scope of Introducing Change**:405 - **Components Affected**: {list all components touched by change}406 - **Services Impacted**: {list all services}407 - **Dependencies**: {downstream systems affected}408 - **Users Impacted**: {estimated count or percentage}409 - **Geographic Scope**: {all regions | specific regions}410 - **User Segments**: {all users | specific segments}411412 **Rollback Impact Assessment**:413 - **Services Affected by Rollback**: {list}414 - **Data Loss Risk**: {NONE | MINIMAL | ACCEPTABLE | UNACCEPTABLE}415 - **Downtime Required**: {NONE | <5 min | 5-15 min | >15 min}416 - **Coordination Required**: {list teams/services needing notification}417418 **Blast Radius Score**: {LOW | MEDIUM | HIGH}419420 Append to: .aiwg/incidents/{incident-id}/regression-analysis.md (Steps 5-6)421422 Append timeline:423 | {HH:MM UTC} | Rollback feasibility assessed | reliability-engineer | Recommended: {option}, Blast radius: {score} |424 """425 )426 ```4274284. **Immediate Action Recommendation**:429 ```430 Task(431 subagent_type="regression-analyst",432 description="Recommend immediate action based on regression analysis",433 prompt="""434 Read complete regression analysis: .aiwg/incidents/{incident-id}/regression-analysis.md435436 ## Step 7: Immediate Action Decision Matrix437438 Use decision matrix to recommend action:439440 | Regression Confidence | Rollback Risk | User Impact | Recommendation |441 |-----------------------|---------------|-------------|----------------|442 | CONFIRMED + HIGH | LOW | HIGH | **ROLLBACK IMMEDIATELY** |443 | CONFIRMED + HIGH | LOW | MEDIUM | **ROLLBACK** |444 | CONFIRMED + HIGH | MEDIUM | HIGH | **ROLLBACK with validation** |445 | CONFIRMED + HIGH | HIGH | HIGH | **HOTFIX (rollback blocked)** |446 | LIKELY + MEDIUM | LOW | HIGH | **ROLLBACK after quick validation** |447 | LIKELY + MEDIUM | MEDIUM | HIGH | **INVESTIGATE + prepare rollback** |448 | POSSIBLE + LOW | ANY | HIGH | **INVESTIGATE (parallel to Tier 1)** |449 | UNLIKELY | ANY | ANY | **STANDARD TRIAGE (continue to Step 2)** |450451 **Current Situation**:452 - Regression Confidence: {from Step 3}453 - Rollback Risk: {from Step 5}454 - User Impact: {from incident record}455456 **Recommended Immediate Action**: {action from matrix}457458 **Action Details**:459 - **Action Type**: {ROLLBACK | HOTFIX | INVESTIGATE | STANDARD_TRIAGE}460 - **Urgency**: {IMMEDIATE (<5 min) | URGENT (<15 min) | NORMAL (standard SLA)}461 - **Prerequisites**: {any validation or approval needed}462 - **Execution Steps**: {high-level steps}463 - **Fallback Plan**: {if this action fails}464465 **Communication**:466 - Notify Incident Commander: {key finding summary}467 - Notify Deployment Manager: {rollback decision if applicable}468 - Update status: "Regression {CONFIRMED|LIKELY|POSSIBLE}, {action} in progress"469470 Append to: .aiwg/incidents/{incident-id}/regression-analysis.md (Step 7)471472 Append timeline:473 | {HH:MM UTC} | Immediate action recommended | regression-analyst | Action: {ROLLBACK|HOTFIX|INVESTIGATE|STANDARD_TRIAGE} |474 """475 )476 ```4774785. **Update Regression Register**:479 ```480 Task(481 subagent_type="regression-analyst",482 description="Record regression in regression register",483 prompt="""484 If regression is CONFIRMED or LIKELY, update regression register:485486 Read regression analysis: .aiwg/incidents/{incident-id}/regression-analysis.md487488 Update regression register with incident:489490 **Regression Entry**:491 ```yaml492 regression_id: REG-{YYYY-MM-DD}-{sequence}493 incident_id: {incident-id}494 detection_date: {YYYY-MM-DD}495 severity: {P0|P1|P2|P3}496497 introducing_change:498 commit_sha: {SHA}499 pr_number: {PR-number}500 author: {name}501 merge_date: {YYYY-MM-DD}502 deployment_date: {YYYY-MM-DD}503504 regression_category: {functional | performance | security | data-integrity}505506 affected_functionality:507 component: {component-name}508 feature: {feature-name}509 user_facing: {YES|NO}510511 detection_gap:512 escaped_testing: {unit | integration | e2e | manual | staging}513 detection_time: {hours from deployment to detection}514 reason: {why tests didn't catch this}515516 mitigation_action: {rollback | hotfix | feature-flag-disable}517 mitigation_time: {minutes from detection to resolution}518519 preventive_actions:520 - {action 1 to prevent recurrence}521 - {action 2 to improve detection}522523 status: {OPEN | MITIGATED | ANALYZED | CLOSED}524 ```525526 Save to: .aiwg/regression/register/{regression-id}.yaml527528 Also update regression summary:529 Append one-line entry to: .aiwg/regression/regression-register-summary.md530531 | {regression-id} | {incident-id} | {YYYY-MM-DD} | {P0|P1|P2} | {commit-SHA} | {category} | {status} |532533 Cross-reference in incident:534 Append to: .aiwg/incidents/{incident-id}/regression-analysis.md535536 ## Regression Register Entry537538 This incident has been registered as: **{regression-id}**539540 See: @.aiwg/regression/register/{regression-id}.yaml541542 Append timeline:543 | {HH:MM UTC} | Regression registered | regression-analyst | Registered as: {regression-id} |544 """545 )546 ```547548**Decision Flow**:549```550Regression Triage Decision Tree:5515521. Is this a regression?553 ├─ CONFIRMED/LIKELY → Proceed to rollback assessment554 │ ├─ Rollback SAFE + HIGH user impact → Execute rollback immediately555 │ ├─ Rollback RISKY or BLOCKED → Proceed to hotfix path556 │ └─ Rollback SAFE + LOW user impact → Prepare rollback, investigate in parallel557 │558 ├─ POSSIBLE → Continue standard triage in parallel with regression investigation559 │560 └─ UNLIKELY/NOT_REGRESSION → Continue to standard triage (Step 2)561```562563**Communicate Progress**:564```565✓ Incident logged566⏳ Regression triage in progress...567 ✓ Recent deployments identified: {count} in last {hours}h568 ✓ Regression verdict: {CONFIRMED|LIKELY|POSSIBLE|UNLIKELY|NOT_REGRESSION}569 {✓ Introducing commit identified: {SHA}, PR: {PR-number}}570 {✓ Rollback feasibility: {SAFE|RISKY|BLOCKED}}571 ✓ Recommended action: {ROLLBACK|HOTFIX|INVESTIGATE|STANDARD_TRIAGE}572 {✓ Regression registered: {regression-id}}573⏳ {Executing immediate rollback | Proceeding to hotfix development | Continuing to standard triage}...574```575576### Step 2: Triage and Severity Assessment577578**Purpose**: Rapidly assess severity and assign priority using Impact × Urgency matrix579580**Your Actions**:5815821. **Launch Triage Agents** (parallel):583 ```584 # Agent 1: Impact Assessment585 Task(586 subagent_type="incident-responder",587 description="Assess incident impact (user effect)",588 prompt="""589 Read incident record: .aiwg/incidents/{incident-id}/incident-record.md590591 Assess Impact Level:592593 **User Impact Assessment**:594 - Affected Users: {count or percentage}595 - Severity of Effect: {complete outage | severe degradation | minor issue}596 - Impact Level: {HIGH | MEDIUM | LOW}597598 Criteria:599 - HIGH: Complete service outage OR >50% users affected OR data loss/corruption600 - MEDIUM: Severe degradation OR 10-50% users affected OR critical feature unavailable601 - LOW: Minor degradation OR <10% users affected OR cosmetic issue602603 **Business Impact**:604 - Revenue Impact: {$amount | NONE}605 - Compliance Risk: {YES | NO}606 - Reputation Risk: {HIGH | MEDIUM | LOW}607 - User Safety Risk: {YES | NO}608609 **Affected Systems**: {list all affected components, services, integrations}610611 Save to: .aiwg/incidents/{incident-id}/triage-assessment.md (Impact section)612 """613 )614615 # Agent 2: Urgency Assessment616 Task(617 subagent_type="reliability-engineer",618 description="Assess incident urgency (time sensitivity)",619 prompt="""620 Read incident record: .aiwg/incidents/{incident-id}/incident-record.md621622 Assess Urgency Level:623624 **Urgency Assessment**:625 - Time Sensitivity: {immediate | hours | days}626 - Worsening Trend: {rapidly degrading | stable | improving}627 - Urgency Level: {HIGH | MEDIUM | LOW}628629 Criteria:630 - HIGH: Immediate resolution required, worsening rapidly, SLA breach imminent631 - MEDIUM: Resolution needed within hours, stable degradation632 - LOW: Resolution can be scheduled, no time pressure633634 **SLA Breach Risk**:635 - Current Availability: {percentage}%636 - SLA Target: {percentage}%637 - Error Budget Remaining: {percentage}%638 - Time to SLA Breach: {estimated time}639640 Append to: .aiwg/incidents/{incident-id}/triage-assessment.md (Urgency section)641 """642 )643 ```6446452. **Synthesize Priority Classification**:646 ```647 Task(648 subagent_type="incident-responder",649 description="Determine incident priority from Impact × Urgency",650 prompt="""651 Read triage assessment: .aiwg/incidents/{incident-id}/triage-assessment.md652653 Determine Priority using matrix:654655 | Impact/Urgency | High Urgency | Medium Urgency | Low Urgency |656 |----------------|--------------|----------------|-------------|657 | High Impact | P0 (Critical) | P1 (High) | P2 (Medium) |658 | Medium Impact | P1 (High) | P2 (Medium) | P3 (Low) |659 | Low Impact | P2 (Medium) | P3 (Low) | P3 (Low) |660661 **Priority**: {P0 | P1 | P2 | P3}662663 **Response SLA**:664 - P0: Acknowledgment immediate, Engage 15 min, Resolve 1-2h, Updates every 15 min665 - P1: Acknowledgment 5 min, Engage 30 min, Resolve 4h, Updates every 30 min666 - P2: Acknowledgment 30 min, Engage 4h, Resolve 24h, Updates daily667 - P3: Acknowledgment 1 business day, Standard backlog process668669 **Escalation Path**:670 - P0: Page on-call → Incident Commander → Deployment Manager → Executive (30 min)671 - P1: Alert on-call → Incident Commander → Component Owner → Management (2h)672 - P2: Create ticket → On-call triage → Component Owner if needed673 - P3: Standard backlog674675 **Incident Commander Assignment** (P0/P1 only):676 - Assign Incident Commander: {name or role}677 - Assign Technical Lead: {on-call engineer or component owner}678 - Assign Communications Lead: {support lead or PM}679680 Update incident record with priority and assignments681 Save to: .aiwg/incidents/{incident-id}/incident-record.md682683 Append timeline:684 | {HH:MM UTC} | Triage complete, severity {P0/P1/P2/P3} assigned | incident-responder | Impact: {HIGH/MED/LOW}, Urgency: {HIGH/MED/LOW} |685 | {HH:MM UTC} | Incident Commander assigned | {name} | {P0/P1 only} |686687 Append to: .aiwg/incidents/{incident-id}/timeline.md688 """689 )690 ```691692**Communicate Progress**:693```694✓ Incident detected695⏳ Assessing impact and urgency...696 ✓ Impact: {HIGH/MEDIUM/LOW}697 ✓ Urgency: {HIGH/MEDIUM/LOW}698✓ Priority assigned: {P0/P1/P2/P3}699✓ Incident Commander assigned: {name} (P0/P1)700⏳ Initiating functional escalation (Tier 1)...701```702703### Step 3: Functional Escalation (Tier 1 → Tier 2 → Tier 3)704705**Purpose**: Engage appropriate expertise based on incident complexity706707**Your Actions**:7087091. **Tier 1 Response (First 15-30 minutes)**:710 ```711 Task(712 subagent_type="reliability-engineer",713 description="Tier 1 response: Runbook execution and data gathering",714 prompt="""715 Read incident record: .aiwg/incidents/{incident-id}/incident-record.md716717 Execute Tier 1 Response:718719 ## Initial Actions (First 5 minutes)720 - [ ] Acknowledge incident721 - [ ] Confirm user impact (reproduce if possible)722 - [ ] Check recent deployments/changes (last 24h)723 - [ ] Review monitoring dashboards for anomalies724 - [ ] Identify applicable runbook: deployment/runbook-{scenario}.md725726 ## Data Gathering727 Collect diagnostic data:728 - System health (pods, nodes, services status)729 - Recent deployments (git log, rollout history)730 - Logs (last 500 lines from affected services)731 - Metrics (error rate, latency, throughput)732 - Database health (active connections, slow queries)733734 Document actions taken and results.735736 ## Escalation Decision (Tier 1 → Tier 2)737 Escalate if:738 - Runbook not available OR issue unresolved after {15 min P0 | 30 min P1}739 - Requires deep component knowledge or code changes740 - Database, network, or infrastructure issue suspected741742 If escalation needed, document:743 - Why escalating (specific reason)744 - Data collected (attach logs, metrics)745 - Hypotheses tested (what was tried)746747 Save diagnostic data to: .aiwg/incidents/{incident-id}/diagnostics/tier1-data.md748749 Append timeline with all actions taken.750 """751 )752 ```7537542. **Tier 2 Response (If escalated)**:755 ```756 Task(757 subagent_type="component-owner",758 description="Tier 2 response: Advanced troubleshooting and code review",759 prompt="""760 Read incident record: .aiwg/incidents/{incident-id}/incident-record.md761 Read Tier 1 data: .aiwg/incidents/{incident-id}/diagnostics/tier1-data.md762763 Execute Tier 2 Response:764765 ## Handoff from Tier 1766 - Review incident summary and diagnostic data767 - Review actions already taken by Tier 1768 - Review relevant runbooks and recent changes769770 ## Advanced Troubleshooting771 - Deep log analysis (error patterns, stack traces)772 - Code review for recent changes (git diff last 48h)773 - Reproduce issue in non-prod environment (if possible)774 - Check component dependencies (upstream/downstream services)775 - Analyze performance profiles (CPU, memory, query execution plans)776777 ## Root Cause Hypothesis778 Formulate hypothesis:779780 **Hypothesis**: {statement of suspected root cause}781782 **Evidence**:783 1. {log pattern or metric anomaly}784 2. {recent deployment or config change}785 3. {external dependency status}786787 **Test Plan**:788 - [ ] {validation step 1}789 - [ ] {validation step 2}790791 ## Escalation Decision (Tier 2 → Tier 3)792 Escalate if:793 - Architectural issue or design flaw suspected794 - Vendor/third-party dependency issue795 - Unresolved after {30 min P0 | 1 hour P1}796 - Emergency code fix required (hotfix approval needed)797798 Save hypothesis and findings to: .aiwg/incidents/{incident-id}/diagnostics/tier2-analysis.md799800 Append timeline with advanced troubleshooting results.801 """802 )803 ```8048053. **Tier 3 Response (If escalated)**:806 ```807 Task(808 subagent_type="architecture-designer",809 description="Tier 3 response: Architectural analysis and emergency decisions",810 prompt="""811 Read all prior diagnostics:812 - .aiwg/incidents/{incident-id}/diagnostics/tier1-data.md813 - .aiwg/incidents/{incident-id}/diagnostics/tier2-analysis.md814815 Execute Tier 3 Response:816817 ## Architectural Analysis818 - Review system design for fundamental issues819 - Evaluate scalability/capacity constraints820 - Consider architectural trade-offs (CAP theorem, consistency models)821 - Engage vendor support if third-party dependency issue822823 ## Emergency Decision Authority824 Provide decisions on:825 - Emergency architecture changes (approve/reject)826 - Vendor escalation (initiate if needed)827 - Hotfix deployment outside normal process (approve with conditions)828 - Temporary workaround vs. full fix (recommend approach)829830 Document architectural assessment and decisions:831 Save to: .aiwg/incidents/{incident-id}/diagnostics/tier3-architecture-assessment.md832833 Append timeline with architectural decisions.834 """835 )836 ```837838**Communicate Progress**:839```840✓ Priority assigned: {P0/P1/P2/P3}841⏳ Tier 1 response initiated...842 ✓ Runbook executed: {runbook-name}843 ✓ Diagnostic data collected844 ⚠️ Escalating to Tier 2 (reason: {escalation-reason})845⏳ Tier 2 response: Component Owner engaged...846 ✓ Root cause hypothesis: {hypothesis}847 {✓ Hypothesis confirmed | ⚠️ Escalating to Tier 3}848```849850### Step 4: Hierarchical Escalation (Management / Executive)851852**Purpose**: Notify leadership when business impact warrants executive involvement853854**Your Actions**:8558561. **Management Notification (P0/P1)**:857 ```858 Task(859 subagent_type="project-manager",860 description="Notify management per escalation matrix",861 prompt="""862 Read incident record: .aiwg/incidents/{incident-id}/incident-record.md863864 Determine if management notification required:865866 **Trigger**:867 - P0: Within 30 minutes of detection (automatic)868 - P1: Within 2 hours if unresolved869 - P2: If user impact escalates or SLA breach imminent870871 Generate management notification:872873 Subject: [{P0 | P1} INCIDENT] {brief-title} - {status}874875 **Incident ID**: {incident-id}876 **Severity**: {P0/P1}877 **Start Time**: {HH:MM UTC}878 **Duration**: {elapsed-time}879880 **User Impact**: {high-level description}881 **Affected Users**: {count | percentage}882 **Business Impact**: {revenue loss | compliance risk | reputation impact}883884 **Current Status**: {INVESTIGATING | MITIGATING | RESOLVED}885 **Root Cause**: {hypothesis or confirmed}886 **ETA to Resolution**: {estimated time | UNKNOWN}887888 **Incident Commander**: {name}889 **Next Update**: {time}890891 Save to: .aiwg/incidents/{incident-id}/communications/management-notification.md892893 Append timeline: Management notified894 """895 )896 ```8978982. **Executive Escalation (P0 Critical)**:899 ```900 Task(901 subagent_type="project-manager",902 description="Notify executive leadership for P0 or major business impact",903 prompt="""904 Read incident record: .aiwg/incidents/{incident-id}/incident-record.md905906 Determine if executive notification required:907908 **Trigger**:909 - P0: If unresolved after 2 hours OR major business impact910 - Security breach or data loss (immediate)911 - Public/media attention likely912 - Regulatory reporting required913914 Generate executive notification:915916 Subject: [EXECUTIVE ALERT] P0 Incident - {brief-title}917918 **Business Impact Summary**:919 - Revenue Impact: {$amount estimated}920 - User Impact: {count} users / {percentage}% of user base921 - Compliance Risk: {YES/NO - describe}922 - Reputation Risk: {HIGH/MEDIUM/LOW}923924 **Incident Summary**:925 {2-3 sentence summary of issue and response}926927 **Current Status**: {status}928 **ETA to Resolution**: {time}929 **Incident Commander**: {name}930931 **Executive Action Needed**:932 {NONE | DECISION REQUIRED | AWARENESS ONLY}933934 **Next Update**: {time}935936 Save to: .aiwg/incidents/{incident-id}/communications/executive-notification.md937938 Append timeline: Executive leadership notified939 """940 )941 ```9429433. **Status Page Communication (P0/P1)**:944 ```945 Task(946 subagent_type="incident-responder",947 description="Generate status page update template",948 prompt="""949 Create public-facing status page update:950951 {YYYY-MM-DD HH:MM UTC} - Investigating952 We are currently investigating an issue affecting {service/feature}.953 Users may experience {specific symptoms}. We will provide updates every {15|30|60} minutes.954955 Save template to: .aiwg/incidents/{incident-id}/communications/status-page-update.md956957 Note: Update within 30 minutes for P0, 1 hour for P1958 """959 )960 ```961962**Communicate Progress**:963```964✓ Tier 2 analysis complete965⏳ Escalating per severity matrix...966 ✓ Management notified (P0/P1)967 {✓ Executive notified (P0 >2h or critical business impact) | ⊘ Executive notification not required}968 ✓ Status page update template created969⏳ Proceeding to root cause analysis and mitigation...970```971972### Step 5: Root Cause Analysis973974**Purpose**: Identify root cause using structured methodologies (5 Whys, Fishbone)975976**Your Actions**:9779781. **Launch RCA Agents** (parallel):979 ```980 # Agent 1: 5 Whys Analysis981 Task(982 subagent_type="incident-responder",983 description="Conduct 5 Whys root cause analysis",984 prompt="""985 Read diagnostics:986 - .aiwg/incidents/{incident-id}/diagnostics/tier1-data.md987 - .aiwg/incidents/{incident-id}/diagnostics/tier2-analysis.md988 - .aiwg/incidents/{incident-id}/diagnostics/tier3-architecture-assessment.md (if exists)989990 Conduct 5 Whys Analysis:991992 **Problem Statement**: {what happened}993994 1. **Why did {problem} occur?**995 - Because {reason-1}996997 2. **Why did {reason-1} occur?**998 - Because {reason-2}9991000 3. **Why did {reason-2} occur?**1001 - Because {reason-3}10021003 4. **Why did {reason-3} occur?**1004 - Because {reason-4}10051006 5. **Why did {reason-4} occur?**1007 - Because {root-cause}10081009 **Root Cause**: {final answer from 5th why}10101011 **Validation**: {test to confirm root cause}10121013 Save to: .aiwg/incidents/{incident-id}/root-cause-analysis.md (5 Whys section)1014 """1015 )10161017 # Agent 2: Contributing Factors (Fishbone)1018 Task(1019 subagent_type="reliability-engineer",1020 description="Identify contributing factors using Ishikawa diagram",1021 prompt="""1022 Read diagnostics and 5 Whys analysis10231024 Analyze Contributing Factors:10251026 **Problem**: {incident title}10271028 ### People1029 - {factor 1: e.g., insufficient training}1030 - {factor 2: e.g., on-call fatigue}10311032 ### Process1033 - {factor 1: e.g., inadequate testing}1034 - {factor 2: e.g., unclear runbook}10351036 ### Technology1037 - {factor 1: e.g., database connection pool exhaustion}1038 - {factor 2: e.g., monitoring gap}10391040 ### Environment1041 - {factor 1: e.g., traffic spike}1042 - {factor 2: e.g., resource constraints}10431044 **Primary Root Cause**: {from 5 Whys}1045 **Contributing Factors**: {list key factors from above}10461047 Append to: .aiwg/incidents/{incident-id}/root-cause-analysis.md (Contributing Factors section)1048 """1049 )1050 ```10511052**Communicate Progress**:1053```1054✓ Hierarchical escalation complete1055⏳ Conducting root cause analysis...1056 ✓ 5 Whys analysis: Root cause identified as {root-cause}1057 ✓ Contributing factors analysis: {count} factors identified1058✓ Root cause analysis complete: .aiwg/incidents/{incident-id}/root-cause-analysis.md1059⏳ Implementing mitigation strategy...1060```10611062### Step 6: Mitigation and Resolution10631064**Purpose**: Implement workaround or fix to restore service and eliminate user impact10651066**Your Actions**:106710681. **Select Mitigation Strategy**:1069 ```1070 Task(1071 subagent_type="incident-responder",1072 description="Select mitigation strategy based on root cause",1073 prompt="""1074 Read root cause analysis: .aiwg/incidents/{incident-id}/root-cause-analysis.md10751076 Evaluate Mitigation Options:10771078 **Option 1: Rollback** (fastest, safest for deployment-related incidents)1079 - Use Case: Recent deployment caused issue, old version was stable1080 - Time to Mitigate: 5-15 minutes1081 - Risk: Low (return to known-good state)10821083 **Option 2: Hotfix** (targeted code fix)1084 - Use Case: Bug fix required, rollback not viable1085 - Time to Mitigate: 30 minutes - 2 hours1086 - Risk: Medium (new code, limited testing)10871088 **Option 3: Configuration Change** (parameter adjustment)1089 - Use Case: Resource limits, timeouts, feature flags1090 - Time to Mitigate: 10-30 minutes1091 - Risk: Low-Medium (no code change)10921093 **Option 4: Workaround** (temporary user-side solution)1094 - Use Case: Fix requires significant time, need immediate relief1095 - Time to Mitigate: Immediate (communication)1096 - Risk: Low (no system change)10971098 **Option 5: Infrastructure Scaling** (resource addition)1099 - Use Case: Capacity issue, traffic spike1100 - Time to Mitigate: 10-20 minutes1101 - Risk: Low-Medium (cost implications)11021103 **Selected Strategy**: {option}1104 **Rationale**: {why this option was chosen}1105 **Implementation Plan**: {specific steps}1106 **Rollback Plan**: {if mitigation fails, how to revert}11071108 Save to: .aiwg/incidents/{incident-id}/mitigation-report.md (Strategy section)1109 """1110 )1111 ```111211132. **Execute Mitigation** (agent depends on strategy):1114 ```1115 # If Rollback1116 Task(1117 subagent_type="devops-engineer",1118 description="Execute rollback procedure",1119 prompt="""1120 Execute rollback based on deployment strategy:11211122 Use existing deployment command:1123 /flow-deploy-to-production --rollback11241125 Document rollback execution:1126 - Rollback timestamp1127 - Previous version: {old-version}1128 - Rolled back to: {stable-version}1129 - Verification: smoke tests, metrics11301131 Append to: .aiwg/incidents/{incident-id}/mitigation-report.md (Execution section)1132 Append timeline: Rollback executed1133 """1134 )11351136 # If Hotfix1137 Task(1138 subagent_type="devops-engineer",1139 description="Deploy emergency hotfix",1140 prompt="""1141 Execute hotfix deployment:11421143 1. Create hotfix branch: hotfix/INC-{incident-ID}-{brief-description}1144 2. Implement minimal fix (code change already identified)1145 3. Test in staging (smoke tests, regression tests)1146 4. Deploy to production using standard flow1147 5. Monitor for 15 minutes (metrics validation)11481149 Get Deployment Manager approval before production deploy.11501151 Document hotfix deployment:1152 - Hotfix commit SHA1153 - Deployment timestamp1154 - Validation results11551156 Append to: .aiwg/incidents/{incident-id}/mitigation-report.md (Execution section)1157 Append timeline: Hotfix deploye11581159…(truncated)