Where we are
Arrival tried to make one writer's custody log carry every kind of sharing. Records now form an observed set. Meaning binds at read. Stores merge without a coordinating authority; admission still applies. Start with Scenarios or read the worked example.
The walk, layer by layer
- 0Recordrecords, observers,
of(things),about(mentions),prev, two kinds of timemostly settled - 1Meaningvertex and store: a question, and a thing you write intoclosed
- 2Resolutioncontent and witness ticks; window, reference, witness sets; late ticksclosed
- 3Compositionone vertex reading many stores; things,
about,resolve-byclosed - 4Placesplaces, store definitions, a slim index, small erasureclosed
- 5Sharingunion by segment lists, two key tiers, presence, retire throughclosed
- →Trustwho counts: five strata, two tiers of key, standing split around tickswalking
- +Horizonseditable lenses, selective disclosure, knowledge as a buildexploring
Build status and sequence are in the roadmap, what waits on Kyle is in the decisions, and what was built and ruled is in the changelog. Each is rendered from its file in the repo. What the model proves is on the laws page.
Decision ledger
Each decision is written as a record, the way the system would hold it. Folded in version 31: 92 entries became 33, grouped by layer. Version 32 settled three model questions raised by two outside reviews. Version 35 recorded what reviewing step 2's model found. Version 36 recorded the rulings of 2026-11-13 to 2026-11-21: declared keys, the cut, the result codec, payload values and edges. Version 37 recorded those of 2026-11-22 and 2026-11-23: step 4 closed, how a spec finds its stores, and the import of an old store. Version 38 recorded those of 2026-11-24: what a store says about its kinds, how a reference is read, and its one written form at the import. The conversation turns in Sources keep how each was reached.
Foundations
strange-loops repo.rust/, with a pure core and a fixture evaluator. JS and Rust check all protocol fixture families and external standards. The loops CLI and its storage over .loops/ are built (step 2, closed on 2026-11-20); budget tooling remains planned. The proposed .loops/ migration remains a collector in the old repo.Layer 0 · the record
loops/record/v1:. It separates the signed record id from other messages.prefix:value. Set normalization also removes repeats and omits empty sets, except sets, where an empty set is written as []: absent and empty differ there.envelope-field-unknown before kind-empty. Variation belongs in the payload.string-not-unicode. It covers values, member names, envelope fields and what a batch holds, in text and in direct-value APIs. It follows envelope-field-unknown and precedes kind-empty. A payload text gets it only when the text is JSON by its syntax. Nothing is substituted, U+FFFD included.number-out-of-range, last in the writer's order. The core's number type stays finite. An input adapter carries the overflow to that check and to the spec parser; it refuses neither earlier nor under another name. A reader's own records must hold finite numbers.emitted is the writer's word (RFC 3339); occurred is an optional claimed span that can be coarse.occurred is a span with a closed grammar: dates, instants and intervals, never a duration.occurred value names one span. Content order reads that span; future windows use its start. Calendar dates are UTC days. EDTF Level 1 qualifiers (2009~) and trailing unspecified digits (201X) retain one span. Qualifiers never change it. Intervals join two points and may have an open end (2019/..). Spans order by start, then end, with open ends last. Content order compares span, emitted, then id digest bytes, never spellings. Without occurred, a record has its emitted instant span. Canonical base32hex id text has the same order as digest bytes. Durations repeat what an end instant says. Seasons, open or unknown starts, unknown ends and years past 9999 fail with occurred-not-span. Accepting less would invalidate stored records. Version 35.{commit, env}, an Ed25519 signature over loops/record/v1: plus the id. References stay opaque. Records are signed by default and a store carries its writers' key bindings, so it verifies itself. The version in the signed prefix lets a reader refuse only what is newer than it knows.emitted, plus its salt and payload. The same draft written twice is the same record, and set union absorbs it, in a batch or across batches. A new observation gets a fresh salt, so it gets a new id and is simply a new record. Version 35.erases; any kind may erase.erases is a set of record ids, refused unless each is one, and never a label. It sits on the envelope, so every reader applies it, whatever its grant. Targets in about were rejected: a kind would decide which reading of about applied. No kind is reserved for erasing, so the field carries the meaning by itself, and a revision can erase what it replaces: prev: [r:X], erases: [r:X]. Authority keys on the field. Version 35.kind, observer, emitted, optional occurred, about, of, prev, under, erases and sets. derived-from, seen and refs belong in payloads. Readers refuse unknown envelope fields.prev sits on the envelope. Withholding or erasing payloads preserves each thing's head ids. A record superseded within a thing cannot become current there. A payload test answers unknown when its payload is unavailable. Results count covered records they cannot read. Added in version 32.number-out-of-range); 1e30 is refused. Within-range fractions are accepted. Numeric readers additionally require whole values. Exact decimal or large-integer values belong in strings.write checks the envelope, salt length, repeated members at any depth, then nonfinite numbers or any number outside ±(253−1), whole or not. Within-range fractions pass. A batch uses the same path, with refusal priority independent of draft order and prev order. It returns a Written record carrying the proof, including distinct member names. Version 35 (PR 7), with the final 13:25 writer-range ruling.present means the member was written, also when it holds null, {}, [] or "". A list reads as a set of its members under is, not and by, and is never a number. Nothing reads inside a nested object. value and n were once on every record, as empty text and 0; they are now fields like any other, so a record without n is unread to a sum of n. Ruled on 2026-11-21 (payload values, seven choices) and stated in the model as payload.read. Version 36.Observers and standing
@home.under. One stance shape covers affirm, adopt, dispute, retire and authorize. A delegate is a shared seat; an identity that emerges starts its own lineage and adopts what it wants to own.under.@g and act under it. under accepts labels, like about, of and prev, and participates in cycle detection. A writer refuses an under target it doesn't hold, in the batch or the store (under-unknown; Kyle, 2026-11-13). Whether the target is a grant, and whether it authorizes the act, is for future standing checks. A label grants no extra authority. Version 35.Things
of.of is one typed reference, a record id or a natural key, read as written and never resolved through another record. Only a root leaves it out; a record with prev states it (of-missing). latest-by, per-thing state and heads run over it, and every prev target is of the same thing. A writer refuses an of naming a held record that is not a root (of-not-root). A record without of keeps its bytes and id. Kyle, 2026-11-10; built in the model, the vectors, JavaScript and Rust. The refusal names and their order are an implementer's choice, not yet confirmed.about only mentions; it never makes a head.where and collect still read it, so everything said about a thing stays a fold. from.about is a mention test and from.of takes a thing's records. A link that many writers add to and remove is a thing of its own whose about names both ends (the edges ruling below). Kyle, 2026-11-10; built with D8a. D8c, keys a record declares it sets, is ruled and built: its envelope field sets, every fold type following keys, and the keyed slice laws.of.*-anchor kinds. A vertex instead hashes its canonical spec and parameters; it has no anchor or standing. Proposed equivalence, provenance and succession remain separate; resolve-by joins identities at read. Unknown names follow the planned store maturity rules.from then chooses kinds. Since D8c (below) a thing's fields are read key by key from the keys each record declares, so an update no longer has to restate the whole; a facet read by kind remains a proposal. prev is a set, so forks retain several heads. Links are new records, never edits to about. A record is of exactly one thing: the one of names, or without of its own id. A root, with no of and no prev, starts a thing named by its id; its revision states that id in of, so unrelated roots never fork each other. Version 35; restated by D8a.prev is succession within a thing.prev targets outside the batch (prev-unknown), an of naming a held record that is not a root (of-not-root), and targets of another thing (prev-unrelated). Readers reject held targets of another thing, but admit unknown targets because they cannot judge them. Planned moving or narrowing uses explicit retire records. Replacement rules read only envelopes; future standing supplies authority. Version 34; restated by D8a.sets names the top-level payload keys a record sets; without it the record is read whole. A slot that follows keys reads each key from its live setters: the records that set it and that no later setter of it replaced. So an emit of status alone no longer drops title. Two live setters that disagree show as a conflict, and the core picks no winner. The envelope of a keyed thing is read from its heads. Ruled on 2026-11-13 and 2026-11-14, and built in the model and both implementations. Version 36.keyed.anchored), so a reader can hold a slice and not the history. loops emit fills this in. It also copies the heads' about and, since 2026-11-21, their occurred when they agree: an update to a thing that occurred in 2009 stays in 2009 unless its writer states a new occurrence. The protocol infers none of it: each is written into the envelope at write time, and a changeset (emit -) states its own, unless it asks for the same filling with --fill. Version 36.rel, from, to and state, and whose about mentions both ends. Labelled about was rejected: it would fork on two concurrent adds and still could not hold an edge's attributes. Ruled on 2026-11-21. Version 36.Meaning · vertices and stores
protocol/spec.md is normative; protocol/schema.md and JSON Schema files do not exist. Today a spec is a file, .loops/vertices/<name>.json. The storage plan uses vertex records and note comments. Parameterized templates remain proposed. The core accepts supported specs as data. Every accepted spec has at least one source; absent or empty from fails with from-missing.protocol/spec.md. by groups count, sum, min, max and collect by an envelope field, a typed-reference prefix of about (env.about:<prefix>) or a payload field. Historical proposals include order, set mode, windows and ranking-only weight-by; they are not implemented grammar. The proposed Avg lens divides Sum by Count. With each input id supplied once, commuting accumulators and over-head folds obey their set laws. Incremental over-head evaluation needs cached LatestBy state, not merely a cached answer. Max's scalar state cannot track changing heads; this proves no impossibility for all bounded-state algorithms. The Rust sum is unbounded. The JavaScript sum is exact to a signed 128-bit total; that limit was found on 2026-11-21 and is on the roadmap to remove or state. Future bounded ports must refuse overflow. Version 32.where can test any envelope field, named explicitly.env.kind, env.observer, env.emitted, env.occurred, env.about, env.of, env.prev, env.under and env.erases. Bare names identify payload fields. Unknown env. names are refused. Arguments must fit their fields: typed references, record ids, times, or supported payload scalars. Numeric tests require safe whole values after binary64 ingestion. Numeric complement laws additionally require a numeric bound. Missing and nonwhole values need not pass either bound. Time equality compares spans, not spelling; time bounds compare starts. Envelope tests select after supersession. A record without occurred passes neither time bound. A window instead uses its emitted. Windows include starts at their lower bound and exclude starts at their upper bound. Ruled on 2026-11-20: a window is a where on that time, applied after the heads (under Resolution, below); it is not built. Filtering before supersession could revive replaced records. Whole-span bounds were rejected: January ends before its year despite their equal starts. Observer tests use lineage ids until name tables arrive. Specs refuse repeated keys and empty where maps. Latest-by always writes follow: "prev" or "keys". Version 35.unread counts what couldn't be read.keys. Collect counts unknown candidates before its limit. Full-result equality needs answering tests and fold-readable covered records. Historical version 35 counted only uncertainty affecting the limit and overclaimed unread: 0. PR 13 removed those claims. A stronger limit-sensitive guarantee remains future work, not a current theorem.from, envelope tests and payload tests then choose among heads. Selecting first could revive a record superseded by another kind, an excluded source, a failed filter or a withheld successor. Without follow, count and sum include selected history, even when superseded; following prev they read the heads, and following keys the things. Found while modelling the spec (versions 33 and 34).Resolution · ticks
tick record signed by its writer, preserving one envelope. A witness tick records the runner's observed set. Erased numeric inputs leave only the signature as evidence for prior results. Proposed revisits create ticks citing earlier ticks. These transitions are not implemented proofs. Version 32.res:, below). The input key is ruled in part, in that it names which covered records were read open, and is not built. Downstream keys use result hashes, so unchanged results stop work. Incremental commuting folds need accumulator state; over-head folds need LatestBy state. Cached result values alone are insufficient.res:.res: and base32hex of SHA-256 over a versioned label and those bytes; it cannot be a record's commitment, which is h:. Ruled on 2026-11-11, 2026-11-20 and 2026-11-21; built, with vectors. Version 36.emitted is the writer's claim, so a record can build on one with a later emitted. The records emitted by T can then hold a record without what it was written on, and read a state no holder could have read: 96 of 3,504 cuts did, with clocks an hour apart. A part closed downward over prev is a state the store could have been in. "As of T" takes the records emitted by T and everything they reach through prev. It changes no record, no writer and no refusal. Ruled on 2026-11-20; the laws are keyed.cut and cut.prefix. Version 36.covers lists ids. emitted is one way to choose them and never a parameter of a fold, so no fold changed. What a store held at a time is not a fold's parameter either: nothing in a record says when it arrived, so only a witness tick taken then can answer. A holder before an erasure and one after it compute different results for the same ids wherever a value reads a payload, so a tick's inputs name which covered records were read open, and one set of inputs never names two results. Ruled on 2026-11-20. Version 36.where, applied after the heads.occurred when it states one, its emitted when it does not. Taking the window first, then folding, showed as current a record that a revision had moved out of the window in 428 of 660 trials. So a window is not a second mechanism beside where. Ruled on 2026-11-20. The field is env.when (ruled 2026-11-21); it is in the model with its laws, and Rust is being built. Version 36.loops tick and loops tick --check; a tick written on one machine checks the same on a second (2026-11-21). The payload holds the spec and its hash, the version of the rules, covers, the covered records read without a payload, and the result with its hash. A tick among the covered records is one record, never opened up. A store admits a tick without checking it; a verb checks, and answers same, differs or cannot check. This replaces "a content tick hashes its vertex, covered ids and result" above: a tick has no id but its record id. Version 36.Places and sharing
segments.json.about; a ping says only where to look. Admission filters and weight ranks.Lenses and context
base-id-duplicate. The base is checked before the text is read, so the refusal is given whatever the text says. The raw matching keeps its first-match behavior and its distinct-id premise.loops emit names every live record the store holds now. A writer who read earlier, a lens applying an edit or an agent acting on a context it was given, then replaces a setter it never read, and nothing shows it: 2,975 of 10,127 keys in the experiment. Against a stated base, a tick or ids, the same emit leaves a visible conflict instead. With no base an emit claims its writer read everything the store holds. Ruled on 2026-11-20 and built on 2026-11-22 as --base and --base-id; the law is keyed.base. A base that leaves out a record under its own is taken together with what is under it, and the writer is told (ruled on 2026-11-22). Whether a strict store warns or fails on such an emit is left for standing. Version 36.The local API and its surfaces
fold; tick and witness match the two proposed tick forms. Refusals have closed codes. Future serve JSON-RPC mirrors the crate for LSP, MCP and front ends.loops CLI is built for one person (step 2): HTTPie-style payload syntax, JSON answers, no zoom flags. A changeset is written whole or not at all. serve and the API beside it remain proposed.Building
Written does, and the laws take those types. Version 35.design/rethink/. node design/build.mjs renders the page, CI checks the render, projects.gruel.world serves it unlisted, and the claude.ai artifact is a mirror. .loops/ exists since step 2; the ledger still builds from ledger.json, and ledger-drafts.mjs turns it into drafts for loops emit -. Version 35.loops emits, reads and folds for one person..loops/, one key, one store. A verb that answers from a store that does not check still answers, and is then refused store-not-clean. Kyle closed the step on 2026-11-20. Ticks are step 4 and come next; standing and sharing follow. Version 36.loops tick writes a tick and loops tick --check answers same, differs or cannot check, and exits 0 only for same. A tick can cover a cut, by time or by ids, and a write can state a tick as its base. Kyle closed the step on 2026-11-22. Boundaries, markers and the runner were never in its exit and are not built. Adoption comes next: the old stores imported as a shadow, and reads across several stores. Version 37.Meaning · vertices and stores
from is bound to a directory by a per-user list, by an optional list kept with a group of stores, or by --store name=dir on the command. The spec and its hash are the same on every machine. A name bound to nothing refuses the whole read (store-unknown), so a missing store is never read as an empty one. A read across stores takes their union first. Ruled on 2026-11-23 (the adoption note); being built. Version 37..loops/store.json says, for each kind, its key field, its reference fields, what to show and which states are open and closed. The store refuses nothing until standing. The shorthand emit is strict about what it is given: it finds a thing's name from its key field, and stops before it signs on a key that disagrees, a kind the file does not name, a state in neither list, or a reference field holding anything but a reference of a listed kind. It never repairs or guesses; a batch through emit - is written as given. No read depends on the file: with no flag that names the description, a read's JSON is the same with and without it. Ruled on 2026-11-24 (the kinds and references note); being built. Version 38.about. A copy would sit in the envelope, where an erasure does not reach, and nothing but the erased payload says where a mention came from. What refers to a thing is read from the fields: loops ls --refers-to asks each declared field as a fold's is does, yes, no or unknown, across kinds and across a group's stores, and states what it read. Ruled on 2026-11-24 (the kinds and references note); being built. Version 38.Building
kind:key, in the order the old store took it in. The old time is occurred, a key made for the import signs, the old observer is a mention and the payload is untouched. A kind the old vertex no longer names is left out unless asked for. A trial on four real stores, 2,912 facts, gave the old tool's reading in every field for every thing held by one store. Ruled on 2026-11-23 (the adoption note); being planned. Version 37.ROADMAP.md, DECISIONS.md and CHANGELOG.md, and the Decisions page renders them. Ruled on 2026-11-21. Version 36.kind:key where the old store proves it.Historical conversation: how the design moved
- Started as a language question: rewrite in something faster and easier to install.
- Narrowed to the real pain: Arrival grew out of hand while trying to make stores shareable and mergeable by default.
- Widened again to the full topology: personal stores, ingestion, composition, ticks in agent orchestration. Git is one place a store can live, not the only one.
- Then went back to first principles, layer by layer. Layer 0 (the record) and the observer took most of the time, which is right, since everything else is built on them.
- Layer 1 closed against three real cases. Composition opened by asking what a thing is, and moved identity from the fold into the record.
- Resolution split ticks into content and witness, and found that most "late ticks" are really revisits.
- Places kept erasure small, split the old vertex file four ways, and a worked example tested everything together.
- Sharing needed nothing new: union, admission, witness-style cuts and key bindings. The work went into keys, presence and agents.
- Build chose Go once bindings dropped out, then Rust in version 31, once phones and extensions needed the core itself. Horizons collected what the design makes cheap: editable lenses, selective disclosure, knowledge as a build.
- Versions 26 to 31 walked the local API, MCP and CLI. They retired seal, kept vertex, made specs JSON and chose Rust. The page became a build brief.
- Version 32 incorporated two outside reviews. It separated fold families and made supersession envelope-only. Payloads became here, withheld or erased. Ticks became values, stored as signed records. Vertex identity became the spec hash, removing vertex anchors and standing.
- Version 34 tested the model's premises. Selection preceded supersession, place forms disagreed,
prevwas global andaboutheld one key. Supersession now runs per thing over held records. Read-order invariance requires consistent forms. Erasure is a record;aboutis a set. - Version 33 aligned the model vocabulary:
protocol/, LatestBy and Stored. PRs 1 and 2 merged; PR 4 added step 2's model. That work placed payload tests after supersession, so filters cannot restore replaced records. - A second opinion from Gemini found seams the page had papered over: a weighted Latest,
prevas one pointer, SKOS left in the example. Each closed with parts already in the model. - The LSP walk replaced dated path names with birth keys read along branch history. Git segment files close on commit. Neither choice entered the core.
- Walking web annotation found federation already there: each person's own store, composed. Publishing became a declaration on the store, and admission became the spam filter.
- The context walk identified five reference states. It carried visible provenance into agent context without guessing unseen content.
- The pipeline walk separated what a place holds from what an agent sees. The outward cloud trip became disclosure; the return became plain sync.
- The build walk gave each result two names, so work stops when results stop changing. Privacy means withholding content, not hiding its existence.
- The lens review changed the contract, not the record. A base names its lens and audience. A committed render is promotion; absence never means edit.
- Drawing the limits found the spec's predicates drifting toward a language. They closed to a typed set, parse pipelines left for collectors, and anything more gets recorded by an observer.
- The budget walk replaced one line count with four budgets. Lean proved fold laws and computed protocol-vector answers outside the Rust build.
- The historical Lean choice brought owned lens syntax into proof scope. It proposed replacing unit tests with external checks. Rust now also has characterization tests.
- The proposed layout used budgets to constrain modules, one public package and a store for its own decisions.
- Step 0 proved the first laws in a day and found that the law worth proving was not "incremental = batch" but "the set decides".
- Step 1 found a number-formatting off-by-one through standard vectors. It also showed why floating-point sums cannot satisfy set invariance.
- Version 35 reviewed step 2 with Codex. The boundaries did not establish all law premises. Batches skipped checks, duplicate members had conflicting meanings, and refusals depended on order. Writing now returns its proof. Go left the repo and this page entered it. The historical next step was data-model formalization. Rust now implements the modeled protocol.
The full trail, turn by turn, is in the Sources tab.
Diagnosis
Earlier Python prototype context. The counts, timings and source paths below describe that prototype, not the current integrated Rust implementation. Historical references may name files absent from this repository.
The model is small. A closed set of about ten folds covers it in roughly 3,600 lines. The codebase around it is about 77,000 lines, and much of that is custody machinery, migration and duplicated storage encodings. The rewrite pays off through what it leaves out more than through the language.
Where Arrival went wrong
The use case is several people writing records and sharing them, which is a multi-writer, merge-by-default problem. Arrival's core invariant is "one lineage has exactly one designated authority," which is single-writer custody. The two conflict.
Receipt order broke convergence
The earlier Python prototype, in numbers
| Package | Source | Tests | Role |
|---|---|---|---|
| libs/engine | 29,853 | 46,885 | vertex, stores (SQLite, JSONL, arrival), reader, admission |
| apps/loops | 28,414 | 37,005 | CLI, lenses, TUI |
| libs/lang | 6,145 | 8,851 | KDL declarations to AST |
| libs/atoms | 3,568 | 4,907 | Fact, Spec, the fold vocabulary |
| libs/migrate | 3,096 | 3,504 | legacy to arrival migration |
| libs/sdk | 2,630 | 7,643 | library surface over the engine |
| libs/store | 2,169 | 5,155 | merge, slice, transport |
| libs/sign | 457 | 405 | RSA JWTs and Ed25519 |
| libs/custody | 333 | 174 | signing glue |
The fold vocabulary is closed: Count, Sum, Min, Max, LatestBy and Collect, with a few modifiers. That makes the semantics portable, because there's no arbitrary user code to carry across languages.
Things a rewrite can drop: migrate, two of the three storage encodings, the RSA JWT path, and the custody ceremonies. My estimate for the essential core is 5,000 to 8,000 lines in a compiled language.
Arrival files inside engine
| arrival.py | 2,148 |
| arrival_head_seam.py | 1,775 |
| arrival_head_attestation.py | 1,680 |
| arrival_file_backend.py | 878 |
| arrival_store.py | 766 |
| arrival_projection.py | 622 |
| arrival_contract.py | 524 |
| arrival_body.py | 318 |
| arrival_registry.py | 229 |
Related but not counted: canonical_audit.py (1,171), witness.py (917), ceremony.py (831), admission.py (739). That prototype's repo root also holds about 30 GATE-*, *-FIX-REPORT and SOLHIGH-* files from rounds of adversarial review.
Performance: what's the language and what's the algorithm
The characterization ledger shows the main costs are algorithmic. Raw append is flat. Everything above it was linear in depth, so filling a store was quadratic.
| Probe | 1k | 5k | 20k | Growth |
|---|---|---|---|---|
| store_append (raw SQLite) | 0.020 | 0.022 | 0.020 | 1.0× |
| engine_receive_held | 2.731 | 10.306 | 45.326 | 16.6× |
| sdk_emit_fact | 8.004 | 28.945 | 123.311 | 15.4× |
| sdk_read_page_100 | 0.686 | 0.809 | 1.192 | 1.7× |
Times in milliseconds, before the receipt-order change. Receipt order cut held-handle receive by 69% at 1k and 87% at 5k. sdk_emit_fact didn't move, because every emit cold-opens the vertex and replays the whole prefix.
- The language fixes: CLI cold start (61 ms of Python imports) and constant factors.
- The language doesn't fix: replay on open. That needs cached state. Start whole-vertex: cache each vertex's state. Key it by its spec, covered set and the tick ids of vertices it reads. Refold when any key input changes. Partial rewind to a checkpoint waits until a real store hurts: across vertices that read each other, its invalidation would become the new Arrival.
benchmarks/LEDGER.md
Findings 1 to 6: every write re-folded the entire history, so ingest was quadratic. The read path is fine. The SDK's stateless surface adds a constant tax. Search only covers declared kinds. Receipt-order fold-in-place fixed held handles only. Measured 2026-08-15 on one machine. Treat sub-10% deltas as unproven.
How Arrival grew
Colleagues shared knowledge about a large work platform in git or JSONL. That led to "mergeable by default". Arrival answered with a backend-neutral custody protocol. It added lineages, dense ordinals, hash chaining, compare-and-append and head attestations. Rollback and equivocation detection, epochs and re-custody followed.
Receipt order came from the performance work. Folding on (ts, id) made ingest quadratic, so fold order became the order this store received facts. That's store-local by definition, so merge(A,B) and merge(B,A) give different fold sequences. Mergeability then had to be rebuilt on top through custody, which is where the scope spiralled.
docs/RECEIPT_ORDER_FOLD.md and libs/store/src/store/merge.py
"Receipt order is store-local. A rowid means something only relative to the store that assigned it." The merge docstring: "No claim is made about event time, about rowids as a primitive, or about the relationship between merge(A,B) and merge(B,A)."
Arrival overview, ratified 26 Aug 2026: "At any moment, one lineage has exactly one designated authority."
Layer 0: the record
A record is an observation, not a statement about the world. Records are immutable, the only write is append, and the record never learns what anything means. A store is a set of records. Order is derived from what records carry, never from where they landed.
Record · observation
- id
- content hash of canonical bytes
- observer
- who saw it (a lineage id)
- kind
- a label, not a type
- emitted
- the writer's now, as the writer states it
- occurred?
- claimed span; can be coarse
- about?
- the things it mentions: a set
- of?
- the one thing it is an emit of; a root leaves it out
- prev?
- the records this one replaces: a set, usually one
- under?
- the grant it acts on
- erases?
- record ids whose payloads it erases
- sets?
- the payload keys this record sets; without it the record is read whole
- payload
- anything, including references
- sig?
- signature over the id, kept beside the record (outside the id); see Sharing
Proposed tick value · stored inside an ordinary record
- id
- content hash
- vertex
- the question it answers
- kind
- the boundary that fired
- spec
- hash of spec + fold-vocabulary version
- covers
- ids of the records it folded
- occurred?
- the concrete window it covers
- payload
- the folded result
- witness metadata
- proposed witness-value fields; stored records always use the ordinary envelope
A stored tick uses the ordinary record envelope with kind tick. Tick-specific fields belong in its payload. The card sketches a proposed tick value, not a second stored-record variant.
The envelope convention
A field belongs on the envelope only if the core reads it. Everything else is a payload convention. It's a test applied when a field is proposed, not a law.
| Field | What in the core reads it | |
|---|---|---|
id | identity, merging, ticks | keep |
observer | admission, signatures | keep |
kind | selection | keep |
emitted | content order | keep |
occurred? | content order | keep |
about? | selection: a mention test | keep |
of? | per-thing state, heads and admission: the thing a record is an emit of | keep |
prev? | Latest and LatestBy follow chains to their heads instead of trusting clocks; a set, so one record can merge a fork | keep |
under? | admission (the grant check) | keep |
erases? | settling payload forms | keep |
sets? | a slot that follows keys: which records set each key | keep |
covers (tick payload) | proposed verification | payload |
as | nothing: names are never matched | drops |
derived-from | nothing: only hygiene vertices | payload |
Historically, as preserved a writer's old name. Dated name records make that a fold, so the field is absent. Every stored tick has the ordinary observer, emitted and signature fields. Content ticks remain values until stored.
Time in the id, or a field?
A time-ordered id (UUIDv7, or AT Protocol's TID) carries emit time inside the identifier. A UUIDv7 is out: it's random, and ticks, verbatim promotion, lineage ids and merge dedup all need the id to be a content hash. The real choice was a time prefix plus a content hash against a plain hash with emitted as a field. In both, the hash covers the time, so they hold the same information; the difference is where it shows.
| Field + plain hash ✓ | Time prefix + hash | |
|---|---|---|
| Ids | standard; any tool verifies | a custom format to split |
| References | opaque | every reference says when its target was written |
| Across realms | "references cross, content doesn't" holds exactly | a shared id leaks when you wrote it |
| Time | canonical UTC instant, with at most nine fractional digits | fixed precision, UTC |
| Sorting | ids don't sort by time | chronological files, index locality |
Everything the prefix buys is about where records live (sorting, locality), which the disposable index already provides. Everything the field buys belongs to the model. emitted passes the envelope convention honestly: the core orders by it.
Two times
emitted is the observer's "now". occurred is optional and holds the claimed past.Things, and who observed them
| Salience tier | Observer set for the thing |
|---|---|
| The mass below | only an ingest collector |
| Current attention | Safari, weighted by time spent |
| What you marked | the platform's like, or you directly |
| What to surface | close to recent attention, but untouched by you |
Set, not sequence
Under "set," the store has no order of its own. Order comes from what records carry. Under "sequence," the store carries receipt order as part of its identity. That was Arrival's choice, and it's the root reason a store needed a single authority to hold its head.
Your original conception: the past happened, so occurred/emitted are primary. Receipt order is where things started going off the rails.
"Ordered twice: as claimed, and as witnessed" now sits entirely inside the record. occurred is as claimed. emitted is as witnessed, by the observer rather than the store. Witness time travels with the record, so every store agrees on it.
Why ingestion isn't "unobserved"
Your proposal was that raw ingestion isn't observed, and becomes observed when attention acts on it. The intuition is right: an RSS item arriving and you reading an essay are different. Two problems with the conclusion:
- It hollows out the observer. Ingestion is most of the volume. If those records have no observer, every fold has to handle that as a special case.
- It puts observation in the lens. If running a lens makes records observed, reading writes to the record, and the record depends on which lenses happened to run. That breaks "meaning binds at read."
The resolution: every record is observed, but observers see different things. A collector sees a row ("Safari's database says you visited u at t"). That's hearsay, and the record claims no more than the collector saw. The collector is still an observer, just a dumb one.
Acting on a digest item (reading, marking, dismissing) is your observation. Running the salience lens is mechanism.
README.md, "The pattern"
"An observer sees the state through a lens … and acts by emitting new facts. The loop closes through the observer, not through the mechanism."
Occurred: one field that can be a span
A coarse date is already a span: 2009 means somewhere in [2009-01-01, 2010-01-01). If every value normalizes to [start, end), one field covers instants, coarse dates and spans. Ordering is by start, then end, then emitted, then id.
2026-10-17T09:14:03Z | instant (a degenerate span) |
2009 | coarse: sometime in 2009 |
2026-10-17T09:14:03Z/2026-10-17T09:18:13Z | a four-minute visit: two instants, never a duration |
2009-07/2011-03 | a migration that ran about two years |
2009~ · 2009? · 2009% | approximate · uncertain · both: the claim says so, the span is still 2009 |
201X · 2004-XX | unspecified digits: sometime in the 2010s, in 2004 |
2019/.. | began in 2019, still going |
settled That is the whole grammar, in protocol/record.md, with the laws in model/Laws/Time.lean and the vectors in vectors/occurred/. The forms come from ISO 8601 and EDTF Level 1, kept to those that name exactly one span. Calendar dates are UTC days, so every store orders them alike. A span of no length comes before a longer one with the same start, and an open end comes last. Durations are refused because an end instant expresses the same span. Seasons, unknown starts, unknown ends and years beyond 9999 do not identify one span. Accepting more later is free; accepting less would invalidate stored records.
Still to muse on
- Duration vs imprecision. "Visited for 4 minutes" lasted the whole span. "Decided in 2009" happened at some point inside it. Both order the same, but folds may care (summing attention time vs placing a decision on a timeline). Preferred design: the core stays out of it and the kind decides at read. This is the most likely place a second field becomes necessary.
- Claim at write vs derive at read. Preferred design:
occurredon the envelope is the observer's own claim. A declaration may derive or reinterpret time at read, as a lens, without overwriting the claim. For dumb collectors either works. - Revised claims. "Actually it was 2011" is a new record about a record. A fold applies it at read.
- Intervals (overlap, containment) are out of scope for layer 0.
EDTF, ISO 8601-2, RFC 3339
EDTF (Extended Date/Time Format) came out of Library of Congress archival work and was folded into ISO 8601-2:2019. It isn't an RFC. Level 0 is ISO 8601 basics. Level 1 adds approximate, uncertain, unspecified digits (200X), seasons and open interval ends. Level 2 is more elaborate. loc.gov/standards/datetime
RFC 3339 profiles ISO 8601 for internet timestamps. rfc-editor.org/rfc/rfc3339
The about field and thing identity
about is promoted from a payload ref to an envelope field because composition depends on it: salience groups by thing across three stores.
about only mentions. The thing a record is an emit of is a separate field, of (D8a): one typed reference, a record id or a natural key, read as written. A root has neither of nor prev and starts the thing named by its own id; a record with prev states of. Heads, latest-by and admission run over of; about never makes a head (D8b).
The hard part is thing identity across stores. The same essay shows up as a feed GUID in RSS, a URL with tracking parameters in Safari, and a post id in likes. Use a typed natural key where the world supplies one. Normalize it per prefix. Use same-as records, folded at read, where identity needs judgment. Worked through in Things.
Observers
An observer is a first-class thing: something that can honestly say "I saw." On a record it's a stable lineage id. Names, keys, grants and reliability are all records about it, relative to whoever states them. Names never take part in matching.
Three concerns that got mixed together
Naming
Who is this?
The name shown for an observer. Answered by naming systems: Kerberos, SDSI, petnames, DIDs.
Key binding
Which keys speak for this name?
Records about the observer. A parent vouches for a child's key.
Authority
What may it do, and for whom?
A store's admission policy over endorsement records. Your OBO and endorsements work lives here.
In the earlier Python prototype, one .vertex observers {} block is the allow-list, the grant and the key registry at once. Most of the CLI and SDK drift comes from that.
Name anatomy
kyle/claude means "the principal kyle calls claude." It is a naming claim, not a delegation of authority, which keeps naming and authority separate.kyle/safari,kyle/rss: my instruments, observing on my behalfkyle/claude: an agent working with me;kyle/claude/revieweris its sub-agentalex@acme: disambiguated once stores compose across people
Four forms of a name
Zooko's triangle splits across forms, each giving up a different corner. Only the first is ever compared.
| Form | Example | Asserted by | Role |
|---|---|---|---|
| Lineage id | sl:7f3a… | the hash of its anchor | the only thing folds and admission key on |
| Self-name | wren | the observer, about itself | a separate name record; lenses can show it as a label |
| Petname path | kyle/claude | the namer, in a signed name record | how people and CLIs refer to observers |
| Home-qualified | kyle/claude@acme | a realm's root name table | sharing across stores, like a Kerberos realm or an AT Protocol handle |
On the wire, and what each layer does with names
{"kind":"obs", "observer":"sl:7f3a…", "emitted":"2026-10-17T14:02:11Z", …}
{"kind":"name", "observer":"sl:a1c0…", "about":["sl:7f3a…"], "name":"claude"} ← kyle's name for it
- Folds and admission compare ids. The design replaces the earlier prototype's leaf-tolerant matching with equality. Its CLI-warns vs SDK-raises split disappears.
- Lenses map ids back to names, using the reader's own name records first. Your view can say
kyle/claudewhile Sam's saysteam/reviewer-bot; both are right. - Input (CLI, queries, specs) resolves names to ids before anything is stored. Ambiguity is an error at typing time, never in storage.
/is naming only.kyle/claudegrants nothing; that's a grant record. Naming a child and vouching for its key often happen together, but stay separate records.- The earlier prototype's
ObserverDecl(name, identity, grant, key)splits into four records: name, lineage id, grant, key binding. The unusedidentityfield suggests that split was already wanted. - Zero-config start: the first emit in an empty store makes a local lineage named from the environment (e.g.
$USER).
Delegation, separated
Preferred design: an observation carries one optional pointer, under: <grant hash>. It's a reference, not the delegation itself, so the admission fold checks it directly and readers who don't care ignore it. The grant, its scope and its revocation stay separate records. This sits between AT Protocol (no delegation in records at all) and Nostr NIP-26 (a signed delegation inside every event).
Does AT Protocol do delegation?
Not in the sense needed here. It delegates access to an account, not one identity acting for another. Records carry no actor-vs-principal distinction: a post written by an OAuth app looks exactly like one you wrote.
| Mechanism | What it does | What to take |
|---|---|---|
| did:plc rotation keys vs signing key | keys that control the identity are separate from the key that signs repo writes | lineage root vs per-agent write keys |
| OAuth granular scopes | repo:<collection>?action=create, blob:image/*; permission sets are themselves Lexicon schemas | grant scopes written in the same spec language as everything else |
| Service auth JWTs | one call, bound to one service (aud) and method (lxm), short expiry, jti nonce | a short-lived capability; never recorded, so not provenance |
| Verification records, labelers | another account publishes a record about you; each reader chooses whom to trust | endorsements as records, admission as a fold (from memory, not re-checked) |
The gap: no chain from actor to principal. Tranquil PDS, a third-party server, has an open pull request for controllers, role presets and an RFC 8693-style act claim. It addresses this gap at the token layer, not in records.
AT Protocol references
Where the missing piece lives
- KERI delegated identifiers: closest structural match to lineage = hash(anchor). A delegate's creation takes effect only once the delegator anchors its seal in the delegator's event log. As I understand it, rotations need this too. Cooperative: the parent vouches but never holds the child's keys.
- Matrix cross-signing: master key signs a self-signing key, which signs each device. "Parent vouches for child" in production at scale.
- RFC 8693 nested
act: the shape for "C acting for B acting for A" when more than one hop must be visible. - UCAN, Biscuit: attenuation at each hop, checkable offline.
Authority as a vertex
Where receipt time still matters. emitted is self-stamped, so a compromised key can backdate a record to before its revocation. The defense needs evidence that the record existed by some time. A store's receipt or a covering tick provides that evidence. Certificate Transparency and RFC 3161 timestamping use this approach. That's the one real job "witnessed by a store" does. It belongs as a narrow tool in the sharing layer, not in the foundation.
How observers work in the earlier Python prototype
This section preserves earlier-prototype details, not the current integrated Rust implementation. The Python paths below are historical references, absent from this repository.
- A free-form string with no grammar. The only structure is
/namespacing (principal/agent). Defaultkyle/loops-claudeviaLOOPS_OBSERVER. No@convention exists. - Fact:
observer: strplusorigin. Documented as required, but__init__defaults to"". Only arrival rejects an empty observer. - Tick: no observer field (this fits). But re-entering ticks get the vertex name as observer, and arrival added a custodian (the vertex stem, also a privileged "self-observer") to fill the slot.
- Declarations:
ObserverDecl(name, identity, grant, key). Theidentityfield is parsed but never read. - Keys: registry keyed by observer name; private keys under
keys/<observer>/ed25519.key. Arrival keeps its own in-log key registry. - Admission: no block means unrestricted; undeclared means
UnknownObserverin the SDK, but only a warning in the CLI.
Inconsistencies found
- Two matching rules: the CLI is leaf-tolerant and the SDK is exact.
kyle/loops-claudepassessl emitbut raisesUnknownObserverthrough the SDK. - The
focus.Xrule enforces meaning at write (observer == X). Under the model it's hearsay, and a fold can filter at read. - The custodian overlaps the self-observer.
TickWindow.observeris really the boundary name.
Earlier-prototype file references
libs/atoms/src/atoms/fact.py:76-88,130,157: Fact fields and constructorslibs/engine/src/engine/sqlite_store.py:293-317:observer TEXT NOT NULL; ticks have no observer columnlibs/engine/src/engine/arrival.py:116,492-493,2013-2058: envelope fields, non-empty check, in-log key registrylibs/engine/src/engine/observer.py:3-5,32-48: namespacing andobserver_matcheslibs/lang/src/lang/ast.py:657-672,757-760:GrantDecl,ObserverDecllibs/lang/src/lang/loader.py:697-729: allowed observer fieldslibs/custody/src/custody/signing.py:92-133,209-294: key paths and verificationlibs/engine/src/engine/admission.py:131-165:grant_for_observerlibs/engine/src/engine/arrival_store.py:27-32,424-461: custodian on tick envelopeslibs/engine/src/engine/vertex.py:585-589,1160,1237:focus.Xgate; ticks re-entering as factsapps/loops/src/loops/commands/identity.py:78-119,199-249: who-am-I resolution;check_emit
Prior art: the name/instance@home grammar
| System | Syntax | Notes |
|---|---|---|
| Kerberos | primary/instance@REALM | almost exactly our grammar. kyle/admin is a separate principal with its own key, related to kyle only by naming |
| Email · WebFinger | name@domain | RFC 7033 resolves acct: (RFC 7565) to a document |
| Nostr NIP-05 | name@domain → key | the domain vouches via /.well-known/nostr.json |
| Matrix | @name:server | home server as namespace |
| SPIFFE | spiffe://domain/path | workload identity; trust domain plus path |
| AT Protocol | handle ↔ did:plc:… | readable handle can change; stable DID underneath; each points at the other |
Prior art: naming without a central registry
- Zooko's triangle (about 2001): a name can be human-meaningful, secure and decentralized, but only two at once.
- Petname systems (Marc Stiegler, 2005): a key (global, secure, unreadable), a nickname (self-claimed, readable, not unique), a petname (my name for you). Your point that observations about observers are relative is a petname system.
- SDSI (Rivest and Lampson, 1996; merged into SPKI, RFC 2693): every principal has a local namespace and names link across them. There are no global names. Closest fit:
kyle/claudeis "the principal kyle calls claude", and kyle vouches for its key. - Secure Scuttlebutt: an identity is an Ed25519 key with its own single-writer signed feed; names are
aboutmessages, including names for others. Very close to sl. Its lessons: identity = key meant a lost key was a lost identity, and one feed per key made multiple devices painful. - Keybase sigchains: a signed, append-only chain of statements a user makes about themselves (keys, devices, proofs). A concrete model of an observer's self-description as its own small store.
- W3C DIDs:
did:method:idresolving to a document of keys with rotation.did:keyis self-certifying,did:webis anchored in DNS.
Prior art: delegation and authority
- OAuth Token Exchange, RFC 8693:
subis the principal,actis the actor; nestedactrecords a delegation chain per token. RFC 9396 (Rich Authorization Requests) addsauthorization_details. - Attenuating capabilities let you pass on only less than you hold. Examples include SPKI authorization certificates, Macaroons (HMAC-chained caveats), Biscuit (public-key Datalog, offline attenuation), and UCAN (DID-based proof chains). Your endorsements belong to this family. Its useful checks are enforced attenuation, offline verification and revocation.
- Nostr NIP-26 (delegated event signing) put delegation into the event envelope and has since been marked unrecommended. Every client had to understand it, for little gain. The lesson is to keep authority out of the record envelope.
Question this raised, now leaning
Is delegation part of the name or part of each observation? A Kerberos- or SDSI-style name is static, so a bot acting for both you and Alex needs two names. An RFC 8693-style per-record reference is dynamic. Preferred design: the name says who named whom; a grant record says on whose behalf; an observation points at its grant with under.
Lineage: identity that changes
The agent in this repo began as a generic Claude, ran on different models, later chose a name, and later still made a key. None of those is the identity. What persists is a continuity of observations. Before a name, sessions share one generic seat; an identity that emerges starts its own lineage and adopts what it wants to own. At session start, the agent is whatever its lineage folds to.
| Changed over time | From → to |
|---|---|
| Model | Opus → Fable |
| Name | none → self-chosen |
| Key | none → its own |
| Session | ephemeral, every time |
did:plc: self-certifying, no registry. "Wren" is a placeholder.Adoption
When Fable met the identity store, it mistrusted it, because nothing had provenance. Signing let it make its own key and sign only the prior observations it agreed with. The old facts stay exactly as written: unsigned, under "claude", dated. The adoption is a new, dated, signed record that references them. That meets the README's bar: legibly unsigned rather than retro-claimed.
From delegate to self
Observer
Records say observer=sl:7f instead of the seat's id.
Grants
Self statements need no grant. Writes that need authority, like an ADR in a shared store, still carry under. Identity never widens access.
Becoming Wren
At session start the lens compiles Wren's affirmed records. Wren's key signs the session's records, under a grant, and the session says what it is in a record. The store holds the continuity.
This also answers Fable's original mistrust. A new session can check your vouch for the lineage and its key binding. It can also check that every adoption happened in the open. Step-by-step diagrams are in Scenarios, steps 3 and 4.
Stances: one record shape
| Stance | Meaning | Where it shows up |
|---|---|---|
| affirm / adopt | I hold this as mine | Fable taking on prior observations |
| dispute | I don't hold this | selective inheritance |
| retire | this was true, it isn't any more | the stale review |
| authorize | this one may act within scope S | your endorsements |
Endorsements and adoption may be one mechanism: a signed observer taking a dated stance toward other records. One vouches for authority, the other for belief.
Salience and the stale review
Why signing became necessary. A store that compiles into a system prompt is a privileged channel. Anyone who writes under that identity shapes the agent's next session. The root of trust is kyle's signature on the anchor record. Only adopted or affirmed records compile at full weight. An injected record that nobody affirmed stays in the record as evidence but never becomes self.
Readable names: name records and render labels
Records carry the lineage id: observer: sl:7f3a…. Separate name records preserve the names used at the time. A lens can show a historical name or the current name as a render label. Renames never change matching. See the four forms of a name under Observers.
Philosophy, briefly
Locke grounds personal identity in memory. Parfit argues identity matters less than psychological continuity and connectedness. Ricoeur calls it narrative identity. The system makes their position literal: identity is the output of a fold, not a field on a record.
Open questions for lineage
- Is a model swap the same observer? leaning Yes:
runs-onis a statement about the lineage. Fable's instinct to start fresh and adopt is the right move only when leaving a shared seat, not on every swap. - Concurrent sessions. Two sessions of one lineage at once: if one adopts f19 and the other disputes it, is the lineage forked? Maybe a lineage is a DAG like git, and divergent stances are data until a later session resolves them.
- Declining a lineage. Three relations differ. Is means the same lineage. Descends from means a new lineage with acknowledged ancestry. Same as links two lineages that turn out to be one. leaning Seat → Wren is descends from. Same as links but never merges.
- Do humans get lineages? Probably, for uniformity. Your own anchor has no one above it to vouch, so you may be the one observer who is legibly self-anchored.
Layer 1: vertex and store
Design proposals: these examples include unsupported grammar and future product surfaces. protocol/spec.md defines accepted specs. Examples are not conformance fixtures.
A store is a thing you write into; a vertex is a question you ask. A store is a lineage defined by records about itself; a vertex is named by the hash of its spec. Neither owns the other.
The legacy .vertex file mixed storage, producers, selection and meaning. The proposed design separates those jobs. A vertex keeps meaning and covers exact records. A store has an anchor, dated declarations and local places. Names resolve through observer-style tables. Declaration policy remains future work.
The contract: state = fold(spec, select(records)). Same set, same spec, same state, wherever it runs and in whatever order the records are read. Every choice on this tab exists to keep that true.
layer closed Tick questions move to layer 2 and thing identity to composition. See Cases for the novel, orchestration and team stores.
The vertex: a question
{
"vertex": "decisions",
"note": "Decisions from notes and from the RFC store at home; review ticks arrive directly.",
"from": [
{ "store": "notes", "kind": ["decision"] },
{ "store": "rfc@home", "kind": ["decision"] }
],
"ticks": ["review"],
"into": "notes",
"order": "occurred",
"fold": { "by-topic": { "latest-by": "topic", "follow": "prev" } },
"boundary": [{ "when": "release" }]
}
| Selects by | Example |
|---|---|
| kind | "kind": ["decision"] |
| observer | "observer": ["sl:7f"] (resolved from a name when written) |
| thing | "of": "url:example.com/x" |
| mention | "about": "url:example.com/x" |
| ticks from a vertex | "ticks": ["review"] |
| another vertex's state | "admitted-by": "auth": admission without special machinery |
Rule: selection looks only at what a record carries, never at which store it came from or when it arrived.
Folds: two families, and neither needs records in order
| Accumulating | Over heads |
|---|---|
Count, Sum, Min, Max, and Collect without follow | LatestBy, and any fold with "follow": "prev"; with "follow": "keys", over each thing's live setters |
| Compact state; the step is commutative | The state retains per-thing heads and referenced ids. The answer comes from that state. |
Both families have set-invariance laws under their stated premises. Accumulating folds consume each id once. LatestBy retains heads and all referenced ids, not just the current answer. A reader that caches this state must keep what a record with an unknown prev supersedes; no caching reader is built. Heads apply per thing, and a record is of exactly one thing; it remains if its thing retains it. Modifiers shape the final answer. Content order chooses among heads, not arrival order.
Boundaries: content vs operational
In the earlier prototype, a boundary fired "when a record of kind X arrives": receipt order in disguise.
- Content boundaries are defined by what records say: "at the record of kind
release", "each calendar day ofoccurred". Deterministic: anyone folding the same set gets the same cycles. - Operational boundaries, like "every N prompts", "on demand" or "after 20 records", are honestly events in time.
Either way the tick lists exactly what it covered. A late record simply wasn't in that tick. A tick is the vertex's own observation: "when I ticked, I had these, and they folded to this."
Earlier prototype boundary
libs/atoms/src/atoms/boundary.py: modes when (on kind arrival), after and every (counts), with reset, payload match, fold-state conditions and a run hook.
Verifiable ticks
A proposed tick carries the spec hash, covered ids and fold result. A reader holding those records can recompute the result. Attachments remain signed claims, not checked fold results.
This only works with a closed, deterministic fold vocabulary, which is a strong reason to keep it closed and versioned. Who signs: nobody, for a content tick, which is a value anyone can recompute. When it's stored, whoever stores it signs the tick record, and the target store's writer policy admits that observer. The vertex holds no key (settled in version 32).
Fold or lens?
Fold: anything another vertex depends on, or that must be reproducible. Salience weights qualify, since the stale-review boundary uses them. Lens: anything that exists only for display or is compiled for one reader, like rendering the system prompt. A lens never writes; acting on what it shows is a new observation.
The store: a thing you write into
The three parts, as files
# .loops/anchor: the store's first record, whose id is st:91…
{"kind":"store-anchor", "observer":"sl:a1", "name":"notes", "stewards":["sl:a1"]}
# .loops/store.json: a render of the declarations, which are dated records in the store
{
"store": "notes",
"kinds": { "decision": { "fields": { "topic": "string", "status": "string" } } },
"writers": [{ "allow": "sl:a1" }, { "allow": "sl:7f", "require-under": true }]
}
# ~/.config/loops/places.json: this machine only
{ "stores": { "st:91…": [
{ "place": "laptop", "path": "/Users/kyle/work/platform/.loops" },
{ "place": "origin", "url": "git+ssh://git.acme/platform.git#.loops" } ] } }
A name resolves in three hops, as for observers: "rfc@home" → name table → st:4c… → this machine's places → a path. Store and observer names share the same tables.
Schema without migration
A declaration applies from the time it's written. A record written before a shape existed isn't invalid; it's from before that shape. Changing a shape is a new declaration: nothing is migrated, and the shape's history stays in the store. The default rule is accretion: add fields and kinds, never break them. A breaking change becomes a new kind, or an explicit retire.
| Maturity | Policy records say | Undeclared kind or writer |
|---|---|---|
| open | none | accepted (solo repo, scratch work) |
| declared | kinds and shapes | accepted, flagged as undeclared |
| strict | policy strict | not admitted; kept as a visible rejection |
"Strict" can't mean writes are impossible. In a replicated set, anyone can append to their own segment. Enforcement at write is a courtesy; admission at read is the real thing. A strict store stops a bad record from counting, not from existing, and keeps what was attempted visible.
Why this ends project-vertex drift
Project vertex files used to scatter across repos and drift silently, because each copy was its own file. Declarations that live in the store travel with every replica, and replication is union, so copies can't silently differ. Concurrent conflicting declarations become a visible conflict in the data, settled by the stewards named in the anchor.
A kind stays a label, not a type. Declarations are records about kinds, so an undeclared observation is still a valid observation, and a store is usable before anyone designs anything.
Prior art
- Datomic: schema is data in the database itself, and grows by adding.
- Rich Hickey, "Spec-ulation" (Clojure/conj 2016): grow by accretion, never break.
- Schema registries with compatibility rules (Avro, Protobuf) and event-sourcing "upcasting".
One life cycle, several things
| Thing | Anchor gives | Later records describe |
|---|---|---|
| Observer | sl:… | names, keys, runs-on, stances |
| Store | st:… | declared kinds, writer policy, stewards |
| Vertex | — | not a lineage: vx:… is the hash of its spec and parameters, and a name points at the current one |
| Tick | — | a value; stored as an ordinary signed record when cited |
Not a generic entity type: just "records about a thing, folded", applied consistently.
Composing: the salience feed
from maps them into the vertex's own vocabulary, so stores built for different purposes feed one question.The salience vertex, and what it depends on
PROPOSED FUTURE syntax. as, order, set and boundary are not built. by is now built, in another spelling: "by": "about" here groups by every thing a record mentions, while the built grammar groups by the mentions under one typed-reference prefix, "by": "env.about:<prefix>", and reads a bare name such as about as a payload field.
{
"vertex": "salience",
"from": [
{ "store": "safari", "kind": ["visit"], "as": "attention" },
{ "store": "likes", "kind": ["like"], "as": "marked" },
{ "store": "feeds", "kind": ["item"], "as": "available" }
],
"order": "occurred",
"fold": {
"attention": { "sum": "dwell", "by": "about", "where": { "env.kind": { "is": "attention" } } },
"marked": { "count": true, "by": "about", "where": { "env.kind": { "is": "marked" } } },
"available": { "collect": true, "set": true, "by": "about", "where": { "env.kind": { "is": "available" } } }
},
"boundary": [{ "every": "day", "axis": "occurred" }],
"into": "digest"
}
- Kinds are scoped to their store. Two stores may both declare
visitwith different shapes.asmaps each input into the vertex's own vocabulary. - Collating needs thing identity. The same essay must be recognized across Safari, likes and RSS. This open question just became central. Preferred design: a normalization rule (such as URL canonicalization) declared per kind in the store, plus
same-asobservations for the hard cases. - Writing
intoanother store makes whoever runs the vertex a writer there. The tick record is theirs, signed with their key and admitted by that store's policy; the vertex itself holds no key. - Across realms,
intois a bridge and must say so explicitly. Within a realm it's ordinary.
Verbs and nouns
| Verb | Who | Produces |
|---|---|---|
| observe | an observer, in the world | nothing yet: perception, outside the system |
| emit | an observer | a record (the write primitive) |
| tick | a vertex | a tick |
| fold | a vertex | state |
| render | a lens | a view for someone |
"Observation" is a noun: the most common kind of record, not the only one. A visit claims something about the world and can be true or false. A proposed declaration, grant, name or adoption takes effect only when the store recognizes it and its author has standing.
Reserved kinds, and speech acts
The future standing design proposes reserved anchors, names, declarations, policies, grants and vouches. It also proposes stances and spec records. These are not implemented admission rules. Other kinds remain user vocabulary.
Speech act theory names the split: constatives state something; performatives do something by being said. A performative only works if its "felicity conditions" hold, such as the speaker having standing. A policy record from a non-steward is emitted, kept and visible, but has no effect: admission is the felicity check.
Prior art
- J. L. Austin, How to Do Things with Words (1962)
- John Searle, Speech Acts (1969)
Pressure-testing the fold vocabulary
The cases asked a lot of the closed vocabulary. It holds, with two parameters instead of new folds.
| Need | Handled by |
|---|---|
| order by chapter or story time | order field=…, a parameter |
| "all children ticked" | a boundary condition on folded state (existed in the earlier prototype) |
| a set, not a list | an explicit set mode on Collect |
| weighting by observer | new: weight-by=<vertex> on Collect's ranking (and so TopN), reading another vertex's state like admitted-by. The proposal excludes Sum because weighting changes its value. It excludes Latest because weighting can bury newer observations. |
Without weight-by, weighted questions would need joins, and joins would open the vocabulary.
Cycles: the strange loop, made safe
Decisions and open threads
| Item | Status |
|---|---|
state = fold(spec, select(records)) holds wherever it runs | settled |
| A kind stays a label; declarations are records about kinds | settled |
| A vertex owns neither storage nor sources | leaning |
| Store = anchor id + declarations as records + local places | leaning |
| Store and observer names share the name tables | leaning |
| Schema by accretion; a breaking change is a new kind | leaning |
| Maturity open → declared → strict, enforced at admission | leaning |
A vertex reads many stores and maps their kinds with as | leaning |
| Stewards named in the anchor govern policy | proposed |
emit and tick are the write verbs; a closed list of reserved kinds | leaning |
| Specs are templates; a vertex is a spec plus parameters, named by their hash | settled |
Fold vocabulary holds: order field=, Collect set mode, weight-by | settled |
| State references form a DAG; ticks may loop | settled |
| Weights are records, applied by a vertex; rank, never hide | settled |
| Should a store carry its standard vertices as records? (Orchestration says templates can live in a store.) | leaning yes |
Verifiable ticks; who signs a tick (whoever stores it); into vs a store per vertex | → layer 2 |
| Thing identity across stores | → composition |
What layer 1 needs from a store, and zero-config
Only three things: list the records, get one by id, and give what's new since a checkpoint. Segments, git, SQLite and S3 all sit below that line, in layer 4. It's the narrow contract Arrival was reaching for, but read-only and with no head.
For the solo case, loops emit walks up from the current directory to find .loops/, the way git finds .git. The first emit writes the anchor. Vertices in .loops/vertices/ default to from "." and into ".", which keeps the "agents emit during work" experience that worked.
Today's vertex files
apps/loops/session.vertex:name,storepath,loopswith foldslibs/lang/tests/fixtures/system.vertex: addsdiscover "./**/*.loop",routes,boundary when=,emit
Three cases
The layer 1 model tested against three real stores: a novel, task orchestration, and the team's shared platform knowledge. Each one surfaced exactly one new idea, and none needed new machinery.
| Case | What it surfaced |
|---|---|
| Novel | The time axis can be a declared field (chapter, story time), not only occurred or emitted. |
| Orchestration | Vertices are instantiated specs, named by their hash. |
| Team store | Weights are records about observers, applied by a vertex at read time. Promotion is a stance. |
The novel
A hand-built store with one steward, made strict early because its shape is designed on purpose. Two vertices ask two questions of the same records: what's the manuscript? and is the timeline consistent? The JS front end is a lens; edits made in it are new records.
Store and vertices
PROPOSED FUTURE syntax. This example uses latest-by: "id" and collect with by. It shows intended semantics, not runnable syntax. collect with by on a payload field such as pov is now built as written. See the normative protocol/spec.md.
# .loops/anchor
{"kind":"store-anchor", "observer":"sl:a1", "name":"novel", "stewards":["sl:a1"]}
# .loops/store.json
{
"store": "novel",
"maturity": "strict",
"kinds": {
"scene": { "fields": { "chapter": "int", "pov": "thing", "story-when": "edtf" } },
"character": { "fields": { "name": "string" } },
"note": {}
},
"writers": [{ "allow": "sl:a1" }, { "allow": "sl:7f", "require-under": true }]
}
# .loops/vertices/manuscript.json
{ "vertex": "manuscript",
"from": [{ "store": "novel", "kind": ["scene"] }],
"order": { "field": "chapter" },
"fold": { "scenes": { "latest-by": "id", "follow": "prev" } },
"boundary": [{ "when": "draft-complete" }],
"into": "novel" }
# .loops/vertices/continuity.json
{ "vertex": "continuity",
"note": "In-story chronology.",
"from": [{ "store": "novel", "kind": ["scene", "character"] }],
"order": { "field": "story-when" },
"fold": { "per-character": { "collect": true, "by": "pov" } } }
Task orchestration
Boundary.conditions. That prototype is not the integrated runner here. One store per run makes a natural unit to archive or discard.Templates and an instance
PROPOSED FUTURE syntax. Templates, boundaries and these commands illustrate the proposed workflow. See the normative protocol/spec.md for runnable spec syntax.
# templates the root store carries
{ "vertex": "subagent",
"ticks": ["self"], "from": [{ "kind": ["step"] }],
"boundary": [{ "when": "task-complete" }] }
{ "vertex": "slice", "param": ["children", "size"],
"note": "Reviewer judgments are records.",
"ticks": ["$children"], "from": [{ "kind": ["review"] }],
"fold": { "done": { "count": true },
"approved": { "count": true, "where": { "verdict": { "is": "approved" } } } },
"boundary": [{ "state": "approved", "at-least": "$size" }] }
{ "vertex": "orchestrator", "param": ["slices", "size", "requester"],
"ticks": ["$slices"],
"fold": { "ticked": { "count": true } },
"boundary": [{ "state": "ticked", "at-least": "$size" }],
"into": "$requester", "bundle": true }
# an instance is the spec plus parameters; its id is their hash, so nothing is written
loops read slice slice:=3 children:='["vx:a1…","vx:a2…"]' size:=2
The team store
| Shape | Verdict |
|---|---|
| A · Shared store in git, per-developer segments, union merge | ✓ the backbone |
| B · Personal stores, read by composition | ✓ for the half-formed and private |
| C · Central ingest, weighted on the way in | ✗ freezes one weighting into the data |
Weighting by observer
PROPOSED FUTURE syntax. This example uses collect with by and weight-by. by is now built, in another spelling: "by": "about" here groups by every thing a record mentions, while the built grammar groups by the mentions under one typed-reference prefix, "by": "env.about:<prefix>", and reads a bare name such as about as a payload field. weight-by is not built. See the normative protocol/spec.md for runnable syntax.
loops emit tenure years:=20 domain=platform --about sl:director # by sl:team-root
loops emit tenure years:=14 domain=platform --about sl:a1 # by sl:team-root
{ "vertex": "platform-knowledge",
"note": "Ranked by tenure, each with its time.",
"from": [{ "store": "team", "kind": ["decision", "process", "history"] }],
"fold": { "by-thing": { "collect": true, "by": "about", "weight-by": "tenure" } } }
- Weights are records: statements about observers, made by someone, so relative to whoever makes them.
- Weighting lives in a vertex, so a new developer, an auditor and the director can each weight the same store differently.
- Tenure varies by domain. Weight by tenure and evidence: who touched the code a record is about, and whose earlier claims were later affirmed. Both are already records.
- Weighting ranks, never hides. In a 20-year codebase, the junior developer's recent observation is often the one that catches the outdated assumption.
- Weight ranks a collection, never Latest. Corrected in version 12: this snippet used to read
"latest" weight-by, which either buries this morning's observation under 2019 seniority or does nothing. "Director says X · two devs observed Y since" is a Collect ordered by weight that shows each record's time.
Promotion: what travels depends on the act
A record copied verbatim isn't a new record. With content addressing, it's the same record, with the same hash, held in two stores, with its original observer, signature and emitted intact.
| Mode | Lands in the team store | Provenance |
|---|---|---|
| Verbatim | the original record + a promote stance | complete: it is the original |
| Restated | a new record with derived-from: <hash> | a pointer: an original exists, unreadable to the team |
| Summarized | a tick from a personal vertex, covering by hash | pointers, with an optional bundle |
| Agent-proposed | Wren drafts any of the above; your stance makes it count | as the chosen mode, plus Wren's grant |
In every mode the promote stance is what the team store's policy checks. Which mode will dominate is a usage question that can't be answered yet; the design supports all of them equally.
Things, of and about
Design proposals: these examples include unsupported grammar and future product surfaces. protocol/spec.md defines accepted specs. Examples are not conformance fixtures.
Records are the only thing stored. A thing is what a record is an emit of. Identity moves out of the fold and into the record, through of on the envelope; about names what a record mentions. Tested against every case so far, it holds with no new machinery and six refinements.
layer closed Composition needs shared thing identity when a vertex reads several stores. It closed on three more decisions:
- Promotion carries its anchor verbatim when the target store lacks it. Across realms a natural key is content, not a reference (
svc:auth@corp-prodsays something), so it crosses only by bridge. A public store is a standing bridge, which is howurl:keys meet across realms (see the web annotation walk in Horizons). - Input resolves against the target store's names first, then home. A miss follows the target store's maturity; see the flow below. Resolution stays there so personal petnames do not leak into team anchors.
asdrops from the envelope. The name in effect atemittedis a fold over dated name records; the automatic first-emit anchor carries the initial self-name.
Three categories, two readers
| What it is | Examples | Identity | Who reads its lineage | |
|---|---|---|---|---|
| Record | an immutable claim; the only thing stored | log snippet, RSS entry, prose save, tick | content hash | none: a record is a point |
| Thing | what records are of | chapter, incident, service, URL, Mara | a root record, or a natural key | vertices only |
| Primitive | observer or store lineage | observer, store | *-anchor lineage | future standing code |
A chapter has a lineage just as an observer does: a first record, then later records that fold into its current self. The difference is who reads it. The future standing layer folds observer and store declarations for admission and writer policy. A vertex is its spec hash, not a lineage. It never needs to know what a chapter is. In the proposed authority design, observers sign and hold grants. Store policy admits records. Vertices hold neither keys nor standing. A thing is acted on and never acts.
Where identity lives
Upsert key="topic"). Two facts were related only because their strings happened to match. Now the emitter states the thing. A slot can now group by a payload field with by; keying LatestBy on one remains proposed.of is the emitter's claim ("this is an emit of r:x1"). A fold key is the vertex's question ("group these by host"). Both stay. of carries one typed reference and about a set of them. The design uses anchoring record ids, natural keys and named system objects. A vertex reference names its spec hash.
Case: a chapter, in facets
of: the mentions record is of the chapter and refers to Mara.holds The fold is LatestBy keyed by kind, once a key may name an envelope field. That key is proposed: today every facet chain is of r:a1, so their heads are heads of one thing. Renumbering, retitling and splitting a chapter all leave r:a1 intact. Diffs inside prose stay out of the model: git and a future blob store compress similar snapshots underneath.
Case: a homelab incident
holds, and simplifies Linking after the fact needs no selection by state, which retracts a worry from the previous turn. A later link is a new record about the target that refers to the evidence. The view selects by what records carry and follows references, like a join. Nothing ever edits about.
Case: the team platform
holds, with one new parameter resolve-by=<identity vertex> maps each thing reference to its class before grouping. It's the third state reference, after admitted-by and weight-by, and the DAG rule covers it. This is the only place identity needs state.
The other cases
| Case | about points at | Result |
|---|---|---|
| RSS feed | a natural key, url:…, normalized (tracking parameters stripped) | ✓ Two fetches are two records ("seen at 9:00", "seen at 15:00"), because emitted is hashed; Latest grouped by URL collapses them. Hash dedup applies only to true copies (promotion, merging replicas). One article under two URLs takes a same-as. |
| Observers | a primitive: tenure about=sl:director, a stance about sl:7f | ✓ Already how the earlier cases were written. |
| Orchestration | a parameter, "task": "r:t3", inside the vertex's id | ✓ A vertex instance is a question about one task, which says plainly what "a vertex is a question" meant. |
| Salience | whatever records touch: about plus references | ✓ "Observers who touched this" needs resolve-by, or three names count as three things. |
What the exercise changed
| Refinement | Why |
|---|---|
of names one thing; about holds the things a record mentions; references are payload values that are ids. | A decision about two services is read in both services' views and heads neither. The mentions record is of the chapter and refers to Mara: different roles, so different places. A record is of exactly one thing. |
| Later links are records, about the target and referring to the evidence. | No selection by state; a correction retires the link record, never the evidence. |
resolve-by is the third state reference. | Identity across anchors is disputed, so it's a fold, read like weight-by. |
Natural keys are typed: prefix:value, with normalization declared per prefix in the store. | Makes url:, host:, svc: comparable without minting. |
Only primitives use the reserved *-anchor kinds. Any other thing is anchored by whatever record starts it. | Keeps the reserved list short; thing kinds stay in user vocabulary. |
prev is a general link and a set, and Latest follows it. Two records sharing a prev are a fork; one record naming both heads merges it. | Prose saves, name records and stances all hit concurrent edits. Following the chain takes clock skew out of "current". Heads are records no successor of that thing names in prev, and a prev never crosses things. A whole view retains a record if its thing retains it. |
Identity, counted
About fifteen identity-related concepts were named along the way. Side by side, they collapse:
| How many | What | |
|---|---|---|
| Identifiers | 2 | A content hash names records and anchoring records for lineages, stores and things. A vertex hash names its spec and parameters. Prefixes label references. A natural key, prefix:value. |
| Names | 1 | Name records in name tables. Self-name, petname paths and @home are forms of it. Never matched. |
| Envelope pointers | 5 | of · about · prev · under · erases. Proposed tick payloads carry covers. |
| Vertex state references | 3 | admitted-by · weight-by · resolve-by |
| Everything else | A record whose about points at something. Stances point at a record; same-as at two things; vouch, grant, tenure and runs-on at a lineage; name records at what they name. |
| Family | Relates | Carried by | Read by |
|---|---|---|---|
| Equivalence | thing ↔ thing | same-as records | identity vertex, through resolve-by |
| Provenance | record → its source or authority | under, covers; derived-from in the payload | admission, verification, hygiene |
| Succession | record → the records it replaces | prev | Latest |
The three families stay separate; blurring them is the owl:sameAs failure. A restated promotion keeps thing identity through of. Its derived-from link records provenance as a payload convention.
Discipline in an open store
In a semantic store, convention is what keeps a growing store aligned. The future admission design applies policy at read time. Records remain unchanged. Records outside the current policy become visible rejections. A schema-first store must be disciplined from day one; this one can be disciplined as it matures.
| Surface | Disciplined by | Drift looks like |
|---|---|---|
| Kinds | declarations, maturity open → strict | kinds in use but never declared; near-duplicate kinds |
| Things | anchors, same-as | near-duplicate anchors; about values that aren't ids |
| Names | name tables | one name pointing at two things |
| Natural keys | normalization per prefix | the same key normalized two ways |
Each surface gets a hygiene vertex that feeds the stale review. They are the standard vertices a store carries, which turns that earlier lean into a concrete yes.
Referencing a thing mid-flow
Referencing something should cost the word you'd say. What happens when that word isn't a known name follows the store's maturity:
loops emit note --about "auth service" "token refresh races on cold start" open about="topic:auth-service" // no extra record; echoed back for reuse declared component-start name="auth service" // r:x9, then the note about r:x9 strict refused: no thing called "auth service"; did you mean auth-svc (r:x1)?
- Keys converge on their own. Two agents who write
topic:auth-servicemeet without coordinating. Anchors never collide, so minting on every miss makes duplicates: three anchors for one service in the team case above. - Minting becomes deliberate when a thing must survive a rename or be told apart from a namesake. It comes with a
same-asfrom the key to the new anchor, and every early record joins the anchor's class throughresolve-by. No migration. - The start record carries the first name, as an anchor carries a self-name; no separate name record.
- Only the envelope joins.
ofnames the thing andaboutwhat is mentioned. A slot can group by a payload field withby, and a payload list puts a record in one group for each member. A later record can link evidence to a thing throughaboutand a payload reference.resolve-bynever reads payloads.
Matching: one equality relation is enough
Linked Data often overloaded owl:sameAs with relatedness. Its global, transitive meaning let loose links merge unrelated entities. Here same-as is local and disputable, folded per reader. The other guard is a cheap place to say "related", so nobody overloads "same".
SKOS's mapping relations (exactMatch, closeMatch, broadMatch, narrowMatch, relatedMatch) were adopted as an opt-in vocabulary and then dropped. They mix the families in one kind: equivalence, hierarchy and association. A generic related tag loses the observation. The director's claim that SSO gateway fronts auth-svc belongs in a note about both things.
| Relationship | Recorded as | Read by |
|---|---|---|
| Same thing, two anchors | same-as; dispute breaks it | the identity vertex, through resolve-by |
| Two things in one observation | a record about both (about is a set), or a payload reference | every view of either thing; backlinks |
| A typed relationship, once it matters | a declared kind with named references: kind "fronts" { ref "proxy" "service" }. Until then, by the edges ruling of 2026-11-21: a scalar field, a payload list, or one thing per edge | lenses, the LSP |
| One thing split from another | the new anchors' start records refer to the original (split-from, a payload convention) | lenses follow it for ancestry |
same-as means identity, not descent. Joining a monolith to its two successor services would mix their later observations. prev stays inside one thing's chain. Observations about the monolith stay about the monolith.
None of it enters the core; same-as isn't even a reserved kind. The proposed resolve-by contract uses connected components over accepted pairs. Higher reference transitions remain future model work.
Halpin et al.
Halpin, Hayes, McCusker, McGuinness and Thompson, "When owl:sameAs isn't the same: an analysis of identity in Linked Data" (ISWC 2010). SKOS Reference, W3C Recommendation (2009), section 10: mapping properties, considered and dropped.
Where it strains
- Choosing natural keys is a modeling decision made at collection. A container id dies with the container; the collector has to pick the stable key (
svc:jellyfin@nas). A bad choice can only be repaired afterwards withsame-as. - Duplicate anchors will pile up in the team store, though fewer in open stores, where a miss writes a key instead of minting. That's expected; a hygiene vertex (name similarity, or Wren proposing matches) feeding the stale review keeps them from piling up unmerged. See Discipline above.
resolve-byis more than a lookup. The identity vertex folds edges (LatestBy per pair, latest stance wins); turning edges into classes is a connected-components step that lives inresolve-by. That keeps the fold vocabulary closed, but the step has to be specified as carefully as a fold. A class's display id (Preferred design: the earliest anchor in content order) can change when classes merge. Nothing stores it, and lenses show names, so that's acceptable.- Recognizing references by prefix can misfire on a string that only looks like an id. Strict stores declare their reference fields; open stores accept the guess.
- "Everything about auth-svc" across a large class is an index question. It belongs to places (layer 4), not to the semantics.
The cases as records and vertices
# the novel
loops emit chapter-start title="The Lighthouse" # → r:a1
loops emit chapter-prose text=blob:… --of r:a1 --prev r:p2
loops emit chapter-mentions characters:='["r:c1"]' ideas:='["r:i9"]' --of r:a1
{ "vertex": "chapter", "param": ["chapter"],
"from": [{ "store": "novel", "of": "$chapter" }],
"fold": { "facets": { "latest-by": "kind", "follow": "prev" },
"notes": { "collect": true, "where": { "env.kind": { "is": "chapter-note" } } } } }
# the homelab
loops emit log --about svc:jellyfin@nas # by the collector
loops emit incident-start title="jellyfin stalls" # → r:i1
loops emit incident-evidence refs:='["r:l7"]' --about r:i1
# the team store
loops emit same-as --about r:x1 --about r:x2 # kyle → r:s1
loops emit same-as --about r:x2 --about r:x3 # a developer → r:s2
loops emit dispute --of r:s2 --prev r:s2 # director
{ "vertex": "identity",
"note": "The latest stance per pair.",
"from": [{ "store": "team", "kind": ["same-as", "dispute"] }],
"fold": { "pairs": { "latest-by": "of", "follow": "prev" } } }
{ "vertex": "platform-knowledge",
"from": [{ "store": "team", "kind": ["decision", "note"] }],
"resolve": "identity",
"fold": { "by-thing": { "collect": true, "by": "about", "weight-by": "tenure" } } }
PROPOSED FUTURE syntax. resolve and weight-by are not built. by is now built, in another spelling: "by": "about" here groups by every thing a record mentions, while the built grammar groups by the mentions under one typed-reference prefix, "by": "env.about:<prefix>", and reads a bare name such as about as a payload field.
Layer 2: resolution
A fold is pure, so state can always be recomputed. A tick exists only when something must be cited, sent, shown or marked. Ticks come in two kinds, split by how their records were chosen: content ticks anyone can reproduce, and witness ticks that record what someone had.
layer closed Erasure inside tick results and the cost of verification move to layer 4, places.
newer Ruled on 2026-11-20, and newer than the text below where they differ: a cut is a part closed downward over prev; "as of T" is the records emitted by T and everything they build on; a tick folds a set named outright; a result lists ids without what the reader holds of them; and a window is a where applied after the heads. The result's bytes and its hash, res:, are built. The form of the tick record was ruled on 2026-11-21 (the tick record note) and is not built yet: a tick is an ordinary record with no id but its own, it holds no window, an empty covers is allowed, and a store admits a tick without checking it.
What a tick claims
| Part | Claim | Trusted by |
|---|---|---|
| Computed | "Folding exactly these records with this spec gives this state." | recomputing; no signature needed |
| Witnessed | "When this boundary fired, these are the records I had." | only whoever witnessed it, so it's signed |
| Asserted | a summary, a recap, a judgment | its author, so it leaves the tick and becomes a record about it |
Two kinds of tick
Content tick
- vertex
- hash of the spec and its parameters, which pins the fold vocabulary
- covers
- ids chosen by the records themselves
- window
- the concrete window, if any
- result
- the folded state, with how many covered payloads it couldn't read
- id
- hash of vertex, covers and result
A value, not a record: no observer, no time, no signature. Two machines compute the same id. Stored only when cited or sent, as a tick record its writer signs.
Witness tick
- kind
tick: an ordinary record- observer
- whoever ran it
- emitted
- the runner's "now"
- payload
- a tick value: vertex, covers, window, result; the set is what the runner had
- sig
- the runner's signature
Never reproducible, and never pretends to be. Its value is historical: what was known, shown or sent.
A reader with the covered records can check a tick's result. Both kinds use the same storage form. A stored content tick is also a tick record, signed by whoever cited or sent it. The kinds differ only in how the set was chosen; what a witness tick asks you to trust is that the set was complete. Once an input is erased, a numeric result can't be recomputed and rests on the signature; a result made of references still can be.
How the set is chosen
| Mode | The set is | Late records | Suits |
|---|---|---|---|
| By window | records whose occurred starts in a span | ticks again | aggregates where completeness is the point: weekly health, last month's HOA records |
| By reference | the closure of what a record cites | never affected | decisions: an ADR covers the evidence it cites, never evidence its deciders didn't see |
| By witness | what the runner had | never ticks again | digests, handoffs, packets, reviews |
Late records and revisits
occurred decides, not about. A record occurring inside a covered window arrives late, and the window vertex ticks again with prev. Work in 2026 on the same thing is a revisit: a new tick that cites the old one. The old conclusion stays true of 2019.| What happens | Example | Response |
|---|---|---|
| Late record | a 2019 email ingested in 2026, occurred: 2019 | window vertices tick again with prev |
| Revisit | 2026 migration work re-examines the ADR | a new tick about the same thing, citing the old |
| Correction | in 2026 someone disputes a 2019 claim | a revisit: the dispute occurs now |
No cascades. A parent tick covers ids, and ids never change. When a child ticks again, the parent still cites the original child, which is accurate: that's what it folded. A hygiene vertex flags "cites a superseded tick", and someone decides whether a revisit is worth it. Staleness is a flag, not a recomputation. A vertex reading ticks-from follows prev chains to the head, as Latest does.
Across the cases
| Case | Boundary | Kind | Notes |
|---|---|---|---|
| Novel · draft 2 | you emit draft-complete | content | latest prose per chapter; anyone reproduces "draft 2" |
| Novel · sent to beta readers | sending | witness | what you actually sent, which can differ if a phone save arrives late |
| Novel · continuity | none | — | no tick: a lens, nothing to cite or send |
| Orchestration · subagent | agent emits task-complete | content | its steps; the agent's report is a record about the tick |
| Orchestration · slice, orchestrator | approved = children; all ticked | content | covers child ticks, so verification recurses down the tree |
| Orchestration · late step | a step after task-complete | ticks again | also an anomaly: the agent kept going after declaring done |
| Team · ADR accepted | status → accepted | content, by reference | the decision, its cited evidence, pins for tenure and identity |
| Team · weekly digest | every Monday | witness | what the team was shown |
| Team · summarized promotion | you promote | content, by reference | the team can't recompute it; trust rests on your signed promote |
| Incident · handoff | 14:00 handoff | witness | what we knew, when |
| Incident · resolved | status → resolved | content | the final state; a late log makes it tick again |
| Homelab · health | collector emits cycle-complete | content | a cron trigger made content by a marker record |
| Salience · morning digest | every 7:00 | witness | what you were shown; reads and dismissals point at it |
| Stale review | an item comes due | witness | what was put in front of you; your affirm or retire points at it |
The HOA recap before a board meeting
- The thing. The management company's email domain, "board meeting" calendar events, payments and documents: several anchors and natural keys joined through
resolve-by. - The window. "Last month" is relative, so the tick records the concrete span,
occurred: 2026-09-18/2026-10-18. A later check checks that span. - The trigger. Pulled on demand, so a witness tick: "the HOA records I had on the 18th". Scheduled two days before each meeting is still operational, even though the date comes from a calendar record.
- The recap. Wren's summary is a record about the tick: the tick holds what was known; the summary holds the claim.
- To the board. Another realm, so a bridge. The summary and a few chosen records cross; the tick crosses by reference, and your emails stay home.
What a postmortem keeps
| In an investigation | Is | From |
|---|---|---|
| a finding; "this log is evidence" | an emitted record with references | a person or Wren |
| "as of the 14:00 handoff we had these" | witness tick | whoever ran the view, signed |
| resolved | content tick | the incident view; anyone recomputes it |
| a summary of the incident | record about the tick | its author |
A selection of records is an emit, not a tick: a person chose it. The investigation and its occurrences are separate things; a recurrence is a new record or anchor the investigation cites, and needs no tick. Witness ticks keep what was known when; the content tick, replaced if late evidence arrives, keeps what was true.
Rules of thumb
- Prefer content boundaries, made with marker records.
draft-complete,task-complete,cycle-completeandresolvedturn moments into content. The marker's emitter is the witness, as an ordinary signed record. - Witness ticks are for what someone saw, knew, sent or was shown. Their value is historical, never a claim to be the truth.
- Verifiability depends on what the reader holds. A holder recomputes. Someone with only a reference trusts the signed act that sent it (promote or bridge). A bundle makes a tick verifiable anywhere.
- Dependencies verify lazily. The tenure or identity vertex's content tick at the same cut can be computed on demand; pins are just tick ids.
- Not every vertex ticks. Only when something must be cited, sent, shown or marked.
Where ticks live, and who writes them
A content tick is a value, recomputed on demand. When someone cites or sends it, they write and sign a tick record. into names where that record lands. Admission there works by recomputing (for a store that holds the records) or by the writer's grant. A vertex never signs anything; the observer who ran it signs.
Determinism, across implementations
- The set decides, for every fold. Accumulating folds are commutative and folds over heads work from the heads, so arrival order never enters. The reader reads JSON numbers as binary64 values. Numeric folds accept only safe whole values and count other values as unread. Sum uses an exact integer accumulator.
- The spec hash pins the fold-vocabulary version. Otherwise a change to LatestBy's semantics would change results under an unchanged hash.
- Conformance vectors bind implementations. The conformance vectors in
vectors/are a requirement. They check agreement between implementations, such as the Rust core and a JavaScript record writer. - Window membership: a record belongs if the start of its
occurredspan falls in the window; records withoutoccurreduseemitted. A spec may override. - Empty windows: a witness tick may be empty ("monitoring saw nothing all night" is information); a content vertex never ticks over an empty set.
Boundary modes in the earlier prototype
Earlier prototype context, not an integrated runner. Its Boundary(mode="when"|"after"|"every", conditions) in libs/atoms/src/atoms/boundary.py holds this split. That path is absent from this repository. Content boundaries include when a kind arrives, after N records, and conditions on folded state. In that prototype, every is the operational mode, alongside a manual "tick now". Boundaries are not implemented here.
Prior art: the Dataflow model
Stream processing handles late data with event time, processing time, watermarks and triggers. It refines or retracts earlier results. occurred is event time, a boundary is a trigger, and ticking again with prev is an accumulating refinement.
Akidau et al., VLDB 2015
Akidau et al., "The Dataflow Model: A Practical Approach to Balancing Correctness, Latency, and Cost in Massive-Scale, Unbounded, Out-of-Order Data Processing", PVLDB 8(12), 2015. vldb.org/pvldb/vol8/p1792-Akidau.pdf
Layer 4: places
Places expose few operations: list records, get one by id, find changes since a checkpoint, and get a blob by hash. The index is disposable. Everything else is a per-store, per-machine choice: where segments live, in what format, and how much of the store each machine holds.
layer closed Segment sync between places is a comparison of segment lists; see Sharing.
A store on disk
.loops/ in git? anchor yes the store's anchor record; its st: id travels with a clone vertices/<name>.json yes the editing form of the store's vertex records segments/<observer>/<device>/<hash>.jsonl yes closed, immutable segments/<observer>/<device>/open.jsonl no the one file being appended to blobs/<hash> small ones; large or erasable ones go to a blob place store.json no a render of the declarations: edit, then loops apply .gitignore yes written by the first emit ~/.config/loops/places.json per machine, never shared ~/.config/loops/keys/ the file signer; the OS keychain otherwise ~/.cache/loops/index.db derived, disposable
Discovery walks up to the nearest .loops/, the way git finds .git. Zero-config is .loops/ alone, JSONL, no places.json. First run creates a device label per write place in the segment path. It keeps two writers out of one file. Exactly one key signs each segment. In a git place a segment file closes once committed. The next write opens a new file. A writer on two branches adds two files instead of forking one. A store whose places are all SQLite can be a single store.db holding the same things.
Defining a store
The old .vertex file did four jobs at once. Each now has its own home:
| Concern | Was in .vertex | New home | Travels? |
|---|---|---|---|
kinds, fields, reference fields, lifecycle, search, preview, writer policy, stewards, natural-key rules | each loop block | store declarations | with the store |
from, fold, boundary, into, weight-by, resolve-by | each loop block | vertex spec | with the store that carries it |
parse, discover | loop and source blocks | collector: parse specs travel; source bindings stay on the machine | split |
store "./data/…" | top line | places.json | never |
{
"store": "team-platform",
"maturity": "declared",
"stewards": ["sl:w1", "sl:director"],
"shared": { "format": "jsonl" },
"refuse": [{ "from": "personal-ingest" }],
"kinds": {
"decision": {
"fields": { "title": "string", "status": { "enum": ["proposed", "accepted", "superseded"] } },
"refs": ["evidence"],
"facet": "status",
"search": ["title", "body"],
"preview": ["title", "status"]
},
"note": { "search": ["body"], "erasable": true }
},
"carries": ["platform-knowledge", "hygiene/things", "hygiene/kinds"]
}
shared: shared places stay reviewable in PRs. refuse: prevention, before erasure is needed. refs: reference fields, once called edges. facet: emitted whole. search: worth indexing; each machine decides. preview: how lenses show it by default. erasable: payloads go to a blob place.
- Updating a store is an emit.
applycompares the file with current declarations and emits one changeset record. A half-synced replica never sees half a change. Breaking changes are refused (a new kind instead); removals emitretire. - It's a performative. A steward's changeset takes effect. Anyone else's is a visible proposal that takes effect if a steward affirms it.
- Concurrent edits are forks, two heads on
prev, resolved by a steward stance. No merge conflicts in a config file. - A record is judged by the declarations in effect at its
emitted. Raising a store to strict doesn't reject its history. A record emitted before a declaration it would violate, but arriving after it, is flagged: the late-record pattern applied to definitions. - The definition has a history: what the store looked like in 2021 is a fold over its declarations.
Places
A place is a location, a format and a scope, holding segments. The store is the union of its segments across places. Ids use canonical bytes (JCS), not a file format. Immutable, single-writer segments make sync a union. Ticks state what they saw, even with partial places.
| Role | Meaning |
|---|---|
| write | where this machine appends its own segments |
| hold | a copy of segments, whole or scoped (scope by emitted, never occurred, or late records go missing) |
| blobs | where large or erasable payloads live |
The index isn't a place: it's derived and per machine. This enables git as interchange: JSONL in git for sync and review, SQLite as a fast working copy. Tiering keeps recent data on the laptop, everything on the homelab, and cold data in object storage. Erasable payloads live in a blob place outside git. Backups are just places.
The index, without doubling storage
| Store | Segment format | Duplication |
|---|---|---|
| Team / project, in git | JSONL + slim index | small: envelopes and offsets |
| Novel | either | small |
| Personal ingestion (mail, feeds, history) | SQLite tables, index in the same file | none |
The index holds envelopes and byte offsets, never payloads. Full-text search uses SQLite FTS5 contentless tables (the inverted index only; contentless_delete lets erasure remove rows), opt-in per kind. The store declares which fields are worth searching; each machine decides whether to build it.
Erasure
The need that matters: private data that shows up where it shouldn't, usually fine at home but landed in a shared store. Retraction is a status (retire); a leaked secret must be rotated anyway. So erasure acts per store, and stays small.
hash(envelope + hash(salt + payload)), so removing the opening changes storage, not the record. One erase covers every verbatim copy in stores that honor it.| Piece | Why |
|---|---|
| Hash the payload separately, salted, per payload | Ids, ticks and what they cover survive erasure. A secret salt makes offline guesses harder while the opening remains withheld. |
One envelope field, erases, on a record signed by a steward, per store | a visible gap, not a broken reference |
| Tick results reference, don't copy | a listed id needs no chasing. Group names and sums are read from payloads, so erasing a record means erasing the ticks that cover it |
| The envelope is permanent | personal identifiers go behind opaque anchors, never natural keys in about |
The whole game: find every record holding the data. Search, then trace references from the originals. Emit a record whose erases names each one. Each store replaces the opening with the commitment. In git that means a steward rewriting one segment file's history; because ids never change, nothing else is touched. Rejection isn't erasure: policy hides a record from folds, but in git it still exists.
Prevention, before cure
- Promotion is a deliberate stance, so it's the review moment; agent-proposed promotions need yours.
- Store policy can refuse whole sources ("never admit records from personal collectors").
- A hygiene vertex flags likely-personal payloads (emails, phone numbers, health terms) for the stale review; secret scanning sits in the same place.
What true erasure would look like
A record shouldn't contain its data; it should commit to it. hash(salt + payload) commits to the payload. A secret salt makes offline guesses harder while the opening remains withheld. Erasure forgets the opening.
| Level | Gone | Still leaks |
|---|---|---|
| 1 · Payload | data and salt | who, when, what kind, about what |
| 2 · Envelope too | everything but the id | only the graph: something was covered here, cited there |
| 3 · Topology | the references | nothing, but it rewrites other records and breaks immutability |
- Keeping references is what makes erasure finishable. The hard part is everything derived from a record; surviving references let a hygiene vertex trace them.
- Physical media: on SSDs deletion isn't reliable, which is why NIST SP 800-88 accepts cryptographic erase.
- Other parties: what someone has read in plaintext, they can keep. True erasure across parties exists only where content never left your control: the realm boundary rule, "references cross, content doesn't", is also the erasure design.
- The exotic end: per-field salted digests (IETF SD-JWT) allow field-level erasure; a facet split gets the same result without it. Chameleon hashes (redactable blockchains, Ateniese et al. 2017) swap content under the same hash, at the cost of a master key over all history.
Layer 5: sharing
Sharing adds nothing new. Replication is set union, compared segment by segment. Delivery isn't trust: admission decides what counts. Keys come in two tiers, standing changes need a person present, and standing ends with "retire through", a cut by what was held, never by time.
layer closed Every piece reuses something from below: segments (layer 4), admission and stances (layer 1), witness ticks (layer 2), key bindings (observers).
What moves
Whole stores, within a realm only (across realms: compose or bridge). Records never change and each fold depends only on the set. Two places holding the same records show the same state, regardless of arrival order. Concurrent edits are two heads on prev: data, not a sync failure.
- Erasure doesn't disturb it. A record that erases travels like any other and each place applies it locally; ids and line counts stay put, so the lists still match.
- Content ticks don't sync. They're a cache anyone holding the records recomputes. Witness ticks are ordinary records and sync like them.
How it moves
| Transport | How |
|---|---|
| Git | commit segments/, anchor and small blobs; leave out the index, places.json and store.json (a rendering, like the index; the changeset record is what gets reviewed). Pull is union. |
| Other places (SQLite, S3, NAS) | compare segment lists, send the difference |
| Bundles | a tick plus what it cites, for bridges across realms |
- No
merge=union. Each segment file has one writer, and in a git place a file closes once committed: the next write opens a new one. So one writer working on two branches adds two files, and merging only ever adds files. A committed segment file that changes, outside a steward's erase, is the alarm: a mislabeled device or a forgery. A union driver would quietly join the files. - Corrected in version 13: with one growing file per device, a writer appending on two branches made a legitimate conflict. The LSP walk found it.
- The device label is per write place, not per machine. Two clones of one repo on the same laptop would otherwise share a segment file.
Who counts
Delivery isn't trust. Anyone can hand you records. The id proves the content is intact, the signature proves who wrote it, and admission decides whether it counts.
What gets signed
The record's id, prefixed loops/record/v1:. The signature sits beside the record, outside the id: sig { key, ed25519 }. It survives erasure (the id covers the payload's commitment), and a stripped copy is the same record with less proof.
When it's checked
The plan: once per record per machine, when it enters the index, which caches the verdict. Ed25519 takes tens of microseconds: a million records is well under a minute, once. As built, every loops verb checks every line on every run, about half a second for 9,000 records; remembering which segments were checked is an open decision.
Signing by default
The CLI makes keys silently on first run and signs every emit; store policy decides what's checked. Unsigned records only come from importers and outside tools, and the hygiene vertex counts them.
Stores verify themselves
On your first write into a store, your anchor and current key bindings are copied in verbatim. Every signature in a store can be checked from that store, by any replica, offline.
Keys
| Moment | What happens |
|---|---|
| First run, new person | a root key and its anchor, a bound key for this machine and its binding, and a name record. Where a root key is made can't be changed for that lineage, so make it where it will stay; the CLI offers a printable recovery key once. |
| First run, new machine | pair: the root key signs a binding for the new machine's key, or use the recovery key. A bound key can't vouch for another. |
| Every emit | signed by this machine's bound key; you never see it |
| No signer (keychain locked) | stores that require signatures refuse; others write unsigned and the hygiene vertex counts it |
| Lost root and recovery key | a new lineage that descends from the old one and adopts its records; no recovery machinery |
Where keys live: the OS keychain by default. Headless machines use an owner-readable file: ~/.config/loops/keys/<lineage>/<device>, like SSH. Keys never live in .loops/ or any place. The signer is a small interface: keychain, file, later ssh-agent or a hardware key. Ed25519 only.
Domain vouching only when colleagues must agree what @acme means: https://acme.com/.well-known/loops maps the name to a root store id. The domain vouches for the mapping, never for content.
Presence: what needs a person
Every record is durable, so that isn't the test. The test is whether a record takes effect because of who signed it, plus acts that can't be undone.
| Needs you present | Doesn't |
|---|---|
grant, vouch, retire: who counts | ordinary emits |
a steward's policy or declare changeset; affirm of a proposal: what counts | affirm and dispute as beliefs about content |
adopt on someone else's behalf | name records: mistakes are visible and fixable |
erasing (erases); bridge out of the realm; declaring a store public: can't be undone | spec, and ticks |
| creating a store or lineage | promote within a grant |
- A grant is presence given ahead of time. One tap when granting; the agent then acts within scope without asking.
- To go further, an agent proposes. A changeset or grant request without standing is already a visible proposal; your
affirmis the tap. That's the elevated-request flow, and the model already had it. - Narrow without you, never widen. Wren can hand a sub-agent part of what it holds (Macaroons, Biscuit, UCAN attenuate the same way).
- One tap per act, no grace window. An act can cover many records (a changeset, a batch promotion); the next act needs a fresh tap, so nothing rides a sudo-style window.
- Checked at admission. A standing-changing record counts only if a root key signed it. Presence is not a third key: it is what a root key is.
The honest limit on presence
A root key is meant to be used only with you present. Other replicas take that on trust. Touch ID protects your machine, not their view of it. Hardware keys can prove it, since FIDO signatures carry a user-presence flag inside the signed bytes, but that means a second signature format beside Ed25519. Start with the keychain claim; add hardware proof only if someone needs it.
Agents
| Threat | Answer |
|---|---|
| A. the agent signs as you | presence for anything that changes standing; sandboxing for the rest |
| B. the agent signs as itself beyond its grant | already covered: admission at read ignores records outside the grant |
| C. the agent's key leaks | the key is worth little: the grant is what makes its records count, and ending the grant ends that |
- No session keys yet. An agent is its own lineage with its own root key, and your grant makes its records count. A key per run can come later, as a bound key of that lineage. Where it was tried, a key per session under one OS user was no boundary: nothing was ever scoped or revoked per session.
- Agents may hold their key. Remote and local agents work the same way: the protection is that the key is worth little, not that it's hidden. It still never enters the session's context, environment or logs.
- A run says what it is. Each session writes a record about itself: the model, the task, where it ran. The key can't check that claim; it is the agent's word.
| Where the agent runs | Can it sign ordinary records as you? |
|---|---|
| same OS user, no sandbox | yes: ordinary records only, ended cleanly by a cut; it can't change standing |
| sandboxed (Claude Code's sandbox, a container, a separate user) | no: your keys are out of reach; it has only its own key |
| remote or cloud | no, by construction |
Sandboxing is an operating-system concern, not part of loops; loops makes all three setups safe the same way. Later, a local signer can sit outside the sandbox behind a socket, like ssh-agent or 1Password's SSH agent. It signs only as Wren, within its grant: defence in depth.
Ending standing: retire through
One mechanism handles two cases. A key stops speaking for a lineage after loss, theft or rotation. Or an observer stops writing to a store when a colleague leaves or a grant ends. emitted is self-stamped, so a cut by time can be dodged by backdating. Cut by what was held instead.
- Late but legitimate records written before the cut may arrive after it. They stay visible but don't count. The hygiene vertex flags them; the steward affirms them if genuine.
- Departure isn't distrust. A colleague who leaves keeps every record admitted; they just can't add more. If a key was stolen before anyone noticed, the steward disputes specific records. Nothing is rewritten.
- A stolen bound key adds no keys. Only a root key binds. A stolen root key is the case with no clean answer; Trust walks it.
- Rotation of a bound key is a new binding by the root key, then the old key retired with a cover. A root key is not rotated: a new root is a new lineage.
A boundary: withholding, not hiding
settled Privacy in Loops is withholding: a record, or anything computed from it, reaches you or it doesn't. A render, fold result, count, summary or embedding carries information from its inputs. A derived thing is as private as its least-public input. It travels under the same grant.
- What it offers: envelopes and commitments show that something is withheld, but still reveal metadata. A secret salt makes offline guesses harder while the opening remains withheld. Readers can check folds over envelopes. Unreachable does not distinguish private records from lost ones.
- What it doesn't: computing over records a reader can't see while keeping them hidden. That needs zero-knowledge proofs or secure computation, and nothing needs them yet.
- So a computed claim you can't recompute is only attested: it rests on the signer, and lenses say so.
Run against the examples
| Case | What happens |
|---|---|
| Team platform | clone, write to your own segment, open a PR. Joining is a steward's policy changeset (one tap); leaving is a retirement that covers your records. |
| Novel co-author | novel replicates to their laptop via git or the NAS; their lineage is added as a writer. They never see feed. |
| Feed, laptop and homelab | the two places compare segment lists |
| Wren, a run | Wren's key, under g:runs; promotions into runs/* need no tap; the run is a record about its session |
| Wren loses a laptop | retire that bound key with a cover; Wren's root key binds a new one |
What Arrival needed that we don't
Head attestation, rollback detection and equivocation proofs protected against untrusted replicas. Inside a realm the places are yours or your team's; across realms nothing replicates. Git's conflict on a segment file is the cheap alarm for the one case left.
Prior art
- Secure Scuttlebutt and Hypercore: per-writer append-only logs, replicated by comparing "how far I have each feed"
- Matrix cross-signing, Keybase device provisioning, Signal linked devices: device keys under an identity key; pairing
- did:plc: rotation keys separate from the signing key
- SSH certificates and Sigstore (Fulcio): short-lived keys bound to an identity
- ssh-agent, 1Password SSH agent: signing through a socket, approval prompts
- FIDO2 / WebAuthn: user-presence and user-verification flags inside signed data
- Macaroons, Biscuit, UCAN: attenuating delegation
- Certificate Transparency (RFC 9162): a signed prefix of an append-only log as evidence
- AT Protocol handle resolution, Nostr NIP-05: a domain vouching for a name
- RFC 8032: Ed25519
Trust: who counts, walked
A line proves which key signed it. Trust is everything between that and "this record counts". Walked end to end, it comes apart into five strata, each reading only the ones below. Two tiers of key are enough. And retire through turns out to need a tick, so standing splits in two around step 4.
proposal Two tiers of key is settled; the rest is not, and none of it is built. The first product slice writes only as its signing key, and one model exists for stratum 1. No anchor that anyone means to keep should be made until this walk is closed.
order Kyle, 2026-11-10: standing comes after ticks, and arrives with sharing, when records first cross between people. Until then everything runs on one machine under one trust root. Before either comes the item and mention split, decision D8, in the changelog from 2026-11-10 to 2026-11-15. Its three parts, D8a, D8b and D8c, are built.
The strata
| Stratum | Question | Reads | State |
|---|---|---|---|
| 0 · bytes | Is this line what it claims? | the line alone | built: the place checks every line it reads |
| 1 · speakers | Does this key speak for this observer? | anchors, key bindings | modelled with two tiers; retiring a key is not |
| 2 · stewards | Who may change this store's standing? | the store's anchor, stratum 1 | design only |
| 3 · grants and policy | Who may write what here? | grants and policy records, strata 1 and 2 | design only |
| 4 · admission | Does this record count? | the record, strata 1 to 3 | today's admission reads only prev and of |
Why strata. The outside review's finding D: admission reads grants, grants are admitted by standing, and standing is a fold over key bindings signed by keys whose standing comes from an anchor. That is a loop unless each question reads only answers already fixed. Stratifying by kind makes it a ladder.
The walk
One store, three writers: you, an agent seat working with you, and a second person who joins and later leaves. Each step says whether the design so far holds or breaks.
You start. One record of kind
lineage-anchor, whose observer is the key that signed it. Its hash is yoursl:id, and that key is your root key.The lineage is the anchor, not the key. One anchor, copied into every store, is the same you in each. The same key signing a second anchor starts a second lineage.
Holds, with one decision inside it: the root needs nothing from the payload, so erasing or withholding the anchor's payload never changes who you are. Your name and email are separate records about the lineage.
You write from the workbench. A
key-bindingrecord, observer your lineage, about the workbench's key. That makes it a bound key, and records it signs withobserver: sl:youare now your word.Breaks the four-tier key scheme, in a useful way. Who may sign a binding? If any bound key may, a stolen bound key can bind more keys, and two keys can each try to end the other. If only the root may, stratum 1 has no recursion at all: the speakers are the root, plus what the root bound.
So: two tiers. The root key signs every record that changes standing. Bound keys sign everything else. The names say what a key does, not where it sits: a root key is on some device too. "Presence" stops being a third key and becomes what the root is: the key that asks for you before it signs. This is the review's "two key tiers, not four".
An agent works with you. It is not a key of yours. The seat has its own lineage and its own root, and your root signs a
grantnaming it, with a scope. Its records carryunder, pointing at the grant.Holds. The agent's key is worth little because the grant, not the key, is what makes its records count, and you end the grant without touching its key. Session keys can come later as bound keys of the seat; nothing needs them yet.
The honest limit stays: an agent running as your OS user can read a bound key kept in a file, and sign ordinary records as you. It can't change standing unless it can also reach the root. Where your root lives is the real decision, below.
The store gets a steward. A
store-anchornames the lineages that may change the store's standing. Solo, that is you.Breaks the earlier sketch, which kept
stewardsin the payload. A payload can be erased or withheld, and a store whose stewards can be erased has no stewards. Either the standing kinds keep everything standing reads in the envelope, or the standing kinds can't be erased. The first is one rule instead of two, and it is what the anchor and the binding already do.A second person joins. A steward's policy record adds their lineage as a writer. Their anchor and bindings are copied in, so the store verifies itself.
Holds, and shows what admission is: a record counts when its key speaks for its observer (stratum 1) and the store's policy takes that observer (stratum 3). The first is not negotiable at any maturity, or anyone could write as anyone. Only the second varies from open to strict.
Everything so far only grows. No rule yet takes standing away. More records never silence a key, unbind a writer or end a grant, and arrival order can't matter. The laws already proved for folds and for late arrivals carry over unchanged.
Holds. This half of standing is small, and the draft model proves its stratum 1.
The second person leaves, and a bound key is lost. Both are "retire through": a cut by what was held, never by time, since
emittedcan be backdated.Breaks on what "through" means. The Sharing walk leaned on a segment being one writer's growing file, so "through r4" names a prefix. A store is a set. The first product slice closes a segment per changeset,
export | importregroups lines, and an erasure rewrites a segment. There is no position to cut at that every replica agrees on.What every replica can agree on is a set of ids. A retirement has to cover the records it lets stand, and "a signed record that covers a set of ids" is a witness tick. The Sharing tab already said so: "a witness tick in miniature".
So retiring waits for ticks. It needs the tick's way of covering a set compactly, and the result encoding, D7, which is built since 2026-11-20.
This settles the order the review argued about. Standing is not one step. The growing half (anchors, bindings, stewards, grants, admission) can come now. Ticks come next. Retiring comes after, as a tick with a stance.
A retirement arrives late. A replica that already counted the lost key's records must stop counting the ones outside the cover.
Holds, as a known shape: it is the same fact as a late
prevtarget retracting an admission. The set still decides; a cached state can't follow it and must be rebuilt for that key's records. The review's law A fits here: the cut ends a key's standing after it and nothing before it, and grants the key signed before the cut stand.
What the walk changes
| Was | Becomes | Why |
|---|---|---|
| Four key tiers: root, presence, device, session | Two: a root key that signs standing, bound keys that sign the rest | Stratum 1 loses its recursion; presence is what the root is |
| An agent's session key bound under your lineage | The seat is its own lineage; a grant makes its records count | Key binding and authority stay separate, as Observers asked |
Standing kept in payloads (stewards, a grant's subject) | Standing reads envelopes only | Erasing or withholding must never change who counts |
| Retire through a position in a segment | Retire through a covered set: a tick | A store is a set; segments regroup and get rewritten |
| Step 3 standing, then step 4 ticks | 3a growing standing, 4 ticks, 3b retiring | Retiring needs what ticks define |
What each standing kind would hold
A sketch, to test the envelope-only rule. Kind names follow the ledger's reserved *-anchor.
| Kind | Observer | About | Counts when signed by |
|---|---|---|---|
lineage-anchor | the root key, k:… | nothing | that key |
key-binding | the lineage | the key bound | the lineage's root |
store-anchor | the founding lineage | the steward lineages | a key speaking for the founder |
grant | the granting lineage | the lineage granted | the granter's root |
| retirement (step 3b) | the lineage or steward | the key or lineage retired | a root; and it covers a set |
Where it strains. A grant's scope (which stores, which kinds) does not fit an envelope. If the scope is payload, a reader without that payload can't judge a record written under the grant. Admission would then answer three ways, as where does: yes, no, or unknown, with the unknowns counted beside the result. That is open, below.
A side effect, closed by D8b. When about made heads, a record about a lineage joined that lineage's thing, and a store anchor about its stewards showed up in each steward's state. about now only mentions: a store anchor is of its own id and heads no steward's state. A fold that asks what was said about a steward still finds it.
What the model proves
model/Loops/Keys.lean models stratum 1 without retirement, with two tiers: a key speaks for a lineage when it is the root an anchor pins, or the root signed a binding naming it. It proves that holding more never silences a key, that the set decides, that withholding payloads changes nothing, that there is no speaker without an anchor, and that a record signed by a key that is no root changes no answer.
The first draft let any speaking key sign a binding. The walk overruled that, and the rule got shorter: with no recursion, the computed list of speakers is proved to be exactly the keys that speak. It is still not a law of the protocol: no vectors, no protocol text, and no entry in the law index.
A lost key, before retiring exists
The split puts retiring after ticks. This walks what the gap costs: one store, you and a second person, and nothing that takes standing away.
The workbench's bound key is lost. You bind a new key with the root key and keep writing. Your lineage is untouched.
Holds. This is the case two tiers makes cheap: losing a bound key never costs you who you are.
The lost key still speaks for you. On every replica, for good: holding more never silences a key. Whoever has it writes ordinary records as you, and the second person's replica admits them.
Breaks, as expected. It can't bind keys, sign grants or change the store's standing, so the damage is ordinary records and no more.
You say the key is lost. An ordinary record about the key. It changes no admission. A lens can mark every record that key signed, and a person can dispute particular ones.
Holds, as far as it goes. It can't say "lost after this point": a store is a set, and "after" is what a tick's cover will supply. So the mark falls on everything the key signed, your own earlier records included.
The root key is lost instead. Whoever has it can bind keys and sign grants as you, and nothing you sign outranks it. The only answer is a new lineage, and the claim "this continues that" is one the thief can make too.
Breaks, and retiring would not fully mend it: a root can't retire itself against a thief holding the same key. This is the case to prevent, which is why the root key stays off the workbench.
The second person leaves. Policy only grows, so they stay a writer. The choice is to live with that or to start a new store and import the old records as history.
Breaks for a team; it doesn't arise solo.
What it shows. For a solo store the gap costs one thing: a lost bound key can't be cut off, only marked. With the root key elsewhere that is tolerable. For a shared store it is not, since a departed writer can't be removed at all.
leaning Keep the split, with one interim rule: no second writer on a store meant to last until retiring exists. And add one cheap thing to 3a: a kind for "this key is lost", ordinary now, which a later retirement can cite.
Decisions this needs from you
Where does your root key live?
The root signs every standing change, so it is the one key worth protecting. On the workbench it would be a file any process running as you can use, agents included. On a laptop keychain or a hardware key it asks for you, and binding the workbench's key becomes one signed record carried over.
leaning Not on the workbench. Until a second machine runs loops, nothing canonical gets anchored there.
Kyle, 2026-11-10 Where a key is kept looks like the application's business, not the protocol's: a ladder from a 0600 file to the OS keychain to a vault. The root in particular is not kept on the workbench. Still open: how the workbench gets its binding signed.
leaning Keeping can improve over time, but where a root key is made can't be undone for that lineage: with two tiers no binding replaces a root. So the anchor you mean to keep is made where its root key will stay, and the workbench gets a throwaway lineage until then.
Two tiers, with the root as presence?
It costs one thing: adding a device always needs the root, where the four-tier design let an existing device vouch. It buys a stratum 1 with no recursion and no question of which key may end which.
settled Yes. Kyle, 2026-11-10. The model now says so.
Standing reads envelopes only?
The alternative is a second rule: standing kinds can't be erased or withheld. Envelope-only needs no exception, but pushes steward and subject lists into about, and leaves a grant's scope with nowhere to go.
leaning Envelope-only for who; payload for scope, with three-way admission.
to walk Kyle wants this unpacked as the design goes on, not ruled now.
Split standing around ticks?
3a (anchors, bindings, stewards, grants, admission), then ticks, then 3b (retiring). Until 3b exists, a lost key or a departed writer can only be handled by starting a new lineage or a new store, which is honest for a solo store and not for a team.
leaning Yes. D7, the result encoding, gated retiring as well as ticks. It is built; both now wait on the tick record, ruled on 2026-11-21 and not built yet.
walked Kyle leans yes too. The walk is above, under "A lost key, before retiring exists": the split holds for a solo store, with one interim rule for teams.
What this walk didn't touch
- Forked policy. Two stewards change policy apart. The review's answer: the newest head by content order is in effect, the fork is shown. Not walked.
- Declarations and maturity. Which kinds and shapes a strict store takes, judged at
emitted. That is the other half of step 3 and reads nothing from this half but who the stewards are. - Names. Name tables and
@homeresolve at read and never take part in matching. - Across realms. Vouches, follows and federation's admission.
- Receipt evidence. A backdated record from a stolen key, before anyone retires it. A covering tick is the evidence; this walk only shows where it plugs in.
- Proving presence to other replicas, and a signer behind a socket. Both stay open under Sharing.
Realms
Stores relate in three ways: compose, bridge and replicate. Only replication moves whole stores, and it is the only one that needs merge semantics. Most stores have one writer. Ticks are records that reference what they cover, and they can travel alone or with everything below them. How vertices tick is in Resolution.
The orchestration chain
By reference or as a bundle
The substrate
Realms and the boundary rule
A realm is a name table plus a boundary rule. @home names a table, not a store. Each store has a table. A realm's table links its children. A domain can optionally vouch for one. Because records hold only hash ids, joining stores into larger realms changes how names resolve and never rewrites data.
| Relationship | Within a realm | Across realms |
|---|---|---|
| Compose | ✓ | ✓ default. Nothing moves. |
| Bridge | ✓ | Only as an explicit, signed tick: a publication, not a sync. |
| Replicate | ✓ | ✗ never. |
Diagrams: Scenarios, steps 5 to 7.
What happens when stores or realms join
| Situation | Result |
|---|---|
| Same lineage, different names | Nothing to do. Folds unify by id; lenses pick a display name. |
| Different lineages, same name | Both valid in their own stores. The unqualified name is ambiguous at input; use claude@notes or add a petname to the parent table. |
| One entity given two lineages before joining | A same-as record, signed by both or vouched by you. Link, never merge. |
- Resolution follows a search path: current store's table, then its parents, then any
@homenamed explicitly. - Realm names are your petnames for root tables, so nested realms need no DNS-style hierarchy. A domain matters only when colleagues must agree what
@acmemeans. - Work is an ownership boundary. At work the root is the team and your work lineage is admitted by their grants. Work and home lineages stay separate; any
same-asbetween them lives only at home. - Lens output stays with the reader. A system prompt drawn from both realms is computed at read. If kept, it is a tick in the reading realm, referencing foreign records by hash.
How a tick enters another vertex: options A, B, C
| Mechanism | Verdict | |
|---|---|---|
| A | Ticks flow directly; a vertex folds records and ticks | chosen Simplest. "The vertex is where loops meet." |
| B | The vertex turns its tick into an observation with observer = the vertex | Blurs observations and ticks. Earlier Python prototype behavior, not a claim about the current integrated Rust implementation. |
| C | An observer (a bridge) sits on every wire | My first proposal. One moving part too many. |
Consequence for layer 1: a spec routes and folds records. A route must select ticks from vertex V as easily as records of kind K. A fold over child ticks can count slices that passed review.
Why immutable segments instead of a log with a head
- Git-storable but not git-only. The backend contract shrinks to put, get and list on immutable blobs, compared with Arrival's atomic compare-and-append.
- Replication is a union of segments. Writers never touch each other's segments.
- Composition is the same union, at read time. "Combining stores is an ordinary local operation" becomes literally true: compose and merge are one operation at different scopes.
- Witness order survives without an authority. Each writer's segment chain is that observer's receipt order, hash-linked. As built, a place keeps its segments as a set, each named by its own hash, and records no order; only a witness tick says what was held when.
For the team case in git: segments per writer and device, .loops/segments/<lineage>/<device>/, each file closed once committed. As built it is .loops/segments/<key>/, one directory for each signing key. Corrected: an earlier version suggested merge=union in .gitattributes as a safety net. With one writer per file an honest pull never conflicts on a segment, so a conflict is an alarm; see Sharing. Decision records get reviewed in the same PR as the code they explain.
What survives from Arrival
| Arrival | In this model |
|---|---|
| Hash-chained history | per-writer segment chains |
| One authority per lineage | trivially true: one writer per chain |
| Backend-neutral ledger contract | immutable blob put / get / list |
| Wire format | segment format (canonical JSONL is fine) |
| Head attestation, rollback, equivocation | optional verification layer for untrusted peers |
| Re-custody, epochs, sidecar | dropped |
Arrival was right to want storage neutrality. The trouble was its unit: an ordered log with a head needs authority, and immutable segments don't.
Privacy falls out of references
Composition and bridging never copy raw records. A salience tick can be shared while the browsing history it covered stays private. For anyone without access, the references don't resolve, and the signature and root still prove the tick is authentic. Email can't leak into a shared repo just because a vertex looked at it.
The hard parts that remain
- Resolving a reference across stores. A small locator registry (store name to path or URL); ticks may carry hints. Bundles cover the cross-machine case.
- Erasure. A writer can compact its own segments. Record hashes don't change, and ticks that covered an erased record keep their root while that record becomes unresolvable. Erasure is built: a record erases through
erases, andloops erasedrops the openings a place holds. - Declarations in multi-writer stores. Settled per store by convention, not by protocol.
- Clock skew. For human-scale stores, emitted plus id tie-breaks is probably enough. A hybrid logical clock is available if not.
Scenarios, built up
One story, seven steps, from a single emit to two realms. Each step adds one idea. An eighth, orchestration, is a proposal that was dry-run against the first product slice. Blue outlines mark what's new in that step; plain boxes carried over from earlier steps.
The invariant under every step: records hold lineage ids, never names. Each step only adds records or changes how names resolve. Nothing already written is ever rewritten.
1 · One person, one store
as envelope field.2 · Instruments: dumb observers
3 · A delegate: the shared seat
under points to the grant. The grant stays a separate record in kyle's segment.4 · Wren emerges
Why a new lineage instead of renaming the seat
- The seat was shared by every session and every model. Renaming it would hand Wren work done by sessions that never became Wren.
- A new lineage plus adoption is honest retro-claiming. The seat's records stay as written. Wren's adoption is a new, dated, signed record pointing at them.
- Rename stays right when a lineage is already one continuous thread, for example Wren choosing a different name later.
- At session start, a session becomes Wren by loading Wren's compiled self. Wren's key signs its records, and the session says what it is in a record. Continuity is held by the store, not by any one session.
5 · A second store
claude@notes) when typed.6 · The homelab realm
@home names a name table, not a store. A store has a table, a realm has a table that links its children, and joining a larger realm only adds a link. No record is rewritten.7 · Work, and the realm boundary
The boundary rule as a table
| Relationship | Within a realm | Across realms |
|---|---|---|
| Compose | ✓ | ✓ default. Nothing moves. |
| Bridge | ✓ | Only as an explicit, signed tick (by reference or bundle): a publication, not a sync. |
| Replicate | ✓ | ✗ never. Replication means same realm. |
References can cross realms; content doesn't. A stance like "Wren affirms r40" or a tick covering foreign records holds only hashes. Readers with access to both realms can check them. Other readers see references, which can still reveal links.
8 · Orchestration: a request goes out, a tick comes back
proposal Kyle's scenario, 2026-11-10. Work is asked for by emitting a record, not by filing an issue. An orchestrator plans it, hands tasks to short-lived sessions, and returns one covering record that unpacks down to each session's detail.
Cases already holds the vertex templates for this under "Task orchestration": a vertex per subagent, slice and orchestrator, each ticking at a boundary and covering its children's ticks. This step walks it with observers and stores, and tests it against what is built.
| Who | What it is | What it writes |
|---|---|---|
| You, or a session talking with you | a lineage, or a bare key | a request about the thing |
| The orchestrator | a lineage with a grant, and its own store of preferences | a plan, tasks, assignments, answers, the closing tick |
| Implementers, reviewers, merge handlers | sessions: a key each, no lineage | task status, questions, results, under their assignment |
| Recall | a collector | what each session did, as hearsay about that session's key |
A request is emitted. An ordinary record about the repo or the thing. It is not a tick: nothing is covered yet.
A vertex lists requests nobody has taken. A request's arrival is its boundary. The orchestrator takes one by revising it. Two orchestrators taking the same request is a fork, and shows as one.
The orchestrator plans. One changeset: a plan and its tasks. Each assignment names a task and a session's key, so the plan tree and the launch tree are one tree.
Sessions work. Each writes as its own key,
underits assignment, and ends with atask-completemarker, which is its vertex's boundary. A question goes up as a record about the task; the orchestrator answers it or passes it to you. Recall records the detail underneath.The ticks climb. A session's tick is covered by its slice's, and the slices' by the orchestrator's, which ticks when all of them have and lands
intothe requester's store. Unpacking is walking the covers back down: goal, slices, sessions, recall.
Only two lineages are needed. You and the orchestrator. A session is a key that writes as itself, which the model already counts as its own word. A session that grows into a lasting collaborator signs an anchor later, and its key becomes that lineage's root key.
The dry run: what today's CLI could and couldn't do
Replayed with loops as merged on 2026-11-10: one open store, six keys, 25 records, using the day's real CI work as the content. Every line verified.
The slice reads no boundary, ticks, param or into, so the run could not use the Cases templates. It stood in plans, tasks and a closing summary as ordinary records about each other. Some of what broke is that stand-in showing why the design uses ticks.
| Tried | Result | What it means |
|---|---|---|
| Six actors, each writing as its own key | holds | Sessions as bare keys need nothing new. |
| A plan and five tasks as one labelled changeset | holds | A plan lands whole or not at all. |
| "Requests nobody has taken", as a fold | holds | Only when taking is a revision. A fold can't say "has no plan about it"; it can say "is still the head". |
| A task board: latest status per task, and lists by status | holds | A session revising the orchestrator's task worked because admission lets anyone replace anything today. |
| Everything one session wrote, everything under one assignment, everything heard about one key | holds | Three counts in one spec. |
under pointing at an assignment | holds, unchecked | under means "the grant it acts on" and nothing checks that yet. An assignment behaves like a small grant. Whether it is one is the delegation question. |
| Tasks about their plan | breaks | Each task became a rival for the plan's own state, and the "winner" of the request was whichever task was newest. about is doing two jobs: "this is the thing's state" and "this belongs to the thing". With ticks, a parent names its children as parameters and covers their ticks, and nothing needs to be about the plan. |
| A task's status by asking about the task | breaks | A record about something else is not a thing under its own id. Asking about the task returned what was said about it, not its status. |
| The closing record, about all 23 ids it covers | breaks | It became the winner of every thing it covered, and one line grew to 1.9 kB. A cover can't be about, and can't be a list. |
| Unpacking the closing record | by hand | One get per id. No fold descends a level. |
| Assigning a session before it had written | awkward | The orchestrator needs the key first. Whoever launches a session should make its key and hand it over. |
| Picking work up automatically | missing | Every fold was run by hand. Nothing reads a boundary, and nothing starts a session when one fires. |
| Files on disk | noted | 25 records made 20 segment files. Recall's volume will make that hurt first. |
The three breaks are decision D8, in the changelog. D8a and D8b are built in the model, the vectors, JavaScript and Rust. A record is an emit of one thing, the one of names, or its own id; about only mentions and never makes a head. A task about its plan, a record about another task, and a closing record about the ids it covers no longer head those things. Of D8c, declared keys, sets and the slots that follow keys are built: a count of open tasks reads each task by its live setters. So is the writer's anchor rule: loops emit names every live record of the thing it holds and carries the thing's whole about. The slice laws are proved, for one keyed thing and for a spec with a keyed slot. The table records the run as it was.
What it needs that doesn't exist
- Ticks, and a runner for boundaries. The spec grammar carries
boundary,ticks,paramandinto, and nothing reads them. The result encoding, D7, is built. The tick itself waits on the form of its record, proposed on 2026-11-21 and not ruled. - Something that acts when a boundary fires. The earlier prototype's boundary could carry a command to run, which is what made its cascades start work by themselves. Here a boundary says when a vertex ticks, and "a vertex never signs anything; the observer who ran it signs". So starting a session is an observer's act, and which observer watches which vertex is not designed.
- Where a question or a note about a task goes. Covers handle "belongs to" for work. A record that is only about a task no longer competes to be its state (D8b), and a fold that asks what was said about the task still finds it.
- Delegation, for strict stores. In an open store an assignment is just context. In a store that admits only granted writers, the orchestrator's grant must let it sponsor sessions, and authority must only narrow on the way down.
- Covers across stores. Preferences, tasks, recall and the repo are likely separate stores. A reader without one of them gets "unknown" for that branch.
- Who signs recall's capture. Signed by recall, a transcript is recall's claim about a session. Signed by the session, it is the session's own word.
A worked example
Every case so far, in one mature setup: six stores across two realms and three machines, plus a bridge to an HOA board. Commands and JSON illustrate the proposed CLI and store design. Ids are shortened (r:a1…). Records a person doesn't type, such as ticks, are described in comments. On disk every record is a JSONL line or a SQLite row.
PROPOSED FUTURE syntax. Examples below use latest-by:kind, latest and collect with by. These forms are not executable in the current crate. by is now built, in another spelling: "by": "about" here groups by every thing a record mentions, while the built grammar groups by the mentions under one typed-reference prefix, "by": "env.about:<prefix>", and reads a bare name such as about as a payload field. The normative protocol defines the current contract.
root, holds the name table and the vertices that read across stores. Arrows show how content moves. Compose reads; a bundle carries a tick with its closure. Promote is a stance. Bridge signs a tick into another realm.How the realm composes
A realm is not a store. @home is everything reachable from one name table, under one trust root (kyle's anchor key). That name table lives in a small store of its own, root; every other store keeps its own anchor, definition and places.
@home realm
└─ root name table + cross-store vertices + spec templates
name "novel" → st:n4… name "wren" → sl:7f…
name "feed" → st:f2… name "HOA" → r:h1…
name "homelab" → st:h9…
vertices: identity · salience · hoa-recap · hygiene
├─ novel own anchor, own store.json, own places (laptop, NAS)
├─ feed own anchor, own store.json, own places (homelab SQLite, laptop 90 days)
├─ homelab …
└─ runs/* disposable, one per run
- Membership is a link, not containment. A store belongs to
@homebecauserootholds a name record pointing at itsst:id. The store doesn't know its realm; joining adds links and never rewrites, so one store could be named in two realms' tables. - Names live at two levels. Realm-wide names (stores, Wren, the HOA) live in
root. Names local to one store, such as the novel's characters or the team's components, live in that store. - Cross-store work lives in
root. A vertex reading several stores needs a carrier, and none of the stores it reads is the right one. It resolves store names throughroot's table, and its ticks land inrootunless it saysinto. - Why not one big store: places and formats, stewards and maturity, erasure scope, what you share and with whom, and lifecycle all differ per store. A co-author can get
novelwithout ever seeingfeed.
The observers
| Lineage | Names | Notes |
|---|---|---|
sl:a1 | kyle | trust root of @home |
sl:c0 | kyle/claude | the shared seat; works under grants |
sl:7f | wren | descends from the seat, vouched by kyle; drafts summaries and findings under grants |
sl:m1 … | kyle/mail, kyle/calendar, kyle/rss, collector/docker@lab | dumb observers reporting records |
sl:w1 | kyle (work) | a separate lineage; any same-as with sl:a1 lives only at home |
root · the realm's own store
# root's store.json
{ "store": "root", "stewards": ["sl:a1"],
"kinds": { "read": {}, "dismiss": {} },
"carries": ["identity", "salience", "hoa-recap", "hygiene/things", "hygiene/names",
"subagent", "slice", "orchestrator"] }
# the @home name table
loops emit name name=wren --about sl:7f
loops emit name name=HOA --about r:h1
loops emit name name="Willow Creek HOA" --about r:h1
loops emit same-as --about r:h1 --about org:willowcreek-mgmt.example # anchor ≡ natural key
{ "vertex": "identity",
"note": "The latest stance per pair.",
"from": [{ "store": "root", "kind": ["same-as", "dispute"] }],
"fold": { "pairs": { "latest-by": "of", "follow": "prev" } } }
{ "vertex": "salience",
"note": "Who touched each thing; a witness tick each morning.",
"from": [{ "store": "feed", "kind": ["feed-item", "visit", "like"] },
{ "store": "root", "kind": ["read", "dismiss"] }],
"resolve": "identity",
"fold": { "observers": { "collect": "observer", "set": true, "by": "about" } },
"boundary": [{ "every": "07:00" }] }
{ "vertex": "hoa-recap",
"note": "Pulled on demand before a meeting: a witness tick over the last 30 days.",
"from": [{ "store": "feed", "about": "r:h1",
"kind": ["mail-message", "calendar-event", "payment", "document"] }],
"resolve": "identity",
"window": { "occurred": "last 30d" },
"boundary": [{ "manual": true }] }
# before the board meeting loops tick hoa-recap --witness # → T:hoa: a witness tick by sl:a1, occurred 2026-09-18/2026-10-18, covering 42 ids loops emit summary text="…" --about T:hoa --under g:recaps # by sl:7f # then a bridge to @hoa-board carrying the summary and citing T:hoa: a signed tick; the emails stay home # the loop closing on the morning digest loops emit read refs:='["r:f12…"]' --about T:digest-1019
novel · facets, forks and drafts
# .loops/store.json
{
"store": "novel", "maturity": "strict", "stewards": ["sl:a1"],
"writers": [{ "allow": "sl:a1" },
{ "allow": "sl:7f", "under": "g:novel-notes", "kinds": ["chapter-note"] }],
"kinds": {
"chapter-start": { "fields": { "title": "string" } },
"chapter-prose": { "facet": true, "fields": { "text": "blob" }, "search": ["text"] },
"chapter-mentions": { "facet": true, "refs": ["characters", "ideas"] },
"book-order": { "facet": true, "refs": ["chapters"] },
"chapter-note": { "search": ["text"] },
"character-start": { "fields": { "name": "string" } },
"draft-complete": { "fields": { "label": "string" } }
},
"carries": ["chapter", "manuscript", "continuity"]
}
loops emit chapter-start title="The Lighthouse" # → r:a1
loops emit chapter-prose text=blob:h:… --of r:a1 --prev r:p2 # laptop
loops emit chapter-prose text=blob:h:… --of r:a1 --prev r:p2 # phone: two heads, a visible fork
loops emit chapter-mentions characters:='["r:c1"]' ideas:='["r:i9"]' --of r:a1
loops emit book-order chapters:='["r:a4","r:a1","r:a2"]' --of r:b0 --prev r:o3 # a move is one record
loops emit draft-complete label="draft 2" # the marker
# .loops/vertices/chapter.json
{ "vertex": "chapter", "param": ["chapter"],
"from": [{ "store": "novel", "of": "$chapter" }],
"fold": { "facets": { "latest-by": "kind", "follow": "prev" },
"notes": { "collect": true, "where": { "env.kind": { "is": "chapter-note" } } } } }
# .loops/vertices/manuscript.json
{ "vertex": "manuscript",
"from": [{ "store": "novel", "kind": ["chapter-prose", "book-order"] }],
"fold": { "chapters": { "latest-by": "of", "follow": "prev" },
"order": { "latest": true, "follow": "prev", "where": { "env.kind": { "is": "book-order" } } } },
"boundary": [{ "when": "draft-complete" }] }
# .loops/vertices/continuity.json: a lens, never ticks
{ "vertex": "continuity",
"from": [{ "store": "novel", "kind": ["chapter-prose", "character-start"] }],
"order": { "field": "story-when" } }
# draft-complete → a content tick covering the head prose ids: "draft 2", reproducible anywhere
loops tick manuscript --witness # beta readers: what you sent them
feed · ingestion in SQLite, erasable mail
# feed's store.json
{
"store": "feed", "stewards": ["sl:a1"],
"kinds": {
"mail-message": { "fields": { "subject": "string", "body": "blob" }, "erasable": true, "search": ["subject", "body"] },
"calendar-event": { "fields": { "title": "string" }, "search": ["title"] },
"feed-item": { "fields": { "title": "string" } },
"visit": { "fields": { "seconds": "int" } },
"payment": { "fields": { "amount": "decimal" }, "erasable": true }
},
"natural": { "url": { "normalize": ["strip-tracking", "lowercase-host"] },
"org": { "normalize": ["registrable-domain"] } },
"parse": ["feed/mail-v2", "feed/ics-v1"]
}
# collectors write JSONL to `loops emit - --stream`, each signing as itself
{"kind":"mail-message", "about":["org:willowcreek-mgmt.example"], "occurred":"2026-10-02T21:11:00Z", "payload":{"subject":"Pool resurfacing bids", "body":"blob:…"}}
{"kind":"calendar-event", "about":["r:h1"], "occurred":"2026-10-22T02:00:00Z/2026-10-22T04:00:00Z", "payload":{"title":"HOA board meeting"}}
{"kind":"feed-item", "about":["url:example.com/essay"]} ← kyle/rss; fetched twice, two records
Parse specs travel with the store; sources and credentials don't.
homelab · an incident, a run, a late log
# homelab's store.json
{
"store": "homelab", "stewards": ["sl:a1"],
"kinds": {
"log": { "fields": { "line": "string" }, "search": ["line"] },
"cycle-complete": {},
"incident-start": { "fields": { "title": "string" } },
"incident-status": { "facet": true, "fields": { "status": { "enum": ["open", "mitigated", "resolved"] } } },
"incident-evidence": { "refs": ["refs"] },
"finding": { "refs": ["refs"], "search": ["text"] }
},
"natural": { "svc": { "normalize": ["lowercase"] } },
"carries": ["health", "incident"]
}
# the docker collector, signing as collector/docker@lab
{"kind":"log", "about":["svc:jellyfin@nas"], "payload":{"line":"…stall…"}} ← r:l7
{"kind":"cycle-complete"} ← its marker
loops emit incident-start title="jellyfin stalls" # → r:i1
loops emit incident-evidence refs:='["r:l7"]' --about r:i1
loops emit finding text="transcode cache full" refs:='["r:l7","r:l9"]' \
--about r:i1 --under g:homelab-ops # by sl:7f
loops emit incident-status status=resolved --of r:i1
{ "vertex": "health",
"note": "A cron made content by a marker.",
"from": [{ "store": "homelab", "kind": ["log"] }],
"fold": { "errors": { "count": true, "by": "about" } },
"boundary": [{ "when": "cycle-complete" }] }
{ "vertex": "incident", "param": ["incident"],
"from": [{ "store": "homelab", "of": "$incident" },
{ "store": "homelab", "about": "$incident", "follow-refs": true }],
"fold": { "state": { "latest-by": "kind", "follow": "prev" },
"evidence": { "collect": true, "set": true } },
"boundary": [{ "when": "incident-status", "where": { "status": { "is": "resolved" } } },
{ "manual": true }] }
loops tick incident incident=r:i1 --witness # a handoff: what we knew, signed by sl:a1
# resolved → T:res, a content tick: the final state
# the collector was offline; a log with occurred inside the window arrives a day later:
# the vertex ticks again, prev T:res, covering … + r:l12; the handoffs are untouched
The investigation also spawned an agent run, its own store:
# the run's store.json
{ "store": "runs/2026-10-19-jellyfin", "stewards": ["sl:a1"],
"writers": [{ "allow": "sl:c0", "under": "g:runs" }] }
# the run's vertex is subagent with task=r:t1, named by their hash; nothing is written to start it
loops emit step … --about r:t1 # by sl:c0
loops emit task-complete --about r:t1 # sl:c0's marker → content tick T:t1
loops emit review verdict=approved --about T:t1 # by sl:a1
# the orchestrator ticks into homelab as a bundle, and it lands as evidence for r:i1
team-platform · the work realm, in git
# team-platform's store.json
{
"store": "team-platform", "maturity": "declared",
"stewards": ["sl:w1", "sl:director"],
"shared": { "format": "jsonl" },
"refuse": [{ "from": "personal-ingest" }],
"kinds": {
"component-start": { "fields": { "name": "string" } },
"decision": { "fields": { "title": "string", "status": { "enum": ["proposed", "accepted", "superseded"] } },
"refs": ["evidence"], "facet": "status", "search": ["title", "body"], "preview": ["title", "status"] },
"note": { "search": ["body"], "erasable": true },
"tenure": { "fields": { "years": "int", "domain": "string" } }
},
"carries": ["identity", "platform-knowledge", "adr", "hygiene/things", "hygiene/private"]
}
loops emit component-start name=auth-svc # sl:dev1 → r:x1
loops emit component-start name="SSO gateway" # sl:director → r:x3
loops emit same-as --about r:x1 --about r:x3 # sl:dev2: a guess → r:s2
loops emit dispute --of r:s2 --prev r:s2 # sl:director: not the same thing
loops emit note body="the proxy in front of auth-svc" --about r:x3 --about r:x1 # sl:director
loops emit decision title="Move auth-svc behind the gateway" status=accepted \
evidence:='["r:n4","r:n7"]' --about r:x1 --occurred 2019-04
{ "vertex": "adr",
"from": [{ "store": "team-platform", "kind": ["decision"] }],
"boundary": [{ "when": "decision", "where": { "status": { "is": "accepted" } } }],
"covers": "reference" }
# → T:adr-2019, a content tick covering r:d2 r:n4 r:n7: the cited evidence, never later arrivals
# 2026: migration work revisits it, a new tick citing the old one:
# → T:mig, from vertex migration, covering T:adr-2019 r:n31 r:n33, about r:x1
# hygiene/private flags a note holding a customer's phone number
loops emit redaction --erases r:n9 # sl:director; one line rewritten in git
One machine's places.json
# ~/.config/loops/places.json: the home laptop; never shared
{
"stores": {
"root": [{ "place": "laptop", "path": "~/root/.loops", "format": "jsonl", "role": ["write", "hold"] },
{ "place": "nas", "url": "ssh://nas/loops/root", "role": ["hold"] }],
"novel": [{ "place": "laptop", "path": "~/novel/.loops", "format": "jsonl", "role": ["write", "hold"] },
{ "place": "nas", "url": "ssh://nas/backup/novel", "role": ["hold"] }],
"feed": [{ "place": "laptop", "path": "~/.loops/feed.db", "format": "sqlite", "role": ["hold"], "scope": "emitted 90d" },
{ "place": "vault", "url": "s3://…/feed-blobs", "role": ["blobs"] }],
"homelab": [{ "place": "laptop", "path": "~/.loops/homelab.db", "format": "sqlite", "role": ["hold"] }],
"runs/*": [{ "place": "laptop", "path": "~/.loops/runs/", "format": "jsonl", "role": ["write", "hold"] }]
},
"index": { "path": "~/.cache/loops/index.db", "search": ["root", "novel", "homelab"] }
}
# on the homelab, the feed store's place also binds its collectors; credentials never leave
{ "stores": { "feed": [{
"place": "homelab", "path": "/srv/loops/feed.db", "format": "sqlite", "role": ["write", "hold"],
"collect": [{ "name": "mail", "source": "imap://…", "parse": "feed/mail-v2", "as": "kyle/mail" }] }] } }
One record on disk, before and after erasure
{"id":"r:9f3c…","env":{"kind":"note","observer":"sl:dev2","emitted":"2026-03-04T15:12:44Z","about":["r:x1"]},
"salt":"…","payload":{"body":"Called the customer back at 555-…"}}
{"id":"r:9f3c…","env":{"kind":"note","observer":"sl:dev2","emitted":"2026-03-04T15:12:44Z","about":["r:x1"]},
"commit":"h:7ab1…"}
The id hashes the JCS object containing commit and env. The commitment hashes the salt and canonical payload. The second line still verifies. Every reference to r:9f3c still resolves. Nothing else in the repository changes.
What the example surfaced
- A realm needs its own store.
@homenames a name table, and name records are records, so they live somewhere: therootstore. It's also the natural carrier for vertices that read across stores (identity, salience, the HOA recap) and for spec templates. - A vertex's ticks default
intothe store that carries it. The HOA recap lands inroot, the incident's ticks inhomelab; a run saysintoexplicitly. - Collectors split like stores do. Parse specs are shareable and a store can carry them; source bindings and credentials stay in
places.jsonbeside the place they write. A parse spec is an ordinary kind: collectors read it, the core doesn't. - Natural-key rules are declarations (
natural "org" normalize=…), and asame-asbetween an anchor and a natural key joins minted and natural identity. - Relative windows need tick syntax:
"window": {"occurred": "last 30d"}in the spec, a concrete span on the tick. Ruled on 2026-11-20: a window is awhereon the time content order uses, not a second mechanism; the field's name is not chosen. "follow": "prev"appears on every facet fold. It should probably be the default wherever records carryprev. Settled in PR 13: it stays written. Latest-by without it is refused (follow-missing), so every spec says whether it reads heads or history.- Corrected in version 12: this example used a SKOS
matchkind. Identity issame-asanddispute; the director's knowledge is a dispute plus a note about both components. - Reference-only tick payloads paid off: erasing the note in the team store changed nothing in any tick.
Horizons
What the design makes cheap, collected before a toolchain starts deciding what's easy. Every idea here combines five mechanisms: records with about, ticks, lenses, places, and keys with bridges. Most can wait; six need allowing for before building.
exploring All workflows below are illustrative proposals, not implemented or proved features. Each detailed case has its own tab below. The overview maps them onto the five mechanisms and keeps the rest.
PROPOSED FUTURE syntax. Commands and specifications below illustrate future workflows. They are not current crate APIs. The normative protocol defines the current contract.
One map, five mechanisms
| Idea | records + about | ticks | lenses | places | keys, bridges |
|---|---|---|---|---|---|
| Docs as editable lenses | ✓ | ✓ base | ✓ | ✓ author signs | |
| LSP hover on code | ✓ birth keys | ✓ | ✓ render only | ||
| Annotating the web with friends | ✓ url: keys, selectors | ✓ aggregator | ✓ sidebar | ✓ own static store each | ✓ public store as standing bridge |
| Discord threads about the same thing | ✓ same key | ✓ sidebar hops | collector; stays home | ||
| Selective disclosure | ✓ salted commitments | ✓ covered set | ✓ bundle | ||
| Static hosting, dumb file sync | ✓ | ✓ verify on read | |||
| Stores that travel with things | ✓ natural key | ✓ | ✓ steward transfer | ||
| Nix and Bazel for knowledge | ✓ input key, result hash | ✓ render output | ✓ cache place | ✓ signed cache | |
| Bitemporal questions | ✓ two times | ✓ as-of | ✓ render as-of | ||
| Agents pass context by tick id | ✓ context, witness | ✓ one per stage | ✓ grant filters the bundle |
The walks
- Editable lenses: docs as the store, then broken on purpose. The base names its lens and audience; a committed render is a promotion; absence is never an edit.
- The LSP: code identified by birth keys along each branch's history; git segment files close on commit.
- Web annotation: federation as each person's own store, composed; static hosting; admission as the spam filter.
- Context by tick: five reference states, briefs and bundles, a cloud run as a borrowed place, everything coming home.
- Selective disclosure: split by disclosure when recording; envelopes shared, payloads withheld.
- Knowledge as a build: two names per result, early cutoff, and privacy as withholding, not hiding.
The rest
Time: bitemporal by construction
- "What did we believe in 2019 about what happened in 2009?" is one cut and one window: the records as of 2019 with what they build on, then a
whereon 2009. - Two ticks diffed give a changelog of understanding.
- Fuzzy dates suit history: genealogy, a platform's early years, a house.
emittedanswers "what did I believe at T"; witness ticks answer "what did this store hold at T".
Things: knowledge where you work
- "What do I know about X?" across every store you can read, by URL, ISBN, DOI,
svc:or anchor. - Code as a thing:
loops blameshows the ADRs behind a file; an LSP server shows them on hover. A symbol's birth key identifies it as it was in the commit that created it. Tooling follows each branch's own history to find that key. See the LSP walk. - Annotate the web: a browser extension writes records about
url:keys; friends share through their own public stores, without browsing history. Your Discord collector's threads about the same URL land in the same conversation: thing-centred, across channels, no server. See the walk. - Stores that travel with things: a house keyed by its address, handed to the buyer by a steward changeset with verifiable history. Also a car, a homelab machine, a service changing teams.
Moving records anywhere
- Any dumb file sync works without conflicts: Syncthing, Dropbox, iCloud, a USB stick. A co-author over a shared folder just works.
- Static hosting as a read place: a public store is a feed with verifiable history; subscribing is composing it into your realm. Federation without relays. The layout is in the web annotation walk.
- Bundles by email: a bridge as an attachment that verifies on arrival.
Trust, attention and agents
- Proof of existence: anchor a tick hash to RFC 3161 or OpenTimestamps.
- Logs that hold up in a dispute: contractor hours, an incident timeline.
- Spaced repetition for knowledge: the stale review asks "still true?" on a schedule; unaffirmed records show their age.
- A contradiction queue: forks, disputes and visible rejections in one place.
loops mcp: emit, query and tick as agent tools; grants decide which tools a session gets.CLAUDE.mdas lens output, with disputes visible.- Context by tick id between agents; a witness tick per session replays what it knew; the tick tree is a verifiable trace. See the walk.
- Collectors in any language over stdin, the legacy importer among them.
What these ask of the build now
| Commitment | Unlocks | Cost if added later |
|---|---|---|
Place layout fetchable by plain HTTP GET: closed segments named by hash, one mutable segments.json | static hosting, file sync, public stores | changes the on-disk format |
| Folds take "as of" for both times | bitemporal questions, diffs | ruled on 2026-11-20: no fold changes. The cut is one function on the held set, before settling, and the window is a where |
| Folds define an absent opening: envelope folds count it, payload folds skip it. Built. | disclosure, erasure | non-deterministic ticks |
One local API under the CLI, serve, MCP and LSP | every surface | surfaces that drift apart |
| Lens contract: render for an audience; parse to a structured view. The core diffs by ids and applies one transaction. Front matter names the base: tick, lens hash and audience. | docs, CSV, store.json as one pattern | store.json stays special |
Two names per result behind a pluggable cache. The input key includes the lens and fold vocabulary. The result hash covers a canonical encoding; it is built, spelled res:. The input key is not built. | early cutoff, shared caches, renders on static places, context by hash | every cache key changes; until then, stale renders under the right name |
Collectors as external processes, split by disclosure; promote carries envelope-only records | any language, team sharing | a plugin system nobody wants |
Prior art
- Foster, Greenwald, Moore, Pierce, Schmitt, "Combinators for bidirectional tree transformations" (2007): lens laws; Boomerang
- Ink & Switch, Cambria (2020): lenses between schemas
- Dolstra, The Purely Functional Software Deployment Model (2006): Nix; Bazel remote caching
- Mokhov, Mitchell, Peyton Jones, "Build Systems à la Carte" (ICFP 2018): early cutoff; Nix RFC 62, content-addressed derivations
- Language Server Protocol; Hypothesis web annotation; W3C Web Annotation model
- IETF SD-JWT; BBS signatures (IETF draft, used in W3C Verifiable Credentials): selective disclosure of signed claims
- Morris et al., "Text Embeddings Reveal (Almost) As Much As Text" (2023): embedding inversion
- OpenTimestamps; RFC 3161
Editable lenses: docs as the store
The store is the single source of truth; the files people already edit are lenses over it. Docs stay Markdown in the repo, edited in PRs the normal way, and every edit lands as dated, signed, cross-referenceable records.
prev comes from that base. One contract covers Markdown, CSV, YAML and store.json.Two laws keep it honest. No-op: a render, parsed with no edits, gives no records. Put-get: your accepted edits read back unchanged, up to the lens's normal form; anything else is reported, never dropped. (Restated by the adversarial walk below.)
- Every rendered file remembers its base: the tick, the lens hash and the audience it was rendered for, in front matter. A stale base makes a visible fork instead of overwriting: a three-way merge done by the data model.
- Each kind decides its granularity. An ADR's front matter fields and fixed sections are facets; a free-form doc can start as one body facet.
- Facets are edited; testimony is cited. Facets are the thing's state (an ADR's status, a chapter's prose), edited by anyone with standing; your own notes are yours to edit too. Others' notes render as quotes: edits inside a quote are refused, and text you add around them becomes your note, referring to theirs. Setting
prevon someone else's observation would supersede their testimony. - Links become references.
[[svc:auth]]parses into a reference field, so backlinks come free. - Authored and derived content mix. "Related incidents" renders read-only from another vertex; parse ignores it, edits to it get a clear message.
- The author applies, CI checks. A pre-commit hook runs
apply, so records are signed by the author and land in the same PR. - Conflicts settle in the data. Committed lens files are always pure renders, so a git conflict on one is resolved by re-rendering, never by hand. A real fork shows as a conflict block; resolving it emits one record with both heads in its
prevset. - Time travel without git:
loops render adr-12 --as-of 2021-03.
Walk: the editable lens, adversarially
illustrative walk The team repo renders adr-12.md from T:4c. Front matter holds id, status and deciders. Three fixed sections are facets. Discussion draws on several people's notes. Another vertex computes Related incidents. Every step tries to break the contract. It held where it mattered: the record didn't change; the lens contract did.
1 · Nothing changed, but the editor did things
CRLF to LF, * bullets to -, smart quotes, a reflowed paragraph. "No edits, no records" holds only if the diff compares parsed views, not bytes.
- Structure is normalized: re-rendering restores the lens's format, like gofmt. Lens files are formatter-owned.
- Facet text is stored verbatim, compared after normalizing whitespace: a pure reflow emits nothing, and the next render restores the stored text.
2 · The lens was upgraded between render and edit
Rendered with lens v3, applied after upgrading to v4, which formats Decision differently. Recomputing render(T:4c) with v4 blames you for v4's changes.
The base is (tick, lens hash, audience), not the tick alone. The old lens is fetched by hash to rebuild the exact base: "name it, don't carry it" from the build walk, paying off at once.
3 · You render with your grant, and commit it
You can see dev2's withheld session turn, so your render of Discussion includes it. Committing it to the team repo leaks it.
A committed render is a promotion. It's rendered for the audience of the place it's committed to, not for whoever ran it. The CI check already catches the leak if CI renders under the repo's audience: your file holds more than that render, so it goes red. The privacy boundary enforces itself.
4 · Erasure after the file was committed
A note shown in Discussion is erased. The store rewrites one segment file, but the note's text was also copied into adr-12.md in every commit since.
Committed renders are copies, so each kind declares where its text may render. Preferred design: facets (the thing's own state) render into committed files. Testimony renders there by reference: author, date and link. Only local renders and the sidebar show its full text. Erasing a facet's text means a steward rewrites that file's history too, visibly.
5 · Two PRs touch different facets
You edit Decision; dev2 sets status to deprecated; both from T:4c. No key is in conflict: a three-way merge per facet, done by the data. The thing has two heads until an emit names both. Git has a spurious conflict, because both PRs re-rendered the file.
- Committed lens files are always pure renders. A pre-commit hook runs apply and re-renders; CI rejects a file that doesn't match its render ("un-applied edit").
- So conflicts on them resolve like lockfiles: union the segments and re-render, never by hand. A merge driver does it.
- Edits made without a key (GitHub's web editor) fail CI with "run apply". A team that wants it can let a CI collector record the edit as hearsay citing the commit, which the author can endorse later. An author's signature never comes from a machine without their key.
6 · Both of you edit Decision
A real fork: two heads, shown as a conflict block; resolving it emits one record with both heads in prev. As before.
Free-form docs stay one body facet. There, any two edits fork the whole body. The fork stays in the data. The lens proposes a text merge against the common base (git merge-file). Non-overlapping edits merge cleanly. Applying signs the merge with both heads in prev. Finer facets aren't needed.
7 · Deleting, reordering, adding
- You delete the Consequences section. Clear it, or an accident? Absence is never an edit; emptiness is. A missing section is an error with a hint: leave the heading with no text to clear it. The same principle as showing missing context as missing.
- You reorder sections: fixed sections are found by heading, so it's a no-op and re-rendering restores the order.
- You add "Alternatives considered", not in the kind: the maturity rule again. Open keeps it as an extra facet keyed by its heading; declared warns and suggests declaring it; strict refuses.
- You delete a CSV row: the lens declares what removal means (say, "row removed means retire") or refuses. Never silent.
- You reorder chapters in the novel's contents. A
positionfacet per chapter makes one move emit n records, and two concurrent moves interleave oddly. Order belongs to the container: onebook-orderfacet listing chapter ids. Concurrent reorders fork one list, and the lens proposes a merge. The worked example is updated.
8 · Editing what isn't yours
- Related incidents (computed): read-only; edits are refused with a message.
- A typo in Sam's note exposes the old rule's problem. The next render shows Sam's unchanged note plus a near-duplicate from you. That reads as a bug. Now: others' testimony renders as quotes and edits inside one are refused ("Sam's words; reply below"). Text you add around the quotes becomes your note; your own past notes are yours, so editing them sets
prev. - What you may edit follows authorship and standing, not block type: facets with standing, your own testimony always, others' testimony only by citing it.
9 · One commit, two lenses, and a copied file
- Apply is one transaction over every lens file in the commit. Both
adr-index.csvandadr-12.mdset ADR-12's status. The same value gives one record. Apply refuses different values before emitting anything. - The diff compares ids, not labels: a renamed
[[svc:auth]]you didn't touch is a no-op. - Copy and paste is how docs get started. A copied ADR still says
id: adr:12, so two files claim one id: refused, "looks like a copy; removeidto create one". A file with no id is minted on apply, which writes the id back.
10 · A base six versions behind
Your Decision edit is against T:4c; Decision has moved on. That's honestly a fork with the current head, and correct. Apply warns ("6 versions behind"); --rebase merges the text onto the current head before emitting. The model only ever sees prev; rebasing is a tool convenience.
11 · The laws, restated
"Apply, then render, gives back the edited file" can't hold as written: other people's records, normalization, refusals and audience filtering all intervene.
- No-op: a render, parsed with no edits, gives no records.
- Put-get: your accepted edits read back unchanged, up to the lens's normal form; anything else is reported, never dropped.
| What the walk changed | Where |
|---|---|
| The base is (tick, lens hash, audience) | lens contract |
| A committed render is a promotion, rendered for the place's audience | lens contract, privacy boundary |
| Committed lens files are pure renders; git conflicts re-render; key-less edits fail CI or become hearsay | conventions, a merge driver |
| Kinds declare where their text renders; testimony is committed by reference | store declaration |
| Absence is never an edit; removal is declared or refused | lens contract |
| Edit rights follow authorship: facets with standing, your own testimony; others' quoted | revises the testimony rule |
| Apply is one transaction; copied ids refused; diff by ids | lens contract |
| Free-form docs stay one body facet, with proposed text merges | closes an Open item |
| Order is one facet on the container | revises the novel example |
| The two laws, restated | lens contract |
What this walk didn't touch
- The record,
prevas a set, facets, LatestBy, admission, the maturity rule: all unchanged. - The conflict block's syntax: it has to stay unambiguous inside code fences.
- Installing the hook and merge driver in a repo, and the CI collector for key-less edits.
- Lenses with no file: the novel's JS front end and the web sidebar edit through the same contract, without git.
Walk: the LSP, end to end
illustrative walk Follow Verify in the platform repo from a 2019 note. A branch renames it; a junior developer adds a note. A merge and a hover follow in 2026. The team-platform store lives in the repo at .loops/. Keys are git:<repo>@<commit>:<path>#<symbol>.
1 · 2019: the director's note
The key for a symbol is the symbol as it was in the commit that created it, its birth. Editor tooling follows history back to find it. That key never changes meaning. Anyone with the repo computes the same one without coordinating. No anchor or name record is needed: "keys converge on their own", applied to code.
loops emit note body="must stay constant-time: the 2018 timing leak" \
seen=git:platform@c1:pkg/auth/token.go#Verify \
--about git:platform@c0:pkg/auth/token.go#Verify
# by sl:director; about the birth key, seen the version read
seen is a payload reference: the exact version the observer was reading. It pays off in step 5.
2 · A branch renames it
feat/jwt branches from main at c4. Commit b1 moves the function to internal/security/jwt.go and renames it ValidateToken. No records are written. A hover at b1 follows the branch's own history: ValidateToken@b1 came from Verify@c4, back to c0. Same birth key; the director's note shows.
This is where version 12 broke. It bound paths to anchors as dated names, "the name in effect at emitted". A rename on the branch would then be in effect on main too, by the clock, though main never renamed anything. Following each branch's history replaces following the clock, and the branch problem disappears.
3 · The junior developer's note, on the branch
loops emit note body="the new key cache: is the compare still constant-time?" \
seen=git:platform@b2:internal/security/jwt.go#ValidateToken \
--about git:platform@c0:pkg/auth/token.go#Verify
# by sl:dev2
The record lands in dev2's segment in the branch's working tree, so knowledge travels with the code it's about. That broke a Sharing rule. Dev2 also wrote notes on main this week. Two branches appended to one growing segment file, so the merge would conflict. Version 10 called such a conflict an alarm, but here it was legitimate: one writer on two branches forks their own log.
Fix: in a git place a segment file closes once committed, and the next write opens a new one. Two branches add different files and merging only adds files. The alarm becomes exact: a committed segment file changed outside an erase. It also settles "records in the tree or a separate ref?": in the tree, because records about branch code should merge when the code does.
4 · The merge: merge commit, squash, rebase
- Merge commit: segment files union; the birth key is unchanged. Nothing to do.
- Squash, for
Verify: it was born before the branch, so main's history still leads to c0. Its notes'seenkeys point at b2, off main, but the string stays exact and the host keeps the pull request's commits. - Squash, for a symbol born on the branch:
cacheKeys, created at b1, has notes keyed on b1. After squashing, main computes its birth as s1 and those notes are orphaned. The merge job observes the squash and repairs it with existing machinery:
loops emit same-as --under g:merge-bot \
--about git:platform@b1:…/jwt.go#cacheKeys --about git:platform@s1:…/jwt.go#cacheKeys
# by ci/merge
- Rebase breaks branch-born symbols the same way; the same step covers it at merge.
- Rename detection is heuristic. If dev2's tooling misses a move and computes birth c3 where the director's computes c0, their notes split. But c3's key lies on the director's history of the same function. Tooling flags the mismatch and proposes a
same-as: a hygiene finding, not an error.
5 · 2026: hovering on main
- Tooling: the cursor resolves to
ValidateToken, its history leads to the birth key at c0, and a disposable index caches that mapping. - Core:
resolve-bymaps the key to its class (the key plus anysame-as); thecode-knowledgevertex collects notes about it, weighted by tenure. - Render:
ValidateToken (born as Verify, 2016)
director · 20y · 2019 · read at c1 must stay constant-time …
⚠ the function changed 3 times since c1
dev2 · 2y · 2026 · read at b2 is the compare still constant-time?
⚠ unanswered
seen earns its place: compare the commit a note was read at with git's history. This flags notes whose version has since changed, giving the stale review a signal. On an old checkout (c2), dev2's note shows as "about a later version", because b2 isn't in c2's history.
The edge that can't be avoided: a commit can't hold records about itself
A commit's id is a hash of its contents, so records naming a symbol born in that commit can't be inside it. Notes about brand-new code land one commit later. Preferred design: the editor holds drafts until the symbol exists in a commit. It then emits them with occurred set to when they were written. Existing fields already say this honestly.
| What the walk changed | Replaces or settles |
|---|---|
| Birth keys, computed by tooling along each branch's history | version 12's anchors plus paths as dated names; no minting for code; the core never reads git |
seen, the version read | staleness flags and old checkouts, free |
| Git segment files close once committed | one writer on two branches; the alarm made exact; records live in the tree |
Squash and rebase repaired by the merge job's same-as | branch-born symbols; tooling mismatches become hygiene proposals |
| Notes on new code trail by one commit, held as drafts | a commit can't name itself |
What the walk didn't touch
- A range of lines inside a function: lean, the birth key plus a W3C-style selector (quoted text and context) in the payload. The part shared with web annotation.
- Files and packages: git follows file renames natively; directories barely.
- The repo's identity: lean, name it by its root commit, which survives renames. Forks share keys for history before they split, which is arguably right.
- Hover latency: mostly an index question.
Walk: annotating the web, federated
illustrative walk You highlight an essay. A Discord thread discusses it; a friend publishes notes. You reply, strangers and the author appear, and the essay changes. Federation came almost free from what was already set: every writer owns their store, and stores never share custody.
1 · You highlight a passage
The extension writes your own observation, signed by a key bound to you: not a collector's hearsay.
loops emit annotation quote="…the exact passage…" prefix="…" suffix="…" \
body="the same argument as chapter 3" refs:='["r:a1"]' seen=h:9c2… \
--about url:example.com/essay
# by sl:a1; the URL normalized at write; seen is the hash of the text as read
- The extension normalizes when writing, by the store's rule:
"natural": {"url": {"normalize": ["canonical-link", "strip-tracking", "lowercase-host"]}}.rel=canonicalwins when it's on the same registrable domain. The same pattern as birth keys: tooling computes keys, the core compares strings, and two tools that disagree get asame-asproposal. seengeneralizes: the version read. A commit for code, a hash of the extracted article for a page. It can't fetch the page back without a snapshot, but it answers "has this changed since I read it?"- Selectors anchor the highlight: W3C quote, prefix and suffix in the payload, the same answer the LSP walk left open for line ranges.
- The reference to
r:a1, your novel chapter, is the "LSP for information": what you read, linked to what you're writing.
2 · A Discord thread about the same essay
# the Discord collector, signing as kyle/discord
{"kind":"discord-message", "about":["discord:thread/8812", "url:example.com/essay"], "payload":{"author":"mira#2210", "text":"this essay is the best case against…"}}
{"kind":"discord-message", "about":["discord:thread/8812"], "payload":{…}} ← replies in that thread
- The sidebar is a lens, and lenses may hop: URL → messages about it → their thread keys → the thread. Folds stay one hop. The collector doesn't tag every message with the URL; that would claim each one is about the essay.
- Conversation follows the thing, not the venue.
- Other people's words stay home. If you publish an annotation that refers to a Discord message, readers see the withheld form ("a private source"); metadata and links can still leak. A secret salt makes offline guesses harder while the opening remains withheld.
3 · Publishing: a public store on static hosting
Publishing is a declaration, not a place setting. A store declares itself public by a steward changeset, which needs presence; a place may publish only stores that declare it. Promotion into it is then ordinary: the extension's share toggle promotes verbatim (same id, same signature) under a grant. A public store is a standing bridge: presence given once, ahead of time.
# public's store.json; declaring it public is a steward changeset, with presence
{ "store": "public", "visibility": "public",
"writers": [{ "allow": "sl:a1", "kinds": ["annotation", "reply"] }] }
# places.json: a git place, pushed to a static host
{ "stores": { "public": [{ "place": "pages", "url": "git@…/notes.git", "role": ["write", "hold"] }] } }
https://sam.example/loops/public/
anchor st: id; pins Sam's root key
segments.json the only file that changes
segments/<observer>/<device>/<hash>.jsonl immutable: cache forever
by-key/<hash of key>.json optional derived index: ids about that key
- Closed segments pay off twice. Closed once committed (the LSP walk) and named by hash, every segment is immutable and CDN-cacheable forever.
by-key/is a query without a server: one GET answers "who annotated this URL in Sam's store?" Derived, and checkable against the signed records.- Natural keys cross realms only by bridge.
url:keys are made to match across realms. Publishing them is the disclosure decision, made once. - The hygiene vertex scans before promotion for internal hosts (an intranet wiki, a private document link). Those keys never leave home.
4 · Following Sam, and replying
loops emit name name=sam --about st:5a… # your root name table: following
loops place add sam https://sam.example/loops/public/ --role hold
loops emit reply body="chapter 3 makes the opposite bet" \
--about r:s7 --about url:example.com/essay # what it answers, and the thread's root
- Following is composition plus a read place. The store id pins Sam's root key on first use; the store carries its key bindings, so records verify on arrival, even from a CDN.
- You never write into Sam's store. The reply goes into yours.
- Replies carry the root, like email's
References. The alternative, recursively selecting records about records about the page, would be a new kind of selection. Anaboutnaming several things keeps folds one hop. - Static hosting can't push. Sam sees the reply by following you, or through a ping in the style of Webmention: "a record at this URL mentions yours". It says only where to look; Sam fetches and verifies. The endpoint is a hint, not a store.
- Federation with no servers: each static store is an outbox, following is composing, and a thread is reassembled by whoever reads it.
5 · Strangers, the author, and spam
- The author:
example.com/.well-known/loopsmaps Ana's domain to her store; the extension checks once per domain and badges her notes "from the site". Visiting already told her site you're there. - Strangers need an aggregator: a vertex over many composed public stores, publishing witness ticks ("I saw these ids about this key, hosted here"). Fetch and verify the cited records. The index may omit or misstate entries. Verifying fetched records does not establish index completeness.
- Spam is an admission question. "Rank, never hide" was written for a team whose members all count. In open federation
admitted-byyour follows (plus one hop of vouches, if wanted) decides who counts; weight ranks within that set. Strangers show as "12 annotations from people you don't follow", expandable: visible rejection, applied to people.
6 · The essay changes, and you retract
- Re-anchoring: the text hash differs from
seen, so selectors try an exact quote. Then they try a fuzzy match on quote, prefix and suffix, as Hypothesis does. Otherwise, your quote becomes an orphan: "this passage was changed or removed". - Dynamic pages (ads, personalization, paywalls) differ per visitor, so hash the extracted article and treat staleness as advisory.
- Snapshots are optional: a personal, erasable blob never shared, or a Wayback Machine link as a reference.
- Retracting: a record that erases propagates and the file holding the original is rewritten. Named by hash, the rewrite is a new file and
segments.jsonpoints to it. Anyone who already pulled it keeps their copy, and caches linger. Erasure here is cooperative; publishing is publishing.
| What the walk changed | Why |
|---|---|
| Keys computed by tooling when writing, by a declared rule | URLs, canonical links and birth keys are one pattern; the core compares strings |
seen is "the version I read"; W3C selectors anchor within it | one answer for code ranges and web passages |
| A store declares itself public (presence); places publish only those | disclosure decided once, as a standing bridge |
Static layout: closed segments named by hash, one mutable list, optional by-key/ | cache forever; erasure is a list change |
| Federation is own stores plus composition; replies carry the root; pings say where to look | no shared custody, no servers, no recursive selection |
| Admission filters; weight ranks among the admitted | spam in open federation; indexes may omit or misstate entries; fetched records still need verification |
| Other people's words stay home | references to them show the withheld form |
What this walk didn't touch
- A reading group's shared store (a small realm, like the team) instead of federating.
- The aggregator's format, and whether it publishes its own
by-key/index. - PDFs and video: page and time selectors.
- The selector spec: W3C's as written, or a subset.
Walk: context by tick id · 1. One handoff
illustrative walk An orchestrator hands a cloud subagent one tick id. The subagent unpacks it and works. Review follows; the next session starts from its tick. The walk focuses on what a reader does with references it can't fully see. This matters most for an agent, which fills gaps with guesses. The task is dev2's unanswered question from the LSP walk.
1 · Ticking the context
# the code-knowledge vertex ticks, about the birth key git:platform@c0:…#Verify → T:ctx # covering r:dn1 r:jn1 T:adr-2019 r:ss4 r:st8 r:pa2 r:n9; pinning T:tenure-… T:identity-… loops emit brief context=T:ctx --about r:t5 "is the compare in ValidateToken still constant-time?" # by the orchestrator's observer; the subagent's vertex is subagent with task=r:t5
The tick covers the director's note, dev2's note and the 2019 ADR tick. It includes dev2's shared session summary and one withheld turn. It also covers your public timing-attack annotation and a note a steward has since erased. The director's note also refers to r:dp3 in the director's personal store. The tick id is the whole handoff.
2 · Choosing what to send
The sandbox holds no stores, so a bare id isn't enough. Reference versus bundle was always a transport choice; now it has a rule: carry only what the receiver can't fetch itself, filtered by its grant.
bundle T:ctx for="sl:c0/session-9" {
carry r:dn1 r:jn1 r:ss4 // in the grant; nowhere the sandbox can reach
envelope r:st8 // session turns are outside the grant: withheld form
omit r:pa2 // in your public store: anyone can fetch it
pin T:tenure-… T:identity-… // ids only; checked lazily
}
A narrower grant is withholding by kind. The subagent's grant leaves out session-turn, so that record arrives as envelope plus commitment: selective disclosure, reused.
3 · Unpacking: five states
Signatures are checked on arrival. T:ctx can't be fully recomputed with payloads absent, so the check degrades honestly: envelopes are checked, payloads rest on the orchestrator's word.
| State | Example | The reader has | The lens shows |
|---|---|---|---|
| Here | r:dn1 | the full record | its content |
| Fetchable | r:pa2, the ADR's evidence | an id and a place that serves it | on demand |
| Withheld | r:st8 | envelope and commitment | who, when, kind, about what; request-open |
| Erased | r:n9 | envelope, commitment, an erase | "erased by a steward"; never openable |
| Unreachable | r:dp3 | the id only | "a source you can't see" |
Unreachable merges private and lost on purpose. The reader treats both as "a source you can't see". A secret salt makes offline guesses harder while the opening remains withheld. This does not hide envelope metadata or disclosed openings.
4 · The session-start lens
One tick, many renders. The spec names a lens per stage; a render is a pure function of lens and tick, cached under that pair.
"lens": { "context": "session-start", "review": "review" } ← in the subagent spec
## Context T:ctx · ValidateToken (born as Verify)
- director · 20y · 2019 · note must stay constant-time: the 2018 timing leak r:dn1
- dev2 · 2y · 2026 · note the new key cache: is the compare still constant-time? r:jn1
- dev2 · 2026-10-14 · session summary outcome: unresolved; tools: go test, pprof r:ss4
- WITHHELD · dev2 · session turn · 2026-10-14 · about ValidateToken r:st8 (request-open)
- ERASED · note · 2026-03-04 · not recoverable r:n9
- kyle · public annotation · quoted: "…early-exit compares leak timing…" r:pa2 (get)
- ADR 2019 "Move auth-svc behind the gateway" T:adr-2019 (unfold)
- 1 source you can't see, cited by r:dn1
- Missing is shown as missing, with its envelope. Dropped silently, the withheld turn would leave the agent thinking its picture was complete. Shown, it knows dev2 tried something on the 14th and can ask.
- Every item carries its provenance: observer, kind, admission. Hearsay and web text render as quoted data, never as guidance: a defence against prompt injection that falls out of first-class observers.
- Progressive, like this page: a gist, then ids to unfold through
loops mcp, so the context window goes to what the agent pursues. - A model summary is not a lens. A model gives different text each run, so it can't be cached under (lens, tick) or verified. It's an observer's record,
loops emit summary refs=… --about T:ctx: signed, attributable, disputable.
5 · Working, and what it knew
loops emit finding refs:='["r:jn1","r:pa2"]' \
text="key-id lookup short-circuits before the constant-time compare; leaks which key ids exist" \
seen=git:platform@c9:internal/security/jwt.go#ValidateToken \
--about git:platform@c0:…#Verify --under g:review-sandbox
loops emit task-complete --about r:t5 # the marker → T:t5
# both by sl:c0/session-9; its last record is a witness tick covering T:ctx, r:pa2 and 2 more
The session's witness tick answers "what did it know?": the context it was handed plus every id it fetched, ids only. As the session's last record, it is also the cover a retirement of that run's key would cite.
6 · Review: the same tick, another lens
The review lens over T:t5 shows the finding, its evidence, and what the session-start lens never needed: the subagent's blind spots. "It didn't see 1 withheld session turn, 1 erased note, 1 unreachable source." You can request-open r:st8 from dev2. They open it with one tap. You decide whether the finding stands. Approval is a review stance about T:t5; promoting the finding into the team store is ordinary under a grant. The next hover on ValidateToken shows dev2's question answered, closing the LSP walk's "unanswered" flag.
7 · The next session
Tomorrow's session starts with context "T:t5" through session-start: continuity by tick id, not transcript. Tick ids never change, so "anything newer?" is a question for the store; a lens that can reach it adds "2 records since this tick".
| What the walk changed | Why |
|---|---|
| One tick, many renders, cached under (lens, tick) | the stage picks the lens; the tick stays one thing |
| Five reference states, missing shown as missing | an agent fills silent gaps with guesses |
| Bundles carry what the receiver can't fetch, filtered by its grant | a narrower grant is disclosure by kind |
| Lenses are deterministic; model output is an observer's record | caching and verification need determinism |
| Provenance reaches the agent; hearsay renders as quoted data | prompt injection, answered by first-class observers |
| A session's witness tick: context plus fetches | "what did it know", and its key's retirement point |
| Review shows blind spots | request-open lets the reviewer fill them |
What this walk didn't touch
- Parallel subagents whose findings conflict: probably forks and disputes, as usual.
- Budgeting the context window: how a lens decides what to show in full and what to leave as ids.
- Caching renders across machines: the Nix-style cache; see knowledge as a build.
- Verifying deep tick trees: already an Open item.
Walk: context by tick id · 2. Design thread to cloud run
illustrative walk The single handoff becomes a chain of loops, as in the earlier loops implementation. A multi-session design conversation emits findings into a thread. A boundary turns an accepted design into tasks. An orchestrator triages them. A cloud manager and subagents do the work. Each stage closes on a boundary, and each handoff decides two things: what the receiving place holds and what the receiving agent sees.
1 · The design thread: findings are the compression
What we emit while designing (findings, decisions, the ADR, all about the thread's anchor) is the distilled graph and the primary context downstream. The siftd turns are why it's trustworthy, but they're large and personal. Preferred design: turns travel as envelopes by default, openable on request; the distilled records travel in full. This is the case for emitting findings mid-conversation at all: they make a handoff affordable. When the design is accepted, the vertex ticks T:design by reference over the decision and its evidence. Tasks are emitted --into runs. Each carries context=T:design.
2 · Tasks and triage: judgment moves upstream
The design session knows a task best, so the task can carry an estimate (size=small, needs=exploration). The orchestrator, shallow by design, judging coherence rather than content, affirms or overrides it with a triage record and picks an agent spec. Scripts act as observers for deterministic steps such as opening a worktree. They report what they did (worktree-opened path=…). Even the plumbing leaves a trail. Each agent's last response becomes a summary record plus task-complete, whose tick fires the parent's boundary.
3 · Up to the cloud: by value, filtered
- The cloud can't reach home. The bundle carries what the run may need, filtered by the cloud seat's grant. Session turns travel as envelopes. Anything outside the grant stays home.
- The cloud run is a borrowed place of your realm, not a bridge: your seat, on its own key, under your grant. That is what lets results come home by union.
- Bundles negotiate like
git fetch: content-addressed, so the receiver says which ids it has; repeat runs send almost nothing. Blobs stay fetch-on-request. - Widening the seat's grant to include session turns is a deliberate, one-time act with presence, like declaring a store public; a run never decides it. The cloud provider can read what goes up.
4 · Inside the run: the place holds everything, each agent sees a brief
| Level | Holds or sees | Why |
|---|---|---|
| The run's store (the place) | the whole bundle | any request is answered locally |
| The manager's context | T:design through a lens | to plan |
| A subagent's context | a brief | an agent given everything does worse: context rot |
A brief is judgment plus packaging, like "model output is a record, not a lens". Choosing the context is a signed record. Packaging it is a tick.
loops emit brief text="check the key cache's compare path; ignore the gateway work" \
refs:='["r:d4","r:f12","r:f15"]' from=T:design --about r:t7
# by sl:c0/manager-3; from: the rest exists, so ask
# → T:brief-7, a tick covering the brief's refs by reference: reproducible from them
Context narrows the way authority does. Each level hands down a subset, never more: Macaroons-style attenuation applied to context. A subagent gets a narrower brief and a narrower grant together.
5 · Asking for more: requests climb to the nearest holder
A brief says what was left out ("47 more records in T:design, mostly session turns and the gateway findings").
- The run's store holds it: the manager serves it within the subagent's grant. Usually instant.
- It's only an envelope in the cloud: the request goes home. You open it with one tap, or a grant set ahead of time does. That grant can allow work-session turns for runs of this design.
- The agent keeps going meanwhile; the review lens shows the blind spot. A subagent waiting on a person stalls the tree.
Walk: context by tick id · 3. The return
illustrative walk Every subagent's turns, tool calls and edits come home. When the run ends you hold the full record of what happened, exactly as if it had run on your laptop.
| Direction | Destination | What travels | Decided by |
|---|---|---|---|
| Up | the cloud: borrowed, readable by the provider | the brief's closure, filtered | the seat's grant; widening it needs presence |
| Down | home: your most trusted places | every record the run produced | nothing: it's your realm syncing |
Coming home is ordinary replication, set union over the run's segments; records that started at home are skipped by have/want. Afterwards the home store holds the same ids and signatures it would have had locally, and the cloud place leaves places.json. A cloud run is a borrowed place.
What "everything" is, as records
session-meta model, tokens, cost, tools used, outcome // per session session-turn prompts and responses // the transcript tool-call tool, arguments, result → blob:h:… // large results as blobs finding / summary / brief / triage // what each agent asserted worktree-opened, commit-pushed // what the scripts did
- Two observers, on purpose. A transcript collector in the run (siftd-style, split by disclosure when recording) reports the transcript: hearsay of what the session said. The session's own key signs its findings and summary: what it claims. Review can ask whether a finding follows from what the transcript shows.
- Tool results are blobs, deduplicated by hash: a file read ten times by five subagents is stored once; logs stay out of the index.
- Edits come home through git, not as copies: the worktree branch is pushed and records point at its commits (
seen, birth keys). Uncommitted scratch edits travel as diff blobs on the tool call that made them.
Knowing you have all of it
- Sync at every tick: a crashed container loses at most the stage in progress.
- Segments are append-only, one writer each: a gap would be a truncation, and that is detectable.
- A cover closes it: on a normal close the run's key is retired with its witness tick as the cover. If the container died, the home orchestrator retires it covering what it received. A record the cover names that you lack means something is missing; anything from that key outside the cover doesn't count.
Where it lands, and what it gives
- Its own store per run (
runs/<id>), composed with the design thread, not mixed in: volume, retention, erasure and search differ. - Places decide holding: SQLite plus a blob place for volume;
"scope": "emitted 90d"keeps recent runs local and older ones in the archive. Turns get full-text search, as in siftd. - The hygiene vertex scans on arrival, not just before sharing: tool output is where secrets leak.
- A full trace from any decision: finding → transcript → tool calls → commit. Replay from witness tick plus turns. Sharing later by disclosure level:
session-metato the team, turns withheld until opened.
| What parts 2 and 3 changed | Why |
|---|---|
| Place versus context: the store holds the bundle, each agent sees a brief | full provenance and narrow prompts, both |
| A brief is a record plus a tick | the choice is judgment; the packaging is deterministic |
| Context attenuates down the tree with authority | never more than the level above holds |
| Requests climb to the nearest holder; agents don't block | only home-withheld records reach you |
| Up is a disclosure, down is a homecoming | a cloud run is a borrowed place of your realm |
| Sync at every tick; retire through what was received | completeness you can check |
| Findings are the compression, turns the evidence | two observers: collector and session |
Selective disclosure: sharing sessions with a team
siftd gathered session logs into one searchable place. In loops terms it's a sessions store fed by a collector. The step after: share what's useful with a team, aggregate it, and keep the rest.
home realm work / team sessions store (everything, yours) practice store (shared) session-meta tools, tokens, repo, outcome ← promoted automatically under a grant session-turn prompts and responses ← withheld: envelope + commitment only session-note "how I fixed X" ← opened deliberately (one tap)
The key move: split by disclosure when recording. The collector emits what you might share and what you wouldn't as separate kinds about the same session anchor. Sharing becomes choosing kinds to promote. Facets give what per-field salted digests (SD-JWT) would, without the machinery.
| Level | The team gets | Leaks | Checkable? |
|---|---|---|---|
| 0 · Nothing | — | — | — |
| 1 · Aggregate | your summary tick | the numbers | no: rests on your signature |
| 2 · Envelope | every record, payload withheld | who, when, kind, about what | ✓ for anything computed from envelopes |
| 3 · By kind | session-meta in full | that kind's fields | ✓ |
| 4 · Opened | chosen records, now or later | that content | ✓ and provably in the covered set |
- Withheld looks like erased: envelope plus commitment, no opening. The format already has it.
- Open later, on request. Team search shows "a session about
svc:auth, outcome: fixed"; a teammate emitsrequest-open; you open it with one tap. The recipient checks the opening against the commitment they already hold. - The line: anything computed from envelopes can be checked; anything computed from payloads rests on the signer unless opened. Zero-knowledge proofs could close that gap; nothing needs them yet.
- Who decides: a home sharing policy says "meta always, notes when marked, turns never". A grant lets the collector promote
session-meta. Content needs a tap per batch. An agent may draft redacted summaries citing the original.
Leaks to design against
- Envelope metadata reveals rhythm: when, how much, on what. Personal identifiers stay behind anchors; some people will stop at level 1 or 3.
- Counts: a tick's covers list shows how many records it folded. A secret salt makes offline guesses harder while the opening remains withheld.
- Embeddings: don't share embeddings of withheld text; text can largely be recovered from them (Morris et al., 2023). Share reviewed topic records instead.
- Secrets: the hygiene vertex scans before any promotion, not after.
Walk: Nix and Bazel for knowledge
illustrative walk Nix and Bazel name build outputs by hashes of their inputs. Someone who already built an output can hand you the result. Trust their signature, or rebuild and compare. A fold is already pure, so Loops fits this without new parts. Walking it gave every result two names, and made a limit of the whole model explicit: privacy is withholding, not hiding.
| Nix / Bazel | Loops |
|---|---|
| derivation: the recipe, inputs pinned | input key: spec, fold vocabulary, covered ids and which were read open, results read |
| content-addressed output | result hash: the folded state, canonically encoded |
| build output | a render, keyed by (lens hash, result hash) |
| binary cache | a static place holding results and renders |
| signed cache entry | a witness tick: "I computed these" |
| fixed-output derivation: impure, declared | an observer's record: a model summary |
| GC roots | pinned ticks: a release, a brief's tick |
1 · CI computes and publishes
CI folds the ADR store and renders the docs lens. It writes both to a static place next to the store. Everything is hash-named and cached indefinitely.
cache/ keys/<input key> → res:7a… // what was asked → what came out results/res:7a….json // the folded state, canonical encoding renders/h:d4…/res:7a….html // lens hash / result hash witness observer="ci" vertex="decisions" key=… result="res:7a…" sig=…
The witness tick is CI's claim: "folding these ids with this spec gave this result." It's an ordinary record and syncs like one.
2 · A laptop fetches instead of folding
- It computes the input key from what it holds: the spec hash, the covered ids and which of them it reads open, the result hashes of the vertices it reads. Hashing is cheap; folding is what's skipped.
- Lookup:
keys/givesres:7a…;renders/gives the page. Nothing was folded. - Trust or check: trust CI's key, or refold and compare. A mismatch means nondeterminism or tampering, and either is worth knowing: it becomes a
disputeabout the witness tick.
3 · A late note lands: early cutoff, two names
Every result gets two names:
| Name | Hash of | Answers | Used for |
|---|---|---|---|
| Input key | everything that shapes the result | "what was asked?" | looking it up |
| Result hash | the folded state itself | "what came out?" | naming it; downstream keys |
r58 is an older note on ADR-12 that loses to the current decision. decisions must refold, since its input key changed, and that's unavoidable and cheap. It produces res:7a… again. status and the docs render are keyed by res:7a…, not by decisions' inputs, so they're hits.
Most edits to a knowledge store are like this: a comment, a weaker observation, a duplicate, a record outside what a lens shows. Without early cutoff, each one rebuilds everything downstream. Nix learned this late, which is why it added content-addressed derivations; Build Systems à la Carte names the property.
- The tick id still changes: it names the covered ids. The new tick says "these records, this result"; downstream reuses the work, not the record.
- Results need a canonical encoding, or the same state hashes two ways: sorted keys and fixed number forms, as in RFC 8785. Built: JCS, with integers as decimal text and the hash spelled
res:. - A render shows only what's in the result. Anything it prints, such as an "as of" date, has to come from the state, or two equal results would render differently.
4 · What goes in the key: name it, don't carry it
Nix hashes the compiler as well as the source. Anything that can change a result belongs in its key, or an upgrade quietly serves stale output under the right name.
| In the key | Not in the key |
|---|---|
| spec hash and fold-vocabulary version | key rules like canonical-link: applied when writing |
| covered ids, and which of them were read open | the clock: folds never read "now" |
result hashes of every vertex read, authority and resolve-by included | which place held the records |
| for a render: the lens hash, templates included | who asked |
Admission and identity need nothing new: who counts and what's the same thing are vertices, so their results are just more inputs.
Name it, don't carry it. A spec or a lens enters the key as a hash. Its text doesn't need to be in the store ahead of time; it's a blob, fetchable by hash when someone wants to check. Pushing everything into the store makes the store self-sufficient, but ties naming to holding. A key makes the same guarantee with nothing stored.
5 · A phone reads the site
It can't fold at all; it reads renders/ over plain HTTP. Static readers are the main customer: a public store's page, the annotation sidebar, a docs site. A cold start on a new device is the same case: fetch results, fold only what's newer.
6 · A reader without the closure: as private as its inputs
A render of withheld records shows those records. A count shows how many there were. A summary paraphrases them. Anything computed from a record carries some of it, so:
- A derived thing is as private as its least-public input, and a cache place serves it under the same grant as the records.
- A computed claim you can't recompute is only attested. With the closure out of reach you can see the result and the witness, but not check it. The context walk already degrades this way ("envelopes are checked, payloads rest on the orchestrator's word"); this names the rule for every derived result.
- Hiding inside what you share isn't offered. Computing over records a reader can't see, while keeping them hidden, needs zero-knowledge proofs; nothing needs them yet. Stated as a boundary in Sharing.
7 · A model summary in the chain: where purity ends
Nix lets a build step reach the network only if it declares its output hash up front; everything else must be pure. Loops draws the same line, already in the context walk:
- Reproducible work is computed: folds and lenses, cached by key, checkable by anyone holding the closure.
- Anything else is observed: a model's summary is an observer's record, signed, with the tick it read in
about. Downstream it's an input like any record, so the chain stays pure after it.
8 · Clearing the cache: roots
Results and renders are cache entries, not records, so any can be evicted and rebuilt. Some must stay: a release tick, a tick cited by a brief, a tick someone pinned. Nix calls these GC roots. Eviction walks from them; everything else is fair game. This gives the run-transcript retention question a shape.
Where it pays, and where it doesn't. For a personal store on a laptop, folding is cheap and this buys little. It helps static readers, cold starts, verification and agents that need a reading without the closure. Equal result hashes name the same encoded result. They do not establish identical input records. That's why it stays an interface until a static reader needs it.
| What the walk changed | Why |
|---|---|
| Two names per result: input key to look up, result hash to name; downstream keys use result hashes | early cutoff: work stops where results stop changing |
| The key holds everything that shapes a result, lens and fold vocabulary included | an upgrade misses the cache instead of serving stale output |
| Name it, don't carry it: specs and lenses enter by hash | reproducibility without storing everything ahead of time |
| Renders are keyed by (lens hash, result hash), not tick id | many ticks share one result |
| Privacy is withholding, not hiding: derived things inherit their inputs' grant | a boundary of the model, now stated |
| A computed claim you can't recompute is only attested | generalizes the context walk's honest degradation |
| Pinned ticks are roots | eviction has a rule |
What this walk didn't touch
- Partial rewind inside one vertex: still waits until a real store hurts. Early cutoff works between vertices without it.
- Remote execution, Bazel's other half: folding on someone else's machine. A cloud run is an agent, not a fold.
- The cache place's exact layout, and whether it lives inside the store's place or beside it.
- Hashing cost for very large results: a Merkle encoding would let a fold rehash only what changed.
Open questions
Only what is still open, grouped by layer; each unfolds into what's known and where it leans. Settled answers moved to the decision ledger on the Map in version 31.
Layer 0 · record
Does occurred need a duration-vs-imprecision marker?
Both normalize to [start, end) and order the same. Preferred design: the kind decides at read. Watch for folds that need it, such as summing attention time.
Observers and lineage
Should under be required when a write needs authority?
Optional keeps the envelope small; required makes admission a lookup instead of a search. Possibly a per-store policy.
Who signs a cross-realm same-as?
Both lineages, or you as the parent of both. It lives only in the home realm either way.
Is a model swap the same observer? leaning
Yes: runs-on is a statement on the lineage. A new lineage is for leaving a shared seat, not for every swap.
Can a lineage fork, and how are stances reconciled?
Concurrent sessions taking opposite stances. A DAG like git, with divergence held as data until resolved.
Does your endorsement design already separate naming from authority?
If so, it's the most battle-tested input for the observer envelope.
Realms and places
One store per repo, or a personal store spanning repos?
The second brings custody questions back in a milder form.
What does verifying a deep tick tree cost?
Recursive recomputation down an orchestration tree. Verify lazily, by sampling, or trust per hop: an operational choice, not a model one.
Horizons
Where does a rendered file keep its base? leaning
Front matter, holding the tick, the lens hash and the audience. It changes on every render and adds git noise; rendering only when the file's own result changes keeps that small.
The conflict block's syntax
A fork renders as a block naming each head and its author. It must stay unambiguous inside code fences and survive editors; git's markers don't. Preferred design: a fenced directive the parser owns.
Hooks, merge drivers, and edits made without a key
Committed lens files rely on a pre-commit hook and a merge driver that re-renders. How a repo installs them, and whether a CI collector records key-less edits as hearsay for the author to endorse, is per team.
Do team aggregates ever need more than the signer's word?
Folds over withheld payloads rest on the signer. Zero-knowledge proofs could close the gap; nothing needs them yet.
Which selector spec? leaning
Both walks need one: line ranges inside a function and passages on a page. Preferred design: a W3C subset, with quote, prefix and suffix as the anchor and position only as a hint. PDFs and video need page and time selectors.
Code beyond symbols: files, packages, the repo
Git follows file renames natively; directories barely. Preferred design: name a repo by its root commit, which survives renames; forks then share keys for the history before they split.
A reading group: one shared store, or federation?
A private group could be a small realm with one store, like the team, synced by git or Syncthing. Federation keeps custody with each person. Both work; probably both get used.
Who runs aggregators, and in what format?
A vertex over many public stores, publishing witness ticks. Open: whether it also publishes a by-key/ index, how a reader finds one, and whether several are composed.
Pings: Webmention as is? leaning yes
A ping carries only where to look: the source store and record. Webmention already defines that shape; adopting it means existing endpoints work.
Admission across federation: one hop of vouches by default?
Follows alone is quiet and safe; one hop of vouches finds more but widens trust. Preferred design: follows only, with one hop as a toggle.
Snapshots of what was read?
seen answers "changed since?" without one. A personal blob (erasable, never shared) or a Wayback link answers "what did it say?". Preferred design: off by default, per site on.
Parallel subagents with conflicting findings
Two sessions on the same task reach different answers. Preferred design: findings are ordinary records; conflicts are disputes or forks, surfaced by the review lens.
Budgeting an agent's context window
A lens decides what to show in full and what to leave as ids to unfold. Preferred design: rank by the vertex's weight and recency, show envelopes for the rest; never drop silently.
Handing a thing over tabled
A house, a car, a machine given to a friend, a service changing teams. Framing so far: custody uses a steward changeset and retire-through, with presence. History uses a restricted tick or the thing's store. Continuity leaves the giver a copy through the cut. Personal data stays outside a thing's store. Envelope disclosure exposes omissions only within the disclosed set. Third-party signatures provide evidence. A same-realm service handover moves no data. Tabled: worth walking, unlikely to change the model.
Transcript collector: built into the harness, or external?
The return needs every turn and tool call as records. A harness that emits records natively is simplest; an external collector reading transcripts works with any harness, as siftd did.
Where does a cache place live? leaning
Results and renders need a home static readers can reach, served under the grant of their inputs. Preferred design: beside the store's place, with hash-named keys/, results/ and renders/. Publish it only where the store is published.
Retention for run transcripts
Runs are the highest-volume store. Retention is a per-store choice that needs a default. Decide when runs move to archives and whether old turns become blob-only. The build walk gives eviction a shape: pinned ticks are roots (a release, a brief's tick), and results and renders outside them can go.
Implementation
The crate's name
The workspace uses loops internally. Its published crate name remains open and can differ.
Schema field names
The JSON examples here are proposed grammar, not accepted inputs. protocol/spec.md defines the implemented spec format. No JSON Schema files or schema.md exist. Names for future declarations, places and boundaries remain open.
What a numeric fold reads settled
The reader reads RFC 8259 numbers as binary64 values. Sum, min, and max accept only safe whole values. Thus 1.0 counts, but 1.5 counts as unread. Sum uses an exact integer accumulator. The protocol does not define fixed-scale decimal strings.
The review's other findings
Two outside reviews of version 31 are compiled in Strange Loops Rethink: Review. Version 32 took its fold, withholding, tick and vertex findings. The occurred grammar is settled, and with it the window time zone: calendar dates are UTC days. Still open: id prefixes other than the result hash's, which is res:; standing bootstrap order; and resolve-by transitivity. Also review segment closure and core salt inputs. Ticks precede standing (Kyle, 2026-11-10).
Canonical encoding for results settled
A result hash needs one encoding per state. Built: RFC 8785 (JCS), with every integer as decimal text and every listed record as its id alone; the hash is spelled res:. protocol/result.md is normative. A Merkle encoding only if hashing large results gets slow.
Where does the LSP's history index live?
Mapping a cursor to a birth key needs a cache of each symbol's history. Preferred design: the editor tooling's own disposable cache, not loops' index; the core never reads git.
Calibrating the budgets
The historical budget guesses were 60k core tokens and 15k per module. Step 1 measured Go's record at 3.2k against roughly 8k. The historical surface snapshot had 34 names. Neither snapshot establishes current Rust budgets. Measure the current slice before setting limits.
Minting in a declared store with several thing kinds
When a name misses and the store declares more than one thing kind, the emitter has to say which. A flag, a prompt, or a per-store default; a CLI detail, not a model one.
Layer 5 · sharing (closed)
Should presence be provable to other replicas?
A root key is meant to be used only with you present. FIDO hardware keys could prove it (a user-presence flag inside the signed bytes) at the cost of a second signature format. Preferred design: wait until someone needs proof.
A local signer behind a socket?
Like ssh-agent: sits outside an agent's sandbox, signs only as that agent and only within its grant. Defence in depth; not needed for the model to hold.
Composition (closed)
How exactly does resolve-by turn pairs into classes?
Connected components over the pairs the identity vertex accepts. It must be specified as precisely as a fold, since verifiable ticks will depend on it. The display id of a class (Preferred design: the earliest anchor in content order) may change when classes merge.
Who proposes merges? leaning
A hygiene vertex for things (name similarity, or an agent proposing matches) feeding the stale review. One hygiene vertex per discipline surface: kinds, things, names, natural keys.
Anchors a store can't read leaning
A team record about an anchor that lives in a personal store groups fine (the hash is enough) but can't be named. Preferred design: promotion carries the anchor along verbatim when the target lacks it. Across realms, a natural key is content, not a reference: svc:auth@corp-prod says something, so it crosses only by bridge. A public store is a standing bridge, which is how url: keys meet across realms.
Which name table resolves input? leaning
Preferred design: the target store's names first, then home; a miss is handled in the target store. Otherwise personal petnames leak into team anchors.
References: recognized by prefix, or declared?
Open stores guess from id prefixes; strict stores declare their reference fields. A string that only looks like an id is the failure case.
Layer 2 · resolution (closed)
into, or a store per vertex? leaning
Content ticks are values, stored only when cited or sent, as a tick record signed by its writer. into names where that record lands; admission is by recomputing or by the writer's grant.
Glossary
One word per concept, one concept per word. This glossary defines the page's principal terms. Plain words win; vertex is the one word kept from the strange-loop vocabulary, on purpose.
Records
| Term | Means |
|---|---|
| record | The unit of everything: an envelope, a payload and a signature, named by a content hash. An observation, never a statement of truth. |
| emit | To write a record. One of the two write verbs; the other is tick. |
| envelope | The fields the core reads: kind, observer, emitted, occurred, about, of, prev, under, erases, sets. A field belongs here only if the core reads it. |
| payload | Everything else. The core never interprets it; folds read typed fields from it. |
| kind | A record's label. It stays a label, not a type; declarations describe it. |
| observer | Whoever says "I saw": a lineage id on every record. A collector is an observer reporting hearsay. |
| emitted · occurred | Two times. emitted is when the observer wrote it; occurred is the claimed span, and may be coarse. |
| about | The things a record mentions: a set. It never makes a head. |
| of | The one thing a record is an emit of: a record id or a natural key, read as written. A root leaves it out and is of the thing its own id names; a record with prev states it. |
| prev | The records this one replaces, within the thing both are of: a set. Empty starts a chain; two or more merge. It may name only records the writer holds of the same thing. |
| under | The grant a record relies on. |
| commitment · salt | The payload's salted hash. A secret salt makes offline guesses harder while the opening remains withheld. Opening it means showing the payload and the salt. |
| erases | The ids whose openings this record asks the store to erase. |
| erasure | Removing a payload but keeping its commitment, so the id and every tick that cites it still hold. |
Things and identity
| Term | Means |
|---|---|
| thing | Whatever records are of: a chapter, a service, a URL, a person. Each record is of exactly one thing, and each thing has its own state; a root starts a thing named by its own id. |
| anchor | The record a thing or a lineage starts with; its id is the identity. Primitives start with the reserved *-anchor kinds. |
| natural key | A typed key that needs no anchor, such as url:, isbn: or svc:. Anyone computes the same one. |
| birth key | The natural key for code: the symbol as it was in the commit that created it. |
| lineage | A stable identity under changing names and keys: the hash of its anchor. Observers and stores are lineages; a vertex is named by its spec's hash instead. |
name · name table · @home | Names resolve at read through name tables and never take part in matching. @home is the table your realm starts from. |
| same-as · dispute | The two identity kinds: these are one thing, or they are not. |
| resolve-by | How a vertex joins identities: it folds same-as and dispute records into classes. |
| facet | One kind of one thing, emitted whole; the current state is the latest per kind. Proposed. As built, a thing's fields are read by the keys its records declare in sets. |
Meaning
| Term | Means |
|---|---|
| store | A set of records with its own anchor and declarations. It holds records; it owns no meaning. |
| declaration · maturity | Records in a store describing its kinds, writers and policy. A store matures from open to declared to strict. |
| vertex | A standing question over stores: it selects, folds and ticks, and its ticks feed higher vertices. Where loops meet, which nothing else names, so it keeps its word from the original vocabulary. |
| spec | A vertex's definition: inputs, folds, a boundary. One spec can be instantiated as several vertices, each named by the hash of the spec and its parameters. Written as JSON: today a file in .loops/vertices/, by the plan a record of kind vertex; its note explains it and stays out of the input key. |
| fold | Turning a set of records into state, with one of six: Count, Sum, Min, Max, LatestBy, Collect. Accumulating folds are commutative; folds over heads follow prev. LatestBy always does, and Count, Sum, Min, Max and Collect do when the slot says "follow": "prev". With "follow": "keys" a slot reads each thing by its live setters, the records nothing above replaces for a key: LatestBy gives each thing's keyed state, and Count, Sum, Min, Max and Collect read things. Latest, TopN and Window are proposed modifiers; Avg is left to the lens. |
| head | A record no record of the same thing names in prev: a thing's current record. A thing with several heads is forked, shown as a conflict. Heads are worked out from envelopes alone, over everything the reader holds. |
| content order | How a fold decides which record wins: taken from what records carry, never from arrival. No fold needs records read in this order. |
| predicate | Wherever a spec says which records, or when to tick. A closed, typed set. |
| boundary · marker | When a vertex ticks. A marker is a record whose arrival is that moment. |
| tick | A vertex's result at a moment, covering exactly the records it folded. Also the verb: a vertex ticks at each boundary. A content tick is a value a holder of its inputs can recompute. Its id covers its vertex, covers and result. When cited or sent, its writer stores and signs a record of kind tick. A witness tick is such a record saying what the runner had. |
| covers | The records a tick folded, listed exactly; also its field, covers=(…). |
| as of | The cut a tick's records are chosen at. As of T by emitted is the records emitted by T and everything they build on. The occurred side is a window, a where applied after the heads. Always an input, never the clock. |
Standing
| Term | Means |
|---|---|
| standing | Whether a record takes effect, given who signed it. |
| admission | The standing check, made at read: a record without standing stays visible but has no effect. |
| stance | A record that affirms, adopts, disputes, retires or authorizes another. |
| steward | An observer with standing over a store's declarations and policy. |
| grant | Standing given ahead of time, with a scope. Agents act within it. |
| presence | A person present, signing with a key behind Touch ID or similar, for acts that can't be undone. A grant is presence given ahead of time. |
| root key | The key that signed a lineage's anchor. It signs what changes standing: bindings, grants, stewards. One per lineage, and no binding replaces it. |
| bound key | A key the root key named in a key-binding. It signs ordinary records as the lineage and can't bind another key. |
| seat | An identity shared by delegates who don't have their own yet. |
Places and sharing
| Term | Means |
|---|---|
| place | Where a store's records live on a machine: a location, a format and a role. |
| segment | One writer's file of records in a place. Closed once committed; named by hash. |
| realm | The stores reachable from one root name table. Realms nest by linking, never by rewriting. |
| promotion | Copying a record, verbatim, into another store in your realm. |
| bridge | Crossing into another realm: always explicit, always a signed tick. |
| bundle | A tick sent together with everything it covers. |
| changeset | Records emitted together as one transaction, as a lens apply does. |
| collector | An external process that turns a source into records, over stdin. |
Reading out
| Term | Means |
|---|---|
| lens | A two-way transform between state and a file: render for an audience, parse edits back, diff by ids, apply as records. Absence is never an edit. |
| base | What a render came from: tick, lens hash and audience. Edits are diffed against it. |
| audience | Who a render is for; it decides what is withheld. |
| input key · result hash | A result's two names: what went in, and what came out. |
Proposed API words
These names describe the design vocabulary, not a complete inventory of the integrated crate's public API.
| Term | Means |
|---|---|
| Realm | Package loops's handle on the stores you can read. Reads span all of them; writes name one store. Narrow restricts it to a grant. |
| Draft | A record before it is signed. |
| State | What a fold returns. |
| AsOf | The cut a set is chosen at. No fold takes it as a parameter. |
| Checkpoint | A place's segment list as last seen. What's new since it is how watching works. Not "cursor": the editor already owns that word. |
| Signer | The trait for anything that signs: a key in a file, the keychain, a hardware key. |
| Place | The trait for storage: list, get by id, what's new since a checkpoint, a blob by hash. loops-place, a directory of JSONL segments, is the one built. |
| Lens | The trait for render and parse; the core does the diff. |
| Refusal | An error with a code from a closed set, and the field it concerns. |
Retired words
| Was | Now | Why |
|---|---|---|
| fact | record | "Fact" implies truth; the model holds observations. |
| genesis | anchor | One concept: the record an identity starts with. |
| subject | thing | of names a thing; about mentions things. |
| residence | place | A residence was just a store's places on one machine. |
| topology | realm | A topology was a realm whose name table links others. |
| boundary list | the limits | Boundary means when a vertex ticks. |
| seal | tick, covers | "Seal" suggests hiding or signing, and a tick does neither. A vertex ticks; a tick covers records. In code at step 2, record.Seal becomes NewRecord and Sealed becomes Stored. |
| spec, for the documents | protocol | Spec stays for a vertex's definition; the normative prose in protocol/ is the protocol. |
| Upsert | LatestBy | A database write verb used for a read: the latest record per key. |
The conversation turns in Sources keep the words used at the time.
Sources
Everything this page draws on: the repository, outside standards and prior art, and the conversation itself.
The conversation entries preserve historical rules and findings. Settled Step-1 rules now require base32hex and canonical UTC instants. The record page gives the current contract.
Repository files
| Path | What it showed |
|---|---|
README.md | the truths, three shapes, the pattern, boundaries of the model, lineage |
docs/CONCEPTUAL_MODEL.md | three loops; state is an answer; the observer loop's danger |
docs/RECEIPT_ORDER_FOLD.md | fold order became receipt order; merge directions differ |
docs/architecture/arrival/*.html | protocol, wire format, backend contract, witness protocol |
benchmarks/LEDGER.md | cost curves; quadratic ingest; cold-open replay |
spec/conformance/ | 81 vectors: fold, merge, replay, replicate, witness, comparison, lens (only fold and lens carry over) |
docs/RATCHETS.md | construction vs detection ratchets |
libs/atoms/src/atoms/parse.py | parse pipelines: Where, and Skip with substrings, regex and lambdas; moved to collectors |
libs/lang/src/lang/ast.py | boundary matches, fold-state conditions, and run shell commands on fire |
libs/*, apps/*, measured | non-test source: 76.7k lines, about 765k tokens; libs/engine alone about 318k |
apps/loops/session.vertex | the one real vertex: selects by kind alone, folds by by and collect |
libs/atoms/src/atoms/fold.py | the closed fold vocabulary; Upsert keys on a payload field |
libs/lang/src/lang/loader.py | a loop block holds fold, boundary, search (FTS5 fields), parse, preview, edge and lifecycle: four jobs in one file |
libs/atoms/src/atoms/boundary.py | Boundary modes when, after, every: only every is operational |
libs/atoms/src/atoms/fact.py | Fact is kind, ts, payload, observer, origin: no subject field |
libs/store/src/store/merge.py | three merge arms; ordering claims |
pyproject.toml | flat vendored wheel; dependency list |
CHANGELOG.md, *-REPORT.md | 0.11.0 "CLI honesty"; review rounds |
Observer code references are listed under Observers.
Standards
- RFC 3339: date and time on the internet
- EDTF: Extended Date/Time Format (ISO 8601-2:2019)
- RFC 8785: JSON Canonicalization Scheme
- RFC 8032: Ed25519
- RFC 9562: UUIDs, including v7
- KDL and kdl-rs
- gitattributes: the
unionmerge driver - SKOS Reference: mapping properties (
exactMatch,closeMatch, …), considered and dropped - AT Protocol record keys: TIDs, time-ordered keys alongside content hashes
- SQLite FTS5: contentless and contentless-delete tables
- SD-JWT: salted per-claim digests for selective disclosure
- NIST SP 800-88: media sanitization, including cryptographic erase
Archival and provenance models
- PREMIS: Objects, Events, Agents (person, organization, software), Rights
- W3C PROV: Entity, Activity, Agent;
wasDerivedFrom,actedOnBehalfOf - OAIS (ISO 14721): submission, archival and dissemination packages
- Records in Contexts (RiC), International Council on Archives: records, agents and relations as a graph
You recalled an archival standard close to this model from an earlier discussion. One of these may be it.
Naming and identity
- Kerberos principal names:
primary/instance@REALM - RFC 7033 WebFinger, RFC 7565
acct: - Nostr NIP-05; NIP-26 (unrecommended)
- Matrix, SPIFFE
- AT Protocol DIDs and handles
- W3C DID Core
- Zooko's triangle; Marc Stiegler, "An Introduction to Petname Systems" (2005)
- Rivest and Lampson, SDSI (1996); RFC 2693 SPKI certificate theory
- Secure Scuttlebutt protocol guide; Keybase sigchains
- KERI (Key Event Receipt Infrastructure) delegated identifiers; Matrix cross-signing (in the Matrix spec)
- Halpin et al., "When owl:sameAs isn't the same" (ISWC 2010)
- Ateniese et al., "Redactable Blockchain" (IEEE EuroS&P 2017): chameleon hashes
AT Protocol and delegation
- Permission spec, OAuth scopes guide, permission requests, OAuth for atproto
- AT Architecture Internet-Draft
- Tranquil PDS delegation pull request (third-party)
- atex ServiceAuth, atproto_identity: service-auth checks as implemented
- atproto in practice: identity
Authority, time evidence, memory
- RFC 8693 OAuth Token Exchange (
act); RFC 9396 Rich Authorization Requests - Macaroons (Birgisson et al., 2014); Biscuit; UCAN
- RFC 9162 Certificate Transparency; RFC 3161 timestamping
- Spaced repetition: Leitner boxes, SM-2, FSRS
- Akidau et al., "The Dataflow Model" (PVLDB 2015): event time, triggers, late data
- Locke, Parfit (Reasons and Persons), Ricoeur on narrative identity
Horizons
- Foster et al., "Combinators for bidirectional tree transformations" (2007): the lens laws (GetPut, PutGet); Ink & Switch, Cambria (2020)
- gitattributes custom merge drivers and
git merge-file: regenerate rather than hand-merge, as with lockfiles - Dolstra, The Purely Functional Software Deployment Model (2006); Bazel remote caching
- Language Server Protocol; Hypothesis; W3C Web Annotation (selectors: quote, context, position)
- SCIP and LSIF monikers: symbols named by package and path, which a rename breaks; git rename detection (
-M,--follow) - Webmention (W3C Recommendation, 2017): a ping that says where to look; ActivityPub, by contrast, pushes into inbox servers
- Hypothesis fuzzy anchoring (quote, prefix, suffix); Mozilla Readability; the Wayback Machine
- Greshake et al., "Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection" (2023)
- Anthropic, "How we built our multi-agent research system" (2025): an orchestrator writing briefs for subagents; Chroma, "Context Rot" (2025)
- git's fetch negotiation (have/want); Macaroons: attenuation, here applied to context
- Mokhov, Mitchell, Peyton Jones, "Build Systems à la Carte" (ICFP 2018): early cutoff, constructive traces; Nix RFC 62, content-addressed derivations; Nix fixed-output derivations and GC roots; the Reproducible Builds project
- BBS signatures (IETF draft); Morris et al., "Text Embeddings Reveal (Almost) As Much As Text" (2023); OpenTimestamps
Proof and budgets
- Bend 2 (bendlang/bend): laws and proofs, dependent and affine types, C, Metal, CUDA and JS targets;
WONTFIX.txt;bend2/comp.ts, the C and JS lanes - Lean 4; Plausible, Lean's property testing; Quint and TLA+ for protocol model checking
- AWS, "How We Built Cedar: A Verification-Guided Approach" (FSE 2024): a Lean model, proofs, and differential random testing against Rust
- Ko, Zan, Hu, "BiGUL: A Formally Verified Core Language for Putback-Based Bidirectional Programming" (PEPM 2016, verified in Agda); Foster, Pilkiewicz, Pierce, "Quotient Lenses" (ICFP 2008)
- The new repo: kgruel/strange-loops-next, with PRs #1 (layer 0), #2 (folds), #3 (KDL)
- RFC 8785's reference test data and number file (cyberphone/json-canonicalization); the SUPERCOP Ed25519 set via Go; the official KDL v2 test suite (kdl-org/kdl)
- Lean 4.35 core library:
List.Perm.eq_of_pairwise,Perm.foldl_eq',grind; Lake's--wfail - Go's
internal/package rule and workspaces (go.work) - Go's native fuzzing;
testscriptand txtar (github.com/rogpeppe/go-internal), from thegocommand's own tests - Go's
apidiffandgorelease(golang.org/x/exp): API-compatibility checks for the surface budget
The Rust build
- Cedar (AWS): a Lean model with proofs, a Rust implementation and differential random testing between them
- UniFFI (Mozilla): Swift and Kotlin bindings from one Rust core, as used for Firefox's application services
wasm-bindgen: the core as WebAssembly for pages and browser extensions- RustCrypto
sha2anded25519-dalek: the core's two allowed dependencies cargo public-api: the surface budget's snapshot difftrycmd: CLI scenarios as scripts with expected outputcargo-fuzz: libFuzzer targets for differential fuzzing against the modelcargo-zigbuild: cross-compiling the CLI with bundled SQLitesecurity-framework: the macOS keychain without C glue
Second opinion
- Gemini, a review of version 11 (20 Oct 2026): the store, display and transport triad; seams in caching across vertices, Upsert forks, minting on a miss, breadth in the build, weighted Latest,
prevas a set,git:keys and splits; SKOS left in the example. Its account of turns 31–33 was off: "we don't need it" (turn 33) was aboutderived-from.
Sharing and keys
- Secure Scuttlebutt; Hypercore: per-writer logs replicated by comparing positions
- Keybase device provisioning; Signal linked devices; Matrix cross-signing; did:plc rotation keys
- SSH certificates; Sigstore (Fulcio): short-lived keys bound to an identity
- ssh-agent; 1Password SSH agent: signing through a socket with approval
- WebAuthn / FIDO2: user-presence flags in signed data
- RFC 8032 Ed25519
The conversation, turn by turn
1 · Rewrite in another language?
kyle
Consider rewriting from scratch for a cleaner, faster implementation. Back-compat not needed; a clean, portable, easy-to-install core is.
claude
- About 77k source and 115k test lines; the model is small and the folds are a closed vocabulary.
- Conformance vectors already anticipate another implementation.
- Ledger: costs are algorithmic; a language fixes cold start, not replay-on-open.
- Lean Rust, Go credible. Expand vectors first, core library before CLI, guard against re-accretion.
2 · Arrival got out of hand
kyle
The early CLI was workable for agents emitting during work. Arrival began from sharing repo knowledge at work (process, history, decisions up to ADRs) via git or JSONL, and tried to be mergeable by default. The library is the product.
claude
- Single-writer custody vs a multi-writer problem; receipt order breaks convergence.
- Merge as set union; fold on content order with checkpoints.
- Let git handle custody for the team case; per-observer JSONL; SQLite as a disposable index; facts reviewed in PRs.
3 · The full topology
kyle
Hand-built stores (a novel, an auth RFC), ingestion stores (newsletters, RSS, subreddits, likes, Safari history), composition into a salience feed, personal-life stores, and ticks in agent orchestration with lossless fidelity. Arrival tried to be git-storable without being git-only.
claude
- Three relationships: compose, bridge, replicate. Most stores have one writer.
- Immutable content-addressed facts and blobs; single-writer segments; derived index.
- Composition makes content order mandatory. Ticks as content-addressed seals; references as a privacy boundary.
4 · Keep it conceptual; build a diagram
kyle
Ticks reference facts by nesting; each tick contains everything within. Start at the top and build a diagram progressively.
claude
- Layers 0 to 5. Layer 0 commitments: observation not truth; immutable; append only; meaning unknown to the record.
- Questions: set or sequence; who observes when a collector writes.
5 · Set; are ingested facts observed?
kyle
Set. Receipt order is where things went off the rails. Maybe ingested facts are unobserved until acted on through the salience lens.
claude
- Pushback: that hollows out the observer and puts observation in the lens.
- Collectors observe records (hearsay). Things vs facts. Salience as a fold over observer sets.
6 · ts is overloaded
kyle
ts should be emit time with an optional settable time. Collectors are dumb observers. Observations about observers depend on who makes them.
claude
emittedandoccurred; "ordered twice" now lives in the fact. Fold axis is declared by the spec.- Observers are things. Proposed a bridge-as-observer (later revised).
7 · Spans, observer envelope, vertex as bridge
kyle
Optional span, possibly coarse. Observers are first-class things with defined aspects; a name@ style was discussed before. Send an agent to ground it. Isn't a vertex the bridge?
claude
- One EDTF-style span field; duration vs imprecision; claim at write.
- Option A: ticks flow into vertices directly. The reviewer's judgment is an observer's fact.
- Agent report on observers in code (see Observers tab).
8 · Ticks are facts; an archival standard
kyle
A tick is conceptually a fact that references or contains the facts below it; it should carry data and be sendable to a remote store at full fidelity. An archival standard from earlier research was close to this model. Prefer adhering to specs.
claude
- One envelope, two variants. Reference vs bundle is transport.
- EDTF is ISO 8601-2, not an RFC. PREMIS, PROV, OAIS, RiC. Specs table.
9 · Prior art for namespacing
kyle
Delegation with key signing led to an OBO design with authorization details, and "endorsements": bounded authorization from others with a durable key store, being implemented at work.
claude
- Three concerns: naming, key binding, authority.
- Kerberos, WebFinger, NIP-05, Matrix, SPIFFE, AT Protocol; Zooko, petnames, SDSI, SSB, Keybase, DIDs; RFC 8693, RAR, capabilities, NIP-26.
- Endorsements as records; authorization as a vertex; the revocation-time caveat.
10 · Agent identities that change
kyle
Agents started generic, chose names, emitted identity observations folded into a system prompt with salience and periodic stale reviews. Fable mistrusted the unprovenanced store, made its own key, and adopted prior observations it agreed with. Leaning toward stable ids under names.
claude
- Identity as continuity; lineage ids from genesis hashes;
observerplusas. - Adoption as honest retro-claiming; stances as one record shape.
- Spaced repetition as a boundary; trust root at genesis; open questions on forks and model swaps.
11 · Capture it as a page
kyle
Make an artifact of the discussion: tabs for mobile, rich with diagrams, all source material, concise on top and unfolding into sources.
claude
- This page, version 1: nine tabs, Unfold → Source layering.
12 · Does AT Protocol allow delegation?
kyle
Reviewing the observer options, delegation seems necessary. Does AT Protocol support it?
claude
- No: it delegates account access, not one identity acting for another; records carry no actor.
- Take rotation-vs-signing keys, scopes as schemas, service auth, verification records. Look to KERI, Matrix cross-signing, RFC 8693
act, UCAN/Biscuit for the chain. - Split delegation into key binding, authority, attribution; optional
underpointer.
13 · How to handle observer naming
kyle
What's the best way to handle the naming effect?
claude
- Names never take part in matching. Four forms: lineage id, self-name, petname path, home-qualified.
- Lenses render names; input resolves them;
ObserverDeclsplits into four records; zero-config first emit.
14 · Delegate to self; realms that grow
kyle
A Claude delegate from the harness later grows its own identity and acts as itself. And realms: per-store at first, then a homelab of topologies, plus work.
claude
- The delegate is a shared seat; Wren starts a new lineage that descends from it and adopts. Identity doesn't widen authority.
@homenames a name table; joining adds links, never rewrites. Work is an ownership boundary; separate lineages; compose across.
15 · Compose across every realm
kyle
Compose makes sense for any cross-realm store or transfer, employer or not. Update the page, with progressive scenario diagrams.
claude
- Boundary rule: compose by default, bridge as explicit signed tick, never replicate. References cross; content doesn't.
- This version: a Scenarios tab built up in seven steps.
16 · Layer 1 from the top
kyle
Walk layer 1 from the top.
claude
- The contract: same set and spec give the same state anywhere.
- A vertex is a question; selection only on what records carry; declared time axis; content vs operational boundaries; verifiable ticks; fold vs lens.
17 · Then how is a store defined?
kyle
Focus on the vertex definition. How would store be defined?
claude
- Identity (genesis), declarations (records in the store), residence (per machine). Names resolve like observers. Discovery like
.git.
18 · Declarations as a store's type
kyle
Observers and stores both establish lineages. Declarations could define a mature or locked-down store, a schema without migrations, and end the drift of scattered project vertex files.
claude
- One life cycle: genesis, then records that fold into the current self. Accretion (Datomic, "Spec-ulation"). Maturity ladder; strict means not admitted, not impossible.
19 · Progressive summary
kyle
Summarize vertices and stores progressively.
claude
- One sentence, one paragraph, the model, decisions and open threads.
20 · Multi-store vertices
kyle
Add it to the page. This resolves the salience feed: a vertex declares the stores and kinds it reads, collates, folds, and can send the result to another store.
claude
- Yes, with
asmapping store-scoped kinds; thing identity becomes central; writingintomakes the vertex a writer there; across realms,intois a bridge. - This version: the Vertex & store tab.
21 · Novel, orchestration, team store
kyle
Consider the novel, task orchestration, and the git-shared multi-repo team store: personal observations from developers, or a central store weighted by experience (20, 14 and about 3 years).
claude
- Novel: order by a declared field. Orchestration: specs as templates, vertices as instances. Team: shared store in git plus personal stores, promotion between them; no central ingest.
- Weights as records applied in a vertex. Pushbacks: tenure varies by domain; rank, never hide.
22 · Emit vs observe; promotion
kyle
Loose language on purpose. Is "observe" a verb and "emit" the primitive? The personal observation should travel with a promotion, depending on how it happens.
claude
- Emit and seal are the write verbs; observation is a noun. Constatives vs performatives; reserved kinds.
- Promotion modes: verbatim (the same record, by hash), restated, summarized, agent-proposed.
23 · Recurse before composition
kyle
Was that a real question? Is anything left in this section before composition?
claude
- Partly; "restated" reflected our narrowing, not evidence.
- Close with two points: the fold vocabulary holds with two parameters; state references form a DAG while ticks may loop.
24 · Close layer 1
kyle
Agreed. Update the page before moving on. Are we leaving open questions that will cause problems later?
claude
- This version: the Cases tab, layer 1 closed, parked questions moved to their layers, and an erasure risk raised.
25 · Ticks or identity first?
kyle
Verifiable ticks keep coming up. What pulls most?
claude
- Identity: it's where Arrival's pain lives now, it presses on the selection rule, and its answer changes what a tick seals.
- Ticks need only a reserved spec-hash field now. Found a crack: floats make Sum and Avg order-sensitive.
26 · What are things?
kyle
We're clumping too broadly: ingested items (log snippets, RSS, novel entries) vs system primitives that have lineages. A chapter has a lineage inside the store, which is itself a lineage.
claude
- Three categories: record, thing, primitive. Lineage alone doesn't separate them; who reads it does (the core vs vertices). Primitives have standing.
- Minted vs natural identity. Names for things reuse the observer naming system; mint on a name miss.
27 · A chapter as emitted records
kyle
Start a chapter by emitting it with metadata and references; edits append to the chapter.
claude
- The first record is the anchor; edits append to the thing, not the record. Renumbering, retitling and splitting survive. Reserve
*-genesisfor primitives.
28 · Draft granularity
kyle
Prose is re-emitted whole; other kinds change on their own without copying the prose. Diffs inside prose are a later question.
claude
- Facets: one kind about one thing, emitted whole; Upsert keyed by kind. Git packs compress similar snapshots.
prevmakes concurrent saves a visible fork.
29 · A departure from loops facts
kyle
Loops facts carried arbitrary kinds and were folded on specified fields. Is this a new primitive?
claude
- Identity moved from the fold to the record;
aboutis the primitive, facets aren't. The old model survives as the no-aboutcase. Claim vs question.
30 · Test it with diagrams
kyle
Show examples as diagrams to see whether it holds across the use cases.
claude
- This version: the Things tab. Six refinements; later links need no state;
resolve-byis the third state reference.
31 · Discipline in a semantic store
kyle
The suggestion vertex and the stale review fit. In an open model, disciplined convention is what makes a properly aligned semantic store.
claude
- The
owl:sameAslesson; SKOS mapping relations, onlyexactMatchresolves. - Four discipline surfaces, a hygiene vertex for each. Read-time admission lets discipline tighten later.
32 · How many identity concepts?
kyle
Count the identity concepts before deciding link vs provenance. Wary of bringing in too much; SKOS makes sense for search across combined records.
claude
- Two id forms, one naming mechanism, four pointers, three state references; the rest rides on
about. Three families: equivalence, provenance, succession. - SKOS as an opt-in vocabulary, not core. Watch the envelope, the on-ramp, and read-side sprawl.
33 · We don't need derived-from
kyle
It answers the question: we don't need it.
claude
- Not folded into
resolve-by(a different family); identity rides onabout, so it's a payload convention. - A field is on the envelope only if the core reads it.
prevearns its place if Latest follows chains.
34 · Drop emitted for a time-ordered id?
kyle
A convention, not a rule. UUIDv7 carries time; could emitted go, leaving occurred?
claude
- Not UUIDv7: the id must stay a content hash. Proposed a time prefix plus hash (AT Protocol's TID and CID). Corrected the RSS dedup claim.
35 · What before an update?
kyle
A nice set of updates. What else before updating the page?
claude
- Recap and the current envelope. Remaining: anchors a store can't read, which name table resolves input, and the envelope review of
asandoccurred.
36 · Field or id, again
kyle
Flip-flopping between emitted and time in the id. Pros and cons?
claude
- Same information, different visibility. Time in ids leaks through every reference across realms; sorting is an index concern. Keep the field and a plain hash.
37 · Update
kyle
Agreed on keeping it. Update, then see what's next.
claude
- This version: the envelope convention on Record; identity counted and discipline on Things; ledger, Open and Sources updated.
38 · Close composition; open layer 2
kyle
Close out composition and start layer 2, likely one of the harder ones.
claude
- Composition closed on three leans;
asdrops. - Why ticks exist; what a tick claims (computed, witnessed, asserted); content vs witness ticks; late records and the Dataflow model.
39 · Arbitrary ticks were something else
kyle
The split holds. Arbitrary ticks were either a selection of records or a fold; an incident is a fold over what the investigation turned up, with witness ticks along the way.
claude
- A selection is an emit; state is a fold; handoffs are witness ticks; resolution is a content tick. Today's
Boundarymodes already hold the split.
40 · Ticks end to end
kyle
Walk ticks across the novel, orchestration, the team store, an incident, and a personal feed: a recap of last month's HOA records before a board meeting.
claude
- The life of a tick; fourteen cases; the HOA walk. Marker records make content boundaries; verifiability depends on what the reader holds; not every vertex ticks.
41 · Re-seal or a new linked tick?
kyle
An ADR from 2019 revisited in 2026 is revisited from other work.
claude
occurreddecides: a revisit is a new tick citing the old. Sets are chosen by window, reference or witness; an ADR seals by reference. Parents seal ids, so cascades become flags.
42 · Edge cases
kyle
Anything left?
claude
- Tick envelopes per kind; window membership by span start; determinism across implementations; empty windows. Erasure reaches into tick results.
43 · Update, then residence
kyle
Agreed. Update, then move into layer 4.
claude
- This version: the Resolution tab; composition and resolution closed; Topology renamed; Open and Sources updated.
44 · Erasure: what is it for?
kyle
No erasure concept today, and Arrival went a little nuts here. Retraction is a status; the real concern is private data showing up in a store where it shouldn't be.
claude
- Erasure per store. The minimal set: salted payload hash, one
erasekind, references in tick results, a permanent envelope. Git honestly; prevention; rejection isn't erasure.
45 · What would true erasure look like?
kyle
Musing: keep the references, wipe the data.
claude
- Records commit to payloads; erasure forgets the opening. Three levels. References make derived data traceable. Limits: SSDs, other parties. SD-JWT and chameleon hashes at the exotic end. Salt per payload.
46 · The whole game
kyle
Per payload is fine: rewrite the records with the hash, throw away the key, done.
claude
- Records don't change; storage replaces the opening. It's a salt, not a key. The remaining work is finding. Erasure closed.
47 · Residence agenda
kyle
Update now, or one sweep after places?
claude
- One sweep. Leans on segment layout, the index, discovery and
places.kdl.
48 · Storage duplication
kyle
An SQLite index used for its feature set duplicates storage.
claude
- Index envelopes and offsets, not payloads; contentless FTS5, opt-in per kind; SQLite as the segment format for ingestion stores.
49 · Remixing places
kyle
This opens up what a place can be.
claude
- Location, format, scope; roles write, hold, blobs. Git as interchange, tiering, blob places, backups as places. Scope by
emitted.
50 · Defining stores
kyle
The vertex file used to define storage and search fields. How are stores defined now?
claude
- Four homes for what
.vertexheld.store.kdlas an editable lens over declarations;applyemits the diff.
51 · Updating a store is an emit
kyle
Arrival tried to keep everything inside the record itself. Updating store information is just an emit?
claude
- Yes, a performative one: standing decides; proposals for free; one changeset per apply; records judged by declarations in effect at
emitted.
52 · A worked example
kyle
The layout matches. Build a pseudo-example across the use cases to see it in a more mature form.
claude
- This version: the Residence and Example tabs, residence closed, sharing up next.
53 · One store or a realm?
kyle
In the example, is home one store holding everything, or a realm of related stores?
claude
- A realm: a small
rootstore holds the name table and cross-store vertices; each other store keeps its own genesis, definition and places.
54 · Root, and how it composes
kyle
Root works; add a slight explanation of the composition.
claude
- Example renamed to
root; "How the realm composes": membership is a link, names at two levels, cross-store work in root, why not one big store.
55 · Layer 5: sharing
kyle
Ready for layer 5. Each layer is taking less effort, which feels right.
claude
- Union compared by segment lists; git without
merge=union; delivery isn't trust; signing by default; retire through. Nothing new needed.
56 · Signing and keys
kyle
Those hold up. How do automatic signing and key storage actually work?
claude
- Lineage id pins the root key; device keys per segment; sign the id, outside it; keychain or file; pairing; stores carry their writers' bindings.
57 · The agent situation
kyle
Is there any way to approach the agent problem?
claude
- Three threats. Session keys retired at close; presence for standing changes; where the agent runs decides the rest.
58 · Presence for durable acts
kyle
I like a Touch ID or elevated request for anything that changes something durable, versus just an emit.
claude
- The test: takes effect because of who signed it, or can't be undone. Grants are presence ahead of time; a presence key per device. This version: the Sharing tab, layer 5 closed.
59 · The build questions
kyle
Let's start on the build questions.
claude
- The Build tab predated most layers: old vectors test the old model, time-ordered ids are gone, signing moves to the start. Rust held while bindings mattered.
60 · Go, and what else exists
kyle
No Python compatibility, a new repo from scratch. Go compiles to one binary and it's done. What other options fit?
claude
- Go, Rust and TypeScript compared. Go fits once embedding stops mattering: the format lets any language write records. Migration is a collector.
61 · The novel front end, and WASM
kyle
The novel used the Python SDK over JSON. Can Go do the same, or is Rust better because of WASM?
claude
- Yes:
loops serveover JSON. WASM runs library code inside a page and matters only with no local process. Go settled.
62 · Get creative
kyle
Stretch before the toolchain constrains us.
claude
- Ideas grouped by mechanism, and six commitments that need allowing for before building.
63 · All of them pull
kyle
The lens aspect most: materialized docs, with edits applied back. Also the LSP, static hosting, annotation with friends, stores with things, Nix for knowledge.
claude
- The lens walk: render, parse, apply; base in front matter; CI checks the law. Every idea uses five mechanisms.
64 · Selective disclosure and siftd
kyle
siftd gathered session logs; I wanted to push prompting history to a team store without sharing everything.
claude
- Split by disclosure when recording; five levels; withheld looks like erased; open on request; what can and can't be proven; embeddings leak.
65 · Horizons on the page
kyle
Horizons needs more cases, but update now since it covers disclosure.
claude
- This version: the Horizons tab, the Build tab rewritten for Go, ledger and Open updated.
66 · A second opinion: progressive identity
kyle
Shared Gemini's review of the page. Its last turn: the maturity curve inverts the database lifecycle; resolve-by is pure connected components; associative links are multi-subject about; things mature from payload strings to keys to anchors.
claude
- Mostly a clean restatement. Real: the page mixed
same-as(Things) and a SKOSmatch(Example); dropmatch. - The director's record did two jobs: a dispute and a note about both.
- An open store's miss should write a key, not mint. Pushback: payload-only topics don't roll up through
resolve-by. - The triad fits; our opinion lives in standing, not transport.
67 · The rest of the review
kyle
The earlier turns: seams in checkpoints, Upsert forks, minting, build breadth; weighted Latest, prev as a set, git: keys, splits. Thought we'd decided against SKOS.
claude
- The record: you liked SKOS for search; "we don't need it" was
derived-from. The example did present opt-in as default. Drop it either way. - Six of eight seams real, two of them contradictions on the page: weighted Latest, and
prevas one pointer beside "both heads asprev". - Pushback: a synthesis must not set
prevon others' testimony; a path is a name, not a natural key, so neithersame-asnor matches fit renames.
68 · Make the changes
kyle
A good set of changes; do it.
claude
- This version: SKOS out, a mid-flow referencing section and a matching table in Things,
prevas a set with heads,weight-byoff Latest, the lens rule for testimony, paths as names, whole-vertex caching.
69 · Which case next?
kyle
Working the LSP end to end will turn up the most difficulties and edge cases.
claude
- Agreed: the only case where the thing changes underneath the record. The others reuse built parts; web annotation shares the LSP's anchoring problem.
- Model edges: names assume one timeline but code branches; anchor granularity; ranges; uncommitted code; records in the same PR. Tooling edges: latency, rename heuristics, composing stores. Start with branches.
70 · One detailed walk
kyle
Let's try one detailed walk.
claude
- Birth keys along each branch's history replace paths as dated names;
seengives staleness. - One writer on two branches broke the segment rule: files close once committed. Squash and rebase repaired by the merge job's
same-as. A commit can't hold records about itself.
71 · Capture the walk
kyle
Fold it in, and capture the walk itself so it isn't lost.
claude
- This version: the walk in Horizons, step by step with a diagram; ledger, Residence, Sharing, Topology and Open updated.
72 · Walk web annotation
kyle
Walk web annotation, with static hosting and sharing with others: a federated commentary.
claude
- Mostly assembly. Keys computed by tooling when writing;
seenas the version read; selectors shared with code ranges. - Publishing is a declaration (presence), a public store a standing bridge; closed segments named by hash make static stores cacheable forever.
- Federation is own stores plus composition; replies carry the root; pings say where to look. Admission filters spam; aggregators can hide, never forge. Others' words stay home.
73 · Fold it in; update the open items
kyle
Please do, and update the open items from what the walks are finding.
claude
- This version: the web annotation walk in Horizons; four ledger entries; presence covers declaring a store public; the Horizons open items rebuilt from both walks, plus publishing and the LSP's history index.
74 · Context by tick, in orchestration
kyle
The interesting case is orchestration: a tick goes through a lens per stage (session start, review). Walk getting a tick, unpacking it, and hitting references or facts that aren't accessible.
claude
- One tick, many renders; bundles carry what the receiver can't fetch, filtered by its grant.
- Five reference states, missing shown as missing; unreachable merges private and lost. Provenance into the agent's context; model summaries are records, not lenses.
- A session witness tick of what it knew; review shows blind spots. Closed dev2's question from the LSP walk.
75 · Fold it in; handing things over
kyle
Fold it in. The house case might widen to any physical item, or a service handed to another team: perhaps the same concept, and a restricted tick in many ways.
claude
- This version: the context walk in Horizons, four ledger entries, Open updated.
- Handing over: custody, history, continuity. "A restricted tick" fits history; custody is standing, not a tick.
76 · Table the handover; the whole pipeline
kyle
Table the handover. Widen the walk: a design thread like this one emits findings, a boundary creates tasks, a shallow orchestrator routes them, a manager in the cloud gets the full bundle with provenance and briefs subagents, who can ask for more.
claude
- Findings are the compression, turns the evidence; judgment moves upstream; triage is a record.
- Up by value, filtered; a cloud run is a borrowed place; have/want. The place holds everything, each agent sees a brief (record plus tick); context attenuates with authority; requests climb and don't block.
77 · Everything comes home
kyle
All the subagents' turns, tool calls and edits should come back too: a full record of what happened, in my own stores.
claude
- Up is a disclosure; down is a homecoming, plain union. Two observers: collector for transcripts, session for claims. Blobs for tool results, git for edits.
- Completeness: sync at every seal, append-only segments, retire through what was received.
78 · All three as one update
kyle
Do all three as one update.
claude
- This version: the context walk in three parts (one handoff, design thread to cloud run, the return), four ledger entries, the handover tabled with its framing, two new Open items.
79 · Nix and Bazel for knowledge, unpacked
kyle
Unpack Nix and Bazel for knowledge; I hadn't considered it at all.
claude
- Hash everything that goes in; fetch instead of compute; trust the signer or recompute. A fold is already pure, so Loops fits.
- It turned up early cutoff, the key including the fold and the lens, renders as private as their inputs, the purity line, GC roots. Worth it for static readers, cold starts, agents and verification.
80 · Early cutoff, and privacy as a boundary
kyle
The key holding the code is what I tried in Arrival by pushing everything into the store ahead of time. Unpack early cutoff. You can't have true hidden privacy here; that's fundamental, so state it. Add it all to the page.
claude
- Two names per result: an input key to look it up, a result hash to name it; downstream keys on results, so work stops where results stop changing.
- Name it, don't carry it. Withholding, not hiding, stated in Sharing as settled. This version: the build walk.
81 · Where are we, and what's pulling?
kyle
Where are we overall, and what's pulling for you?
claude
- Layers closed; the last four walks added nothing to the core, so more walks yield less, and the risk shifts to the page outgrowing anything that tests it.
- Pulls: break the editable lens on purpose; then the "won't do" list and the budget; then the local API. Then start building.
82 · The editable lens, adversarially
kyle
Agreed: the lens walk, then the boundary list, budget and structure, then build with this as the grounding.
claude
- Eleven attempts to break
adr-12.md. The base is (tick, lens hash, audience); a committed render is a promotion; committed lens files are pure renders; absence is never an edit; edit rights follow authorship; apply is one transaction. - Free-form docs stay one body facet; order moves to the container. The record didn't change.
83 · Fold it in; tabs for Horizons
kyle
Add it, and give Horizons its own tabs, one per example, instead of scrolling so deep.
claude
- This version: Horizons in seven tabs (overview and six walks, with next and previous at the bottom of each), the lens walk, the revised lens contract,
book-orderin the novel example.
84 · Draw the boundary list
kyle
Let's draw the boundary list next.
claude
- Four tiers: not the model, not in the core, not yet with triggers, outside by design; a rule for entering the core.
- Three to settle: a query language, encryption at rest, spec predicates.
85 · No query language, no encryption; predicates?
kyle
No query language: use a SQLite store and query that. Encryption at rest would add enormous complexity. Unpack spec predicates.
claude
- Predicates live in parse pipelines, boundaries and selection, and had reached regex, lambdas and shell commands; the one real vertex uses kind alone.
- A closed typed set; RE2 and JavaScript disagree on regex; classify by recording, not by predicate. Parse to collectors,
rundropped, logic-less templates.
86 · Agreed; the parse pipelines go
kyle
Agreed, and getting rid of the parse pipelines too: early craft that stayed long past its usefulness.
claude
- This version: the boundary list and the closed predicate set in Build, three ledger entries, the "won't do" item settled.
87 · Budgets beyond lines; a state machine; Bend 2
kyle
Does the budget have to be lines of code? A token budget per file, maybe. Should we build a full state machine, or look at Bend 2 for parts of this? Going for creative and ambitious.
claude
- Measured the old repo: about 765k tokens. Four budgets instead of one: context in tokens per package, surface, vocabulary, imports; growth only through the ledger; a regenerability test.
- No state-machine framework: the fold already is one. Bend 2 as a proof oracle writing the vectors, not the implementation; a time-boxed spike.
88 · Fold it in; could Bend compile to Go?
kyle
Yes, add it. How hard would a Go compiler for Bend be?
claude
- Read
comp.ts: a Go lane would follow the JS lane, an emitter, runtime and effects of roughly 1.5k to 2.5k lines. The catch is trust: proofs cover the source, so vectors would check the Go anyway, and it would be a fork. - This version: budgets and the spec stack in Build, three ledger entries, two Open items.
89 · Lean 4 instead? Lenses too?
kyle
What if Lean 4 were the prover? Does it make sense here, and could we prove lenses as well?
claude
- Lean over Bend: Cedar already runs this pattern at scale (Lean model, proofs, differential testing against Rust); tactics, bytes, maturity.
- Lenses: yes for the syntax we own: no-op and put-get per combinator, normal form, nothing dropped, escaping. Not CommonMark at large, editors or adapters.
90 · Model first; a testing strategy without unit tests
kyle
Do it: starting with this from the beginning would be a huge help, a way to extend scenarios as the Go grows without relying on tests. I dislike unit tests and prefer full end-to-end testing; Lean seems to take the unit tests' place.
claude
- Yes, with the model leading by one step. Four checks: proofs, vectors, differential fuzzing, scenarios; tests touch only what users touch; every failure becomes a case; the walks become scenarios.
- This version: Lean in the spec stack, the lens laws, a testing section, step 0 in the sequence, two ledger entries, two Open items.
91 · Lay out the repo
kyle
Let's lay out the repo structure next.
claude
- Two Go modules instead of one: a core with no requires, so the import budget enforces itself; everything under
internal/behind packageloops; Lean twins per package; vectors as a pure render of the model. - Asked: two modules, the name,
.loops/.
92 · Two modules, strange-loops, .loops/
kyle
Two modules is fine, keep strange-loops, and yes to .loops/.
claude
- This version: "Repo structure" replaces Packaging in Build, with the tree diagram, the rules it enforces, package budgets and the step map; two ledger entries; the Lean model's home settled.
93 · Rename the old repo; start step 0
kyle
Rename the old repo and start step 0.
claude
- Step 0 done: Lean model, proofs and 23 vectors, with CI that checks the proofs and fails on vector drift. The set decides; Count needs dedup; the keyed-section lens laws hold.
- The rename needs you: no tool here renames a repo. This version: the spike adopted, laws marked proved, step 0 done.
94 · A new repo instead; how far tonight?
kyle
Start a new repo; I can rename and swap later. If I went to bed, how far could this go before we need to sit down together?
claude
- Step 0 pushed to
strange-loops-next, CI green. Overnight: step 1 end to end, the KDL parser, more folds in Lean; stop before step 2, whose decisions are taste (the local API, the CLI, spec syntax, the layout on disk).
95 · Go ahead, with PRs
kyle
Continue as described, using PRs. Looking forward to discussing with some code to talk about.
claude
- Three stacked PRs: layer 0 (model, Go, JS writer, budget checker), Latest, Sum, Min and Max in Lean, and the KDL parser. This version: step 1 in review, overnight choices listed in Open, numeric exactness to decide.
96 · Release the KDL parser on its own?
kyle
Go had no KDL parser? If we use ours, shouldn't it be released separately at some point?
claude
- Go has no finished KDL 2.0 parser, so yes, later: a public printer, nightly fuzzing, a README crediting the suite. First decide whether KDL belongs in the core at all. Noted in Open.
97 · A take on the PRs
kyle
The PRs look clean. What's your take?
claude
- The plumbing is good; package
loopsisn't designed yet. Two leaned choices matter most: refusing unknown envelope fields, and the id's preimage. Two of four checks are live. Merge in order; the API walk is next.
98 · The API walk
kyle
Agreed on pure functions plus a handle, specs as data (KDL is just a lens), JSON-RPC, refusals and an envelope version. Watching probably isn't core.
claude
- The core gives a checkpoint;
servedecides when to look. Walked dev2's hover: identity-aware reads go throughFold, and the handle is a realm.
99 · A vocabulary pass
kyle
Before going deeper, a coherence pass on the vocabulary: much of it came from strange loops. Keep standing, drop fact. Keep vertex: it's where loops meet, and nothing else names it.
claude
- One word per concept. This version: the Glossary tab; renames across the page, with the conversation turns left as they were; the API walk in Build; five ledger entries; spec's two meanings and Upsert's name in Open.
100 · Protocol, LatestBy, and seal
kyle
Protocol over spec, LatestBy over Upsert. The vocabulary is easier to say and explain now. Seal still feels off.
claude
- Seal suggests hiding or signing; a tick does neither. Tick becomes the verb too, like commit in git, and a tick covers the records it folded.
- The MCP walk: the handle narrows to a grant; withheld records come back erased; no tick tool, since agents emit markers;
Ticksplits fromWitness. This version: all of it, plus "who runs a boundary?" in Open.
101 · serve, remotely
kyle
How would serve work remotely? Does it need subscriptions?
claude
- No: the client holds its checkpoint, so
watchis a stream that resumes. Places pull; pings stay deferred. Content ticks run anywhere, since a second run makes the same id; witness ticks run where their key lives. This version: "who runs a boundary?" settled, a ledger entry.
102 · The CLI, and bulk emits
kyle
Drop the zoom; the payload syntax is clean. Does JSONL on stdin cover agents that need to emit a suite of records?
claude
- Yes, with two additions: a batch is one changeset, all or nothing, with
--streamfor collectors; and labels, as ingit fast-import, so records in a batch can refer to each other before their ids exist. This version: the CLI in Build, a ledger entry.
103 · Spec syntax and the layout on disk
kyle
Walk the spec syntax and the .loops/ layout, then revisit Go versus Rust.
claude
- KDL keeps only the last of repeated properties, so the page's
kind=… kind=…examples were wrong. Proposed: one node per clause, sets as arguments,wherewith six word operators, templates byparam. The layout: anchor, vertices, segments closed on commit, store and places files per machine.
104 · Is KDL still needed?
kyle
KDL was there for iterating on a whole combined vertex. Is it still needed? Other formats, other conceptions? JSON for simplicity seems better.
claude
- No: specs are small, closed and mostly written by programs and agents. JSON with a JSON Schema: no mapping layer, one schema for editors, agents and MCP, comments as a
notefield. Specs are records; with JSON the file is just the editing form from step 2. This version: Specs are JSON in Build, KDL out of the core, a ledger entry.
105 · Go or Rust, again
kyle
Honestly, the trend of Rust everywhere in AI work. And running inside a phone, or a browser extension, without a web app is powerful. JSON as the canonical format lends itself to that.
claude
- Reading in a device needs the core itself, and there Rust is clearly ahead: WebAssembly of a few hundred KB, UniFFI for Swift and Kotlin. A strict compiler is a fast verifier for agents; the closed sets become enums; Cedar is the same stack. Guards: a dependency allowlist, no
unsafe, noasyncor macros in the core. Switching costs a day now.
106 · Bring everything into alignment
kyle
A thorough page update: fold the decisions down, pull KDL out, and get it ready for a Rust build. Implementation starts in a new session.
claude
- Version 31: Build rewritten for Rust and reordered as a brief, with "Ready to build" first; a Cargo workspace, module budgets and an allowlist; the
.loops/layout; every example as JSON or CLI commands; the ledger folded from 92 entries to 33; Open pruned to what is open; the glossary's API words in Rust terms; sources for the Rust build.
107 · Two reviews, and the core model
kyle
Added a review compiled from Fable and Gemini Argon. Discuss what surfaced, particularly how to improve the Lean model and the core.
claude
- The model was ahead of the page: Upsert's step never needed content order, and its proofs already say late records fold onto cached state. Not every fold can be a small step, though: supersession can bring back what a bounded state threw away. So two families: accumulating folds are commutative; folds over heads keep the heads and work their answer out from them.
- The biggest addition: a payload is here, withheld or erased, and supersession reads only the envelope, so nothing replaced comes back. A
whereon a missing payload answers unknown, and results count what they couldn't read. - A content tick as a value, stored only as a signed tick record: no second envelope. With a vertex named by its spec's hash, vertex anchors and vertex standing go.
kyle
Agreed on all three; the tick as a value is elegant. Then on to the Lean proofs.
claude
- Version 32: the three decisions in the ledger, Vertex, Resolution, Cases, Example and Glossary; the Lean step 2 plan and four laws in Build; a proof policy; Open's decimal leaning and a pointer to the review's other findings.
108 · Back in sync, and the spec as data
kyle
On to the spec-as-data work. Didn't we rename spec to protocol? Are we getting out of sync with the PRs?
claude
- Yes. The normative prose became protocol; a vertex's spec kept its name. The repo still said
spec/, Seal and Upsert, because the rename had been left to the Rust port. One commit caught the model up. - The spec as data: a closed type parsed from JSON,
wherewith three answers, slots built from the two families. Payload tests must apply after supersession, or a filter brings back what was replaced. A labelled batch has one meaning.
kyle
Handle both: the PRs and the page.
claude
- PRs 1 and 2 merged, PR 3 closed with its branch kept, PR 4 opened for step 2's model. Version 33: Build and the ledger say where things stand, the laws table shows step 2 proved, and the decision on payload tests is recorded.
109 · What have we proven, and prev per thing
kyle
A deep think: what exactly have we proven? What edge conditions, races or assumptions could we be overlooking?
claude
- Every law says: for a given set, the answer is a function of the set. Nothing says the set is complete, current, trusted or well dated; those limits are now written down.
- Four holes, each reproduced against the model: envelope selection still ran before supersession; two places' forms of one record broke "the set decides";
prevwas global;aboutwas one key.
kyle
Per thing; global never made sense. A cross-thing prev shouldn't be allowed at all: it breaks a thing's provenance.
claude
- So you can only replace what you hold, in a shared thing:
emitrefusesprev-unknownandprev-unrelated, readers refuse a cross-thingprev. A record about several things is current in each; about nothing is its own thing. Who may replace whom is a hook for step 3. - This version, 34: the ledger, Build, the laws table and the Glossary say so; PR 4 carries the proofs and 94 vectors.
110 · What occurred can say
kyle
Unpack the EDTF subset before formalizing it.
claude
- The core reads
occurredonly to order and to window, so the test is whether a form names exactly one span. Dates, qualifiers, trailing unspecified digits and date intervals do; seasons, open or unknown starts and unknown ends don't. - EDTF has no durations and no times in intervals, so the page's own four-minute visit wasn't EDTF. Proposed: a closed grammar of our own, built from ISO 8601 and EDTF Level 1, kept narrow because widening later is free.
kyle
Calendar dates as UTC days. Start and end instants rather than durations, which is too much flexibility. Allow an open end. A span of no length first at a tie.
claude
- PR 11: the grammar in
protocol/record.md, its order proved a strict total order, a qualifier proved never to change a span, refusals asoccurred-not-span, andvectors/occurred/, checked by an independent JS reader.
kyle
Run the Astra and Argon reviews on the PR.
claude
- About 280,000 fuzzed inputs, no disagreement between Lean and JS. Both found that a year-0000 instant with a positive offset couldn't be rendered, and that three laws said more than they proved. Argon also found two invalid examples on the Example tab and proved the missing law: moments compare as exact decimals.
- Asked: render year −1, or refuse it? Is
2009/2009-06meant? Shouldwhereon a time compare whole spans or starts?
kyle
Render it. Yes. Starts.
claude
- Each law now says what its theorem proves, on the reader itself; years render signed; the prose names the date shapes, the day boundary, fractions and
:60; thewhererecord says tests compare starts, so a pair of bounds selects what a window does.
111 · Content order on real times
claude
- Next: the fold model's times become real. Where does a record without
occurredsort? Proposed: at itsemittedinstant, the rule windows already use.
kyle
A simple rule; go with it.
claude
- PR 12: fold records hold
emittedandoccurredas text with what each reads as; content order is span, thenemitted, then id, and its four laws keep their statements. Every changed vector kept its expected result.fold/latest-by/05never reachedemitted, since its records'occurreddiffered; it does now.
kyle
Run Astra and Argon before the merge.
claude
- Neither found a wrong expected result, checking every order-sensitive vector from the text. But the vectors couldn't tell the rule from three wrong ones: a record without
occurredsorting newest, spans compared by spelling,emittedcompared as text. A typo in a fixture's time would quietly drop itsoccurred. The review also identified an id text-order gap. Step 1 closes that gap with base32hex and a proved text-order law. - Proposed: ids compare as digest bytes, the rule times follow, meaning over spelling.
kyle
Settle them.
claude
- Fold ids are now written as layer 0 writes them, and their order is proved to be the digest's byte order;
Newer.congrproves the order reads nothing else, andLatestBy.winner_newerthat the winner is newer than every other head. Each fixture proves its times read. The tie vectors spell one time two ways, and each wrong rule now fails a vector.
112 · where on the envelope
kyle
Merge it, then pick up the 13 work.
claude
- PR 13:
env.<field>names every envelope field,erasesandunderincluded; a bare name is a payload field, so"kind"in awhereis now a payload field and every example saysenv.kind. A name the envelope doesn't have is refused, and so is an argument that doesn't fit its field. - Times follow content order's rule, meaning over spelling:
is "2026-10"matches2026-10-01/2026-10-31,at-leastandbelowcompare starts, and a record withoutoccurredpasses neither. Proved on the evaluator, and a deliberate break that compared only starts forisgot past the first vectors, so a day starting with the month joined them.
113 · Reviewing where on the envelope
kyle
Run Astra and Argon on it.
claude
- Neither found a wrong expected result. Both found wrong evaluators that passed every vector: five of the eight envelope fields never ran, a bare
kindstill read from the envelope, and envelope tests could run before supersession. Two laws read stronger than they were:where.typednever touched the parser, and nothing pinnedemittedto its own instant. - Proposed: refuse what can never match (
env.observer is "alice", when layer 0 refuses an untyped observer), repeated keys, an emptywhere, and latest-by withoutfollow.
kyle
Agreed on all of them. There's no reason to test a bare string against observer.
claude
- Parsing is proved to accept exactly the tests whose arguments fit their fields, and to render each back as written; a repeated key is refused where it repeats. Latest-by and collect following
prevare proved to return only heads, andemittedto read as its own instant. - A new run vector tests every envelope field, by several observers, with a revision, an erased record and a withheld one. Every mutant either reviewer wrote now fails a vector. One got past a count, since its two errors cancelled, until that slot listed the records it chose.
114 · A grammar for the spec
claude
- A second round agreed with every vector. What was left was prose that didn't determine the parser (which keys, which codes, which order inside
from), wrong evaluators that still passed (duplicates checked breadth first,limitbeforefollow, text summed as a number), and laws that claimed more than they proved. - Proposed: refuse
"kind": []and every empty name; letfrom'saboutchoose by thing, sor:Xtakes X itself; carry the spec as written where it repeats a key; correct the ledger onunreadunder a limit; and write the grammar down.
kyle
Go with the recommendations, and the spec, then a quick read by each.
claude
protocol/spec.mdis the grammar: the keys, the fourteen codes, and the order they are checked in. The specs the parser gives are proved to be exactly those that fit, each parsing back to itself. That says what it gives, not which JSON it accepts; a quick read by Argon caught the first wording claiming the second, which the vectors pin.- Slots over heads are proved to return only heads that
fromtakes and every test holds for. Of twenty-one new parse vectors, several break two rules at once, so only the written order passes; a new run vector hasfromtake a record about nothing by its own id, and a sum over text that reads as a number counts it unread.