Strange LoopsGrammarLawsEvidenceDecisions

Rendered from notes/2026-11-22-adoption.md in the repository.

On this page

The adoption step: AD1 to AD4

Put to Kyle in DECISIONS.md on 2026-11-22 and ruled on 2026-11-23, each for its recommendation with additions. The entries are kept here as they were put, with the ruling at the head of each. "Recommended", "today" and "not built" in the text are as written then. AD3, two details that the import's plan found open, was put on 2026-11-23 and ruled the same day for its recommendation. AD4, found by the first real import, was put and ruled on 2026-11-23; it is the last section. The ruling is recorded in the changelog under 2026-11-23. The step itself was ruled on 2026-11-21 (W1).

What the entries said of the step. You ruled on 2026-11-21 (W1) that the adoption step's CLI pieces are built beside the tick work. A worker planned them on 2026-11-22. The pieces that are the CLI's alone are being built: loops ls, a scan by the start of a name, a plain-text view with relative times, a --version, and the cache of checked segments (W2). Two pieces need you first. AD1 is one. The other is AD2, the import of your old stores as a shadow.

A trial before the ruling

Between the entries and the ruling, the coordinator imported a copy of four of Kyle's old stores into scratch stores, writing each fact as AD2's recommended column says. The stores are private; only counts are given here.

AD1: how a spec finds the stores it names

Ruled by Kyle, 2026-11-23: A and A, with two additions.

Question. A spec's from names a store for each source. Today the name is ignored. When a read may span several stores, how is a name turned into a directory, and what does a read answer when a name leads nowhere?

Example, run on today's binary. Two stores: workshop holds one task and one note, yard holds one task. One spec, morning:

from:  store workshop, kind task
       store yard,     kind note
fold:  items = count
Run inToday's answerWhy
workshop2It counts the task and the note it holds. yard is never opened.
yard1The same spec, another answer: it counts its own task.
workshop, with the one store name changed to no-such-store2A name bound to nothing is answered from the directory all the same.

What the answer should be is already ruled: a fold across stores takes the union of the named stores first and runs every source over it (the tick record note, section 9, and protocol/spec.md). Here that is 3: both tasks and the note, each record once. What is open is how the names resolve.

Options for finding a store.

A name meansCost
A (recommended)An entry in a per-user list of names and directories (~/.config/loops/stores.json). The spec travels between machines unchanged; each machine says where its stores are.You bind each name once per machine. Your existing specs name stores that are bound nowhere yet.
BA directory beside the current one with that name.Renaming a directory changes what a spec reads. Stores that live apart cannot be named.
CA path written in the spec.The path is part of the spec, so its hash, and every tick of it, differs between machines.

Options for a name that leads nowhere.

The read answers
A (recommended)Nothing on standard output, and a refusal that names the store (store-unknown).A missing store is never mistaken for an empty one. Needs the new refusal code.
BWhat the stores that were found give, with a note.The same spec gives another answer on a machine that lacks a store, as it does today.

What changes for you. Under A and A, a spec that names one store today keeps its answer once that name is bound to its directory, and refuses until then. I would bind the names your existing vertices use before the strict rule is switched on, and list them for you first.

Not asked. loops tick and loops tick --check stay on the one store in the directory. A tick across stores would cover other records and is its own piece.

AD2: how an old store becomes records

Ruled by Kyle, 2026-11-23: the recommended column in all eight rows, with four additions.

Question. The shadow import copies an old store into a new one, to be read beside the old tool. Each old fact becomes one signed record. Which record? The answers decide the id of every imported record, so they are yours, and they are cheap to change only before the first real import.

What an old store holds (the shape of yours; the values below are made up). A table of facts, each with an id, a kind, a time, an observer written as text, and a JSON payload. A vertex file says how each kind is read: thread by name, log collected. So three facts:

01ab  thread  2026-10-01 09:00  relay  {"name":"kiln","status":"open","message":"Repair kiln"}
01ac  thread  2026-10-03 16:30  relay  {"name":"kiln","status":"done"}
01ad  log     2026-10-03 16:31  relay  {"message":"fired the kiln"}

