operate
Take a shipped service through detection, response, and learning — instrument it, write the runbook, communicate the incident, then feed the postmortem's deltas back into the runbook.
- Use it when
- Use when the user is preparing to run a service, is in an incident, or is writing a postmortem.
- Comes with
- The sre-oncall pack
- Where you decide
- Learn (G4): you decide
- Size
- 4 stages · 1 gate · up to 3 revision rounds
Installs the loop as an invokable skill, plus every skill its stages run.
Other ways to install
Every loop in its pack, with their skills:
The loop alone, without its stage skills (each stage falls back to an inline version):
In Claude Code, the sre-oncall plugin includes it:
The loop
%%{init: {'theme':'base','themeVariables':{'fontFamily':'Segoe UI, Helvetica, Arial','fontSize':'15px','lineColor':'#9AA5B1'},'flowchart':{'curve':'basis','rankSpacing':70,'nodeSpacing':50,'padding':16}}}%%
flowchart LR
classDef gen fill:#E8F0FE,stroke:#4C7DF0,stroke-width:1.5px,color:#1A3A8F;
classDef review fill:#FDEAEA,stroke:#E05B5B,stroke-width:1.5px,color:#8A1F1F;
classDef gate fill:#FBE3A2,stroke:#D9971E,stroke-width:2px,color:#6B4500,font-weight:bold;
classDef ship fill:#E6F7EC,stroke:#34A853,stroke-width:2px,color:#0F6B33,font-weight:bold;
instrument["instrument<br/><small>observability-plan</small>"]:::gen
document["document<br/><small>runbook-generator</small>"]:::gen
respond["respond<br/><small>incident-comms</small>"]:::gen
learn["learn<br/><small>postmortem-generator</small>"]:::review
G4{"G4 · human"}:::gate
DONE(["complete"]):::ship
instrument --> document
document --> respond
respond --> learn
learn --> G4
G4 == "PROCEED" ==> DONE
G4 -- "REVISE (max 3)" --> document
Stages
| # | Stage | What it does | Skills | Gate |
|---|---|---|---|---|
| 1 | instrument generate | Decide what is measured and what pages a human. You cannot respond to what you never detected. | observability-plan | — |
| 2 | document generate | Write the procedure the on-call follows at 3am, per alert the previous stage defined. | runbook-generator | — |
| 3 | respond generate | Communicate during the incident, to the audience that needs it, at the stage the incident is actually in. | incident-comms | — |
| 4 | learn verify | Analyse blamelessly and emit runbook deltas. An incident that changes no procedure has not been learned from. | postmortem-generator | G4 — you decide PROCEED · PROCEED WITH CONDITIONS · REVISE · BLOCKED |
The only loop whose failures are irreversible and live. The other four can be re-run at the cost of time; this one runs while real users are affected. Its feedback edge is the point: postmortem-generator emits runbook deltas phrased as edits, and those go straight back into document. An incident that changes no procedure has not been learned from.
How to run this loop
- Instrument first.
observability-plandecides what is measured and what pages a human. You cannot respond to what you never detected, and you cannot write a runbook entry for an alert that does not exist. - Write the runbook per alert. Each alert the previous stage defined maps to a
runbook-generatorentry. An alert with no procedure wakes someone who then has to think. - Respond to the audience the incident actually has.
incident-commsis staged — detect, mitigate, resolve — and the stage determines the message. Writing a resolution update during mitigation is the most common error here. - Learn at G4.
postmortem-generatoranalyses blamelessly and ends with runbook deltas. A human signs off that the incident is closed.REVISEreturns todocument: the deltas are the loop's output, and applying them is what closes it.
Entering mid-loop is normal and expected. An incident starts at respond; a new service starts at instrument. Do not replay earlier stages for their own sake.
Verdicts
Defined in contracts/terminals.json. G4 emits PROCEED, PROCEED WITH CONDITIONS, REVISE, or BLOCKED. PROCEED WITH CONDITIONS means the incident is closed but named follow-ups are outstanding — they travel with the postmortem.
Non-interactive runs
Never fabricate incident facts — timings, impact, customer counts, root cause. When the timeline is incomplete, emit BLOCKED: need <the missing facts> and name them. A confident postmortem built on guessed impact is worse than no postmortem.
When a stage's skill is not installed
Name the missing skill and skilldrop as its source, do the minimal inline version, and record the stage as degraded. During a live incident, prefer the degraded inline version over stopping to install anything.
Run log (opt-in)
Only when the environment variable SKILLDROP_LOOP_LOG is set to a file path: after each gate's verdict, append one JSON line to that file. Nothing else is recorded, and nothing is sent anywhere. When the variable isn't set, or you can't read it, skip this section.
printf '%s\n' '{"ts":"2026-10-01T14:03:00Z","loop":"operate","stage":"learn","gate":"G4","verdict":"PROCEED","round":1}' >> "$SKILLDROP_LOOP_LOG"
Fields: ts (UTC), loop, stage, gate (null for a stage without one), verdict (the gate's exact word), and round (1 for the first attempt, counting returns under the cap). skilldrop loop-stats summarises the file: which gates pass first time, which loop back, and which end in BLOCKED.
Quality bar
- Every alert has a runbook entry. An alert that pages someone with no procedure is an interruption, not a signal.
- The postmortem ends in runbook deltas. Analysis with no procedural change is a story about an outage.
- Comms match the incident's actual stage. Detect, mitigate, and resolve have different audiences and different truths.
- Blameless means blameless. Naming a person is a defect in the postmortem; naming a missing guardrail is the point.
Anti-patterns to avoid
- ❌ Writing the runbook before the observability plan. Procedures for alerts that do not exist, and none for the alerts that do.
- ❌ Skipping
learnbecause the incident was small. Small incidents are where the cheap runbook deltas are. - ❌ Guessing impact numbers to finish the postmortem. State the gap; a postmortem's value is entirely in its accuracy.
- ❌ Replaying
instrumentduring a live incident. Enter atrespond; the loop is not a checklist to complete in order.