Reference · Import runbooks into the brain
Import runbooks into the brain
Most teams have their rules written down already, in deploy runbooks, incident playbooks and checklists. The Import card turns those files into draft brain rules. Each draft quotes the file and the passage it came from, and lands in the review queue. Nothing reaches the brain until a person accepts it.
1. Open the Import card
In the desktop app, open Memory, then Brain library, and pick the repository whose brain the rules belong to. The Import card sits above the library tables. Open it to see the file picker, the Knowledge file to draft into (patterns.md unless you choose another), and a line that says which drafter will run.
2. Pick your runbooks
The card takes Markdown (.md, .markdown), plain text (.txt) and PDF, up to 1 MB per file. Pick several at once; each goes in its own request. A file of another type, or over the limit, is refused under the card with the reason before it is read. Files are read on your machine and are not stored afterwards. Nothing is sent to repoops.ai.
A PDF exported from a word processor or a wiki has a text layer, and RepoOps reads it page by page. A scanned PDF has only page images. It is read through OCR when the build includes it, and refused with that reason when it does not, so export the runbook as text instead.
3. How a draft is written
With no model key set, RepoOps drafts with a heuristic that needs nothing and spends nothing. Each headed section that holds instructions becomes one rule listing up to eight of them, and an instruction with no heading above it becomes a rule of its own. An instruction is a sentence that tells someone what to do: a step that starts with a verb, a line that starts with Always or Never, or a condition such as If the deploy fails, roll back.
When your own Anthropic key is set in Settings, one model call per file rewords the rules instead. The model may change the wording but not the citation: every rule must name a section RepoOps sent, and the citation is built from that section's own lines. If the call fails or the daily call cap is reached, the heuristic drafts and the result says why. Tick Draft without a model to skip the call even when a key is set.
Secrets such as API keys, tokens and private keys are redacted before either drafter reads the text.
4. Read the result
Each file gets one result: how many drafts were queued, which drafter wrote them, and a list of the drafts with the file, section and line range (or page, for a PDF) each came from. Importing the same file twice in a day does not queue the same drafts twice. A file with no instructions in it says so rather than queueing nothing in silence.
5. Review in Brain reflection
Follow Review them in Brain reflection. Every draft is a card with its rule and the quoted passage underneath. Accept it, edit it first, or reject it. An accepted rule is written into the Knowledge file with its citation, so a reader can still trace it to the runbook later. The coding agents that read the brain read it from then on.
Other ways into the same queue: the nightly reflection, and a capture on My Brain. How a reviewed lesson reaches a session is on Lessons and recurrence.
From a script
The card calls POST /api/brain/import-runbooks?repo=<id> with { name, text or base64, target, drafter }, one file per request, on the desktop app's local server. GET on the same path returns the limits, the Knowledge files you can draft into, and whether a model key and OCR are present. A refusal comes back as { ok: false, reason } with the same sentence the card shows.
Last updated