Playbook framework

The problem with writing playbooks

The obvious way to build incident response is one document per scenario: a breach playbook, a data-loss playbook, a certificate playbook, an agent-misbehaviour playbook. That approach fails in a specific and predictable way. The documents diverge. The same containment step is described three ways in three files. A lesson learned in one scenario is not applied to the others. And when the governance framework changes, every document has to change to match.

The founder's decision was that playbooks must adhere to the governance framework. The instruction for this work was to focus on the meta-structure and the primitives, so that a playbook applies across scenarios.

The design: three layers

layerislives in
Primitivethe vocabulary. An atomic, parameterised action.registries/primitives.yaml
Phasethe grammar. A fixed phase vocabulary that orders work.declared in the primitive registry metadata
Playbookthe sentence. A composition of primitives bound to parameters, in a phase order, for one scenario.registries/playbooks.yaml

The whole argument in one line: correctness lives in the vocabulary, scenario knowledge lives in the composition.

Layer 1: the primitives

A primitive is a verb, and it is scenario-agnostic. If an action only makes sense in one scenario, it is a step, not a primitive.

There are three categories, and the distinction matters because they have different risk profiles:

intentprimitivescharacter
observecollect-state, query-registry, read-logs, snapshot, hash-artefactread-only, never gated
assessclassify-severity, scope-impact, check-conformanceread-only, never gated
decidegate-approval, declare-incident, assign-rolethe human control points
actisolate, contain, stop-service, start-service, rotate-secret, revoke-credential, restore-backup, failover, rebuild, apply-loadoutthe mutating set, mostly gated
communicatenotify, page-oncall, update-statusoutward-facing
recordrecord-evidence, open-ticket, log-decision, update-registrythe audit trail
verifyverify-health, verify-restore, verify-absence, re-run-evidencethe proof set
learnpostmortem, close-incident, promote-controlthe loop closing

Thirty-five primitives in total.

The property that makes governance inherit

Every primitive declares four governance properties:

propertymeaning
risklow, medium, high or critical
approvalnone, tier-dependent or required
reversiblewhether the action can be undone
evidencethe artefact the action must produce

This is the design decision that does the most work. Because approval and reversibility are properties of the verb, every playbook that uses restore-backup inherits "requires human approval, not reversible, must produce a restore record" without restating it. Governance cannot be forgotten in a scenario, because it was never written into the scenario in the first place.

Eleven of the thirty-five primitives are gated. revoke-credential, restore-backup, close-incident and promote-control require approval outright, regardless of tier, because they are not reversible or they close a record.

Layer 2: the phases

A nine-phase vocabulary, drawn from the established incident-handling models but generalised past incidents so the same structure carries change, recovery, rehearsal and provisioning work:

prepare -> detect -> assess -> contain -> resolve -> recover -> verify -> communicate -> learn

A playbook selects a subset and orders it. A restore drill does not contain a containment phase. A node onboarding does not contain an eradication phase. The vocabulary is fixed; the selection is the scenario's contribution.

This is also what makes the framework auditable. A reviewer can ask "which playbooks have a verify phase" and get an answer, because verify means one thing everywhere.

Layer 3: the playbooks

Nine scenarios ship today, and they are the demonstration that one vocabulary is enough:

playbookclasswhat it is for
incident-responseincidentthe generic lifecycle; every specific incident is this shape with different bindings
credential-compromiseincidenta secret is believed exposed; assumes use, not just exposure
data-loss-restorerecoverydata lost or corrupt; prove the restore before declaring recovery
node-failurerecoverya node is unreachable; repair in place or rebuild from declarative source
agent-misbehaviourincidentcontaining the operator that usually does the containing
certificate-expirychangethe cheapest incident is the one a check prevented
supply-chain-compromiseincidentan upstream image is compromised; clean-room rewrite is the remediation
restore-drillrehearsalthe rehearsal that makes the recovery playbooks credible
node-onboardingchangebringing a node into the fleet, same verbs, different order

Coverage: nine playbooks, ninety-one steps, thirty-one of the thirty-five primitives used, and all nine phases exercised.

Why this generalises

Three properties, each checkable rather than asserted.

  1. Closed world. Every step names a primitive that exists. Verified: zero steps reference an undeclared verb. The doctor check playbook_step_unknown_primitive enforces it, so an invented procedure is a finding, not a style question.
  2. Governance is inherited, not restated. playbook_without_approval_gate fails any incident-class playbook that never passes through a human decision. playbook_without_evidence fails any incident playbook that produces no verification or record step.
  3. Adding a scenario is a composition. A tenth scenario is roughly ten lines of YAML binding existing verbs. It is not a new document, it does not restate governance, and it cannot invent a procedure the vocabulary does not have.

