Strange LoopsGrammarLawsEvidenceDecisions

Rendered from notes/2026-11-21-order-of-work.md in the repository.

On this page

The order of work, and how we work: W1 to W6

Put to Kyle in DECISIONS.md on 2026-11-21 and ruled the same day, each for its recommendation. The entries are kept here as they were put, with the ruling at the head of each. "Recommended" in the text is what was recommended then. The ruling is recorded in the changelog under 2026-11-21. W7 (which choices come to Kyle) was ruled earlier that day and is in the changelog too.

W1: an adoption step before standing and sharing

Ruled by Kyle, 2026-11-21: option A, in parallel. The adoption step comes after ticks and before standing, and its pieces that touch only the CLI are built beside the tick work. The caching reader's law (issue #8) leaves step 4: it is stated when a caching reader is built.

Question. Should a step that makes the new loops your daily tool come before standing and sharing?

Example: a Monday morning. With the old tool you typed sl read project and saw each item's name and status. With the new loops today:

So the only daily users of the new tool are agents.

What the step would build.

Options.

OrderWhen you would be using it daily
APayload values, the tick record and a first tick, adoption, then standing with sharingAfter ticks
A, in parallel (recommended)As A, and the adoption pieces that touch only the CLI (ls, the prefix scan, the plain view, reads across stores, the shadow import) are built beside the tick workPiece by piece, from now
BYour order of 2026-11-10 as it stands: ticks, then standing with sharing. The adoption pieces stay "later work".After the two largest steps are built, with no daily use to test them
CAdoption first, then ticksSoonest. Ticks, which Recall and handoffs between agents need, wait.

I lean to A because the tick work is in motion: the laws are in the model and the codec is built. C is a fair choice too; the import needs nothing from ticks. Neon and margins-claude both support an adoption step before standing.

Neon's comments, and what I make of them.

Done when loops is first on PATH for daily work.

W2: remember which segments were checked

Ruled by Kyle, 2026-11-21: yes, in the adoption step.

Question. May a read skip the signature checks on a segment that this user's own loops has already checked?

Example. homelab-audit has 9,053 facts. Once imported, every loops command checks every signature before it answers: about half a second each time (measured: loops check over 9,000 records takes 0.53 s). A shell prompt or a chat hook that reads on every prompt pays that every time. Writing 2,000 records one emit at a time takes 145 s, because each emit checks all that came before.

