# Primitive registry - the vocabulary that playbooks are written in. # # A primitive is an atomic, parameterised operational action. It is not a step # in a procedure; it is a word. Playbooks compose primitives into sequences, so # one primitive set serves every scenario and a new scenario is a composition # rather than a new document. # # Design rules: # 1. A primitive does ONE thing and names it with a verb. # 2. Every primitive declares whether it needs human approval, whether it is # reversible, and what evidence it produces. Governance is therefore a # property of the vocabulary, not a footnote in a procedure. # 3. Primitives are scenario-agnostic. If a primitive only makes sense in one # playbook, it is a step, not a primitive. # # Consumed by: neo4j/collect-registries.sh (emits the primitive registry graph) # Doctor check: playbook_step_unknown_primitive fails when a playbook uses a verb # that is not declared here. metadata: version: "0.1.0" status: draft created: "2026-10-06" ticket: [HITL] phases: - prepare - detect - assess - contain - resolve - recover - verify - communicate - learn primitives: # ---------------------------------------------------------------- observe - key: collect-state intent: observe name: Collect state summary: Gather the current state of a target from its authoritative source. risk: low approval: none reversible: true evidence: state-capture params: [target, sources] - key: query-registry intent: observe name: Query the registry summary: Read the registry graph for the authoritative record of a target. risk: low approval: none reversible: true evidence: registry-query params: [registry, key] - key: read-logs intent: observe name: Read logs summary: Pull log records for a target over a bounded window. risk: low approval: none reversible: true evidence: log-extract params: [source, window, query] - key: snapshot intent: observe name: Snapshot summary: Capture a point-in-time artefact before any mutation, so the pre-state is recoverable. risk: low approval: none reversible: true evidence: snapshot-ref params: [target, kind] - key: hash-artefact intent: observe name: Hash artefact summary: Compute a digest over an artefact so its integrity is checkable later. risk: low approval: none reversible: true evidence: digest params: [artefact, algorithm] # ----------------------------------------------------------------- assess - key: classify-severity intent: assess name: Classify severity summary: Assign a severity tier from the risk model, which sets the response tier and the approval threshold. risk: low approval: none reversible: true evidence: severity-assignment params: [signal, model] - key: scope-impact intent: assess name: Scope the impact summary: Derive the blast radius by traversing the registry graph from the affected entry. risk: low approval: none reversible: true evidence: impact-scope params: [entry, depth] - key: check-conformance intent: assess name: Check conformance summary: Run a doctor check and capture the result as evidence. risk: low approval: none reversible: true evidence: conformance-result params: [check] # -------------------------------------------------------------- decide/gate - key: gate-approval intent: decide name: Approval gate summary: Stop and require a human decision before proceeding. The tier model decides who and how fast. risk: low approval: none reversible: true evidence: approval-record params: [tier, approver, question] - key: declare-incident intent: decide name: Declare an incident summary: Formally open an incident, which starts the clock, fixes the record and notifies the tier. risk: medium approval: none reversible: true evidence: incident-record params: [severity, summary, owner] - key: assign-role intent: decide name: Assign a role summary: Bind a named owner to a role for the duration, so accountability is explicit. risk: low approval: none reversible: true evidence: role-assignment params: [role, holder, scope] # -------------------------------------------------------------------- act - key: isolate intent: act name: Isolate summary: Remove a target's network reachability while leaving it running for inspection. risk: high approval: tier-dependent reversible: true evidence: isolation-record params: [target, method, duration] - key: contain intent: act name: Contain summary: Restrict a target's capabilities to a safe subset without stopping it. risk: high approval: tier-dependent reversible: true evidence: containment-record params: [target, policy] - key: stop-service intent: act name: Stop a service summary: Stop a named service. Availability impact is expected and recorded. risk: high approval: tier-dependent reversible: true evidence: stop-record params: [service, reason] - key: start-service intent: act name: Start a service summary: Start a named service. risk: medium approval: none reversible: true evidence: start-record params: [service] - key: rotate-secret intent: act name: Rotate a secret summary: Issue a new value for a credential and retire the old one without downtime. risk: high approval: tier-dependent reversible: false evidence: rotation-record params: [secret, scope, grace] - key: revoke-credential intent: act name: Revoke a credential summary: Withdraw access immediately. Not reversible, so it is always gated. risk: critical approval: required reversible: false evidence: revocation-record params: [credential, subject, reason] - key: restore-backup intent: act name: Restore a backup summary: Restore a data source from a backup artefact into a target. risk: critical approval: required reversible: false evidence: restore-record params: [backup, target, point-in-time] - key: failover intent: act name: Fail over summary: Move a workload to a standby so service continues while the primary is dealt with. risk: high approval: tier-dependent reversible: true evidence: failover-record params: [service, from, to] - key: rebuild intent: act name: Rebuild summary: Destroy and reprovision a target purely from its declarative source, which is the strongest guarantee of a clean state. risk: high approval: tier-dependent reversible: false evidence: rebuild-record params: [target, source] - key: apply-loadout intent: act name: Apply a loadout summary: Provision or update a named loadout on a node. risk: high approval: tier-dependent reversible: true evidence: loadout-record params: [node, loadout, version] # ------------------------------------------------------------ communicate - key: notify intent: communicate name: Notify summary: Send a message to a channel selected by risk tier, not by convenience. risk: low approval: none reversible: true evidence: notification-record params: [tier, channel, message] - key: page-oncall intent: communicate name: Page on-call summary: Escalate to a human who is accountable for responding. risk: low approval: none reversible: true evidence: page-record params: [severity, subject] - key: update-status intent: communicate name: Update status summary: Publish a status entry so the timeline is visible while work is in flight. risk: low approval: none reversible: true evidence: status-entry params: [incident, state, note] # ---------------------------------------------------------------- record - key: record-evidence intent: record name: Record evidence summary: Persist an artefact with its provenance so a third party can re-run or re-read it. risk: low approval: none reversible: false evidence: evidence-record params: [artefact, source, chain] - key: open-ticket intent: record name: Open a ticket summary: Create a tracked work item so the follow-up cannot quietly vanish. risk: low approval: none reversible: true evidence: ticket-ref params: [title, owner, due] - key: log-decision intent: record name: Log a decision summary: Record the decision, its rationale and its consequences at the moment it is made. risk: low approval: none reversible: false evidence: decision-record params: [decision, rationale, consequences] - key: update-registry intent: record name: Update the registry summary: Write the outcome back into the registry graph so state and record agree. risk: medium approval: none reversible: true evidence: registry-write params: [registry, key, changes] # ---------------------------------------------------------------- verify - key: verify-health intent: verify name: Verify health summary: Confirm the target reports healthy through its own health surface. risk: low approval: none reversible: true evidence: health-result params: [target, endpoint] - key: verify-restore intent: verify name: Verify a restore summary: Prove a restore actually produced usable data. An untested backup is not a backup. risk: low approval: none reversible: true evidence: restore-proof params: [target, assertions] - key: verify-absence intent: verify name: Verify absence summary: Prove the condition that triggered the response no longer holds. risk: low approval: none reversible: true evidence: absence-proof params: [condition, method, window] - key: re-run-evidence intent: verify name: Re-run evidence summary: Re-execute the original check so the claim is reproducible rather than asserted. risk: low approval: none reversible: true evidence: rerun-result params: [check, baseline] # ----------------------------------------------------------------- close - key: postmortem intent: learn name: Postmortem summary: Write the review while the detail is fresh, in the incident-playbook form the governance framework requires. risk: low approval: none reversible: false evidence: postmortem-doc params: [incident, template] - key: close-incident intent: learn name: Close the incident summary: Close formally, which requires the evidence chain and the verification steps to be present. risk: low approval: required reversible: false evidence: closure-record params: [incident, disposition] - key: promote-control intent: learn name: Promote a control summary: Turn a lesson into a permanent check, so the same failure cannot recur silently. This is the loop closing. risk: medium approval: required reversible: true evidence: control-record params: [lesson, check, owner] # ------------------------------------------------- schema change governance # Added after assessing the schema-migration tooling landscape. The finding # was that the platform has ten databases and no schema-change governance at # all, and that this gap must be closed in the vocabulary regardless of which # migration engine is chosen. - key: migrate-schema intent: act name: Apply a schema migration summary: Apply a versioned, reviewed schema change to a database and record it in a change history. risk: high approval: required reversible: false evidence: migration-record params: [database, version, direction] - key: rollback-schema intent: act name: Roll back a schema migration summary: Revert a schema change to its prior version. Destructive when the migration was not written to be reversible, so it is always gated. risk: critical approval: required reversible: false evidence: rollback-record params: [database, version] - key: verify-schema intent: verify name: Verify the schema version summary: Confirm the applied schema matches the intended version, so a migration is proven rather than assumed. risk: low approval: none reversible: true evidence: schema-verification params: [database, expected-version] # ----------------------------------------------------- agent authority model # Added after assessing Open Instinct (adoption.yaml: open-instinct SKIP, # open-instinct-policy-guard BUILD). The finding was that the platform # declares agent trust in the interface registry but has no capability gate in # front of the operator agent, so agent-misbehaviour can only respond after # the fact. These primitives make the authority model an explicit, checkable # property of the vocabulary, in the same way approval and reversibility # already are. # Full assessment: /opt/prodg/open-instinct-integration-plan.md - key: provision-agent-identity intent: act name: Provision an agent identity summary: Mint an agent identity with a scoped credential, so the agent holds only what its class needs and nothing more. risk: medium approval: tier-dependent reversible: true evidence: identity-record params: [agent, handle, scopes] - key: set-trust-tier intent: decide name: Set a trust tier summary: Bind a principal to a tier. This is the authority grant everything else derives from, so widening it is always gated. risk: high approval: required reversible: true evidence: tier-record params: [principal, tier, rationale] - key: grant-capability intent: act name: Grant a capability summary: Add a scoped, time-boxed exception to a principal's tier. Additive only; it can never widen past the owner. risk: high approval: required reversible: true evidence: grant-record params: [principal, capabilities, scope, expires-at] - key: revoke-capability intent: act name: Revoke a capability summary: Withdraw a granted capability before it expires, so access ends when the reason for it ends. risk: high approval: required reversible: true evidence: revocation-record params: [principal, capabilities, reason] - key: verify-capability intent: verify name: Verify a capability boundary summary: Prove by negative test that a principal cannot do what its tier forbids, rather than asserting the guard holds. risk: low approval: none reversible: true evidence: negative-proof params: [principal, forbidden, method]