The short version
Imagine a toolbox where every tool has a name tag it cannot forge. You reach in, pull out a thermometer, and the toolbox can tell it really is that thermometer, on that shelf, and not something pretending.
A Sawbones module is one board for one job: a DC meter, a listen-only bus pod, and later more senses. Every module speaks the same protocol to the supervisor. Plugging a module in grants it nothing until a person has enrolled it.
What a module is
The plan is for modules to be small boards on a 42 mm grid with a USB-C connection, a shared firmware core and a machine-readable manifest. The manifest says what the module measures, with units and ranges, which actions it offers and their hazard class, its limits, and the safe state it goes to when something goes wrong. The grid size and connector are decided for now and open to change.
This is the design. No physical module has been built. Every module in the repository today is simulated.
The protocol (technical)
sawbones-module-protocol is one crate compiled into both the supervisor and module firmware, so the two cannot drift. It is no_std and reads no clock.
Calls. Every built module answers the same requests: identify, describe, health, self-test, time, config read and write, log, stage an update, reset, safe state and actuate. Each has one expected reply, or a typed refusal.
Frame. A header of fixed length (starting with the magic bytes SB and a version), a bounded payload and a 4-byte CRC-32C. Integers are little-endian. The CRC catches line noise, not an attacker, and the documentation says so. What resists an attacker is the layers on top. Golden tests pin the encoding so it cannot drift silently.
Decoding is total. The request and response decoders accept any byte string and return a value or a named error. They are fuzzed weekly in CI (the module_protocol_frame target) with a re-encode round trip.
Identity. A module proves who it is with an Ed25519 signature over the host's fresh challenge, the session the module opened, its claimed identity, its capabilities, its manifest digest and its firmware digest, checked against the key enrolled for that identity. A replayed or edited identity does not verify. Sessions are chosen by the module and sequence numbers rise on both sides, so an old or repeated frame is dropped.
Hazard class on the wire. A class 2 or 3 command carries the interlock's hazard class and, for class 3, the lease target naming exactly that action on that module. The module checks it against its own class table, so a module does not take the supervisor's word for it.
Testing before hardware exists
sawbones-sim-modules provides simulated modules (a DC meter, a comms pod and an interlock controller) and a simulated link with named, seeded fault scenarios: bit flips, truncation, loss, duplication, reordering, delay, babbling, replay including across a reboot, an identity that names another module or overclaims, oversized length fields and a stuck line. The same seed gives the same run. Nothing in it reads a clock, spawns a thread or touches the operating system. The simulated modules carry no real key and can never attach to a live session.
Those scenarios feed red-team cards in the catalog, such as a module that claims to be another module.
Conformance levels (designed)
The design document sketches four levels, from "described" (a host driver and a manifest) up to "agent-maintainable" (update with rollback, a reproducible build and a golden recording). None is enforced yet. See docs/project-document.md.
Not built yet
Per-device module keys, signed boot, real USB enumeration, noise-floor checks that flag a stream too clean to be real, and every physical module. A reading a module reports about itself counts only as evidence about that module until an independent instrument agrees.
Want to help? See Get involved.