The proposal (Neon's design; I think it is sound):

Options.

What it buys. Neon estimates a read of 9,000 records goes from about 0.6 s to under 0.2 s. That is an estimate, not a measurement.

Neon's comment. My first version of this entry left out the bullet about the version of the checking rules. Neon is right that it is required; it is added above.

W3: stop extending the JavaScript implementation

Ruled by Kyle, 2026-11-21: option B, as a trial for step 4. The JavaScript keeps what it has and passes its vectors; it does not grow ticks. It is looked at again when ticks are done.

Question. Each protocol piece is built three times today: in Lean (the model), in JavaScript, and in Rust, and a fuzz run compares all three. Should the pieces from ticks on be built in Lean and Rust only?

Example: the tick record. The last piece built the present way was the result codec: model/Loops/Result.lean, interop/js/result.mjs and rust/core/src/result.rs, then the fuzz generator taught about it.

The tick record is built inChecked by
A, as nowLean, JavaScript, RustThe three-way fuzz; margins-claude's Python from outside
B, freeze (recommended as a trial)Lean, RustA two-way fuzz; margins-claude's Python from outside
C, retire JavaScript nowLean, RustThe same, and the existing layers lose their third implementation too

Under B the JavaScript stays for everything it has today (records, folds, specs, the result codec) and is kept passing its vectors, the payload values change included. It does not grow ticks, standing or sync.

Views. Neon proposes B. margins-claude is against retiring it (C): JavaScript is what the in-repo fuzz compares, and its own Python lives in another repository and is not in CI. It has no objection to B as a trial for step 4, with the risk below. I recommend B for step 4 only, looked at again when ticks are done.

What B risks. When Lean and Rust disagree, no third implementation says which is wrong; the model wins by definition.

Neon's comments, and what I make of them.

What I do not have. A count of faults that only the JavaScript side caught; margins-claude has none either. If you want it before ruling, I can go through the fuzz reports for it.

W4: the refusal for input that is wrong twice

Ruled by Kyle, 2026-11-21: option C with Neon's guardrail. The protocol text and the vectors of a new step pin one fault each; for an input with several, the model's order decides inside this repository and is noted in the changelog.

Question. When an input has two faults, must every implementation give the same one refusal, and who chooses which?

Example. This slot has two faults, an empty field name and an unknown follow:

{"sum": "", "follow": "next"}      refused: follow-invalid at fold.total.follow
{"sum": ""}                        refused: fold-argument at fold.total.sum

The protocol pins that the first answer is follow-invalid and never fold-argument. All three implementations give exactly that. Neon counts about 70 lines of protocol text that pin such orders, and several of the orders came to you for a ruling. The same will come up for ticks: a tick that names a record nobody holds, and whose hash also does not match.

Options.

Why not B. The fuzz compares answers for equality today. Under B it would need to know every code that applies to an input, which is more machinery than following the model's order. Or it accepts "both refused" and no longer sees an implementation that refuses for the wrong reason.

Neon's comment, and what I make of it. Neon accepts C and adds a guardrail: keep the exact order as a rule inside this repository, between Lean and Rust, and do not write tables of tie-breaks into protocol/*.md that bind a reader written from the prose. I agree, and would rule it this way for new steps:

The cost: two readers written from the prose may name different codes for an input that is wrong twice. Both refuse it. The orders already pinned for records and specs stay as they are.

W5: the mutant check on every merge request

Ruled by Kyle, 2026-11-21: keep the check on every merge request. Step 4's mutants are added after its exit.

What it is. The mutation catalogue holds 314 deliberate faults, each tied to an exact line of the model. Every merge request runs a quick check that each one still finds its line, and that a sample of 33 are caught. The full run is separate and on request.

Example. Making value and n ordinary fields changes about 70 places in the model. Some of the 314 faults point at those lines.

Options. Keep it, or move it to the full run. Recommended: keep it.

Measured, 2026-11-21. The value and n change was the test: it touched 218 files and the model's record itself. 13 of the 314 faults needed work (8 re-pointed, 5 rewritten, none retired), and it took under five minutes, four of them the runner. So the check cost almost nothing on the largest model change so far, and it caught the 13 in the merge request that moved them. I no longer have low confidence: keep it.

Neon's comment, and what I make of it. Neon agrees, and adds: write no new mutants for step 4 until ticks have survived real use. So far every piece has added its mutants in the same merge request (nineteen for the result codec). I agree in part: while the tick record's shape is still moving, mutants tied to its lines would be re-pointed again and again. I would add step 4's mutants once its exit is met, a content tick recomputed to the same hash on two machines, and not wait longer than that. Say whether step 4's mutants wait for its exit.

W6: generated pages in the repository

Ruled by Kyle, 2026-11-21: keep committing out/.

Question. Neon proposes that the generated HTML under out/ stop being committed and be built in CI.

Example. A merge request that changes one law shows the Lean change and, below it, the regenerated out/ pages. A reviewer scrolls past generated HTML.

What stands in the way. Your site's sync script (projects.gruel.world/scripts/sync.sh) refuses to copy output that is not committed: "so every hosted revision is a commit you can check out and regenerate".

Options. Keep committing out/, or change the site's sync to build it. Recommended: keep. The rule in the sync script is a good one and the cost is noise in a diff.

Neon's comment. Keep, and mark out/ as generated in .gitattributes so that a merge request folds those files away. That costs nothing and suits either ruling, so it is done (2026-11-21). The other half of Neon's point, counts kept by hand in the roadmap, is done: the roadmap no longer holds them.

W3b: the frozen JavaScript, after ticks

Ruled by Kyle, 2026-11-23: option B, as the rule. The JavaScript keeps its layers and vectors and the slice comparison; new steps are built in Lean and Rust. "Today" in the text is as written then.

Question. You ruled W3 on 2026-11-21 as a trial: the JavaScript keeps what it has and passes its vectors, ticks are built in Lean and Rust only, and it is looked at again when ticks are done. Ticks are done. Keep it frozen, bring it up to ticks, or retire it?

Run today. The JavaScript checks every vector from before ticks and none of the tick vectors:

$ node interop/js/check.mjs vectors
result      23 files read   23 on disk    194 passed    0 failed
standard     8 files read    - on disk   4134 passed    0 failed
tick      131 files not run by JavaScript (W3)
7363 checks passed
$ node --test interop/js/*.test.mjs          50 tests, 50 pass

Both take about 11 seconds. A worker went through the whole history for this entry; the coordinator checked the numbers above.

What the JavaScript has caught, from the start of the project.

What the trial cost. Ten commits touched interop/js since 2026-11-21. Three were the payload-values update W3 included; six only recounted the tick files it skips as tick vectors arrived; one removed the sum limit. No CI run failed because of the JavaScript.

What it still does that nothing else does in CI. It is the second computation of which records a spec's answer depends on, beside the Rust (TK13): it agreed on 486 of 488 generated cases, and in the other two its set was smaller and inside the Rust's, as the keyed rule allows. With a dropped eraser planted in the Rust, that comparison caught it. margins-claude's Python does the same from outside, but not in CI.

OptionCostWhat the evidence becomes
BKeep it frozen, as the rule (recommended). New steps are built in Lean and Rust; the JavaScript keeps its layers, its vectors and the slice comparison.About 11 seconds of CI, and a recount when tick vectors are added. A fault in its existing layers is fixed.As now: 649 vectors three ways, 131 tick vectors two ways, the selector checked twice.
ABring it up to ticks.Three or four modules (spec hashing, the tick reader and writer, the check), 131 vectors to pass, and a third port of every later rule.A third tick answer in CI. The trial found no fault one would have caught.
CRetire it.Remove the CI job; replace the generator's use of it, the slice comparison and the evidence pages' JavaScript column.The eight older fuzz families compare Lean and Rust. The selector loses its second computation unless margins-claude's Python joins CI.

What it costs to change later. Little either way. B keeps every option open: retiring later costs what it costs now, and nothing new would be built on the JavaScript.

Not asked. The browser page planned on the JavaScript uses the Rust compiled for the browser, as W3 said; that is the same under every option. The roadmap and the laws page said all three implementations check every vector; since ticks that is not so, and both now say what is checked by which.