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-response3id: incident-response4version: 2.0.05description: >6 Full incident lifecycle: detect → triage → escalate → resolve. Six-step incident7 response playbook with structured logging, backoff/circuit-breaker for restart loops,8 verification-as-terminal-state, severity classification, and canonical escalation ladder.9 Lower machine entropy.10owner: AAA11risk_tier: critical12autonomy_tier: T113floor_scope: [F1, F2, F3, F4, F6, F11, F13]14tags: [incident, triage, escalation, response, restart-loop, circuit-breaker, postmortem, severity]15capability_tier: fed-long-context16ecology_state: WARM17---1819# Incident Response — Full Lifecycle2021> **Don't panic, don't guess, lower machine entropy.**2223## What This Skill Is2425A unified incident response skill covering the full lifecycle:26271. **Triage** — six-step playbook with structured logging, backoff/circuit-breaker, and verification-as-terminal-state282. **Escalation** — severity classification and canonical escalation ladder293. **Resolution** — postmortem, institutional memory, and prevention3031## When to Use3233- A federation organ is red, unreachable, or failing health checks34- A VAULT999 entry, memory record, or constitutional artifact looks wrong35- A constitutional floor (F1–F13) trips or is suspected to be breached36- Arif reports a bug, anomaly, or service impact37- A runtime alert requires immediate structured response38- Service outages, security breaches, constitutional violations, or agent misbehavior3940## When NOT to Use4142- **Do not use for curiosity or "what if" probes.** Confirmed or strongly suspected incidents only.43- **Do not use to bypass the arifOS kernel** for mutating, irreversible, or sovereign-class actions.44- **Do not apply patches** without containment, reversible staging, and kernel SEAL when required.45- If the root cause is upstream (cloud provider, OS, network), escalate instead of patching locally.4647## §1. INCIDENT SEVERITY4849| Level | Name | Examples | Response Time |50|-------|------|----------|---------------|51| 1 | info | Minor drift, stale docs | Next business day |52| 2 | warning | Service slow, test flaky | 4 hours |53| 3 | error | Service down, agent confused | 1 hour |54| 4 | critical | Security breach, data loss, constitutional violation | 15 minutes |55| 5 | emergency | Active attack, irreversible damage in progress | Immediate |5657When in doubt, escalate one level higher.5859## §2. SIX-STEP PLAYBOOK6061### Step 0: Detect Restart Loop (Circuit Breaker)6263Before doing anything else, check if the service is in a restart loop.6465```bash66systemctl show <service> -p NRestarts 2>/dev/null67```6869**Circuit breaker rules:**70- `NRestarts > 5` in 5 minutes → **STOP THE LOOP**: `systemctl stop <service>`71- `NRestarts > 20` in 1 hour → escalate to 888_HOLD72- Log the circuit breaker event73- Do NOT restart until root cause is found7475### Step 1: Sense7677Establish observable facts before interpreting.7879- Run organ health probes: `systemctl status <unit>` and `journalctl -u <unit> --since '5m ago'`80- Use `arif_observe` mode=vitals or mode=search for federation-wide signals81- Capture timestamps, error lines, and affected service names verbatim82- **Log every probe**: `{who, what: "sense", why: <incident>, result: <findings>}`8384### Step 2: Scope8586Classify the incident to prevent scope creep.8788| Scope | Definition | Response |89|-------|------------|----------|90| Organ-only | One service or repo affected | Local containment + organ owner |91| Federation-wide | Multiple organs or A2A/MCP transport impacted | Federation ops + kernel notice |92| Constitutional | F-floor tripped or governance invariant violated | arifOS 888_JUDGE + witness |93| Sovereign | Human authority, safety, or dignity at risk | 888 HOLD + Arif |9495Stop if scope starts expanding mid-diagnosis. Re-scope and re-authorize.9697### Step 3: Contain9899Protect recoverability before changing anything.100101- If data-loss risk exists: snapshot DB / vault / git state / config before any patch102- If no data-loss risk: document current state and defer containment103- For irreversible changes: route through arifOS kernel and obtain SEAL or sovereign ack104- Apply the minimum change that stops active damage105106### Step 4: Diagnose107108Read, recall, and correlate. Stop hypothesizing when evidence explains the symptom.109110- Read recent logs and config diffs111- Recall prior incidents and deployments with `arif_memory` mode=recall112- Check recent git commits, deploys, and dependency changes113- **Check for patterns**: same symptom in last 7 days? → partial-fix, not new incident114- Name the root cause with confidence level and supporting evidence115116### Step 5: Patch — One Change at a Time117118Minimum reversible change, committed and verified.119120- Draft the smallest fix that addresses the root cause121- **One mutation per step.** Never batch 3 fixes and restart122- Prefer commits over manual edits123- Deploy through the organ's standard path124- **Verify after EVERY change** — if the fix didn't work, revert and try next hypothesis125- **Backoff strategy**: 1st retry: 5s, 2nd: 30s, 3rd: 120s (escalate)126- If the patch is irreversible, apply 888 HOLD before continuing127128### Step 6: Postmortem + Structured Log129130Close the loop with institutional memory.131132- If a floor was breached, seal the postmortem to VAULT999 as witness133- Write postmortem to `/root/INCIDENTS/<YYYY-MM-DD>-<slug>.md` with:134 - Trigger, Scope classification, Root cause and evidence, Fix applied, Verification result, Prevention measures135- If the same symptom recurs within 7 days, treat as partial-fix pattern, not new incident136- **Final structured log**: `{who, what: "postmortem", why: <incident>, result: {...}}`137138## §3. ESCALATION LADDER139140```141Agent detects incident142 ↓143Agent applies skill (if trained)144 ↓145Escalate to domain agent (GEOX/WEALTH/WELL/A-FORGE)146 ↓147Escalate to AAA control plane (routing + visibility)148 ↓149Escalate to arifOS 888_JUDGE (constitutional / irreversible)150 ↓151Escalate to Arif (human sovereign)152```153154### Notification Matrix155156| Level | Notify |157|-------|--------|158| 1-2 | Log + dashboard |159| 3 | Domain agent + AAA |160| 4 | arifOS judge + Arif (Telegram) |161| 5 | Arif immediately + all agents |162163### Investigation Skills164165- Service down → `vps-ops` health probes166- Secret leaked → `FORGE-secret-hygiene`167- Agent misbehaving → re-read SOUL.md168- Constitutional violation → authority detection169170## §4. FIRE-TIME REAUTHORIZATION (WAJIB 5)171172A decision made at *write-time* is NOT automatically valid at *fire-time*. Authorization must be re-judged.173174### Affected surfaces175176Cron jobs, queued workers, dependency-update PRs, scheduled deployments, delayed shell jobs, retry queues, event-triggered automation, long-running MCP tasks.177178### The required invariant179180Every deferred mutation must be judged TWICE: write-time + fire-time.181182At 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.183184### Failure behavior185186A scheduled action with **expired authority MUST become HOLD**.187188`write_time_authorization.expiry < now()` → return 888_HOLD at fire time.189190## §5. ORGAN DISAGREEMENT DOCTRINE (WAJIB 7)191192When GEOX, WEALTH, and WELL recommend incompatible actions, the resolution order:1931941. **Hard veto conditions** (any organ may trigger HOLD with evidence)1952. **Blast-radius precedence** (organ owning dominant irreversible consequence)1963. **Pareto search** (seek alternative satisfying all hard constraints)1974. **F13 escalation** (if no acceptable option → escalate to Arif)198199### Hard veto table200201| Organ | May veto when | Release condition |202|---|---|---|203| GEOX | Physical infeasibility OR unacceptable earth uncertainty | New data or revised interpretation |204| WELL | Unsafe human or operational readiness | Confirmed safe capacity + witness |205| WEALTH | Insolvency, unaffordable exposure | Restructured deal OR capital limit raised |206| arifOS | Authority, law, or constitutional violation | Ratified exception OR constitutional amendment |207208## Forbidden Actions209210- **NEVER** cover up an incident211- **NEVER** delay escalation to avoid "bothering" someone212- **NEVER** destroy logs or evidence213- **NEVER** restart a service without understanding why it failed214- **NEVER** patch a production organ without sensing, scoping, and containing first215- **NEVER** apply an irreversible patch without 888 HOLD / sovereign ack216- **NEVER** skip the postmortem for constitutional or repeated incidents217- **NEVER** suppress or omit Ω₀ (uncertainty) in incident receipts218219## Escalation Path220221| Condition | Escalate To | Method |222|-----------|-------------|--------|223| Constitutional floor tripped | arifOS 888_JUDGE | A2A verdict_request / MCP arif_judge |224| Irreversible action needed | Arif (F13 SOVEREIGN) | 888 HOLD |225| Root cause upstream | Federation ops + A-FORGE | A2A ops channel |226| Scope creep during response | STOP + re-authorize via kernel | new ART cycle |227| Same incident within 7 days | Senior ops + postmortem review | incident registry |