Every guarantee BrainLLM makes is enforced at the tool layer rather than requested in a prompt. Here is what that actually looks like.
Created by bootstrap() against a fresh Trilium instance. The root carries a discovery marker, and every structural note is engraved with its purpose at creation.
BrainLLM โโโ ๐ค Master the user โ durable identity โ โโโ Biography ยท Goals ยท Preferences 3 singletons โโโ ๐ค LLM the assistant's self-model โ โโโ Responsibilities ยท Protocols 2 singletons โ โโโ Diary/ one [yyyy-mm-dd] note per day โโโ ๐๏ธ Memory the operational record โ โโโ Sessions/ one [yyyy-mm-dd] note per day โ โโโ Threads/ titled multi-session work โ โโโ <Thread>/ Context + Resolution only, โ day-to-day lives in dated children โโโ ๐ Knowledge learned info beyond training โ โโโ Master/ user facts beyond bio/goals/prefs โ โโโ Domains/ one Sources note + N information notes โโโ ๐ก Insights the brain's record of itself โโโ Logs/ auto-generated daily change log โโโ Graph live Mermaid render of the relation graph
What a note is determines how writes to it behave. This is the distinction that keeps a knowledge base from decaying into a changelog.
Exactly one maintained note; writes upsert into it. They hold current-state truth, edited in place โ biography, goals, preferences, responsibilities, protocols, and each domain's Sources note.
One per calendar day, titled by date. Diary and session writes append a timestamped block, because chronology is the point. The daily log is regenerated in place โ one clean snapshot, never stacked.
Titled notes, deduplicated by normalised title within their scope. A thread is itself a book: its body holds only Context and Resolution, and each active day gets its own child.
Degradation demotes rather than removes, so an archived note keeps its content and stays retrievable. Any touch reactivates it.
active โโโโโโโโโโโโโโโถ resolved | superseded terminal, archived in place โ untouched 21 days โผ dormant โโโโโโโโโโโโโโโถ archived in place #archived + #closed โ untouched 45 days more โผ
They are maintained, not recorded. Sessions, diary entries and logs never age either โ they are records by nature.
A thread marked eternal is skipped by the sweep entirely, for work the user wants kept permanently active.
Not modification date โ a thread's own body rarely changes once written, so date-based aging would retire a thread being worked on daily.
Connections are typed and rejected if they aren't on the list, because an untyped "related to" edge carries no information a reader can act on.
extends ยท contradicts ยท supports ยท causes ยท references ยท partOf ยท worksWith ยท mentors ยท instanceOf ยท supersedes ยท implements ยท inspiredBy ยท sourceOf ยท derivedFrom ยท corrects โ and relatesTo as the last resort.
corrects existsRevising a note in place leaves no trace its previous claim was ever believed โ so nothing tells a later reader to be suspicious of sibling notes written in the same pass, by the same reasoning, on the same day. In a memory whose value is being trustworthy about the past, silent overwriting is the operation to trust least.
A session can't commit until every step has run โ and in the right order, because the diary is the closing record and should be written with the reflection cues in hand.
session() โ addendum() โ maintain() โ remarks() โ diary() โ close() Gate state lives on today's session note as a label, not in process memory โ so it survives a restart and behaves identically whether the server is running over stdio or behind a load balancer.
Five minutes to a working brain, if you already have Trilium up.