The short version
Think of a workshop foreman. The foreman knows which tools are plugged in, hands the agent readings, and passes along requests. The foreman does not hold the keys to the power cupboard. If the foreman made a mistake or got fooled, the cupboard would stay locked anyway.
The brain is that foreman. It is a program on a Raspberry Pi that identifies modules, collects their readings, checks each request against the rules and exposes the result to an AI agent. Our rule for it is plain: the Pi carries data but does not vouch for it. The chips that hold the real limits check their own rules whatever the Pi believes. The Pi's checks only refuse sooner.
What the brain does
- Knows who is who. Plugging something in grants it nothing. Each module must be enrolled: tied to one hub port, one key and one pinned description. A module that proves its identity from the wrong port, shows up on two ports, claims more than it was enrolled for, or carries a different description is quarantined, told to go to its safe state, and has its facts thrown out until a person re-enrolls it.
- Watches deadlines. Every request has a time limit. A module that goes quiet or is unplugged is marked lost, and the facts that depended on it are invalidated.
- Labels every number. A reading carries where it came from: measured by an instrument, stated by the operator, taken from a document, concluded by an agent, or unverified. The agent cannot give itself a better label.
- Funnels every write through one door. Preflight, S.C.R.U.B. check, confirm, then act.
Technical detail
The skeleton is sawbones-supervisor. It has no hardware I/O and no clock: every link is a trait (module transport, interlock link, bus transport, challenge source) and time is a tick passed in. That is why every test runs with in-memory fakes and the simulated modules from sawbones-sim-modules.
One write path. Supervisor::preflight checks the facts a write rests on and classifies the request, returning a token bound to the request, the action digest and the fact versions. Supervisor::latch_check checks the S.C.R.U.B.. Supervisor::invoke takes both by value, has the policy engine's confirm consume the token at the moment of action, checks the latch again and runs the supervisor's own gates. Only then does the bus transport receive an Authorized action, a type nothing else can construct. Compile-fail examples in the crate show that skipping the token or the latch does not build.
Facts go stale on purpose. In sawbones-policy, a fact is scoped to the exact device model, serial and firmware, the interface, the conditions and the method that established it. A reflash, a rewired port, a lost device, a foreign bus master or a clock break invalidates the facts it touches, and an invalidation is sticky: the fact must be earned again. The facts a write relies on are worked out by the host, never from a list the agent supplies.
Readings cannot self-promote. In sawbones-reading, a decoder or plugin produces an Observation that has no trust tier. Only host code can turn it into a Reading, whose fields are private; a compile-fail doctest guards that. Any string that came from outside the project is wrapped in WorldText, which has no Display, so it cannot slip into a prompt or log line by accident.
S.C.R.U.B. (Stop Commands Read from Untrusted Bytes). Once outside content reaches the agent, class 2 and higher actions wait for a fresh approval. The latch starts tripped, a new turn inherits it, and only the trust root's reports of approvals clear it. Details on the Interlock page.
Connection plans. Class 2 and 3 actions also need a connection plan that passes the isolation checker in sawbones-isolation, a typed graph of grounds that flags ground loops, defeated isolation and buses with two masters before anything is wired.
What is built, and what is not
Built and tested in simulation: the registry and quarantine, link deadlines, the heartbeat answer, fact invalidation, the one write path, the S.C.R.U.B. and the isolation checker.
Not built yet: the write tools of the MCP server (T.R.I.A.G.E. v0 is built in simulation and read-only, and it reports module text to the latch), drivers as child processes, the equipment knowledge store, real USB enumeration, and module write commands. Nothing has run on a real Raspberry Pi with real modules.
Read the code
The crate list and what each one does is in the README. The design document is docs/project-document.md.