Architecture

On Plurics, a whole working environment forks as cheaply as a Git branch. You can try a risky upgrade, run four builds on one codebase with no port or lock collisions, freeze a noisy task in memory, and throw an experiment away in milliseconds. This page covers what that changes in daily work, the four primitives and four laws underneath, and how the system runs today. The RFCs specify each part.

Working in Plurics#

Most of the design below looks like security machinery: closed namespaces, attenuated ports, a vault, and a ledger that never rewinds. Its purpose is ordinary work with fewer interruptions:

  • A world is a workspace, not one repository. Real work crosses neighboring repositories, notes, tools, and other running agents. A world is any copy-on-write state tree plus the ports its creator binds into it, so it can hold a service, its client library, and your notes on both, and it forks that whole workspace as easily as a single directory.
  • Experiments with real undo. Before a database migration, a system upgrade, or an unfamiliar build script, fork a world in milliseconds with your warm build caches in place. If the check passes, merge atomically. If it breaks, discard the world: no leftover config files, packages, or orphan processes.
  • Parallel work without collisions. A hotfix, a long test run, and two competing refactors each run in a world of their own. Every world can bind localhost:3000 and 5432 at the same time and share a 10 GiB target/ cache copy-on-write, with no Cargo or npm lockfile fights. Freeze a heavy world in RAM with its processes intact, handle an interruption, and thaw it where it left off.
  • A shell in any world. plsh shell fix opens an interactive terminal inside fix, and plsh exec streams a program's output as it runs. Background executions keep running after you detach, and plsh exec-attach reconnects to them.
  • Fewer interruptions. Agent tools ask before risky commands because, on Unix, any command can touch your whole machine. Inside a closed world, scripts and agents run without prompts. Review moves to the finish line: merging a diff, or releasing staged external calls. The reviewer can be you, a deterministic check, or a reviewer agent that handles routine work and escalates the rest.
  • No .env sprawl or machine drift. Credentials live once in the vault and enter outbound TLS requests at the boundary, not in .env files across repositories. A world can pin its runtime as a content-addressed base image instead of drifting with host package updates.

Why plural worlds#

Unix gives every program one live tree and trusts the person at the keyboard. That design has lasted more than fifty years because it is simple: one copy of the system, changed in place by someone who answers for what their programs do.

It breaks when many actors work at once: people, build tools, verifiers, upgrade scripts, and agents, some of them untrusted. An agent that runs under your user ID can read ~/.ssh and reach the network. Two actors that change the same tree see each other's half-finished work. Plurics gives each task a world of its own instead. Here is the smallest case, a world made from one directory:

$ plsh init --source ./repo
initialized main (id b06302dba0cd)
$ plsh world fork fix
forked fix from main (id 7fd8030a4a35)
$ plsh exec fix -- sed -i s/1/2/ app.conf
$ plsh world diff fix
M app.conf  [state, clean]
$ plsh world seal fix --message 'version 2'
sealed fix at seq 5: value c651aba1b50d
$ plsh verify fix -- ./check.sh >/dev/null && plsh world merge fix
fast-forwarded main to fix: value c651aba1b50d

An unmodified sed changes fix, not main. Sealing fix turns its tree into one immutable value. The check runs in a copy of that value with no grants, and main moves only if the check passes. At no point does main hold a half-finished change.

Unix assumesPlurics provides
A trusted person at the keyboardActors whose authority is exactly the grants they hold
Ambient authority: a user ID reaches $HOME, ~/.ssh, and the networkA closed world that sees only what its creator bound into it
One live tree, changed in placeWorlds that fork in O(1) on a copy-on-write file system, then seal, diff, merge, or discard
An effect happens when the call returnsEffects recorded in a ledger outside every world before they leave
fork() copies a processworld.fork copies a whole environment, and a world can call it on itself

Plurics does not replace Unix. Unix becomes the interior of a leaf world, a world that runs programs rather than more worlds. Unmodified programs such as sh, sqlite3, rustc, and git run inside it with their usual files, processes, and pipes. What changes is what a world can name, and where its writes and network traffic go.

Four primitives and four laws#

The session above used three of the four primitives. main and fix are worlds. c651aba1b50d names a value: the hash of fix's tree at its seal. The ledger, outside both worlds, journals the seal. The fourth primitive, the port, lets a program inside a world do the same things, as the recursion example shows.