The old tool reads thread kiln as status done, message Repair kiln: a later fact of the same name overlays the fields it carries.

Example, run on the binary with the plain view (2026-11-22). The three facts written by hand as the recommended column below would write them (loops emit - --fill, with a key made for the import):

$ loops ls --plain
KIND    RECORDS
log     1
thread  2

$ loops ls thread: --fields name,status,message --plain
THING        HEAD KINDS  RECORDS  HEADS  name  status  message
thread:kiln  thread      2        1      kiln  done    Repair kiln

The second record names the first in prev and sets only status, so message still reads from the first. That is the old tool's answer.

The choices.

ChoiceRecommendedThe other way
1What a keyed fact is of. A kind the vertex reads "by" a field.The thing <kind>:<value of that field>, here thread:kiln. A later fact of the same name is a revision: it names what is live in prev and sets the fields it carries.Every fact a root of its own. Then nothing overlays, and each read needs a spec that groups by the field.
2A kind the vertex collects, or does not name.A root, as log above.A thing per kind.
3The order of revisions.The order in which the old store took the facts in (it keeps one). That is what the old tool's reading saw.The facts' own times. Two facts with one time need a tie-break, and a backfilled fact would land in the past.
4The times.The old time becomes occurred. emitted is the time of the import. A window on env.when then reads the old time.The old time as emitted: the record would claim to have been written then, by a key that did not exist.
5Who signs.A key made for the import. Every imported record says so in its observer, and can be told from what you write afterwards.Your own key. Imported and new records look alike.
6Where the old observer and the old id are kept.The old observer as a mention, observer:relay. The old id in a file beside the import, which also makes a second run write nothing. The payload is the old payload, untouched.The old id as a mention on each record, or both as extra payload fields. Extra fields change what a spec reads.
7The old ticks.Left out and counted. They are the old tool's own, and as kind tick the new check would call each "not a tick".Imported under another kind, for the record.
8A fact held by two old stores.Imported into each new store it was in, with the same salt and time for the same old id, from the import's file. Where the fact has the same history in both stores, the two copies are then one record, and a read across the stores counts it once. Where the histories differ they are two records; I will count how often that happens in your stores before the import.Imported once, into one store.

What I am not sure of, and will check before anything is built: whether your old stores hold kinds the vertex does not name, facts whose key field is missing, and payloads the new writer refuses (a number out of range, a repeated name). The import will count each and stop on the last kind; it will not guess.

Not asked. The import's verb and flags, its batches, and how the copy is compared with the old tool's reading are the implementer's. The old store is never written.

AD3: two details of the import

Ruled by Kyle, 2026-11-23: the recommended column in both rows. A fact of a kind the vertex does not name, brought in with --include-unnamed, is a root. The old time is kept to the microsecond. The build already followed both, so no code changed. Put on 2026-11-23 after the import's plan, and ruled the same day.

Question. A worker planned the import on 2026-11-23, and its plan found two places where AD2 does not say which record is written. Both decide record ids, so they are cheap to change only before the first real import. What should each be?

The build follows the recommended column until you rule otherwise. Nothing real is imported before you do.

The caseExampleRecommendedThe other choice
1A kind the vertex does not name, brought in with the flag. Your addition (d) leaves such facts out unless asked for. When you ask, what is each one?The workshop's vertex no longer names repair. The old store still holds two repair facts, both with name kiln: status open, then status done.Two roots, as row 2 of AD2 says for a kind the vertex does not read by a field. Nothing overlays: both facts can be read, and there is no thing repair:kiln.Keyed by name, as the store's other kinds are: one thing repair:kiln that reads done. In a read across stores this is a second history of the thing beside the store that now holds the kind: the case (d) was added to prevent.
2How fine the old time is. The old store keeps a time as a number of seconds with a fraction. It becomes the text of occurred (row 4).The stored number 1793610000.1234567. A number of this size can only step by about 0.24 millionths of a second.To the microsecond: 2026-11-02T09:00:00.123457Z. That is as fine as the number is, and it is what the old tool shows.To the nanosecond: 2026-11-02T09:00:00.123456717Z. The last three digits are an effect of how the number is stored, not a time anyone wrote.

