Reference

Design

The principles, what is built and what is planned, and a map of the documentation: the design documents, the ten architecture decisions, and where each part lives in the code.

Principles

  • The event log is the only state. Every run is an append-only, hash-chained log; workers hold nothing they cannot rebuild from it. Dashboards, status lines and recovery are reads of the same log. A feature that needs state expresses it as events.
  • Write before acting. Model responses and tool intents are recorded before their effects, so a crash at any point leaves a log that says what did and didn’t happen. Side effects are never retried blindly.
  • Harnesses first. Claude Code and Codex, run headless on their subscriptions, are the employees. Shiioo’s own agent loop exists for local models, not as a replacement for the harnesses.
  • The owner is on a phone. Every decision an agent cannot make alone becomes a message with two buttons. The rules decide the rest, and every decision is on the record.
  • One binary, one machine, no services to run. An embedded store, a loopback API, Tailscale for reach. Remote nodes dial out to the server; they never require the server to reach them.
  • A personal workforce, not a managed cloud. One owner, one office. No tenants, organisations or billing.

Topology

Today the office is one process: the server and the only node are the same binary on the same machine, with redb underneath.

TodayDecided, not built
ServerOne process; redb; loopback API; Tailscale for the phoneUnchanged
NodesThe one inside the server processRemote nodes that dial out over WebSocket and run agents for the office, so a Spark or a second Mac can join
StoreredbA Postgres backend exists and passes the same conformance suite; a cluster no longer requires it (ADR-0003’s cluster part is superseded by ADR-0010)
IsolationThe owner’s user account, gated by the rules and approvalsIsolation levels per run
Policyrules.toml: first match wins, default askCedar policies and Biscuit credentials

What exists

The office runs end to end today: the kernel with leases, fencing and recovery; the redb store with a conformance suite shared with an in-memory backend and a Postgres backend; the worker loop with the Claude Code and Codex drivers and the native loop for Anthropic and OpenAI-compatible providers; the rules with the hook that gates every harness command; the HTTP API with a resumable event stream, approvals, capacity and employees; the mobile dashboard; the Telegram bot; the GitHub issue intake; the launchd service with keep-awake; the simulator. Every section of the design documents is marked (built), (planned) or (deferred, ADR-n).

Planned, and not yet started:

AreaState
Isolation levels for harness runs (OS sandbox, snapshots)Planned, next phase. Today a harness runs with the owner’s permissions, gated by the rules.
Remote nodes that dial out over WebSocket, so a Spark or a second Mac can run agents for the officeDecided (ADR-0006, ADR-0010), not built. The only node is the one inside the process.
Cedar policies and Biscuit credentialsDecided (ADR-0005), not built. Today’s rules are the TOML file.
ACP (Agent Client Protocol) as a third harness interfacePlanned.
Fork, rewind, replay and evals over recorded runsDesigned, not built.
Codex capacity windows, approvals that survive a server restart, cancellation mid-commandKnown gaps, in the backlog.

Documents

Everything lives in the repository under docs/. Where a document and the code disagree, the code wins and the document is wrong.

DocumentCovers
What Shiioo isThe product definition, principles, topology and roadmap. Read this first.
ArchitectureThe one rule, the guarantees, components, storage, the crate map.
GlossaryPlatform terms, and how the virtual-company vocabulary (office, employee, task) maps onto them.
ContributingBuilding, testing, conventions, how to add an event, a backend, a harness, a rule, a command, a route.
BacklogKnown rough edges, to fix or consciously keep.
Porting from shiioo-legacyWhat was kept, replaced or dropped from the previous codebase.

Design documents

DocumentCovers
Event logEvent format, hashing over stored bytes, the payload catalogue, external input, blobs, schema evolution, backends, archival, streaming.
ExecutionRun lifecycle, scheduling, the worker loop, leases, cancellation, subagents, recovery, failure modes, simulation.
Tools and machinesTool model, built-in and MCP tools, nodes and their protocol, isolation levels, worktrees and snapshots, secrets.
Runtimes and providersThe native loop, the Claude Code and Codex drivers, ACP (planned), model providers and the router, context building.
GovernanceThe owner’s rules, approvals, budgets, change management, the virtual-company template.
Fork and replayRewind, fork, diff, replay and evals.
APIREST and SSE, employees, permissions and approvals, capacity, diff, the dashboard, errors, auth.
TelegramCommands, approvals with one tap, notifications, security of the bot.
IntakeWork arriving as labelled GitHub issues: the label protocol, the task prompt, dedup and state, failure handling.
SecurityThreat model, controls, today’s posture, and what is not protected.
DeploymentThe office on one Mac (install, keep-awake, Tailscale), several machines, config, observability, upgrades, backups.

Decisions

Each architecture decision record holds one decision: the context, what was chosen, what was given up, and when to revisit. Records are never edited after acceptance except for their status; a changed decision gets a new record that supersedes the old one. The index has the template.

#Decision
0001The per-run event log is the only state.
0002Run ownership through leases with fencing tokens.
0003redb by default, Postgres for clusters. The cluster part is superseded by 0010.
0004REST plus resumable SSE as the only public API.
0005Cedar for policies, Biscuit for agent credentials.
0006Machines run a daemon that dials out over WebSocket.
0007Rewrite Shiioo from scratch under Apache-2.0.
0008The product is a personal agent workforce, not a managed agent cloud.
0009Harnesses are the primary runtime; the native loop serves local models.
0010One binary: a server, nodes that dial out, an embedded store.

Where to look in the code

A Cargo workspace of ten crates, one binary. Each crate has a README (purpose, API, how to test) and a docs/ directory for maintainers.

CrateOwnsRead
shiioo-coreThe event format, hashing, leases and epochs, the recovery rules. No I/O.README, invariants, recovery
shiioo-storeThe EventStore trait and its backends: redb, memory, Postgres. Every backend passes one conformance suite.README, backends, conformance
shiioo-runtimeThe worker loop, the Claude Code and Codex drivers, tools, the machine and its journal, worktrees.README, worker loop, harness adapters, machine and tools
shiioo-rulesWhat agents may do without asking: the TOML format, matching, the defaults.README, rules format
shiioo-providersOpenAI-compatible model providers for the native loop (Ollama, LM Studio, MLX).README, OpenAI-compatible
shiioo-apiHTTP routes, the event stream, approvals, capacity, employees, the dashboard.README, HTTP, approvals and capacity, dashboard
shiioo-telegramThe bot: commands, the owner gate, approval buttons, notifications.README, protocol
shiioo-intakeLabelled GitHub issues becoming runs, through the gh CLI.README, flow
shiioo-simThe seeded simulator: crashes, lease races, machine restarts over thousands of scenarios.README, scenarios
shiiooThe binary: CLI commands, the config file, the service installer, the hook program, the office that ties the crates together.README, office layout, service, hook

Working on it

cargo build --workspace
cargo test                                             # unit, integration and simulation tests; no services needed
cargo clippy --workspace --all-targets --all-features  # must be clean
python3 scripts/check-docs.py                          # every relative link in the docs must resolve

The workspace forbids unsafe and denies unwrap(). Tests never run the real claude or codex; they drive fakes that replay recorded output, and the recordings are real, sanitised output from the real tools. Docs carry status markers, and decisions worth not re-litigating get a record. There is no release process yet: cargo install --path crates/shiioo on the office machine, then shiioo uninstall && shiioo install to pick up a new binary. The rest is in Contributing.

Shiioo is Apache-2.0, at github.com/raskell-io/shiioo. The previous codebase is shiioo-legacy.