Docs ยท the user model

How you want
to be worked with.

The most valuable thing a brain learns is said once, in passing, usually as a correction. The next session has lost it unless something wrote it down. This page covers the parts of os-brain that hold on to it and the limits each one keeps.

Preferences #

$ os-brain prefer "answers first, reasoning after" --confirmed \
    --why "said so when a reply opened with background"
remembered #6 [global/preference] answers first, reasoning after

$ os-brain prefer "send the weekly totals to Maria as a PDF, never a spreadsheet" \
    --about Maria --why "she forwards it to the accountant"
remembered #10 [global/relationship] send the weekly totals to Maria as a PDF, never a spreadsheet

prefer is remember with the fields already filled in, because friction is the reason preferences never get written down. It stores a preference at importance 4 with today as the source date and "stated by the user" as the source. --about <person> files it as a relationship instead (put the person's name in the text, since the type is what changes). --confirmed records that they said it outright, --why becomes the body and --pin, --scope, --importance, --supersedes and --update work as they do on remember.

Preferences and relationships go into the brief under HOW THEY WANT TO WORK, up to eight of them by importance and recency, ahead of guardrails and pinned facts. They are tier C, so in an ordinary search they fade over about two months. The brief ignores that fading. A preference stays in front of every session until it is replaced or pushed out of the eight by more important ones.

## HOW THEY WANT TO WORK
  #6 [preference] [confirmed] answers first, reasoning after
     said so when a reply opened with background

A preference that is a hard boundary rather than a taste belongs in a guardrail: remember --type constraint (or policy) puts it in every brief and makes forget ask for --force.

When to store one #

The moment it is said, not at the end of the session. Sessions get compacted and killed mid-task and a preference the agent meant to write later does not survive that. The signs are plain enough:

The per-prompt hook watches for this language and reminds the agent. The reminder only fires on clear phrasing, at most once every 15 minutes in a session and not when a stored preference already says much the same thing:

[brain] that reads like a standing preference, not a one-off. If it is, store it now: os-brain prefer "<the rule in their words>" --why "<what prompted it>"

It is a backstop. The agent is the mechanism and the reminder only catches what the agent missed.

Your exact words #

Every message you type is stored verbatim before the agent answers. The UserPromptSubmit hook (os-brain hook-recall) does it on each turn, because that is the only moment the exact words are still there. Everything after it depends on the model choosing to write something down.

$ os-brain utterances
#4 2026-11-20 [taste] I hate it when the summary repeats the question
#3 2026-11-20 [command] run the tests
#2 2026-11-20 [directive] from now on always show me the diff before you deploy
#1 2026-11-20 [command] no, I care about the totals being right, not the layout

$ os-brain utterances --class directive   # command | taste | directive | exhibit
$ os-brain utterances --unclassified      # what was not sorted at all
$ os-brain utterances -n 50
$ os-brain capture "from now on always show me the diff before you deploy"   # by hand
captured #2 as a directive (cue:from now on). Say it again in another session and it becomes law.

Together they answer a question that would otherwise need a transcript: what did they ask for in their own words, as opposed to what the session decided they meant. capture exists mainly for the hook and stays silent on an ordinary turn. A command that announced itself on every message would be one people mute.

How a prompt is sorted #

Each captured prompt gets one of four classes and the cue that decided it, so a reader can check the reason rather than trust the label.

ClassWhat puts a prompt there
exhibitSomething shown rather than said: a fenced code block, a quoted line starting with >, "for example" or "someone said". Checked first.
directiveA narrow list of literal cues: "from now on", "always", "never", "each time", "every time", "whenever", "by default", "make sure you", "I want you to".
taste"I like", "I love", "I hate", "I prefer", "I can't stand".
commandEverything else, which is most prompts.

The sorting leans towards "not a rule" at every step and the reason is an asymmetry. Storing a one-off as a rule rewrites every future session and looks the same afterwards as a rule you really stated. Missing a rule costs one restatement. Exhibit comes first for the same reason: a pasted transcript with somebody else's "always do X" in it must never become your standing rule.

Classification is English only. A prompt in another language is stored as a command marked as not classified and utterances counts how many there were, so the limit is visible instead of quietly patched over with a half-tuned matcher.

What is kept and for how long #

There is no per-message opt-out. The only way to stop capture is not to wire the hook: os-brain init --no-auto-recall, which turns off automatic recall on each prompt as well. init says this when it wires the hook.

The ladder: stated, hardened, law #

Repetition is authority. Every memory has a place on a ladder that the brain works out from what it can already see, never from anyone's say-so:

StateHow a memory gets there
statedSaved once. A position, open to discussion.
hardenedSaved again after an objection was recorded against it. The objection keeps its date and its reasoning.
lawSaved again from a different session than the one that last stated it. A second session agreeing counts. The same session repeating itself does not.

"Saved again" means a remember or prefer with the same title in the same scope, which refines the memory in place and moves the ladder:

$ os-brain prefer "answers first, reasoning after"   # a later session
updated existing memory #6 (same title in global)
  ladder: law (stated 3x) - restated in a different session: law. Only the user can reopen it.

$ os-brain ladder 6
#6 is law, stated 3x
  current state: law.

Each state is recorded once with its date and nothing lowers it. The session id comes from the agent (OS_BRAIN_SESSION_ID or CLAUDE_CODE_SESSION_ID). Without one, each command counts as its own session, named after the host and the process id, so a memory saved once and restated once by hand from a shell becomes law.

The ladder is there for the agent. A session that finds a fact disputed treats it as an open question. One that finds it settled as law stops arguing it. It does not change how a memory ranks in recall or whether it goes into the brief.

Disagreeing with a memory #

$ os-brain object 1 --why "measured the opposite on staging today: the app terminates TLS itself there"
objection recorded against #1
  it is stated (stated 1x)
  objection recorded. A restatement after this will harden the memory.

$ os-brain ladder 1
#1 is stated, stated 1x
  current state: stated.
  objected 2026-11-20: measured the opposite on staging today: the app terminates TLS itself there

An objection deletes nothing and supersedes nothing. It records that somebody disagreed and why, so the next session sees the disagreement instead of inheriting the claim unopposed. --why is required because the reasoning outlasts the verdict. A memory that is already law still takes the objection, since people may still disagree. It just cannot reopen the memory.

Use --supersedes for a fact that changed. Use object for one that may never have been right.

whoami #

$ os-brain whoami --observe sources="reads primary sources"
Observe 'sources': evidence is required — a trait with no evidence is the bare score this model refuses to store

$ os-brain whoami --observe sources="reads primary sources" \
    --evidence "asked for the RFC rather than a summary, twice"
sources            reads primary sources
    because: asked for the RFC rather than a summary, twice

Wrong? os-brain whoami --forget <key>. It is a measurement, not a verdict.

$ os-brain whoami --forget sources
dropped 'sources'

The user model is a short list of traits, each a key=value with the evidence that produced it. Every trait needs evidence. A picture of a person built from guesses with no citation is a pile of assumptions nobody can push back on, while this one can be challenged line by line. Observing a key again replaces it: the model holds the current read on a person, not a log of every time it changed its mind. --forget takes the key, not the phrase.

You see it only when you ask. It never goes into the brief, because a brief that opens by describing the person reading it is unpleasant and a wrong assessment reads as condescension.

Where each part lives #

PartStored inWhy there
preferences, relationshipsthe project's brainThey are memories, with types, scopes and history like any other.
captured promptsthe project's brainThey are what was said in this project, kept 30 days.
objections and ladder statethe project's brain, beside the memoryThey belong to one memory.
whoami traitsthe shared store, ~/.claude/os-brain/brain.dbThe person is the same in every project. Filing traits per project would mean learning them again in every repository and would let two projects disagree about who you are.

None of it leaves the machine. Traits are never published as a lesson or copied anywhere else, since a profile of a person stops being safe to keep the moment it is treated as shareable content. One machine, several projects explains the shared store.