Brain

The knowledge plane, and how agents reach it. Brain is not a store of its own. It unifies four sources and exposes them to every Claude Code session you run, both worker sessions and your own interactive ones.

SourceHolds
Memorylearned insights: patterns, gotchas, decisions, and things that failed
Libraryauthored documents: research notes, decision records, project docs
Code indexstructure: which files exist, what they export, what imports what
Directivesthe rules a project is governed by, read live from disk

How a search is ranked#

The three kinds of source answer different questions, so brain does not pretend they are comparable:

  • Memory and library are searched semantically, against the same embedding model, so their scores are directly comparable and interleave into one ranked list.
  • Code index is a structural lookup: a symbol, a path, an import edge. It comes back as its own block, unranked against the others.
  • Directives are not results at all. Rules always apply, so they are pinned ahead of everything scored.

A search asks all four at once and degrades rather than fails. If the local model host is down or one database is cold, you get the sources that answered, flagged as partial, instead of an error.

There is one guard worth knowing: every source records which embedding model indexed it, and brain drops any source whose model no longer matches rather than ranking silently across incompatible vectors.

Scope#

Knowledge is either global (true everywhere, across every project) or attached to one project.

Because projects form a tree (a customer with repositories beneath it), pinning a search to a parent surfaces knowledge from its children too. Global means your entire world, not one customer; customer-wide knowledge belongs on the parent project.

Agents are constrained structurally, not by instruction: a session can write to global or to its own project, and cannot name a foreign one.

How agents get it#

Brain runs as an MCP server that Claude Code attaches to automatically. There is no port and no daemon. It is spawned per session and dies with it.

Tools available to a session include search across all four sources, recall and write for memory, library search and fetch, code search, directive lookup, idea capture, and recording a failed approach as a dispute.

You get the same thing in your own interactive sessions, which is why /toryo-* commands and hand-driven work share one knowledge base rather than two.

Team installs point at a shared knowledge plane over HTTP, gated by your seat, so a machine with no local database still reaches the team's brain.

In board#

The Brain screen searches all four sources at once. It is the fastest way to check what your agents actually know about something before dispatching work that depends on it.

Maintenance#

Decay, reindexing, and cleanup run themselves on the scheduler's system lane. Nothing here needs a setup step.