Row 1, run on today's binary (written by hand both ways, with a scratch key):

as roots                              keyed by name
$ loops ls --plain                    $ loops ls repair: --fields name,status --plain
KIND    RECORDS                       THING        RECORDS  HEADS  name  status
repair  2                             repair:kiln  2        1      kiln  done
$ loops ls repair: --plain
(nothing: no thing is named repair:…)

What it costs to change later. Either row changes the id of every record it touches. After a real import, changing one means a fresh shadow store.

Not asked; the plan settled these under your rulings, and they go in the changelog when built.

AD4: references in the old payloads

Ruled by Kyle (with Neon), 2026-11-23: rows 1 to 3 as recommended; row 4 the other way, a clean payload; and one rule for old ids. The full ruling is in the changelog under 2026-11-23. "Today" and "recommended" in the text are as written then.

Question. The first real import, of the six homelab stores on 2026-11-23, reads as the old tool does in every field but one. But the old stores refer from one fact to another in two ways that the import, which keeps every payload untouched as AD2 says, carries only as text. Should those references also become mentions (about)?

The two forms, counted in the six stores (11,072 facts).

Example, run on both tools today. An invented old store, written with the old tool: a person potter, then a task kiln twice, first status=open owner=person/potter ref=thread:firing, then status=done ref=decision/glaze.

$ sl read workshop.vertex --json --all              (the old tool; the task's row, shortened)
payload  {"name": "kiln", "status": "done", "owner": "person/potter", "owner_ref": "01M858Z8H3HM…"}
refs     ["decision/glaze", "thread:firing"]

$ loops of task:kiln --plain                          (exported and imported with today's tools)
  owner      person/potter
  owner_ref  01M858Z8H3HM…
  ref        decision/glaze
  status     done
about        observer:clerk

$ loops fold mentions.json --plain                    (records that mention thread:firing)
records  0
The caseRecommendedThe other choice
1A reference in ref, kind:key or kind/key.It also becomes a mention, kind:key, on its record. A spec with "about": "thread:firing" then finds every record that referred to the thread, which the old tool counted as the thread's inbound references.Payload only, as imported today. Finding what refers to the thread needs a test on the whole text of ref, which cannot pick one reference out of several.
2An old id in a <name>_ref field, or in ref.It becomes a mention of the thing that fact belongs to, through the journal: owner_ref naming potter's fact gives person:potter. Every one of the 14,697 names a keyed thing.Payload only. The id names nothing in the new store.
3What a revision mentions. The old tool gathers ref across revisions and keeps the latest value of each <name>_ref field.Each record mentions what its thing refers to after it, read as the old tool would: every ref so far, and the current value of each <name>_ref field, but only its own observer. Then loops of task:kiln shows decision:glaze observer:clerk person:potter thread:firing. Written by hand that way today, both records count as mentioning the thread. It is also what loops emit does for a revision: run without --about, it copies the head's mentions.Each record mentions only the references its own fact wrote. The thing shows the latest fact's; all of them are a read over its records.
4The payload.Untouched, as AD2 ruled: ref, owner and owner_ref stay as written. The mentions are added beside them.Take ref out once its references are mentions, as the old tool did, and rewrite old ids to record ids. The payload is then no longer the old payload.

What it costs to change later. Rows 1 to 3 change the bytes and id of almost every record: 8,400 facts or more carry a reference. The six shadows written today follow the other column. Importing them again into fresh shadows takes about 3 seconds; nothing reads them yet.

Not asked. The comparison tool learns to compare the old tool's refs with a thing's mentions once this is ruled. A reference whose kind no vertex declares (4 of them) is still a valid mention and is treated as row 1 says. Facts without their key field (37 here) are roots under AD2 (c); the old tool does not show them, and the comparison counts them apart.