runbooks / command
Audit runbooks against the code
Checks runbooks still match the code
❯ /runbooks:audit <id> | --capability x | --all [--fix] [--model <model>]❯ $runbooks:runbooks-audit <id> | --capability x | --all [--fix] [--model <model>]When executing as a child, you cannot ask the user. When the main session executes this file inline, it asks the user directly and handles calls through the dispatcher. Where this file says to ask (AskUserQuestion, "ask the user", a diff approval), stop with status: question as agents.md says. Where it says to say something and stop, put the message in summary: and report status: done. Commit nothing: the main session commits after it prints your summary.
With role tracking on (roles.enabled in the config), also read the Roles sections of references/format.md and references/config.md. The role checks below apply only then.
Parameters
Select one way: an id, --capability or --all.
| Parameter | What it does |
|---|---|
<id> |
One runbook. |
--capability <x> |
Every runbook of one capability. |
--all |
Every runbook that is not deprecated. |
--fix |
After the report, show the edits as a diff per runbook, apply them once you approve, and commit by the runbooks policy. It also rewrites api steps written before 1.9.2 with http and json blocks, keeping the same checks; that conversion leaves last_run as it is. Without it the command only reports and writes no file. |
--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 audit runs on sonnet and audit --fix runs on opus. 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:audit billing.issue-invoice # one runbook
/runbooks:audit --capability billing # one capability
/runbooks:audit --all # every runbook
/runbooks:audit billing.issue-invoice --fix # report, then fix
/runbooks:audit --capability billing --fix # fix a capability
/runbooks:audit --all --fix # fix everything
/runbooks:audit billing.issue-invoice --model opus # on opus, this time only