PrimitiveWhat it is
WorldA closed execution and state environment. It forks and discards in O(1) on a copy-on-write file system.
ValueAn immutable, content-addressed sealed state: the BLAKE3 identity of a world's tree at a seal.
PortThe only door out of a world. It does not fork with the world. Its creator chooses the far end and the grants it carries.
LedgerThe append-only record outside every world. Worlds fork; the ledger does not.

Four laws govern the primitives:

  1. L1 Closure. A world observes and affects only what its creator bound into its namespace: no ambient $HOME, no ~/.ssh, no network route, and, in deterministic mode, no ambient clock or entropy. Capability confinement and deterministic replay both follow from this one law.
  2. L2 Descent. A child world's mounts, port grants, egress policy, base image, and quota are subsets of its parent's.
  3. L3 Custody. Custody is everything inside Plurics's snapshot-and-ledger boundary. Every binding is a Value, which is in custody and forks with the world, or a Port, which does not fork. Anything outside custody crosses a port.
  4. L4 Monotonicity. The ledger never forks, shrinks, or replays. Nothing leaves custody before its durable ledger record.

Principals are symmetric. A person, a verifier, a reviewer agent, a team policy, and a delegated service are all principals, and only the grants their ports carry tell them apart. Merging a verified world or releasing a staged batch takes a port with that grant, not a special kind of user. The same design serves a solo developer approving in plurics-tui, the terminal review console, a supervisor agent merging overnight, and many people and machines later.

The running system#

One daemon, pluricsd, owns every world. Clients reach it over a socket, worlds reach it through ports, network traffic leaves through the daemon, and Linux sits underneath.

Clientsplsh · plurics-tui · any programJSON-RPCpluricsdledger · vault · quotasnetworkportsworldworldworldLinux
  • Clients speak JSON-RPC 2.0 to pluricsd over a Unix socket that only its owner can open, or over TCP after proving they hold the control key (RFC-001).
  • Ports. An execution started with grants gets a socket of its own, bound at /run/plurics/port.sock inside the world. The port carries exactly the grants its creator gave it, reaches only that world and its descendants, and closes when the execution ends.
  • Egress. An execution started with an egress policy gets a second socket. It is the only way out of the world's network namespace. Every request through it is metered, and the vault can add a credential on the way out (RFC-002).
  • Runners. By default, an execution runs under bwrap in a cgroup of its own. pluricsd serve --runner vm boots each execution in its own KVM micro-VM instead, with no network device (RFC-001).
  • State. One SQLite file, ledger.db, is the only durable store. It holds the ledger, the quota tables, and every world record. After a crash, pluricsd reconciles the ledger, checks each world against its working copy, and resumes interrupted releases. Nothing is replayed.

Plumbing and porcelain#

The core is plumbing: the four primitives and the services pluricsd builds on them. The vault, quotas, the egress door, and the staged outbox are core services. Each is a use of ports and the ledger, not a new primitive. A program that knows one workload, such as an agent's model provider, a dollar budget, or Git, is porcelain: it lives outside the daemon and reaches it through the same port interface as any other program.

Four rules keep that boundary:

  • Every verb works from inside. A program in a world calls the same world verbs as the host, within its port's grants.
  • Real programs first. Each rung of the evolution path proves itself on real, unmodified programs before any model-based test, and on at least two unlike workloads.
  • No interface without a caller. No ABI, wire format, or formal model stays in the tree for more than two weeks without a real caller.
  • Linux behind one seam. The services do no I/O of their own, so Linux can be replaced from below.

Five workloads, one core#

The core is designed to serve five unlike workloads, with no special cases:

  1. Speculative engineering. People, agents, provers, and fuzzers try changes in parallel worlds. A verifier picks the winner, and the rest are discarded.
  2. Transactional upgrades. An operating system or database upgrade runs in a fork. It is verified and then merged atomically, or thrown away in O(1).
  3. Incident response. A closed world replays a production trace while you try mitigations, before anything touches production.
  4. Compartmentalized personal computing. An untrusted PDF, a finance tool, and a mail client each run in a world of their own, with no ambient authority between them.
  5. Deterministic simulation. Hundreds of seeds of a distributed system run in worlds with a virtual clock, seeded entropy, and a closed network.

The test suites already run plain Unix programs and coding agents over TLS end to end (RFC-004). Coding agents are one workload among these.

Where user space is headed#

