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
| layer | is | lives in |
|---|---|---|
| Primitive | the vocabulary. An atomic, parameterised action. | registries/primitives.yaml |
| Phase | the grammar. A fixed phase vocabulary that orders work. | declared in the primitive registry metadata |
| Playbook | the 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:
| intent | primitives | character |
|---|---|---|
| observe | collect-state, query-registry, read-logs, snapshot, hash-artefact | read-only, never gated |
| assess | classify-severity, scope-impact, check-conformance | read-only, never gated |
| decide | gate-approval, declare-incident, assign-role | the human control points |
| act | isolate, contain, stop-service, start-service, rotate-secret, revoke-credential, restore-backup, failover, rebuild, apply-loadout | the mutating set, mostly gated |
| communicate | notify, page-oncall, update-status | outward-facing |
| record | record-evidence, open-ticket, log-decision, update-registry | the audit trail |
| verify | verify-health, verify-restore, verify-absence, re-run-evidence | the proof set |
| learn | postmortem, close-incident, promote-control | the loop closing |
Thirty-five primitives in total.
The property that makes governance inherit
Every primitive declares four governance properties:
| property | meaning |
|---|---|
risk | low, medium, high or critical |
approval | none, tier-dependent or required |
reversible | whether the action can be undone |
evidence | the 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:
| playbook | class | what it is for |
|---|---|---|
| incident-response | incident | the generic lifecycle; every specific incident is this shape with different bindings |
| credential-compromise | incident | a secret is believed exposed; assumes use, not just exposure |
| data-loss-restore | recovery | data lost or corrupt; prove the restore before declaring recovery |
| node-failure | recovery | a node is unreachable; repair in place or rebuild from declarative source |
| agent-misbehaviour | incident | containing the operator that usually does the containing |
| certificate-expiry | change | the cheapest incident is the one a check prevented |
| supply-chain-compromise | incident | an upstream image is compromised; clean-room rewrite is the remediation |
| restore-drill | rehearsal | the rehearsal that makes the recovery playbooks credible |
| node-onboarding | change | bringing 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.
- Closed world. Every step names a primitive that exists. Verified: zero steps reference an undeclared verb. The doctor check
playbook_step_unknown_primitiveenforces it, so an invented procedure is a finding, not a style question. - Governance is inherited, not restated.
playbook_without_approval_gatefails any incident-class playbook that never passes through a human decision.playbook_without_evidencefails any incident playbook that produces no verification or record step. - 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
- Declare a playbook in
registries/playbooks.yamlwith an identity, a class and a phase subset. - Write steps that bind declared primitives to parameters.
- Run the collector, then the doctor. A step using an undeclared verb fails immediately.
- 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-controlis the primitive that turns a lesson into a permanent check. That is the improvement loop closing in the vocabulary itself. - Agent blast radius.
agent-misbehaviourexists 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 framework | NIST 800-61 | SANS PICERL |
|---|---|---|
| prepare | Preparation | Preparation |
| detect | Detection and Analysis | Identification |
| assess | Detection and Analysis | Identification |
| contain | Containment, Eradication and Recovery | Containment |
| resolve | Containment, Eradication and Recovery | Eradication |
| recover | Containment, Eradication and Recovery | Recovery |
| verify | (implicit) | (implicit) |
| communicate | (implicit) | (implicit) |
| learn | Post-Incident Activity | Lessons 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
| question | blocks |
|---|---|
| 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 |