Docs · beyond memories

Three things that
are not memories.

A memory is true until something changes it. A task is owed until it is done. A measure is a number that only means something next to its earlier readings. Mixing any of them in with memories would throw off the ranking, so each one sits beside them with its own rules.

Tasks #

When someone asks to be reminded every week or chased on Friday, use a task. Do not rely on whatever scheduler the agent's host happens to have.

$ os-brain task add "rotate the staging certificate" --when "every monday 9am"
task #1 [user] rotate the staging certificate
  due 2026-11-23 09:00 (every mon at 09:00)

$ os-brain task add "ask whether the vendor replied about the PDF fonts" \
    --owner agent --when "tomorrow 9am"
task #2 [agent] ask whether the vendor replied about the PDF fonts
  due 2026-11-21 09:00 (once)

$ os-brain task list
[ ] #3   check the invoice totals report  (due 2026-11-21 02:58)
[ ] #2   ask whether the vendor replied about the PDF fonts  (you owe this · set by session demo-ses on 2026-11-20 · due 2026-11-21 09:00)
[ ] #1   rotate the staging certificate  (due 2026-11-23 09:00 · every mon at 09:00)

--owner user|agent says who owes it. user (the default) is a reminder for the person. agent is a job for a session to raise, which is what you want for "ask them whether X happened". An agent-owned task shows which session set it and when, because it is the instruction of whoever added it, which may have been an earlier session and not the user.

Put the condition in the body. "Remind me about the draft" is a nudge. "Has the vendor replied? If so, reread the contract notes and offer to send; if not, one line and move on" is a task a later session can act on without guessing.

Four states #

$ os-brain task wait 2     # submitted, the next move is someone else's
#2 waiting (was open): ask whether the vendor replied about the PDF fonts
$ os-brain task done 3     # or: task drop 3
$ os-brain task reopen 3   # back to open, from any state
$ os-brain task snooze 1 --until "in 2 hours"
#1 snoozed to 2026-11-21 01:58 (this occurrence only; still every mon at 09:00)
$ os-brain task set 2 --body "sent 20 Nov, chase Friday" --when "2026-11-27 09:00"
#2 updated (body, when): ask whether the vendor replied about the PDF fonts
  due 2026-11-27 09:00
$ os-brain task list --all   # closed ones too; --state open|waiting|done|dropped filters
[ ] #1   rotate the staging certificate  (due 2026-11-23 09:00 · every mon at 09:00 · snoozed to 2026-11-21 01:58)
[~] #2   ask whether the vendor replied about the PDF fonts  (waiting on someone else · ...)
[x] #3   check the invoice totals report
$ os-brain task due        # what is owed right now, without marking it delivered

A task is open, waiting, done or dropped. Waiting means it is still owed but the next move is someone else's. It stays on the list marked [~] and still shows up when due, so the date on a waiting task is the day to chase it. done, drop, wait and reopen work from any state.

task set <id> changes a task in place: --title, --body, --owner, --scope and --when (none clears the schedule). Only the flags you pass change anything. Do not drop a task and add it again to change it: the new one gets a new id and the old one's history stops.

A typo is an error. An unknown subcommand, a flag that subcommand does not read or a missing id is refused before anything runs. It never falls back to printing the list, which would look like success.

$ os-brain task done 2 --owner user
task done does not take --owner; to edit a task use task set <id> --owner

Schedules #

--when takes the time the way people say it. These are the forms it reads:

FormMeans
in 3 hoursonce, relative to now
tomorrow 9amonce, tomorrow
5pmonce, today at that time
2026-08-09 14:00once, on that date (a bare date works too)
every 5 hoursrepeating, on an interval
daily 17:00repeating, every day
every monday 9amrepeating, every week on that day
monthly 1 09:00repeating, on that day of each month

Anything else is refused with that list, so a schedule cannot be half understood. Weekday names on their own ("friday 9am") are not a one-off form: use the date. A repeating task moves to its next occurrence when you close the current one, instead of piling up the occurrences you missed.

How tasks reach you and what they cannot do #

Tasks only show up when a session runs. A due task appears in the brief, with the prompt hook on every message and at the end of a session. Nothing wakes a machine or acts on its own, so a task on a project nobody opens for two weeks waits two weeks. Say so when someone asks for a weekly reminder: they may have meant an alarm and this is not an alarm.

Every task add prints the same warning, so nobody has to remember it:

  Delivered when a session is open and somebody is typing — nothing here wakes a machine or acts unattended.

A task nobody answers keeps coming back but not forever. After three unanswered deliveries it says it has been offered three times without being acknowledged and asks whether to keep it, snooze it or drop it. A reminder that keeps arriving with no way to answer it turns into something people scroll past and the brief is built so that none of its signals end up like that.

The list as a file #

$ os-brain task todo --out TODO.md
TODO.md is inside a git repository and is not gitignored.
  gitignore it, then re-run   no flag needed, and the usual answer
  a path outside the project  needs --allow-outside
  commit it deliberately      needs --allow-tracked

task todo writes the ordered list to a file on request and follows the same safety rules as every other file the brain writes. It will not overwrite a file it did not create, write through a symbolic link, write outside the project without --allow-outside or write to a path git would track without --allow-tracked. Every task is in that file in cleartext, so add it to .gitignore or pass the flag on purpose.

What is outstanding #

$ os-brain open
## WHAT IS OPEN — invoices, answered from the brain at 2026-11-20 23:58

