Incident Response — Full Lifecycle
Don't panic, don't guess, lower machine entropy.
What This Skill Is
A unified incident response skill covering the full lifecycle:
- Triage — six-step playbook with structured logging, backoff/circuit-breaker, and verification-as-terminal-state
- Escalation — severity classification and canonical escalation ladder
- Resolution — postmortem, institutional memory, and prevention
When to Use
- A federation organ is red, unreachable, or failing health checks
- A VAULT999 entry, memory record, or constitutional artifact looks wrong
- A constitutional floor (F1–F13) trips or is suspected to be breached
- Arif reports a bug, anomaly, or service impact
- A runtime alert requires immediate structured response
- Service outages, security breaches, constitutional violations, or agent misbehavior
When NOT to Use
- Do not use for curiosity or "what if" probes. Confirmed or strongly suspected incidents only.
- Do not use to bypass the arifOS kernel for mutating, irreversible, or sovereign-class actions.
- Do not apply patches without containment, reversible staging, and kernel SEAL when required.
- If the root cause is upstream (cloud provider, OS, network), escalate instead of patching locally.
§1. INCIDENT SEVERITY
| Level |
Name |
Examples |
Response Time |
| 1 |
info |
Minor drift, stale docs |
Next business day |
| 2 |
warning |
Service slow, test flaky |
4 hours |
| 3 |
error |
Service down, agent confused |
1 hour |
| 4 |
critical |
Security breach, data loss, constitutional violation |
15 minutes |
| 5 |
emergency |
Active attack, irreversible damage in progress |
Immediate |
When in doubt, escalate one level higher.
§2. SIX-STEP PLAYBOOK
Step 0: Detect Restart Loop (Circuit Breaker)
Before doing anything else, check if the service is in a restart loop.
systemctl show <service> -p NRestarts 2>/dev/null
Circuit breaker rules:
NRestarts > 5 in 5 minutes → STOP THE LOOP: systemctl stop <service>
NRestarts > 20 in 1 hour → escalate to 888_HOLD
- Log the circuit breaker event
- Do NOT restart until root cause is found
Step 1: Sense
Establish observable facts before interpreting.
- Run organ health probes:
systemctl status <unit> and journalctl -u <unit> --since '5m ago'
- Use
arif_observe mode=vitals or mode=search for federation-wide signals
- Capture timestamps, error lines, and affected service names verbatim
- Log every probe:
{who, what: "sense", why: <incident>, result: <findings>}
Step 2: Scope
Classify the incident to prevent scope creep.
| Scope |
Definition |
Response |
| Organ-only |
One service or repo affected |
Local containment + organ owner |
| Federation-wide |
Multiple organs or A2A/MCP transport impacted |
Federation ops + kernel notice |
| Constitutional |
F-floor tripped or governance invariant violated |
arifOS 888_JUDGE + witness |
| Sovereign |
Human authority, safety, or dignity at risk |
888 HOLD + Arif |
Stop if scope starts expanding mid-diagnosis. Re-scope and re-authorize.
Step 3: Contain
Protect recoverability before changing anything.
- If data-loss risk exists: snapshot DB / vault / git state / config before any patch
- If no data-loss risk: document current state and defer containment
- For irreversible changes: route through arifOS kernel and obtain SEAL or sovereign ack
- Apply the minimum change that stops active damage
Step 4: Diagnose
Read, recall, and correlate. Stop hypothesizing when evidence explains the symptom.
- Read recent logs and config diffs
- Recall prior incidents and deployments with
arif_memory mode=recall
- Check recent git commits, deploys, and dependency changes
- Check for patterns: same symptom in last 7 days? → partial-fix, not new incident
- Name the root cause with confidence level and supporting evidence
Step 5: Patch — One Change at a Time
Minimum reversible change, committed and verified.
- Draft the smallest fix that addresses the root cause
- One mutation per step. Never batch 3 fixes and restart
- Prefer commits over manual edits
- Deploy through the organ's standard path
- Verify after EVERY change — if the fix didn't work, revert and try next hypothesis
- Backoff strategy: 1st retry: 5s, 2nd: 30s, 3rd: 120s (escalate)
- If the patch is irreversible, apply 888 HOLD before continuing
Step 6: Postmortem + Structured Log
Close the loop with institutional memory.
- If a floor was breached, seal the postmortem to VAULT999 as witness
- Write postmortem to
/root/INCIDENTS/<YYYY-MM-DD>-<slug>.md with:
- Trigger, Scope classification, Root cause and evidence, Fix applied, Verification result, Prevention measures
- If the same symptom recurs within 7 days, treat as partial-fix pattern, not new incident
- Final structured log:
{who, what: "postmortem", why: <incident>, result: {...}}
§3. ESCALATION LADDER
Agent detects incident
↓
Agent applies skill (if trained)
↓
Escalate to domain agent (GEOX/WEALTH/WELL/A-FORGE)
↓
Escalate to AAA control plane (routing + visibility)
↓
Escalate to arifOS 888_JUDGE (constitutional / irreversible)
↓
Escalate to Arif (human sovereign)
Notification Matrix
| Level |
Notify |
| 1-2 |
Log + dashboard |
| 3 |
Domain agent + AAA |
| 4 |
arifOS judge + Arif (Telegram) |
| 5 |
Arif immediately + all agents |
Investigation Skills
- Service down →
vps-ops health probes
- Secret leaked →
FORGE-secret-hygiene
- Agent misbehaving → re-read SOUL.md
- Constitutional violation → authority detection
§4. FIRE-TIME REAUTHORIZATION (WAJIB 5)
A decision made at write-time is NOT automatically valid at fire-time. Authorization must be re-judged.
Affected surfaces
Cron jobs, queued workers, dependency-update PRs, scheduled deployments, delayed shell jobs, retry queues, event-triggered automation, long-running MCP tasks.
The required invariant
Every deferred mutation must be judged TWICE: write-time + fire-time.
At fire time, re-check: identity/session validity, lease expiry, current branch/commit, current target state, changed blast radius, new evidence, human approval validity, dependency health, rollback availability, revocation status.
Failure behavior
A scheduled action with expired authority MUST become HOLD.
write_time_authorization.expiry < now() → return 888_HOLD at fire time.
§5. ORGAN DISAGREEMENT DOCTRINE (WAJIB 7)
When GEOX, WEALTH, and WELL recommend incompatible actions, the resolution order:
- Hard veto conditions (any organ may trigger HOLD with evidence)
- Blast-radius precedence (organ owning dominant irreversible consequence)
- Pareto search (seek alternative satisfying all hard constraints)
- F13 escalation (if no acceptable option → escalate to Arif)
Hard veto table
| Organ |
May veto when |
Release condition |
| GEOX |
Physical infeasibility OR unacceptable earth uncertainty |
New data or revised interpretation |
| WELL |
Unsafe human or operational readiness |
Confirmed safe capacity + witness |
| WEALTH |
Insolvency, unaffordable exposure |
Restructured deal OR capital limit raised |
| arifOS |
Authority, law, or constitutional violation |
Ratified exception OR constitutional amendment |
Forbidden Actions
- NEVER cover up an incident
- NEVER delay escalation to avoid "bothering" someone
- NEVER destroy logs or evidence
- NEVER restart a service without understanding why it failed
- NEVER patch a production organ without sensing, scoping, and containing first
- NEVER apply an irreversible patch without 888 HOLD / sovereign ack
- NEVER skip the postmortem for constitutional or repeated incidents
- NEVER suppress or omit Ω₀ (uncertainty) in incident receipts
Escalation Path
| Condition |
Escalate To |
Method |
| Constitutional floor tripped |
arifOS 888_JUDGE |
A2A verdict_request / MCP arif_judge |
| Irreversible action needed |
Arif (F13 SOVEREIGN) |
888 HOLD |
| Root cause upstream |
Federation ops + A-FORGE |
A2A ops channel |
| Scope creep during response |
STOP + re-authorize via kernel |
new ART cycle |
| Same incident within 7 days |
Senior ops + postmortem review |
incident registry |
1---2name: incident-response3description: Full incident lifecycle: detect → triage → escalate → resolve. Six-step incident response playbook with structured logging, backoff/circuit-breaker for restart loops, verification-as-terminal-state, severity classification, and canonical escalation ladder. Lower machine entropy.4---56# Incident Response — Full Lifecycle78> **Don't panic, don't guess, lower machine entropy.**910## What This Skill Is1112A unified incident response skill covering the full lifecycle:13141. **Triage** — six-step playbook with structured logging, backoff/circuit-breaker, and verification-as-terminal-state152. **Escalation** — severity classification and canonical escalation ladder163. **Resolution** — postmortem, institutional memory, and prevention1718## When to Use1920- A federation organ is red, unreachable, or failing health checks21- A VAULT999 entry, memory record, or constitutional artifact looks wrong22- A constitutional floor (F1–F13) trips or is suspected to be breached23- Arif reports a bug, anomaly, or service impact24- A runtime alert requires immediate structured response25- Service outages, security breaches, constitutional violations, or agent misbehavior2627## When NOT to Use2829- **Do not use for curiosity or "what if" probes.** Confirmed or strongly suspected incidents only.30- **Do not use to bypass the arifOS kernel** for mutating, irreversible, or sovereign-class actions.31- **Do not apply patches** without containment, reversible staging, and kernel SEAL when required.32- If the root cause is upstream (cloud provider, OS, network), escalate instead of patching locally.3334## §1. INCIDENT SEVERITY3536| Level | Name | Examples | Response Time |37|-------|------|----------|---------------|38| 1 | info | Minor drift, stale docs | Next business day |39| 2 | warning | Service slow, test flaky | 4 hours |40| 3 | error | Service down, agent confused | 1 hour |41| 4 | critical | Security breach, data loss, constitutional violation | 15 minutes |42| 5 | emergency | Active attack, irreversible damage in progress | Immediate |4344When in doubt, escalate one level higher.4546## §2. SIX-STEP PLAYBOOK4748### Step 0: Detect Restart Loop (Circuit Breaker)4950Before doing anything else, check if the service is in a restart loop.5152```bash53systemctl show <service> -p NRestarts 2>/dev/null54```5556**Circuit breaker rules:**57- `NRestarts > 5` in 5 minutes → **STOP THE LOOP**: `systemctl stop <service>`58- `NRestarts > 20` in 1 hour → escalate to 888_HOLD59- Log the circuit breaker event60- Do NOT restart until root cause is found6162### Step 1: Sense6364Establish observable facts before interpreting.6566- Run organ health probes: `systemctl status <unit>` and `journalctl -u <unit> --since '5m ago'`67- Use `arif_observe` mode=vitals or mode=search for federation-wide signals68- Capture timestamps, error lines, and affected service names verbatim69- **Log every probe**: `{who, what: "sense", why: <incident>, result: <findings>}`7071### Step 2: Scope7273Classify the incident to prevent scope creep.7475| Scope | Definition | Response |76|-------|------------|----------|77| Organ-only | One service or repo affected | Local containment + organ owner |78| Federation-wide | Multiple organs or A2A/MCP transport impacted | Federation ops + kernel notice |79| Constitutional | F-floor tripped or governance invariant violated | arifOS 888_JUDGE + witness |80| Sovereign | Human authority, safety, or dignity at risk | 888 HOLD + Arif |8182Stop if scope starts expanding mid-diagnosis. Re-scope and re-authorize.8384### Step 3: Contain8586Protect recoverability before changing anything.8788- If data-loss risk exists: snapshot DB / vault / git state / config before any patch89- If no data-loss risk: document current state and defer containment90- For irreversible changes: route through arifOS kernel and obtain SEAL or sovereign ack91- Apply the minimum change that stops active damage9293### Step 4: Diagnose9495Read, recall, and correlate. Stop hypothesizing when evidence explains the symptom.9697- Read recent logs and config diffs98- Recall prior incidents and deployments with `arif_memory` mode=recall99- Check recent git commits, deploys, and dependency changes100- **Check for patterns**: same symptom in last 7 days? → partial-fix, not new incident101- Name the root cause with confidence level and supporting evidence102103### Step 5: Patch — One Change at a Time104105Minimum reversible change, committed and verified.106107- Draft the smallest fix that addresses the root cause108- **One mutation per step.** Never batch 3 fixes and restart109- Prefer commits over manual edits110- Deploy through the organ's standard path111- **Verify after EVERY change** — if the fix didn't work, revert and try next hypothesis112- **Backoff strategy**: 1st retry: 5s, 2nd: 30s, 3rd: 120s (escalate)113- If the patch is irreversible, apply 888 HOLD before continuing114115### Step 6: Postmortem + Structured Log116117Close the loop with institutional memory.118119- If a floor was breached, seal the postmortem to VAULT999 as witness120- Write postmortem to `/root/INCIDENTS/<YYYY-MM-DD>-<slug>.md` with:121 - Trigger, Scope classification, Root cause and evidence, Fix applied, Verification result, Prevention measures122- If the same symptom recurs within 7 days, treat as partial-fix pattern, not new incident123- **Final structured log**: `{who, what: "postmortem", why: <incident>, result: {...}}`124125## §3. ESCALATION LADDER126127```128Agent detects incident129 ↓130Agent applies skill (if trained)131 ↓132Escalate to domain agent (GEOX/WEALTH/WELL/A-FORGE)133 ↓134Escalate to AAA control plane (routing + visibility)135 ↓136Escalate to arifOS 888_JUDGE (constitutional / irreversible)137 ↓138Escalate to Arif (human sovereign)139```140141### Notification Matrix142143| Level | Notify |144|-------|--------|145| 1-2 | Log + dashboard |146| 3 | Domain agent + AAA |147| 4 | arifOS judge + Arif (Telegram) |148| 5 | Arif immediately + all agents |149150### Investigation Skills151152- Service down → `vps-ops` health probes153- Secret leaked → `FORGE-secret-hygiene`154- Agent misbehaving → re-read SOUL.md155- Constitutional violation → authority detection156157## §4. FIRE-TIME REAUTHORIZATION (WAJIB 5)158159A decision made at *write-time* is NOT automatically valid at *fire-time*. Authorization must be re-judged.160161### Affected surfaces162163Cron jobs, queued workers, dependency-update PRs, scheduled deployments, delayed shell jobs, retry queues, event-triggered automation, long-running MCP tasks.164165### The required invariant166167Every deferred mutation must be judged TWICE: write-time + fire-time.168169At fire time, re-check: identity/session validity, lease expiry, current branch/commit, current target state, changed blast radius, new evidence, human approval validity, dependency health, rollback availability, revocation status.170171### Failure behavior172173A scheduled action with **expired authority MUST become HOLD**.174175`write_time_authorization.expiry < now()` → return 888_HOLD at fire time.176177## §5. ORGAN DISAGREEMENT DOCTRINE (WAJIB 7)178179When GEOX, WEALTH, and WELL recommend incompatible actions, the resolution order:1801811. **Hard veto conditions** (any organ may trigger HOLD with evidence)1822. **Blast-radius precedence** (organ owning dominant irreversible consequence)1833. **Pareto search** (seek alternative satisfying all hard constraints)1844. **F13 escalation** (if no acceptable option → escalate to Arif)185186### Hard veto table187188| Organ | May veto when | Release condition |189|---|---|---|190| GEOX | Physical infeasibility OR unacceptable earth uncertainty | New data or revised interpretation |191| WELL | Unsafe human or operational readiness | Confirmed safe capacity + witness |192| WEALTH | Insolvency, unaffordable exposure | Restructured deal OR capital limit raised |193| arifOS | Authority, law, or constitutional violation | Ratified exception OR constitutional amendment |194195## Forbidden Actions196197- **NEVER** cover up an incident198- **NEVER** delay escalation to avoid "bothering" someone199- **NEVER** destroy logs or evidence200- **NEVER** restart a service without understanding why it failed201- **NEVER** patch a production organ without sensing, scoping, and containing first202- **NEVER** apply an irreversible patch without 888 HOLD / sovereign ack203- **NEVER** skip the postmortem for constitutional or repeated incidents204- **NEVER** suppress or omit Ω₀ (uncertainty) in incident receipts205206## Escalation Path207208| Condition | Escalate To | Method |209|-----------|-------------|--------|210| Constitutional floor tripped | arifOS 888_JUDGE | A2A verdict_request / MCP arif_judge |211| Irreversible action needed | Arif (F13 SOVEREIGN) | 888 HOLD |212| Root cause upstream | Federation ops + A-FORGE | A2A ops channel |213| Scope creep during response | STOP + re-authorize via kernel | new ART cycle |214| Same incident within 7 days | Senior ops + postmortem review | incident registry |