Skip to content

Loops · sre-oncall

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
npx skilldrop-cli install --loop operate

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:

npx skilldrop-cli install --loop --pack sre-oncall

The loop alone, without its stage skills (each stage falls back to an inline version):

npx skilldrop-cli install --loop operate --no-skills

In Claude Code, the sre-oncall plugin includes it:

/plugin install sre-oncall@skilldrop

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

#StageWhat it doesSkillsGate
1instrument
generate
Decide what is measured and what pages a human. You cannot respond to what you never detected.observability-plan—
2document
generate
Write the procedure the on-call follows at 3am, per alert the previous stage defined.runbook-generator—
3respond
generate
Communicate during the incident, to the audience that needs it, at the stage the incident is actually in.incident-comms—
4learn
verify
Analyse blamelessly and emit runbook deltas. An incident that changes no procedure has not been learned from.postmortem-generatorG4 — 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

  1. Instrument first. observability-plan decides 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.
  2. Write the runbook per alert. Each alert the previous stage defined maps to a runbook-generator entry. An alert with no procedure wakes someone who then has to think.
  3. Respond to the audience the incident actually has. incident-comms is staged — detect, mitigate, resolve — and the stage determines the message. Writing a resolution update during mitigation is the most common error here.
  4. Learn at G4. postmortem-generator analyses blamelessly and ends with runbook deltas. A human signs off that the incident is closed. REVISE returns to document: 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

Anti-patterns to avoid

Source

LOOP.md · loop.json on GitHub · Why loops