cerebral work // os · soma
An operating system for governed autonomy.
soma is the agentic OS: run an enterprise on a persistent
agent workforce where every consequential verb is classified through an enforced gate ladder,
audited, and — the wedge — bound into a signed chain that cites the exact policy version it
was judged under. Authority is delegated per verb by a named human and revocable by signed
amendment, never granted by default. Cerebral runs on it as instance #0; the
reflex wire format is an open governance spec.
What it does
The body of an enterprise run by agents. Each function agent has a canon, its own memory lens, a verb × tier gate scope, and — critically — no credentials of its own. Every side-effecting call routes through the reflex plane, which classifies, gates, executes, and writes the audit record. Governance you can bypass is advisory; soma's is structural. There is no ungoverned mode — not even for dev.
- reflex — the gate plane. The runtime reflex arc. Verb classifier over a four-tier ladder — GREEN (autonomous, audited), YELLOW (notify-and-proceed, vetoable), RED (blocks on named-human sign-off), NEVER (sealed, no path exists). It is also the credential custodian and the executor: the agent submits the action, reflex classifies and runs it, the agent never sees the key. The one genuinely new hard thing.
- marrow — the constitution and the audit spine. Append-only, hash-chained, Ed25519-signed. One stream carries two kinds of entry: every decision the gate made, and every amendment to the policy it decided under — so was this decided under the law as it then stood? is answered by folding the chain to a sequence number, not by trusting a separate config history. Authority is enumerated per (agent, verb) and default-deny; altering it is a signed amendment by a named human. NEVER-tier to touch except through reflex — and reflex holds no signing key, so it reads the ledger and structurally cannot write it.
- hermes — the function-agent runtime.
Per-user, per-function durable agents on a multi-tenant NATS bus, estate-native on Kubernetes:
a
nats-tenant-operatorissuing account-per-user CRDs, anats-bridgesidecar, and read-only agent charts. Resolves the runtime open-question toward estate-native K8s; carries the per-user-hermesdesign forward from unsigned-paas. - deck — the operator surface.
SvelteKit PWA on Cloudflare Workers. The gate queue (sign-off cards with payload + diff),
function-agent status board, audit timeline, marrow view, amendment sign-off. Reaches
the founder on any device — a RED card cannot wait for a terminal. Board-tier-gated via
@cerebral/gate. - cli — the terminal line.
Rust, with a ratatui TUI and a machine
--jsonmode: gate queue, agent status, sign-off, ledger. The same cards the deck renders, in the operator's native habitat — thelizard/meshctlprecedent carried onto the gate plane. - spec — the reflex wire format. The open governance spec: three record types — action submission → classification, sign-off request/response, and the sealed audit record that enters the marrow chain. Any agent runtime can submit; any enterprise can mount its own policy + sign-off surface. RFC drafting is Phase 8, spec-from-practice after instance #0 has proven the shape.
Architecture
soma composes the estate rather than greenfielding: reverie/engram is the memory substrate,
godseat's gate taxonomy, terrarium's lifecycle gates, Keycloak + @cerebral/gate for
the human identity plane. What changes at the OS layer is the reflex plane, marrow,
the function-agent runtime, and the two operator surfaces.
| Component | Lang | Role |
|---|---|---|
| reflex | Rust | The gate plane: credential custodian + verb classifier + executor + audit writer. The only genuinely new hard thing. Ports/absorbs terrarium's reflex-core. |
| marrow | Rust | The constitutional ledger — append-only, hash-chained, Ed25519-signed. Per-(agent, verb) authority and the amendments that alter it, carried in the same stream as the decisions they govern. NEVER-tier to touch except through reflex. |
| hermes (runtime) | K8s · Helm + Go/Rust operator | The function-agent runtime. Per-user/per-function durable agents on a NATS multi-tenant bus: nats-tenant-operator (account-per-user CRDs) + nats-bridge sidecar + read-only agent charts. |
| deck | SvelteKit PWA · CF Workers | Gate queue + function-agent status board + audit timeline + marrow view + amendment sign-off. Board-tier-gated via @cerebral/gate. Scaffolded from cf-pwa-template. |
| cli | Rust · ratatui TUI + --json | The operator surface: gate queue, agent status, sign-off, ledger — both machine (--json) and interactive (TUI). |
| spec | docs | The reflex wire format — classification / sign-off / audit records. The open governance spec; RFC drafting is Phase 8, spec-from-practice. |
Status
SCAFFOLD as of 2026-07-18 — a federated terrarium node
that adopts the standards and stays its own repo. The soma design seed
(projects/soma/ in terrarium) has been ejected and re-homed; the ground-truth
design lives in docs/soma/ARCHITECTURE.md, this repo is its build home. Phase 1
— the reflex daemon v0: verb taxonomy + classify + audit + credential custody for one tool
surface — has not yet landed. Until it does, verbs do not
actually route through reflex; the components are specified, not executing.
The build sequence runs Phase 0 → Phase 8: seed hardening, reflex daemon v0, the soma/comms pilot (draft-only), memory tiers, gate calibration, staffing the company, surfaces to parity, cortex on soma, and finally the reflex RFC. The runtime component lands alongside Phase 1–2. The milestone that closes Phase 1 is narrow and load-bearing: an agent asks to send an email, the founder approves from a phone, and the agent never saw the credential.
Naming: soma is a working title — unregistrable as a
public brand, pending Marc/Laura ratification. os is the repo and build name; the
product name is a separate, deferred decision. Nothing here bakes a public brand.