Incident response

From JeremyDev87/codingbuddy · View interactive version

Incident response is an AI agent skill from the GitHub repository JeremyDev87/codingbuddy. Use when production incident occurs, alerts fire, service degradation detected, or on-call escalation needed - guides systematic organizational response before technical fixes

How to use this skill

Skill file

Incident Response

Overview

Incidents demand disciplined response, not heroic fixes. Rushed patches mask problems and create new ones.

Core principle: ALWAYS triage, communicate, and contain before attempting fixes. Technical investigation follows organizational response.

Violating the letter of this process is violating the spirit of incident response.

First 5 Minutes Checklist

Use this when alerts fire. Don't think, follow the list.

| Minute | Action | Output |

|--------|--------|--------|

| 0-1 | Acknowledge alert | incident_acknowledged |

| 1-2 | Screenshot dashboards NOW | Evidence preserved |

| 2-3 | Assess: >50% users? Critical function? | Severity (P1-P4) |

| 3-4 | Post in incident channel: severity + impact + trace_id | stakeholders_notified |

| 4-5 | If P1/P2: Open war room, page on-call | Responders engaged |

After 5 minutes: Proceed to Phase 4 (Mitigate) - you've completed Detect, Triage, Communicate.

The Iron Law

NO FIXES WITHOUT TRIAGE AND COMMUNICATION FIRST

If you haven't classified severity and notified stakeholders, you cannot propose fixes.

When to Use

Use for ANY production incident:

Use this ESPECIALLY when:

Don't skip when:

When NOT to Use

This skill is for organizational incident response. Don't use it for:

Key distinction: This skill manages the organizational response (communication, escalation, coordination). For technical root cause analysis, hand off to superpowers:systematic-debugging at Phase 5.

The Eight Phases

You MUST complete each phase before proceeding to the next.

digraph incident_response {
    rankdir=TB;
    node [shape=box];

    "1. Detect" -> "2. Triage";
    "2. Triage" -> "3. Communicate";
    "3. Communicate" -> "4. Mitigate";
    "4. Mitigate" -> "5. Diagnose";
    "5. Diagnose" -> "6. Fix/Rollback";
    "6. Fix/Rollback" -> "7. Verify";
    "7. Verify" -> "8. Document";

    "Skip Phase?" [shape=diamond];
    "2. Triage" -> "Skip Phase?" [style=dashed, label="tempted?"];
    "Skip Phase?" -> "STOP" [label="NO"];
    "STOP" [shape=doublecircle, color=red];
}

Phase 1: Detect

Acknowledge the incident:

  1. Confirm the alert is valid
  1. Capture initial evidence
  1. Declare incident start

Completion criteria:

Phase 2: Triage

Classify severity BEFORE taking action:

See severity-classification.md for detailed criteria.

  1. Assess impact scope
  1. Classify severity (P1-P4)
  1. Determine business impact
  1. Check SLO status

Completion criteria:

Phase 3: Communicate

Notify stakeholders BEFORE attempting fixes:

See communication-templates.md for notification formats.

  1. Internal notification
  1. External communication (if applicable)
  1. Set communication cadence
  1. Include trace_id in all communications

Completion criteria:

Phase 4: Mitigate

Contain the blast radius:

  1. Evaluate rollback FIRST
  1. If rollback not viable:
  1. Preserve evidence before action
  1. Implement containment

Completion criteria:

Phase 5: Diagnose

Now investigate the root cause:

HANDOFF: Use superpowers:systematic-debugging for technical investigation.

  1. Form hypothesis
  1. Test hypothesis
  1. If 3+ hypotheses failed:

Completion criteria:

Phase 6: Fix or Rollback

Apply the resolution:

  1. If rollback is the answer:
  1. If forward-fix required:
  1. Never skip verification

Completion criteria:

Phase 7: Verify

Confirm the incident is resolved:

HANDOFF: Use superpowers:verification-before-completion for thorough verification.

  1. Service health check
  1. User impact verification
  1. Monitoring confirmation

Completion criteria:

Phase 8: Document

The incident is NOT resolved until documentation exists:

See postmortem-template.md for the blameless RCA framework.

  1. Schedule postmortem
  1. Capture timeline
  1. Identify action items
  1. Close the incident

Completion criteria:

Red Flags - STOP and Follow Process

If you catch yourself thinking:

ALL of these mean: STOP. Return to the current phase.

Common Rationalizations

| Excuse | Reality |

|--------|---------|

| "This is obviously a P1" | Every incident feels urgent. Triage takes 2 minutes, wrong classification causes chaos. |

| "Fix first, communicate later" | Silent outages create panic. 30-second update prevents 30-minute escalation. |

| "Rollback is too risky" | Known state > uncertain forward fix. Rollback buys time to fix properly. |

| "We can investigate after fixing" | Evidence disappears after restart. Capture now, analyze later. |

| "It's a one-off, skip the postmortem" | All incidents feel unique. Patterns emerge only from documentation. |

| "I know this system, trust me" | Expert intuition fails under pressure. Protocol beats intuition. |

| "Communication slows us down" | Coordinated response > heroic solo effort. Communication accelerates resolution. |

| "Previous fix worked, try another" | 3+ fixes = wrong diagnosis. Stop guessing, investigate properly. |

Quick Reference

| Phase | Key Activities | Verification Key |

|-------|---------------|------------------|

| 1. Detect | Acknowledge, capture evidence, record time, capture trace_id | incident_acknowledged |

| 2. Triage | Assess impact, classify P1-P4, check SLO | severity_classified |

| 3. Communicate | Notify team, update status, set cadence, include trace_id | stakeholders_notified |

| 4. Mitigate | Evaluate rollback, contain blast radius | containment_verified |

| 5. Diagnose | Form hypothesis, test systematically | root_cause_identified |

| 6. Fix/Rollback | Apply resolution, get review | fix_deployed |

| 7. Verify | Confirm resolution, check SLO | service_restored |

| 8. Document | Schedule postmortem, capture timeline, correlate via trace_id | postmortem_scheduled |

🔑 trace_id: Include in ALL internal communications - enables instant context jumping across logs, traces, and metrics.

Supporting Files

These files provide detailed guidance for specific phases:

Related Skills

Real-World Impact

From incident response data:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.