Replay
One record of everything that happened, so any past moment can be rebuilt and run again.
# the record: every stream, one timeline, never rewritten
$bun LIFEOS/REPLAY/Replay.ts tail --n 8
$bun LIFEOS/REPLAY/Replay.ts verify && bun LIFEOS/REPLAY/Replay.ts counters
# 2,418 rows today from 31 writers · chains intact · cloud 41s behind · 0 gaps at the 07:00 reconcile
# rewind: Sunday 19:40, Sam asked if everything was backed up. Juno said yes. The laptop was 7 days stale.
$bun LIFEOS/REPLAY/Rewind.ts input 5e1c90ab --errata ERR-212
# replay: run that turn again, as it ran and with the fix in place
$bun LIFEOS/ASSAY/Assay.ts replay --turn fixtures/5e1c90ab-t3.json --fix-append backup-check.md --expect "laptop.*stale" --k 5
$
Replay in the terminal: the last eight rows of Sam's record from six streams, the record's own health check showing 2,418 rows today, and Sunday's wrong answer about backups rewound and replayed, 0 of 5 as it ran and 5 of 5 with the fix.
Replay is the record of what happened. When a hook refuses a command, a job finishes or an app deploys, the fact is written once, in one shape, to one append-only record. Everything else the system keeps about its work is computed from it, so any past moment can be rebuilt and run again with a fix in place.
Why it exists
A system with dozens of parts ends up with dozens of private diaries, each in its own format. LifeOS kept them in one state folder it treated as disposable, so history quietly disappeared: the work-event log was wiped about every nine hours.
When something went wrong, the evidence was often gone, so no fix could be checked against its miss.
How it works
Every row carries the same envelope: who wrote it, when, which stream, how private it is, and the fact itself (large payloads by hash). On each machine, every writer appends to its own daily segment, so none waits on another, and each day’s segments are hash-chained and sealed against later edits. Secrets are masked (the local engine still refuses them for now), content leaves only by an audited erasure you approve, never by age, and the authoritative copy lives in the cloud on your own account.
The rest is meant to be views, like the work board. A registered view names what it reads and how it combines those rows, so it can be thrown away and rebuilt. Systems move in one at a time, writing to both stores until they match. A drill rebuilds every registered view against a copy and counts the history held only in deletable files. An hourly check reads the last two hours against transcripts and other independent logs and reports missing rows to Vigil.
Your apps report in too, each through a scoped credential or service binding with a ceiling on what it may send; customer data never reaches the cloud record.
A prompt fix is judged over several runs because a model can answer differently each time. Code fixes are proven by a test of the miss that fails on the old commit and passes on the new one. Replayed turns can’t call their tools yet.
Where you see it
In the terminal up top, Replay.ts tail lists the last eight rows from six streams: a failed laptop backup, its alert, the text to Sam, an eval receipt, a staging deploy and a turn, between two Vigil heartbeats. verify and counters report 2,418 rows today from 31 writers, chains intact and 0 gaps at the 07:00 reconcile. Rewind.ts rebuilds the turn behind Errata entry ERR-212: on Sunday Juno told Sam everything was backed up when the laptop was 7 days stale. Assay replays it five times as it ran and five with the fix: 0 of 5 against 5 of 5, verdict better.
Where it fits
Replay keeps what happened, and Vigil decides whether any of it is worth interrupting you for. Cortex curates what’s worth remembering in its own ledger, which Replay reads in place. Census lists what exists and computes each thing’s state from the rows that name it. Code keeps its history in git, and Ledger versions every change to the system.