Suppose you ask an agent why last night's deploy got slower. Answering takes a throwaway view of profiler output, a script that joins two log formats, and a look across the service, its client library, and your notes from the last incident. On Unix, each of those tools gets installed on your machine and outlives the question. On Plurics, an agent can build them in a world, use them, and discard them with the world.

The rest of this section describes direction, not the running system. Its last part says what exists today.

Disposable tools, durable data#

Traditional operating systems were built around static, preinstalled apps, and you carry files between them by hand. More and more, people work through one assistant that builds the tools, views, and workflows a task needs as it goes. Plurics divides the system along that line. Your data, sealed values, credentials in the vault, and the ledger are the long-lived pieces. A task-specific tool runs in a cheap, closed world. When the job ends, you discard the world, or seal it and keep the tool as a value.

Working realms, not project silos#

A wall around every folder is the wrong boundary: a prompt at every crossing teaches people to approve without reading. The direction is a broad working realm with no prompts inside it, where moving across related projects and coordinating with sibling agents is the normal path. Hard boundaries sit where risk actually changes:

  1. Reversible versus irreversible. Local exploration inside a working realm can be undone. A commitment to the outside world cannot.
  2. Low stakes versus high stakes. Work with different stakes lives in different working realms, and raw credentials stay in the vault, outside every world.
  3. Clean versus untrusted input. Work that has read external data carries that provenance, and nothing that data could have steered passes as clean.

Quiet by default#

Plurics is not meant to be an operating system of permission pop-ups. The core stays strict: a port carries exactly its grants. Above the core, routine work inside a working realm should need no prompt. A policy layer, built on delegated grants such as effect_release, can settle routine requests that cross a boundary and ask you only on a refusal, on tainted input, or on an irreversible commitment. A request that appears inside untrusted text is data, not authorization: a mention in a web page or an email grants nothing.

What exists today#

The running system already provides the floor: copy-on-write worlds, vaulted egress, the staged outbox, and provenance marks, which rise to ExternalIngress when external data reaches a world. It also provides delegated release: a reviewer world whose port carries effect_release may release a clean outbox of one of its descendants, never its own. Working realms, ports for coordinating sibling agents, and the policy layer are still to be built.

Evolution path#

Plurics is meant to own the machine. Today it does not. pluricsd is a user daemon on a Linux distribution, and every world shares the host's Linux kernel. Linux is where Plurics is being built. It is not where Plurics is meant to stay.

Starting on Linux was a decision about order. A kernel written first would have cost years before the first world ran, and no real program would have tested anything above it. On Linux, the first worlds ran real compilers, databases, and agents, and the tests from that work now say what any lower layer must do.

The plan is to move down the stack one rung at a time. Each rung moves Linux further from the boundary between worlds.

RungWhat runsWhere Linux isStatus
Hostedpluricsd as a user daemon. A world is a set of namespaces and a cgroup.The host operating system, shared by every worldRunning
ApplianceA machine image that boots a Linux kernel and pluricsd and nothing else: no login, no package manager, no shell outside a worldUnder Plurics, for its driversBuilt; gate not yet passed
VM worldsEach world boots its own Linux kernel in a small virtual machine. Forking a world forks its memory as well as its files.Inside each world, and under them as the hypervisor (KVM)Next; live fork built in the VM runner
Plurics kernelA small kernel written for Plurics replaces the host Linux. It runs native Plurics worlds directly and Linux-compatibility worlds as virtual machines, forking them by sharing pages. It runs first on virtual hardware.Optional: inside compatibility worlds and, where needed, a driver guestPlanned
Bare metalThe same kernel boots a real machine.Optional: same two places, or none on native drivers and native worldsPlanned

Two things stay fixed on the way down. Existing Linux programs keep running unmodified: from the third rung on, they get the Linux interface from a Linux kernel that belongs to their own world, so the Plurics kernel never has to imitate Linux. And plsh, the port protocol, and the ledger do not change, because each rung replaces only what is beneath pluricsd.

Linux leaves the boundary between worlds first and becomes optional after that. C and Rust programs compiled directly for Plurics run in native worlds with no Linux inside them, and small Rust driver domains cover virtual and targeted server hardware. Linux-compatibility worlds remain an option for legacy Linux binaries and broad laptop hardware, so driver work never stalls the kernel.

No rung has a date. A rung starts when the one above it has passed its gate, and RFC-004 lists the gates and the pieces already built. The reference implementation is one Rust workspace, layered so that each crate depends only on crates below it.