Skip to content

runbooks / command

Map the code into placeholders

Scans the code and writes a placeholder runbook for each flow no runbook cites

❯ /runbooks:map [--capability x | --slice name | --path glob] [--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.

A placeholder is a runbook with frontmatter and a Goal but no steps (status: placeholder). It marks a flow that still needs a runbook. /runbooks:create fills it later. This command writes new placeholders only and never edits an existing runbook, placeholders included, so running it again maps only what is still unmapped.

Parameters

Use at most one filter. Without one it maps the whole project. With a filter, a requirement is mapped only when it belongs to a flow mapped in that scope. Running it again maps only what is still unmapped.

Parameter What it does
--capability <x> Map only entries whose file is in the slice x of the config slices.
--slice <name> The same as --capability.
--path <glob> Map only entries whose file matches the glob.
--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 map runs on sonnet. 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:map                              # the whole project
/runbooks:map --capability billing         # one capability
/runbooks:map --slice billing              # one slice from the config
/runbooks:map --path 'src/app/billing/**'  # files under a path
/runbooks:map --model opus                 # on opus, this time only

View source on GitHub