s-m-r-t
Open the s-m-r-t source on GitHub Switch to dark color scheme
← All packages
Agents & runtime v0.57.40

@happyvertical/smrt-playbooks

Layered playbook definitions, app and tenant overrides, and plan resolution for agents: a named sequence of steps every agent surface follows.

Source ↗

What it gives you

Layered playbook definitions, app and tenant overrides, and plan resolution for agents: a named sequence of steps every agent surface follows.

  1. 01Resolution layers: code default, config override, stored app override, stored tenant override, runtime override
  2. 02A playbook is a script, never a call: resolution returns a plan and nothing here executes a step
  3. 03Step lists are never editable; enablement and plane lists only narrow

Define and resolve

definePlaybook registers code defaults in a global process registry, so a package ships its own playbooks. resolvePlaybook merges the layers and returns a plan or fails closed with a specific reason: unknown-playbook, disabled, plane-not-declared, intent-registry-unavailable, or unknown-intent. A TTL cache keyed by key and tenant is invalidated on override save or delete.

Two kinds of step

An operation step names a qualified model and action, never a generated tool name. An intent step names a declared view intent and is valid only where a surface is mounted. Steps never classify themselves; classification is inherited from the referenced operation and undeclared operations resolve to destructive.

Preflight predicts, never grants

preflightPlaybook resolves through the caller’s own layer chain and returns a per-step verdict of allow, deny, or unknown plus an aggregate. Every step re-enforces authorization at execution.