That third property is the whole point of the instruction. The expensive artefact is the vocabulary, and it is built once. The scenarios are cheap, and they accumulate.

How a new scenario is added

  1. Declare a playbook in registries/playbooks.yaml with an identity, a class and a phase subset.
  2. Write steps that bind declared primitives to parameters.
  3. Run the collector, then the doctor. A step using an undeclared verb fails immediately.
  4. If the scenario genuinely needs an action no primitive expresses, add the primitive to the vocabulary first, with its risk, approval, reversibility and evidence declared. Then use it.

Step 4 is the discipline. The temptation is always to inline a bespoke step because the scenario is special. That is how the vocabulary rots.

Relationship to the rest of the platform

  • Registry-driven. Playbooks and primitives are registries, joined into the same graph as services, nodes and agents. A playbook step resolving to a primitive is the same closed-world pattern as a service resolving to a technology.
  • Evidence discipline. Each primitive declares the artefact it produces, so a response leaves an evidence trail by construction rather than by diligence.
  • The recursive loop. promote-control is the primitive that turns a lesson into a permanent check. That is the improvement loop closing in the vocabulary itself.
  • Agent blast radius. agent-misbehaviour exists because the operator holds root. It is the playbook for the case where the agent is the problem, which is why its approval gate is deliberately placed first.

Prior art

The design is not invented in a vacuum. The research behind it, with 107 citations, is in the pack under research/playbook-prior-art.md. Four findings shaped what is here.

The phase vocabulary has a settled lineage

NIST SP 800-61 r2 defined a four-phase lifecycle and the SANS PICERL model refined it to six. The two map almost one-to-one. One detail worth recording: r2 was withdrawn in April 2025 and superseded by 800-61r3, which is restructured around the CSF 2.0 functions. A framework built on r2's phase names would already be citing a withdrawn document, so the phases here are deliberately framework-neutral verbs rather than a copy of either model.

this frameworkNIST 800-61SANS PICERL
preparePreparationPreparation
detectDetection and AnalysisIdentification
assessDetection and AnalysisIdentification
containContainment, Eradication and RecoveryContainment
resolveContainment, Eradication and RecoveryEradication
recoverContainment, Eradication and RecoveryRecovery
verify(implicit)(implicit)
communicate(implicit)(implicit)
learnPost-Incident ActivityLessons Learned

Two deliberate departures. communicate is a phase rather than a side effect, because in a regulated environment notification is a timed obligation with an audit trail, not something that happens incidentally. And verify is a phase rather than a closing note, because an unverified recovery is an assertion.

The primitive decomposition is how SOAR platforms already work

Every mature SOAR product converges on the same three tiers: an atomic typed action, a workflow that sequences them, and an orchestration layer that triggers workflows. Cortex XSOAR calls the atomic unit a task with typed inputs and outputs; Splunk SOAR calls it an app action; Tines documents eight action types; StackStorm calls it an atomic action and bundles them into packs.

That convergence is the evidence for the design here. The primitive layer is not speculative; it is the shape the industry arrived at independently, with the difference that this framework makes the governance properties part of the vocabulary.

MITRE D3FEND already supplies a defensive verb set

D3FEND defines seven tactics and 267 techniques, each with a stable identifier. It is a ready-made vocabulary for naming defensive actions, and it anchors each verb to a citable definition. It is the natural place to align primitive names if external auditability of the vocabulary itself becomes a requirement.

Governance is expressed two ways, and only one is machine-checkable

The research proposes a cross-cutting Govern overlay. This framework instead puts risk, approval, reversible and evidence on each primitive. Both express the same intent. The difference is that the overlay is a convention a reviewer must remember, while a primitive property is something the doctor can query. playbook_without_approval_gate exists only because governance is data.

On the count

The research synthesised 18 coarser verbs and 8 phases. This framework ships 35 finer verbs and 9 phases. The difference is granularity, not disagreement: the coarser set is a valid projection of the finer one. Finer verbs were chosen because rotate-secret and revoke-credential carry different approval and reversibility semantics, and collapsing them would lose exactly the distinction that makes governance inheritable.

Open questions this raises

questionblocks
Are the nine phases the right fixed set, or should phases also be data?vocabulary stability
Which primitives are safe for an agent to invoke unattended, and which always require a human?agent envelope
Who owns the primitive registry, and what is the change process for adding a verb?governance
Should the tier model (who approves, how fast) be a registry too?alert ownership