Skip to main content
T4 epic · SRE / on-call: three evidence sources gathered in parallel, a typed timeline, then the honest part: nika:wait a settle window, re-poll the status API, and nika:assert refuses to draft a « resolved » postmortem while prod still burns. after: { save: terminal } sends the armed on-call ping NO MATTER WHAT happened to the draft.

The job

The hour after an incident is logs, Slack archaeology and a postmortem nobody wants to start. This pipeline assembles the evidence, rebuilds the timeline as typed events, proves recovery, and leaves a draft (summary, impact, hypotheses, actions) in the incidents folder before the retro is scheduled.
Limit on macOS in 0.124.3. The sandbox confines exec: git to the workflow’s declared filesystem boundary, which grants no read of .git or of git’s global configuration. The confined git exits with status 128, even inside a real repository, so deploys takes its recover: value and the timeline is told the deploy log is unavailable. See Known limits.

The shape

The file

incident-war-room.nika

How it works

1

Evidence gathers in one wave

deploys (git log over the last const.log_window), status_history (with retry:, because status pages flap during incidents) and runbook wait only for the approve answer: one parallel wave, three sources.
2

Settle, recheck, PROVE

settle waits inputs.settle (30 s by default) for the fix to propagate, recheck re-polls .current.state, and confirmed fails the run, loudly, unless it reads operational. No optimistic postmortems. Offline, the re-poll recovers to operational so a rehearsal can reach the draft; point --var status_url= at your status API for the real check.
3

The ping always reports

Armed with --var alert=true, alert fires on the terminal edge of save, whether the draft landed, failed or was cancelled, and its message carries ${{ tasks.save.status }}. A task that must fail loudly rides terminal, not unwind: unwind errors are logged and do not propagate.

Constructs you just used

Run it

What it needs: A local model (Ollama serving qwen3.5:4b) and the sample runbook. The status endpoint is a placeholder that resolves nowhere, so both polls recover offline. The deploy log reads Git, which is refused on macOS in 0.124.3 (Known limits).
1

Rehearse it

A mock model answers, the sample files come with it, and nothing is written in your folder. Before it runs, nika try names the hosts a step may reach: may reach: status.internal.example.com · hooks.slack.com — the mock replaces the model, not the network. It stops at the approve gate, as a real run does.
2

Get your own copy

Save the file above as incident-war-room.nika in a new folder, then download the sample it reads:
3

Check it, then run it

The run writes incidents/checkout-api-postmortem.md.It asks at the approve gate before anything else runs. On a terminal you answer; in a script it pauses (exit 4) and prints the --resume line that continues it, or you answer up front with --answer approve=true.Any other model works: pass --model <provider>/<name> with its key, and cap a cloud model with --max-cost-usd.--var status_url=… points both polls at your status API. The on-call ping stays off unless you add --var alert=true with ONCALL_WEBHOOK_URL set.

Make it yours

  • Pull the incident channel export as a fourth evidence source and let the timeline cite humans, not just machines.
  • Auto-file the retro: nika:fetch method: POST to your calendar/issue API with ${{ tasks.timeline.output.events[0].at }} as the anchor.
  • Track MTTR over time: the always-fires alert stream is already your dataset.

Next · CEO Monday brief

The closer: a three-branch gather, jq arithmetic, one human decision at the root, and a ping that reports every outcome.