Skip to content

runbooks / command

Create a context

Registers a context with its keys and cases, and marks the runbooks it reaches for review

❯ /runbooks:contexts:create [name] [--model <model>]

Adds the context to <paths.runbooks>/roles.json and marks the runbooks it reaches with review. A context is a question about the record that changes what a role may do on some keys, and a case is one answer to it. Read first: ${RUNBOOKS_PLUGIN_ROOT}/skills/runbooks/references/config.md, "Roles", and ${RUNBOOKS_PLUGIN_ROOT}/skills/runbooks/references/format.md, "Review". Commit policy: ${RUNBOOKS_PLUGIN_ROOT}/skills/runbooks/references/commits.md.

Parameters

Needs role tracking on. It asks the description, the keys and at least two cases, shows the diff of roles.json, then lists the runbooks on the new keys and offers to mark them for review. No role's access changes until /runbooks:permissions:manage gives it actions per case.

Parameter What it does
[name] The new context, in kebab-case and not used by another context. Without it, the command asks.
--model <m> Run this invocation on one model: inline (in the main session), haiku, sonnet, opus or fable. Any value but inline runs the command in a sub-agent on that model. Without it, the command takes its row of the models table in the config: by default contexts:create runs inline. On Codex, the values are inline, inherit (a sub-agent on the session's model) or a model ID the session supports, and the table is codex.models, where every row that is not inline defaults to inherit. See models.
/runbooks:contexts:create                 # asks the name
/runbooks:contexts:create client-access   # a new context
/runbooks:contexts:create --model sonnet  # in a sonnet sub-agent

View source on GitHub