Ai incident response

From kumaran-is/claude-code-onboarding · View interactive version

Ai incident response is an AI agent skill from the GitHub repository kumaran-is/claude-code-onboarding. Run the AI incident response procedure when something is going wrong in production AI. Use when the user explicitly runs /ai-incident-response or says "AI incident", "model is broken", "production AI is failing", "we're seeing weird outputs in prod", "hallucination in production", or similar urgent

How to use this skill

Skill file

AI Incident Response

Iron Law: Stabilize before investigating. Pull the kill switch or roll back before debugging root cause. Curiosity about why it broke must never delay stopping the bleeding.

When AI production behavior degrades, follow the procedure from the AI Playbook (Layer 4 §4.3). The objective: stabilize first, investigate second, learn third.

Stage 1: Stabilize (first 15 minutes)

Do these in order. Do not investigate root cause yet — that comes after the bleeding stops.

  1. Confirm scope. Ask the user:
  1. Decide on rollback or kill. Check the Decision Record for rollback triggers. If the symptom matches:
  1. Capture the crime scene before anything else changes:
  1. Notify. The Decision Record names an on-call owner. Tell them. If the incident has user impact, the team's incident comms process owns it from here.

Stage 2: Triage (next 30–60 minutes)

  1. Quarantine bad outputs. Decide per the feature's design (Layer 4 §4.3):
  1. Reverse downstream actions if possible.
  1. Check leading indicators (Layer 4 §4.3) to detect related cascading issues:

Stage 3: Investigate (after stabilization)

  1. Identify root cause. Common categories:
  1. Identify the eval gap. Every confirmed incident represents an example your eval set didn't catch. Capture:

Stage 4: Learn (within 5 business days)

  1. Write the post-mortem. Use this template:
# Post-Mortem: <Feature Name> — <Date>

## Summary
- What happened (one paragraph)
- Severity (S0 / S1 / S2 / S3)
- User impact
- Duration: <detection time> → <stabilization time> → <full recovery>

## Timeline
- <time>: <event>
- <time>: <event>
- ...

## Root cause
<the actual cause, not the symptom>

## Why our controls didn't catch this
- Output Contract: ...
- Evals: ...
- Adversarial tests: ...
- Leading indicators: ...
- Kill switch / rollback: ...

## Eval gap — new test cases to add
- <input> → <expected> (was: <actual>)
- ...

## Prevention
- Immediate (this week): ...
- Short-term (this month): ...
- Structural (this quarter): ...

## Owner
<Named human>
  1. Update artifacts.
  1. Calibrate. If the incident reveals that composite-confidence weights or thresholds are wrong, schedule a recalibration. Don't change thresholds during the incident.

Default stance

What this skill does NOT do

If this skill cannot proceed

Abort condition: no Decision Record exists for the feature
→ Cannot determine rollback triggers or named owner.
→ Output: "No Decision Record at docs/ai-decisions/<feature-slug>.md.
  Proceed without it, but rollback decisions must be made manually.
  After the incident, run /ai-audit to retroactively create one."

Abort condition: kill switch location unknown
→ Output: "Kill switch location not documented. Escalate to the engineering team
  to locate the feature flag manually. Do not attempt ad-hoc mitigations."

Abort condition: user wants to recalibrate thresholds during Stage 2/3
→ Hard stop. Output: "Do not recalibrate thresholds mid-incident. You don't have
  reliable data yet. Schedule recalibration in the Stage 4 post-mortem."

Verify (Stage 2 completion check)

After Stage 2, before moving to Stage 3:

✅ Feature flag toggled or version rolled back — confirmed in deployment logs
✅ Bad outputs quarantined or retracted — confirmed in system
✅ On-call owner notified — confirmed via comms channel
✅ Crime scene captured — versions, sample inputs/outputs, time window logged
✅ Leading indicators checked — no cascading issues spreading

References

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.