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.
| Today | Decided, not built | |
|---|---|---|
| Server | One process; redb; loopback API; Tailscale for the phone | Unchanged |
| Nodes | The one inside the server process | Remote nodes that dial out over WebSocket and run agents for the office, so a Spark or a second Mac can join |
| Store | redb | A 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) |
| Isolation | The owner’s user account, gated by the rules and approvals | Isolation levels per run |
| Policy | rules.toml: first match wins, default ask | Cedar 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:
| Area | State |
|---|---|
| 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 office | Decided (ADR-0006, ADR-0010), not built. The only node is the one inside the process. |
| Cedar policies and Biscuit credentials | Decided (ADR-0005), not built. Today’s rules are the TOML file. |
| ACP (Agent Client Protocol) as a third harness interface | Planned. |
| Fork, rewind, replay and evals over recorded runs | Designed, not built. |
| Codex capacity windows, approvals that survive a server restart, cancellation mid-command | Known 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.
| Document | Covers |
|---|---|
| What Shiioo is | The product definition, principles, topology and roadmap. Read this first. |
| Architecture | The one rule, the guarantees, components, storage, the crate map. |
| Glossary | Platform terms, and how the virtual-company vocabulary (office, employee, task) maps onto them. |
| Contributing | Building, testing, conventions, how to add an event, a backend, a harness, a rule, a command, a route. |
| Backlog | Known rough edges, to fix or consciously keep. |
| Porting from shiioo-legacy | What was kept, replaced or dropped from the previous codebase. |
Design documents
| Document | Covers |
|---|---|
| Event log | Event format, hashing over stored bytes, the payload catalogue, external input, blobs, schema evolution, backends, archival, streaming. |
| Execution | Run lifecycle, scheduling, the worker loop, leases, cancellation, subagents, recovery, failure modes, simulation. |
| Tools and machines | Tool model, built-in and MCP tools, nodes and their protocol, isolation levels, worktrees and snapshots, secrets. |
| Runtimes and providers | The native loop, the Claude Code and Codex drivers, ACP (planned), model providers and the router, context building. |
| Governance | The owner’s rules, approvals, budgets, change management, the virtual-company template. |
| Fork and replay | Rewind, fork, diff, replay and evals. |
| API | REST and SSE, employees, permissions and approvals, capacity, diff, the dashboard, errors, auth. |
| Telegram | Commands, approvals with one tap, notifications, security of the bot. |
| Intake | Work arriving as labelled GitHub issues: the label protocol, the task prompt, dedup and state, failure handling. |
| Security | Threat model, controls, today’s posture, and what is not protected. |
| Deployment | The 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 |
|---|---|
| 0001 | The per-run event log is the only state. |
| 0002 | Run ownership through leases with fencing tokens. |
| 0003 | redb by default, Postgres for clusters. The cluster part is superseded by 0010. |
| 0004 | REST plus resumable SSE as the only public API. |
| 0005 | Cedar for policies, Biscuit for agent credentials. |
| 0006 | Machines run a daemon that dials out over WebSocket. |
| 0007 | Rewrite Shiioo from scratch under Apache-2.0. |
| 0008 | The product is a personal agent workforce, not a managed agent cloud. |
| 0009 | Harnesses are the primary runtime; the native loop serves local models. |
| 0010 | One 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.
| Crate | Owns | Read |
|---|---|---|
shiioo-core | The event format, hashing, leases and epochs, the recovery rules. No I/O. | README, invariants, recovery |
shiioo-store | The EventStore trait and its backends: redb, memory, Postgres. Every backend passes one conformance suite. | README, backends, conformance |
shiioo-runtime | The worker loop, the Claude Code and Codex drivers, tools, the machine and its journal, worktrees. | README, worker loop, harness adapters, machine and tools |
shiioo-rules | What agents may do without asking: the TOML format, matching, the defaults. | README, rules format |
shiioo-providers | OpenAI-compatible model providers for the native loop (Ollama, LM Studio, MLX). | README, OpenAI-compatible |
shiioo-api | HTTP routes, the event stream, approvals, capacity, employees, the dashboard. | README, HTTP, approvals and capacity, dashboard |
shiioo-telegram | The bot: commands, the owner gate, approval buttons, notifications. | README, protocol |
shiioo-intake | Labelled GitHub issues becoming runs, through the gh CLI. | README, flow |
shiioo-sim | The seeded simulator: crashes, lease races, machine restarts over thousands of scenarios. | README, scenarios |
shiioo | The 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 resolveThe 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.