OPEN TASKS (2)  — bodies in `os-brain task list` or `os-brain open --full`
  [ ] #1   rotate the staging certificate  (due 2026-11-23 09:00 · every mon at 09:00 · ...)
  [~] #2   ask whether the vendor replied about the PDF fonts  (waiting on someone else · ...)

WHAT ACTUALLY HAPPENED
  2026-11-20 23:58 [task] task #2 edited (body, when): ask whether the vendor replied about the PDF fonts
  2026-11-20 23:58 [task] task #3 done (was open): check the invoice totals report
  ...

"Where did we leave off?" is a question a session would otherwise answer by re-reading the git log and a long TODO file. open answers it from the brain: open tasks, work in flight and what the activity log says just happened. --full adds task bodies and longer extracts and -n sets how many items it shows. The prompt hook adds the same block, unasked, when your message reads like that question ("what's next?").

Measures #

A memory tells you what is true. A measure tells you what a number was and which way it is going. A reading stored as a memory can be found but not trended, which is usually the only reason it was taken.

$ os-brain measure add "pdf render p95" 1840 --unit ms --date 2026-11-02 --ref "grafana:invoices"
#1 pdf_render_p95 = 1840 ms on 2026-11-02
$ os-brain measure add "pdf render p95" 910 --unit ms --date 2026-11-10 --note "after the font cache fix"
#2 pdf_render_p95 = 910 ms on 2026-11-10  ↓ -930 since 2026-11-02
$ os-brain measure add "PDF_Render-p95" 620 --unit ms
#3 pdf_render_p95 = 620 ms on 2026-11-20  ↓ -290 since 2026-11-10

$ os-brain measure series "pdf render p95"   # --from / --to / -n narrow it
$ os-brain measure list                    # every series, breaches first
$ os-brain measure forget 5                # one reading, by id

Readings are not searched or ranked at all. That is on purpose: a number must never push a fact down. A p95 taken this morning is newer than every decision in the brain and if it were ranked the same way it would land on top of all of them. Measures still appear in the brief, in map, in stats and in recall when the question names a series.

Other flags: --label, --why, --source, --confidence and --scope. export carries measures and import restores them only into a project that has none. Readings have no identity (two on one day is a real series, not a duplicate), so there is no safe merge and a second import would double the history.

Limits: silent until you set one

$ os-brain measure limit "pdf render p95" --high 1000 --better down --why "the invoice SLO"
band for pdf_render_p95: low= high=1000 better=down
$ os-brain measure add "pdf render p95" 1250 --unit ms
#4 pdf_render_p95 = 1250 ms on 2026-11-20  ↑ +630 since 2026-11-20
[brain] pdf_render_p95 is above its declared ceiling of 1000: the invoice SLO

$ os-brain measure series "pdf render p95"
! pdf render p95         1250 ms  ↑ +630 since 2026-11-20 (worse)   n=4   ABOVE 1000
  █▂▁▄   min 620 · mean 1155 · max 1840

  2026-11-02        1840 ms        !above   grafana:invoices
  2026-11-10         910 ms         after the font cache fix
  2026-11-20         620 ms
  2026-11-20        1250 ms        !above

A number with no limit set is recorded and never judged. Most numbers have no right answer and a tool that made one up would start complaining about readings nobody asked it to watch. Set a limit (--low, --high and which way is --better) and a reading outside it is flagged on the write, in list, in doctor and in every brief until it is back inside.

Do not use a measure for something that happened once: that is a memory. Do not use a memory for the fifth reading of a number you already track.

Leads for sales work #

A brain is not only for code. init puts one in any directory an agent works in, including a sales or outreach folder. There, what has to carry over between sessions is who was contacted and what happens next.

$ os-brain lead add --name "Jane Doe" --company "Acme" --role CTO \
    --channel email --segment agency --value-est 12000 \
    --next-action "send the sample invoice" --next-date 2026-11-27
lead #1 added: Jane Doe @ Acme [new]

$ os-brain lead list   # --status and --segment filter it
#1 [new] Jane Doe @ Acme (agency) $12,000 | next: send the sample invoice (2026-11-27)
1 leads, pipeline value $12,000

$ os-brain lead update 1 --status replied --append-note "asked about VAT on credit notes"
$ os-brain lead show 1
$ os-brain lead pipeline   # also: lead hot, lead next

Each lead has a stage (new researching contacted replied engaged demo trial negotiating won lost skip), the next action and its date. Use --append-note so the history is kept, since --notes replaces it. add and update also take --url, --email and --tier. On a lead --tier is free text for your own segments, unrelated to the decay tiers memories have. Memories about one lead go in the scope lead:<id>.

It is optional and it stays out of the brief until a lead exists. A sales tracker nobody asked for would be noise in every project that sells nothing. Text in a lead that looks like a credential is refused and, unlike most commands, lead has no --allow-secret: nothing about a sales note needs to carry a key.

The activity log #

$ os-brain log "deployed 1.4 to staging" --kind deploy
logged event #7 [deploy] deployed 1.4 to staging
$ os-brain events
2026-11-21 00:04 [deploy] (global) deployed 1.4 to staging
2026-11-20 23:58 [task] (global) task #3 done (was open): check the invoice totals report

Memories say what is true. The log says what happened. It only grows and it is never ranked against memories. Task changes are logged for you, which is how open can say what the last session actually did. Declare the kinds a project uses with os-brain kind, the same way scopes are declared, so map can spot a kind somebody made up by a typo.