STREAM v0.1b direction: master design note
Lab: 2026-11-30-v0-1b-direction-claude · Started: 2026-11-30 · Iteration: 5 (see §17 for how iterations are recorded)
Status: Working draft. Nothing here is decided. Every item is a proposal for the owner, unless it says Decided with a date.
Builds on: the unfolding-replies lab, Stage C, derive_context v2, the direction-bit and Option 9 reports, the Reader A/B reports, and the verb-table work of 2026-11-29.
This note collects the new direction and the elements of a v0.1b kernel in one place. It will be revised in place; the changelog at the end records each iteration.
0. Summary
- Each of the seven position bits gets one meaning, the same for every relation.
- F, S and O are derivable from the entry and the reader's state by functions the kernel defines. By default they are also stored: the header carries the full 7-bit position, and the reader checks stored = derived. Header-only filtering on every bit keeps working (§1.2).
- Direction (D) means establish vs undo. The way something moves lives in the
from/toroles, so the header keeps a 1-bit direction field. - Positions are linked by three bit operations (undo, view from the other side, settle), which form an 8-element monoid. Citations between entries are checked with one or two bit operations.
- Anything an entry names is born at its first mention, owned by the acting principal. Strict modes turn this off.
- Kinds are classified by how they are used (a trait bitset), not by a list declared up front. Packs may declare; the plainest entry still works.
- One entry per transfer. The Books post both legs; holds use reserved balances; reversal is an undo.
- A log needs exactly two lines to start: preamble and GENESIS. Everything else depends on the use and is set by setup policies.
- The four relations are established as four operations, each with a law that can be tested (enclose, call, cross, and self-application of the log's distinctions). Behaviour follows from the laws instead of being written out per relation (§3.4).
- Phase is two bits, (opens, closes), separate from c. D closes a relation's standing; phase brackets the act; M marks uncommitted; the absence code marks a missing piece (§3.6).
1. The position and its bits
c = 64F + 32S + 16M + 8O + 2R + D 0 ≤ c ≤ 127 phase: 2 bits, outside c
| Bit | 0 | 1 | Question it answers | Stored or derived |
|---|---|---|---|---|
| F | frame | world | Does the entry enact the act, or report something seen outside? | derivable: has a source role? Stored and checked by default. |
| S | sign | substance | Is the affected thing a record (many places; an issuer may exist) or a resource (one place at a time; never issued)? | derivable: the kind's class (§7.3). Stored and checked by default. |
| M | fact | possible | Committed, or pending until a later fact cites it? | stored |
| O | self | other | Is the affected party someone other than the principal acted for? | derivable: owner lookup. Stored and checked by default. |
| R | in · is · may · to | membership · standing of a property · permission interval · quantity flow | stored (2 bits) | |
| D | into | out of | Establish, or undo an earlier entry (cited)? | stored |
1.1 The header's type bits: v0.1 against v0.1b
The v0.1 short header (docs/compact-header/bitpack-header-draft-v0.1.md §4) spends 11 bits on type: Position 7, Phase 2, Modality 1, Direction 1. If Position is the coordinate c, then Modality and Direction repeat bits M and D that are already inside it.
| Option | Type bits | Bits freed from the 30-bit short header |
|---|---|---|
| v0.1 as written | 7 + 2 + 1 + 1 = 11 | — |
| v0.1b, 7 bits checked | c (7) + phase (2) = 9 | 2 |
| v0.1b, 6 bits | R (2) + D (1) + M (1) + phase (2) = 6 | 5 |
Freed bits could widen the 12-bit time delta, which is where the open overflow question (X06, freeze gate G5) comes from: +2 bits gives 0–16,383 units, +5 bits gives 0–131,071. The extended header's 12-bit object/kind index is already the back-reference idea of §10 point 3.
1.2 Filtering cost: why the default stores all seven bits
Iteration 3. If F, S and O were only computed (the 6-bit option), every filter on them would need the reader's state:
| Where filtering happens | 6 bits, computed | 7 bits, stored and checked |
|---|---|---|
| Header-only scan of a raw log (the v0.1 draft's main reason for the header: "skip the payload unread") | F, S, O cannot be filtered; R, D, M, phase can | every bit can, one AND per line |
| A running reader with indexes | same cost: c computed once at append, kept in a sidecar index | same cost |
| Tools, shards or archives with no Register snapshot | must rebuild state first | filter directly |
| Writing a line | derive F, S, O (lookups already done) | derive F, S, O, then compare with the stored bits |
Proposed default: wire.type = 7 bits checked. The header carries c; the writer's reader derives F, S, O and refuses any line whose stored bits disagree. This changes the claim from "three bits are not stored" to "three bits can't lie". It still frees 2 bits from the v0.1 short header, because v0.1 stores M and D twice. The 6-bit form stays available as a compact profile for constrained links, where every reader keeps state.
Stored O is relative to whoever wrote the line, which is what notifications and the counterparty rule (§3.2) need.
1.3 The type in one byte
Iteration 4. v1's type is one byte (phase << 6 | code). The 128 positions were designed so that a position is one 7-bit ASCII code. Position plus phase is 9 bits, so they can't share one byte. The options:
| Option | The byte holds | Phase | F, S, O | Header-only filtering |
|---|---|---|---|---|
| A | c (7 bits) + 1 spare bit: a position is one ASCII code | its own 2-bit field, as in the v0.1 header | stored in c, checked | every bit |
| B | S M O R R D + phase (2) = 8 bits | in the byte | S, O stored and checked; F read from the source role (no state needed, but not header-only) |
every bit except F |
| C | R R D M + phase (2) + 2 spare | in the byte | all derived (needs state) | not on F, S, O |
Proposed: A. The type is c, which is one byte and one ASCII character; phase is a separate aspect field, as the v0.1 header already lays it out. The 9-bit (c, phase) value exists only as a query key in indexes and filters. It is never stored as one field. B is the fallback if phase must live inside the type byte. If source became one of the header's role-presence slots, B would also keep header-only filtering on F. Owner decision (§15 Q11).
1.3.1 Option A in full: two bytes, "what" and "shape"
Iteration 5. The v0.1 short header, without its duplicated Modality and Direction, fits two bytes exactly, plus the time delta:
byte 1 [ change | F S M O R R D ] what changes: the position c
byte 2 [ ext | opens closes | r0 r1 r2 r3 | estimate ] how the record is shaped
time 12-bit delta (or 14, using the 2 bits saved)
| Field | Bits | From v0.1 |
|---|---|---|
| change (high bit, byte 1) | 1 | Change |
| c | 7 | Position (Modality and Direction were duplicates of bits inside it) |
| extended-follows (high bit, byte 2) | 1 | Extended-follows |
| phase (opens, closes) | 2 | Phase |
| role presence | 4 | Role presence |
| estimate | 1 | Estimate |
| time delta | 12 | Time delta |
| total | 28 | v0.1: 30 |
- No new fields. Every v0.1 short-header field is kept; two duplicated bits are removed; the rest is byte-aligned.
- Two ways of reading the log. Byte 1 gives the relation views (transfers, permissions, undos, pending). Byte 2 gives the lifecycle and completeness views (open acts, records with missing roles, estimates, readings). One mask per byte, or both together.
- Compared with v1 (one byte: phase 2 + verb code 6, 64 verbs, meaning in a verb table): one more bit for the type and phase together buys 128 positions whose bits carry meaning.
- Printability is open (§15 Q12). A 7-bit value can be a control character (0–31). As binary that is fine; as text it needs either the reconciled control-character definitions or a printable mapping such as the v0.1 64-symbol alphabet.
Affected party, per relation: in → the member; is → the bearer of the property; may → the holder of the permission; to → the source book (from).
Actor: actor(e) = the for principal if present, otherwise the recorder. O compares against the actor. The recorder separately needs a record grant from for whenever rec ≠ for.
2. Derivation of F, S and O
F(e) = [ source ∈ roles(e) ] reads: the entry body only
S(e) = [ class(kind(affected(e))) = resource ] reads: the kind's birth record
O(e) = [ owner(affected(e)) ≠ actor(e) ] reads: the object's owner at this position
c(e) = 64F + 32S + 16M + 8O + 2R + D
- Every lookup reads the state before the entry, plus this entry's own births (§6).
- With the default wire (7 bits checked, §1.2), the reader compares stored and computed bits and refuses on a mismatch. With the 6-bit profile, the computed bits are used directly.
2.1 Resolving names
An entry names things in its roles: from: book:ops, member: invoice:2041, unit: EUR. Resolving a name means finding the reader's record for that thing as of this position: whether it exists, who owns it, its kind and class, whether it is live, its balance. The reader hashes the canonical name and looks it up in the symbol table (§10).
It must happen for every name, because nothing else in the pipeline can run without it:
- O needs the owner; S needs the class.
- Guards need current state: membership, balance, live grants, open pending items.
- Effects must update the right record.
- A lookup that finds nothing is how the reader knows the thing is being born (§6).
v1 already resolves names this way, for declarations in force and for rec/for authority. v0.1b adds no new lookups; it reuses them.
2.2 What a single line tells you
- With the default wire: the whole position, from the header. Checking that S and O are right needs the state as it stands at that position; reading them doesn't.
- With the 6-bit profile: R, D, M and phase from the header; F from the body; S and O need the state. v1 already needs that state to know what most verbs do.
3. Laws
3.1 Bit laws (arithmetic on c)
mirror μ(c) = c ⊕ 1 undo ↔ establish
view ν(c) = c ⊕ 8 the same act, recorded by the other side
settle σ(c) = c ∧ ¬16 pending → committed (= c − 16 when M = 1)
μ∘μ = id ν∘ν = id σ∘σ = σ μ, ν, σ commute pairwise
They generate an 8-element monoid, {id, μ, ν, μν} × {id, σ}. Every legal link between two entries is one of those eight. The structure mirrors Spencer-Brown's two axioms: crossing twice returns (μ, ν), and calling twice is calling once (σ). This is a parallel worth recording, not a derivation.
3.2 Citation checks
undo: D(c) = 1 → cites t, t live, c = μ(c_t)
settle: t pending and open, c = σ(c_t) if actor(e) = actor(t)
c = ν(σ(c_t)) if actor(e) ≠ actor(t)
3.3 State laws
| Law | Statement |
|---|---|
| Once | Every pending item and every live establishment is used up at most once (Open-items set). |
| Zero | A frame to entry's legs sum to zero per book and unit, by its form. |
| Single value | is holds one value per property. A new DECLARE replaces the old one; WITHDRAW leaves ⊥ (withdrawn). |
| Attenuation | A granted permission ≤ the granter's (actions ⊆, scope ⊆, validity ⊆, depth <). |
| Root | Every permission path ends at a genesis root. |
| Position | Type, guard and effect read only the state before the entry (plus its births). |
3.4 The four relations as four operations
Iteration 3. Stage 0 no longer lists the relations as a given set with a separately written effect for each. It defines four primitive operations, each with one law. A relation is the name of an operation's effect, and it earns the name by passing the law.
| Relation | Operation | Law (checked) | State structure it builds | Grade |
|---|---|---|---|---|
| in | enclose: draw a boundary with an inside | containment is transitive and irreflexive (nothing is inside itself); a resource has one place | a partial order (Struct) | law: checkable; the mark-boundary experiment already derives it from enclose |
| is | call: give a thing a value under a name | idempotent: calling the same value twice changes nothing; one value per name | an override map (Reg) | law: checkable |
| to | cross: move a measure from one side to the other | involution: crossing back returns (reverse = −δ); what leaves one side enters the other (legs sum to zero) | an abelian group (Books) | law: checkable |
| may | apply the log's distinctions to its own later lines | least fixed point: authority is the smallest set closed under the grant rules; every chain ends at a root | a closure over grants (Auth), read by guards | law: checkable; the name of the operation is open (§15 Q9) |
Two operational cuts give the 2×2 (DIGEST §3's grid, now as properties of the effects):
| builds structure (chains compose by closure) | attaches values (folded per key) | |
|---|---|---|
| a thing and its place or value | in | is |
| between two parties (granter→holder, from→to) | may | to |
The effect-law self-check runs next to the bit-law check at start-up, and in the conformance suite:
is : set(x,p,v); set(x,p,v) ≡ set(x,p,v)
to : post(t); post(reverse t) ≡ no change; Σ legs = 0 per unit
in : enclose(a,b); enclose(b,c) ⇒ a inside c; never a inside a
may : closure(grants) = T(closure(grants)), and is the least such set; every chain ends at a root
The order they unfold in from genesis (each needs the one before):
GENESIS mark log boundary L; inside = this log, outside = everything else; roots inside (trust supplied)
in enclose boundaries and members inside L
is call things inside get values
to cross measures cross between enclosed books; outside:<unit> is the outside of L
may self-apply the log's distinctions applied to its own later lines; GENESIS supplied the first
The other bits, read operationally:
| Bit | Reading |
|---|---|
| D | cross back: close the effect from this position on (exit, withdraw, revoke, inverse) |
| O | an in question: is the affected thing inside the actor's ownership boundary? |
| S | a record is a name that can be called in many places; a resource is an occupant enclosed in one |
| F | whose distinction it is: drawn by this log, or by another observer (the source) and reported in (§3.5) |
| M | indicated but not yet crossed: no effect until a fact settles it |
What stays stipulated: that these four operations exist (the kernel's primitives, note 05), trust in the roots, measure (units and quantities), and time (the clock). The words in, is, may, to are names given after the behaviour is established.
3.5 Observed and authoritative state
Iteration 3. F is made operational by where a line writes:
- Frame lines (F = 0) write the authoritative partition of the state: what this log enacts.
- World lines (F = 1) write the observed partition: what outside sources report, each tagged with its source.
- Drift is the difference between the two for the same object and property. Reconciliation is a frame line that cites the observation it accepts or rejects.
Guards read the authoritative partition. Views can show either, or both side by side.
3.6 Phase
Iteration 4; corrected in iteration 5. Direction approved by the owner 2026-12-01; the questions in §15 Q10–Q12 stay open.
What phase is. Two yes/no answers about the act itself, not about the relation:
| closes an interval: no | closes an interval: yes | |
|---|---|---|
| opens an interval: no | sample | end |
| opens an interval: yes | begin | instant |
An instant opens and closes at once. A sample does neither: it is a point inside something already open. The shape (four values from two questions) is forced; time itself comes from the clock supplied at genesis. That resolves DIGEST's "forced" grading of step 10 against notes 05 and 06: they were describing different things.
Separation rule. Each mechanism answers one question, so no event can be written two ways:
| Mechanism | Answers | Example |
|---|---|---|
| D = 1 | this established relation no longer holds from here | leaving a group: in, D=1, instant |
| phase begin/end | the act took time: it started here and finished there | a VM migration: in, D=0, begin … in, D=0, end |
| validity role | how long an established permission (or other standing) lasts | a grant valid Dec 1 → Dec 31 |
| use count | how many times a permission can be used | a single-use grant: uses: 1 |
| M = 1 | not committed; may never happen | a hold |
absence not-yet |
one piece of this record will come later | an amount known only at the end |
When the effect lands:
| Phase | Effect on the relation's state |
|---|---|
| instant | lands at this line |
| begin | none yet; opens an in-progress item (a committed fact that the act started) |
| end | lands here; cites its begin, same c, and uses it up (the use-once rule, as for settling) |
| sample | none on the relation; adds a reading to a series (observed partition when reported) |
A begun act that fails ends with an outcome role, or its begin is undone if it was recorded by mistake.
Laws. μ, ν and σ act on c and leave phase unchanged. The pairing check: end.c = begin.c, begin in progress, end cites begin. If phase codes follow the bits (sample 00, begin 01, end 10, instant 11), then begin ∨ end = instant and p_end = p_begin ⊕ 11. That numbering differs from v0.1's (instant 0, begin 1, end 2, sample 3): owner decision (§15 Q10); a lookup table gives the same reading without renumbering.
Phase and relation. Iteration 5 correction. Iteration 4 marked may × {begin, end, sample} invalid (96 of 512 fact-forms). That was wrong. Applying the separation rule evenly, every relation has acts that take time and states that can be read:
| Relation | begin / end (the act takes time) | sample (a reading inside something ongoing) |
|---|---|---|
| in | a move or migration | presence readings |
| is | an assessment or measurement process; the value lands at end | signal readings |
| to | a settlement or a flow over time | meter readings (running totals) |
| may | a grant or revocation that takes time to take effect (access spreading across systems; staged rollout). Committed, not usable until end. | access scans and reviews, usually reported from outside (F = 1) |
Iteration 4's is example ("a value that holds while an activity runs") was standing, not an act, and belongs to D.
What phase is not for:
- Permission spans are the permission's standing: GRANT (D = 0) with a validity role, closed early by REVOKE (D = 1) or ended by the validity role with no line needed. Putting spans in begin/end as well would give one span three spellings.
- One-off permissions are a use count, used up by the act done under the grant (the use-once rule). "Instant" describes the granting act, not the permission's life.
No fact-form is invalid in advance. All 512 are allowed by the kernel; the Stage A workbook decides per position which are meaningful, and may mark individual cells invalid.
ACT end. Completion of an act is D = 0, phase end. That agrees with the corpus, and preset QToB4's D = 1 would read as reversing an ACT. This supports settling D-02 the corpus's way; the decision stays with the owner (§14).
Naming. Verbs are named per c (128). Phase renders as aspect on the same verb (started, completed, reading). The label pack may carry optional phase-specific names, which is where ZAKO's 13 phase-variant verbs belong.
4. Reading pipeline (every line after GENESIS)
1. bytes canonical form
2. position seal chain / segment
3. header R, D, M, phase
4. resolve each named identifier → existing id, or birth (§6)
5. derive F, S, O
6. assemble c; compare with stored c if present
7. laws citation checks (§3.2); begin/end pairing (§3.6)
8. guards §5, cheapest first
9. effect Δ from the prior state
10. commit state ⊕ births ⊕ Δ, atomically; on refusal, journal a refusal receipt and discard the births
open replays every line through the same pipeline. There is one code path for submission and replay, so stored data cannot have skipped a check.
5. Guards
guard(e) = laws ∧ g_P ∧ g_F ∧ g_S ∧ g_R ∧ g_D ∧ g_M ∧ g_O ∧ record-right ∧ policy
| Guard | Passes when |
|---|---|
| g_F | F = 1 → a source role is present |
| g_S | S = 1 → one place at a time (in), never negative (to). S = 0 → may be in many boundaries; a book may go negative only if declared issuer. |
| g_R | the relation's own precondition (member present for exit, property set for withdraw, interval live for revoke, units match for to) |
| g_D | D = 1 → target live, not already undone |
| g_M | settling → target pending and open; M = 1 → no committed effect |
| g_O | O = 0 → actor owns the affected object. O = 1 → an authority path exists (grant, mandate, or evidence plus attribution for is). |
| g_P | the fact-form (c, phase) is not marked invalid in the workbook; end → cites an in-progress begin with the same c |
| record-right | rec ≠ for → a record grant from for to rec covers c |
| policy | every rule from packs in force holds |
The guard is a conjunction, so the order doesn't change the result; it fixes which refusal reason is reported. Packs can only add conditions. Authority comes only from grant facts, never from loading a pack. A refusal is journaled; retries return the same receipt (v1 behaviour).
6. Births by first mention
for each identifier x named in e with lookup(x) = ⊥:
owner(x) := actor(e) principals: owner(x) := x (self-owned)
kind(x) := the kind e names, or the role default
born(x) := position of e
- Births are deterministic (entry + prefix), are recorded as part of the entry's effect, and are discarded if the entry is refused.
- Refusals are left only for real conflicts: a conflicting redeclaration, a use the kind doesn't allow, or strict mode (§12).
- A principal born by mention exists but cannot record until it has a credential and a record grant.
6.1 Role defaults
| Role | Default kind |
|---|---|
from, to on a to entry |
book |
boundary in in |
boundary |
member in in placed with a location role (at) |
item (a resource) |
member in in otherwise; bearer in is |
thing |
holder in may |
principal |
source |
principal |
| the unit on a quantity | unit |
7. Kinds: class and traits inferred from use
7.1 Units come from the plainest entry
People write amounts with a symbol or letters before or after them: 120 EUR, €120, 5 kg, 3h, 2 GB. The symbol is the quantity's kind. It is born at first mention as a unit, like any other name. No unit pack is needed to write or read a quantity. Packs may later supply dimensions, conversions and aliases (€ = EUR).
7.2 How quantities enter a log: intake from outside
Most holdings, money included, enter a log as a plain declaration of what someone holds: "book:ops holds 500 EUR". That is modelled as a handover from outside the log:
to D=0 from: outside:EUR to: book:ops q: 500 unit: EUR
outside:<unit>is a boundary book, born at first mention, that stands for everything beyond this log. It is the only kind of book, besides a declared issuer, that may go negative. Its balance is minus the total brought in, which is a useful figure in its own right.- Conservation still holds: the legs sum to zero.
- The intake is a frame entry (F = 0) when the actor simply asserts the holding on their own authority. It is a world entry (F = 1) when it carries a source, such as a bank statement or a meter, and then it is reconciled against later reports.
- The same entry shape covers an opening balance, a deposit, a delivery and a reading. Only the roles differ.
7.3 Record or resource: what the class changes, and how it is set
Iteration 2 correction. Iteration 1 inferred the class from how a quantity first enters. That was wrong: money and kWh both usually enter by intake from outside, so their origin cannot tell them apart.
What the class actually changes:
| Relation | Record (S = 0) | Resource (S = 1) |
|---|---|---|
in |
may sit in many boundaries at once | in exactly one place at a time |
to |
conserved, one book at a time; an issuer book may be declared | conserved, one book at a time; no issuer can ever be declared (you cannot record kWh into existence) |
| copying | can be referenced or copied freely | cannot be duplicated, only moved |
On to the difference is small: it is only whether an issuer may exist. On in it is large.
class(k) = declared class if a pack or DECLARE gave one (packs win)
resource else if k is first placed with a location role (`at`)
or first moved by an atomic exit-and-enter
record otherwise (the default)
The class is fixed at birth and stored. Later entries read it and never re-infer it. A later conflicting declaration needs an explicit reclassification entry with its own guard.
Known limit: a physical thing first declared without a location ("I bought a chair") is a record until something says otherwise. The cost is only that the "one place at a time" guard doesn't apply to it yet.
7.4 Traits: a kind's role signature
Each kind keeps a small bitset of the roles it has filled. It is updated at commit with one OR, and conflicts are checked with one AND.
| Trait | Set when the kind… |
|---|---|
| T0 container | is the boundary in an in |
| T1 member | is the member in an in |
| T2 bearer | is the subject of an is |
| T3 holder | holds a permission in may |
| T4 book | is from or to in a to |
| T5 observer | is a source |
| T6 durative | is used with begin/end phases |
| T7 sampled | is used with the sample phase |
| T8 located | is placed in one place at a time (S = 1) |
Candidate classes of kind, as trait masks:
| Class | Mask | Examples |
|---|---|---|
| book / account | T4 | wallets, ledgers, stock bins |
| place / container | T0 (+T8 on members) | warehouse, host, room |
| group / tag | T0, members S = 0 | team, label, folder |
| item / asset | T1 + T8 | device, pallet, chair |
| record / document | T2 only | invoice, profile, setting |
| principal / agent | T3 | person, service, agent |
| observer / sensor | T5 (+T7) | meter, registry, feed |
| activity / process | T6 | job, shift, deployment |
| signal / metric | T7 + T2 | temperature, latency |
These are names for patterns, not new kernel types. A view can group by them.
7.5 Tags and groups in a log entry
A tag or group isn't a new construct. It is a boundary whose members are records, so they can sit in many at once:
in D=0 member: invoice:2041 boundary: tag:urgent → filed under "urgent"
in D=0 member: invoice:2041 boundary: team:billing → also in a team boundary
in D=1 member: invoice:2041 boundary: tag:urgent → untagged (cites the first)
Both boundaries are born at first mention. Because invoice:2041 is a record, being in two boundaries passes g_S. A resource (S = 1) placed in a second boundary without leaving the first is refused, or the entry is read as a move if policy allows.
8. Transfers
- One entry per transfer:
from,to,q,unit, and an optionalcites. The Books post−qonfromand+qonto. - Push vs pull = O, derived from the owner of
from. A pull needs a mandate. - Two-phase = M. A hold adds to
reserved[from]; posting cites the hold; void and timeout retire it.available = posted − reserved. - Reversal = D. It posts the exact inverse of the cited entry.
- Exchange = two linked transfers committed together.
- Issuing is explicit: only a book declared
issuermay go negative. - Conservation holds by construction for frame entries. World entries are reconciled against frame entries, not posted blindly.
9. Ownership given to someone else
When an entry creates something and names an owner other than the actor, the recorder may lose control of it at once. Candidate forms:
| Form | Log shape | Recorder afterwards |
|---|---|---|
| A. Assign | birth with for: X; the recorder needs a record grant from X |
no control |
| B. Offer | birth owned by the actor, plus a pending ownership transfer (M = 1) to X. X accepts (settles, so ⊕8 applies) or declines (retire). | full control until X accepts |
| C. Assign and retain | A plus a GRANT back to the recorder (custodian or manager scope), in the same atomic batch | scoped rights |
| D. Standing acceptance | X holds a policy "accept assignments from Y" | as A, without a per-item grant |
An unsolicited assignment (no grant, no offer, no standing acceptance) is either refused or turned into form B. That choice is a setup policy (§12).
9.1 Notification classes come from the bits
Notify every principal named in an entry, other than the actor, who owns an object in any of its roles. The bits then say what kind of notice it is:
| Bits | Notice |
|---|---|
| M = 0, D = 0 | something was done to something of yours (inform) |
| M = 1 | something awaits your response (accept, decline, pay) |
| D = 1 | something earlier was undone |
| settles your pending item | your request or offer was answered |
| F = 1 | an outside source reported something about yours |
This is a view, not a kernel feature. It is computed from c and the roles, with no extra state.
10. Indexes and compute cost
Question: once births happen by first mention, do the growing numbers of objects, books, kinds and subjects need scans or routine jobs to keep indexes current?
Proposed answer: no. Each index is a function of the log prefix, kept up to date at commit, and the check for "is this new?" is the lookup the reader must do anyway.
- Birth costs nothing extra. Step 4 resolves every named identifier, so it hashes and looks it up regardless. A miss is the birth. There is no separate existence check.
- Symbol table. Each birth gets the next dense integer id (its birth ordinal). The table is append-only: a hash map from name to id, plus an array from id to record (owner, kind, class, traits, born). An insert costs O(1) amortised.
- Optional wire saving. After first mention, an entry may refer to an identifier by its id or by the position of its birth, instead of by name. That skips hashing on read, the way a compressor reuses an earlier string.
- Secondary indexes (by kind, owner, unit, c, boundary) are append-only posting lists. Each commit appends to the lists its entry touches: O(1) per index per entry.
- Traits and classes are bitsets updated with one OR. Conflict checks are one AND.
- Counts (how many kinds, objects, books) are the birth counters. Reading them is O(1).
- Checkpoints at each seal. The seal summary records that segment's births and index additions, plus a root hash over the symbol table and indexes. A restart loads the last checkpoint and replays at most one segment. A reader can confirm an index by comparing its root hash at a seal.
- Full scans happen only on a cold rebuild, which is a replay: O(n), once.
- At large scale, the symbol table moves to sorted runs on disk (LSM-style), with a Bloom filter in front. A filter miss means "definitely new", so the birth needs no disk read.
11. Stage 0: kernel constants and start-up
Everything in this section is fixed before line 1, in the kernel descriptor, whose SHA-256 is the kernel's identity.
D1 sets B = {0,1}; Phase = {instant, begin, end, sample};
Id = canonical strings; Q = decimal strings; ⊥ distinct from 0, ∅ and withdrawn
D2 positions C = B⁷, c = 64F+32S+16M+8O+2R+D; bit projections; type = c (one byte, §1.3)
phase P = B² read as (opens, closes) (§3.6); query key (c, p), 9 bits; wire: two bytes (§1.3.1)
D3 operations μ, ν, σ and their laws (§3.1)
D4 state S = (Struct, Reg, Auth, Books, Open, Sym, n, h)
Sym = symbol table (§10); Reg reserved properties: owner, kind, class, traits, issuer, born
D5 initial S₀ = (∅, ∅, ∅, ∅, ∅, ∅, n = 0, h = 0²⁵⁶)
D6 seed kinds principal, boundary, kind, pack, book, thing, unit (record); item (resource)
D7 order permission order ⪯ (§3.3 Attenuation)
D8 actor actor(e), affected(e) per relation (§1)
D9 births §6 and role defaults §6.1; intake §7.2; class rule §7.3; traits §7.4
D10 derivation F, S, O (§2)
D11 laws citation checks (§3.2); begin/end pairing (§3.6)
D12 guards §5
D13 operations enclose, call, cross, self-apply, each with its law (§3.4); the relation of a line
(in, is, to, may) names the operation its effect applies. Writes go to the
authoritative or observed partition by F (§3.5). Open ±; Sym +
D14 step births → derive → laws → guards → effect → commit, or refusal receipt
D15 seals seg_hash = sha256(segment bytes); h' = sha256(hex(h) ‖ hex(seg_hash))
D16 identity K = sha256(descriptor)
Start-up sequence a reader runs:
0.1 load descriptor; compute K
0.2 build the constants and tables (D1–D14)
0.3 check the bit laws over all 128 values of c (128 × 6 comparisons)
0.3b check the four effect laws (§3.4) on a fixed sample state
0.4 state := S₀
0.5 require line 1 = "STREAM/1 kernel=sha256:" ‖ hex(K), else open refuses
0.6 read line 2 as GENESIS (§12)
11.1 Printing the start-up (a bootstrap transcript)
Option: begin a log by printing every Stage 0 operation.
- It costs very little: Stage 0 is constant-sized (a few hundred lines, microseconds of compute).
- It adds no information to the log. Stage 0 is a deterministic function of K, which the preamble already names. Anyone can regenerate the same transcript from the kernel.
- It would also not be a performative act. These lines report what the reader computed; they don't establish anything. GENESIS is the first act.
Proposed: publish the Stage 0 transcript once per kernel version as a conformance artifact: the canonical bootstrap transcript, which note 17 lists as missing. Decided 2026-12-01 (owner): printing the start-up into a log is an audit option, verbose-genesis, off by default. When on, it writes the transcript into segment 0 as non-fact trace lines covered by the first seal.
12. Opening entries and setup policies
12.1 Required lines
| # | Line | Effect |
|---|---|---|
| 1 | preamble STREAM/1 kernel=… |
binds the log to this kernel (not a fact) |
| 2 | GENESIS(log_id, roots, clock, tz, seed_hash, policy_hashes) |
Type fixed by kernel law; allowed only here. Log boundary born, owned by the roots. Roots hold every permission on it (trust is supplied here). Fixes clock, timezone and setup policies. |
After line 2 a root can write ordinary entries at once.
12.2 Conditional setup lines
| Needed for | Lines |
|---|---|
| others writing | principal (by mention or DECLARE) + record GRANT + credential |
| acting for another | record GRANT from for to rec |
| pulls | mandate GRANT from the source owner |
| issuing sign quantities | DECLARE issuer on a book |
| shared vocabulary, policies, labels | BIND packs, one line each |
12.3 Setup policies (fixed in GENESIS policy_hashes; may be tightened later by a policy pack)
| Policy | Values | Proposed default | Strict mode |
|---|---|---|---|
births.objects |
allow / declare-first | allow | declare-first |
births.books |
allow / declare-first | allow | declare-first |
births.kinds |
allow / pack-only | allow | pack-only |
births.units |
allow / pack-only | allow | pack-only |
births.principals |
allow / declare-first | allow (they can't record without a grant) | declare-first |
class.inference |
location / pack-only | location (§7.3) | pack-only |
ownership.for-without-grant |
refuse / offer | offer (form B) | refuse |
resource.second-place |
refuse / treat-as-move | refuse | refuse |
issuer |
declared only | declared only | declared only |
wire.type |
6 bits / 7 bits checked | 7 bits checked (§1.2) | 7 bits checked |
verbose-genesis |
off / on | off | on, for audit |
Policies tighten only. A pack may move a value toward strict, never away from it. This matches the guard rule that packs only add conditions.
13. Consequences for the kernel's mathematics
| Area | v1 | v0.1b direction |
|---|---|---|
| What carries meaning | 8 verbs; the rest declared | four operations with laws + bit rules + phase |
| Entry type | in the entry | the entry plus the state before it |
| Conservation | checked | built into the entry's form |
| Links between entries | conventions | citation checks with the μ, ν, σ monoid; use-once rule |
| State | one fold | Books: a group (sums, fast balances) · Register and membership: last-writer-wins maps · authority: a derived closure |
| Seed logic | positive Datalog | positive + stratified negation over each entry's own roles + time-indexed ownership |
| Direction field | disputed meaning, Option 9 would widen | 1 bit, establish/undo; no widening |
13.1 Proof obligations
- Totality: every admitted entry gets F, S and O, or a stated refusal.
- Determinism: the pipeline reads only the prior state plus births; the batch rule is fixed (each entry in a batch is typed against the state before the batch).
- Conservation, by induction over frame
toentries. - Citation laws and the use-once rule.
- Involution and idempotence (§3.1), checked at start-up.
- Stored c = derived c, when 7 bits are stored.
- Closure terminates under stratified negation; incremental upkeep agrees with recomputation, including under REVOKE.
- Replay on
open= submission.
14. Effects on open decisions
| Item | Effect of this direction |
|---|---|
| D-01 direction | Option 9's four modes map onto existing fields (normal = D 0, reversal = D 1, edge = phase, compound = linked entries). No widening. |
| D-02 ACT end | Closing is phase's job, so an ACT end entry establishes: D = 0. This agrees with the corpus; preset QToB4 (D = 1) would read as an undo. Round 4's separation rule (§3.6) supports this. Owner decision; not decided here. |
| D-03 6-bit claim | Honest: 6 stored bits, with three context bits computed by kernel-defined functions. No verb-table lookup. |
| D-05 depth re-check | Removed by replaying through admission on open. |
| D-11 book key | Unit = the quantity's kind (§7.1), so the key is (boundary, unit), and unit symbols can't collide across kinds. Revisit with §7.2–7.3. |
15. Open questions
- F = enact vs observe, and O = "affected party is not the actor": accept?
- Class rule (§7.3): record by default, resource on a location role or a move, packs winning. Accept? And intake from
outside:<unit>(§7.2)? - Trait set (§7.4): are these the right nine? Should any trait be fixed at birth like the class, or do all accrue?
- Ownership forms (§9): which are kernel-level and which are policy?
- Wire type: 7 bits checked as the default (proposed in iteration 3, §1.2), with 6 bits as a compact profile. Accept?
- Batch typing rule: state before the batch (proposed) or sequential?
resource.second-place: refuse, or read as a move?- Bootstrap transcript: answered 2026-12-01 (owner): published per kernel; printing into a log is an audit option, off by default.
- The operation behind
may(§3.4): DIGEST §3 places may with to under crossing (may = "is it allowed to cross?"), and gives re-entry to frame/world and phase. Iteration 3 reads may's operation as the log applying its own distinctions to later lines, which is closer to re-entry (note 06 links re-entry to recording which frame and policy were in force). Both can hold: may is about a crossing and works by self-application. Keep DIGEST's grid and name the operation "self-apply" rather than "re-entry", or adopt re-entry for may? - Phase numbering: renumber to follow the bits (sample 00, begin 01, end 10, instant 11), which changes v0.1 presets and test vectors, or keep v0.1's numbering with a lookup table (§3.6)?
- The type byte: option A (c in one byte, phase separate; proposed, in its two-byte form §1.3.1), B (phase in the byte, F read from the source role) or C (§1.3)?
- Printability of the two-byte form: binary only; reconciled control characters; or a printable mapping (§1.3.1)?
16. Lineage: what earlier notes already said, and what is new
Iteration 3. Checked against the earlier record so restatement isn't presented as discovery.
| Idea in this note | Already in the record | What v0.1b adds |
|---|---|---|
| Relations as operators with laws | note 08: each relation an operator on a shared state; in = inclusion order, is = evaluation, may = restricts admissible transitions, to = conserved weighted delta (incidence matrix); the type dispatches the operator; the log is a composition of operators | Laws become start-up and conformance checks (§3.4), answering note 08's question 9. The 2×2 is restated as two operational cuts. |
| Calling idempotent, crossing involutive | note 08 ("idempotent and involutive reductions"); note 16 §9 (typed interpretations needed; executing twice need not undo; idempotence doesn't collapse evidence) | Tied to bit operations: μ and ν are involutions, σ is idempotent, checked over all 128 positions. Undo is a distinct cited line, not double execution, which is what note 16 §9 required. |
| The 2×2 of relations | DIGEST §3: how things stand (in, is) / crossing (may, to); logic table (transitive part–whole; one value per property; traces to a root; conserved) | The same grid, as structure-vs-value and thing-vs-two-parties properties of the effects. |
| Containment derived from enclose | mark-boundary experiment; note 16 (enclose and beside as supplied constructors) | Placed first in the unfolding order after GENESIS. |
| Re-entry and fixed points | note 16 §9 (re-entry as recurrence; positive inference reaches a fixed point); note 06 (re-entry and recording the frame in force); DIGEST (re-entry → frame/world, phase) | The authority closure as a least fixed point; open question on naming may's operation (§15 Q9). |
| Direction per operator | note 08 table (enter/leave, assert/supersede, allow/withhold, into/out of) | Changed: one meaning for D in every relation (establish / undo). |
| External generation and boundary crossing | note 08 ("external generation, loss or boundary crossing must be represented explicitly") | outside:<unit> as the outside of the genesis mark (§7.2). |
| Incremental projections, identical across readers | note 08 questions 8 and 9 | Segment summaries, checkpoints and root hashes (§10). |
New in v0.1b, not found in the earlier record: derived and checked F/S/O with functions defined by the kernel; O relative to the actor, and the ⊕8 counterparty rule; the μ/ν/σ monoid as citation checks; births by first mention, role defaults and seed kinds; kind classes and traits from use; the trim transfer model with holds and intake from outside; setup policies with strict modes; observed and authoritative partitions.
17. How this lab records iterations
Iteration 3. The lab is revised in rounds. Each round may touch one element or several, and the documents aggregate elements. The record has to show both: the lab's iteration number, and each element's own history.
- Elements have stable ids. Each piece of the design being iterated has an id (table below). An id never changes, even if the element moves to another section or into its own file.
iterations.csv(in this folder) has one row per element changed per iteration:iteration, date, element, change, summary, decided_by, refs.changeis one ofadded,changed,corrected,withdrawn,decided.decided_byisowneronly when the owner decided; otherwise empty.- Lab iteration vs element iteration. The lab iteration is the round number (this note's header). An element's iteration count is the number of rows for that element. The CSV gives both.
- Sections carry the round. A section changed in a round starts with an italic line such as Iteration 3. The changelog below summarises each round.
- Snapshots. When a round closes, the tabbed page is frozen as
artifacts/iteration-NN.htmlwithrecord.py lab attach … --as artifact. Rounds 1 and 2 were not snapshotted; snapshots start at round 3. - Commits. One commit per round on the lab branch,
docs(lab): v0.1b direction, iteration N, made when the owner asks. Git history then gives line-level differences between rounds. 6b.exchanges.mdrecords each owner question or challenge and its outcome, in order, so the reasoning between rounds is kept, not only the results. - The tabbed page has an Iterations tab built from
iterations.csv: by round, and by element. - Machine-readable for the site.
iterations.csvis plain CSV so the Labs page tooling being built for babb-home can show it without parsing prose.
| Element id | Covers |
|---|---|
| EL-bits | §1: one meaning per bit |
| EL-wire | §1.1–1.3: header type bits, filtering cost, wire.type, the type byte |
| EL-derive | §2: derivation of F, S, O; resolving names |
| EL-laws | §3.1–3.3: bit laws, citation checks, state laws |
| EL-relops | §3.4–3.5: relations as operations; observed and authoritative state |
| EL-phase | §3.6: phase as (opens, closes); separation rule; effect timing; invalid forms |
| EL-pipeline | §4: reading pipeline |
| EL-guards | §5: guards |
| EL-births | §6: births by first mention; role defaults |
| EL-kinds | §7: units, intake, class, traits, tags |
| EL-transfers | §8: transfers |
| EL-ownership | §9: ownership forms; notifications |
| EL-indexes | §10: indexes and cost |
| EL-stage0 | §11: Stage 0 and start-up; bootstrap transcript |
| EL-setup | §12: opening entries; setup policies |
| EL-kernel-math | §13: consequences and proof obligations |
| EL-decisions | §14–15: effects on decisions; open questions |
| EL-lineage | §16: lineage |
| EL-process | §17: this section; exchanges.md, the record of owner questions and outcomes |
| EL-workplan | technical-work-plan.md |
| EL-overview | system-overview.md |
| EL-rationale | design-rationale.md |
| EL-math | mathematics.md |
Changelog
| Iteration | Date | Change |
|---|---|---|
| 5 | 2026-12-01 | Corrected round 4 after the owner's challenge: may takes every phase (grants that take time to take effect; access scans), so no fact-form is invalid in advance; permission spans stay standing (validity role, grant, revoke) and one-off permissions are a use count (§3.6). Corrected the is begin/end example. Option A set out in full as a two-byte "what + shape" layout carrying every v0.1 short-header field in 28 bits (§1.3.1). Q12 added. Exchange log added (exchanges.md). |
| 4 | 2026-12-01 | Phase analysed and set out (§3.6): (opens, closes), the separation rule against D, M and not-yet, effect timing, begin/end pairing, 96 invalid fact-forms, ACT end. Owner approved the direction. Type-byte options (§1.3); proposed: c in one byte, phase separate. g_P guard; Stage 0 D2/D11 and pipeline step 7 updated. Open: phase numbering (Q10), type byte (Q11). |
| 3 | 2026-12-01 | Renamed the direction v0.2 → v0.1b (owner). Default wire changed to 7 bits checked, with the filtering-cost reasoning (§1.2). Relations established as four operations with laws, an effect-law self-check, the unfolding order, and operational readings of every bit (§3.4); observed and authoritative partitions (§3.5). Stage 0 D1/D13 rewritten. Lineage against notes 06, 08, 16, DIGEST and mark-boundary (§16). Iteration recording (§17, iterations.csv). |
| 2 | 2026-12-01 | Added seed kind item (a resource) as the role default for members placed with a location role (§6.1), so location can classify an unnamed kind. Corrected the class rule: origin cannot separate money from resources (§7.3). Added intake from outside for declared holdings (§7.2), resolving names (§2.1), and the v0.1 vs v0.1b type-bit budget (§1.1). Owner decided that printing the start-up is an audit option, off by default (§11.1). Added companion documents: work plan, system overview, design rationale, mathematics. |
| 1 | 2026-11-30 | First version. Collects: single-meaning bits, derived F/S/O, the μ/ν/σ laws, the pipeline, guards, births by first mention, role defaults, unit symbols as kinds, class by origin, kind traits, tags as boundaries, transfers, ownership forms and notification classes, index efficiency, Stage 0, opening entries, setup policies with strict modes, kernel consequences, effects on D-01/02/03/05/11. |
STREAM v0.1b: technical work plan
Lab: 2026-11-30-v0-1b-direction-claude · Date: 2026-12-01 · Status: working draft, for the owner to approve, amend or reject per section.
Design source: master-design-note.md (this lab). Section numbers written as "note §n" point there.
Companions: system-overview.md, design-rationale.md, mathematics.md.
This plan covers building the kernel and the system around it: encoding, log, reader, Books, authority, packs, setup, indexes, the seed language, the 128-position table, interfaces and migration. It is language-agnostic. Appendices A–C say how to approach it in assembly, C and Python. The existing Rust v1 kernel (crates/) stays the running reference for v1 and a source of tested parts; Appendix D says how it relates.
0. Ground rules for the build
- Specification first. Every work package (WP) starts by writing its rules as text plus test vectors. Code follows. A disagreement between code and text is a bug in one of them, and gets fixed in writing.
- One reference implementation, then a second. Build a small, readable reference first; Python suits this (Appendix C). A second, fast implementation (C, Rust, or C with assembly for hot paths) must then agree with it on every vector. That agreement is freeze gate G1 in the v0.1 header draft, applied to the whole kernel.
- Determinism. No wall clock, randomness, floating point, hash-map iteration order, locale or thread timing may affect any result. Quantities are decimal strings or scaled integers; times come only from entries.
- One code path. Submission and replay (
open) run the same pipeline (note §4). - Pure core, thin shell. The kernel core is pure functions over
(state, entry) → (state', result). Storage, network, CLI and clocks live outside it. - Everything refused is explained. Each refusal has a stable code and a short reason, and is journaled.
- Gated decisions stay gated. A WP that depends on an undecided item (§9) implements it behind a named parameter, with every candidate value covered by tests, until the owner decides.
1. Architecture
Layers, lowest first. Each layer depends only on the layers below it.
L13 Views and applications boards, balances, timelines, notifications, drift
L12 Interfaces CLI, library API, text spelling, service endpoints
L11 Indexes and lenses posting lists, masks, folds, checkpoints
L10 Seed language (unfolding) relation · rule · action · activate · invoke · fresh · emit · retire
L9 Packs and policies BIND, label packs (the 128 table), policy packs, strict modes
L8 Authority closure delegation reachability, attenuation, goal-directed evaluation
L7 Pipeline and log store step, batches, refusal receipts, segments, open/replay
L6 Kernel core births, derivation, laws, guards, effects
L5 State containers Struct · Reg · Auth · Books · Open · Sym
L4 Symbol table names → ids, births, back-references
L3 Entry model roles, quantities, cites, absence codes
L2 Header codec v0.1 bitpack and the v0.1b type field
L1 Hashing and seals SHA-256, segment hash, chain
L0 Bytes and canonical form canonical JSON (v1), ASCII header alphabet
Data flow for one line: bytes (L0) → header + payload (L2, L3) → names resolved or born (L4) → F, S, O derived, c assembled, laws, guards, effect (L6) → committed to state (L5) and log (L7) → indexes updated (L11) → views refresh (L13).
2. Data model (language-agnostic records)
Field types: u8/u16/u32/u64 unsigned integers; id = dense symbol-table integer; pos = log position (u64); hash = 32 bytes; dec = canonical decimal string or scaled integer with a declared scale; bits = bitset.
| Record | Fields |
|---|---|
| Header | type field (6 or 7 bits + phase 2), role presence (4), estimate (1), change (1), time delta (n bits), extended-follows (1); extended: absence kind × 4 (3 bits each), object/kind index (12), check bits (6) |
| Entry | pos, header, rec (id), for (id or none), roles: map role → (id or literal), quantity (dec, unit id) or none, cites (pos or none), source (id or none), payload hash |
| Symbol | id, canonical name, kind (id), owner (id), class (record/resource), traits (bits), issuer (bool), born (pos), live (bool) |
| Kind | a Symbol whose kind is kind; plus declared class (optional), unit dimension (optional, from packs) |
| Membership | member (id), boundary (id), opened (pos), closed (pos or none) |
| Property | bearer (id), property (id), value or withdrawn, set at (pos) |
| Grant | id, holder, granter, actions (set of positions or a position mask), scope (set of ids or a boundary), validity (pos or time interval), depth (u8), granted (pos), revoked (pos or none), kind: record / mandate / permission |
| Book | book id, unit id, posted (dec), reserved (dec), issuer (bool), outside (bool) |
| OpenItem | pos, c, kind: establishment / pending, consumed by (pos or none) |
| Refusal receipt | pos, digest of the submitted line, code, reason, failing guard |
| Checkpoint | segment number, chain value, state root hash, symbol count, index roots |
| Pack | hash, name, version, declarations (kinds, units, classes, labels, policies) |
| Setup policy | name, value (note §12.3), source (genesis or pack pos) |
3. Work packages
Each WP lists: purpose · depends on · deliverables · method · tests · exit.
WP01 Canonical bytes (L0)
- Purpose: byte-exact parse and serialise, so that "canonical" is checkable.
- Depends: none.
- Deliverables: canonical JSON writer and reader (v1 rules: keys in byte order, no duplicates, no whitespace, integers only, quantities as decimal strings); the ASCII 64-symbol header alphabet codec; line framing.
- Method:
canonical(bytes) ⇔ serialise(parse(bytes)) == bytes. - Tests: v1 conformance case 04 (non-canonical); round-trip of all v0.1 header vectors; fuzzing for crashes and non-idempotence.
- Exit: every v1 conformance case gives the expected open result at the byte level.
WP02 Hashing, seals and chain (L1)
- Purpose: v1 seal semantics, unchanged.
- Depends: WP01.
- Deliverables: SHA-256; segment hash over all bytes before the seal line;
h' = sha256(hex(h) ‖ hex(seg_hash)); genesis chain 0²⁵⁶; segment OPEN carryingprev. - Tests: v1 cases 02, 03, 06; NIST SHA-256 vectors.
- Exit: byte-identical chain values to the Rust v1 kernel on every conformance log.
WP03 Kernel descriptor and Stage 0 (L1–L6 constants)
- Purpose: the kernel as data, plus start-up (note §11).
- Depends: WP02.
- Deliverables: the v0.1b descriptor text (D1–D16); its hash K; constant tables (bit projections, μ/ν/σ, seed kinds, role defaults, guard order, refusal codes); the start-up self-check (128 × 6 bit-law comparisons, plus the four effect laws on a sample state, note §3.4); the canonical bootstrap transcript generator; the
verbose-genesiswriter (off by default). - Tests: the self-check passes; the transcript is byte-identical across implementations; the preamble check accepts the matching K and refuses others (v1 case 05).
- Exit: two implementations produce the same K and the same transcript.
WP04 Header codec (L2)
- Purpose: encode and decode headers, v0.1 and v0.1b.
- Depends: WP01.
- Deliverables: v0.1 short and extended header exactly as drafted; v0.1b type field with
wire.type= 7 bits checked (default) or 6 bits (compact profile) (note §1.1–1.2), with the freed bits assigned to the time delta; the stored-versus-derived check on write; typed absence codes 0–6 (7 reserved, refused); check bits; header-only filter function; the two-byte "what + shape" layout (note §1.3.1, option A, pending owner) alongside the v0.1 layout; printable spelling per Q12; phase read as (opens, closes) through a table, so either numbering works (note §3.6, Q10). - Gated by: X06 overflow rule (D-09), the
wire.typechoice, versioning in the first field (G4). - Tests: v0.1 vectors V01–V10 decode; X01–X08 refuse as specified; property test: decode(encode(h)) = h for all valid h; every single-character corruption of an extended header is caught.
- Exit: all published vectors pass in two implementations.
WP05 Entry model and text spelling (L3)
- Purpose: the structured entry and its plain-text form.
- Depends: WP01, WP04.
- Deliverables: role set and role order (kernel slots); quantity parsing with unit symbols before or after the amount (
120 EUR,€120,5 kg,3h), producing (dec, unit name);cites,source,for; absence per role. - Tests: a unit-symbol corpus (prefix, suffix, glued, spaced, multi-character); decimal edge cases (scale, sign, leading zeros refused); missing versus absent-by-code.
- Exit: text spelling ⇄ structured entry ⇄ canonical bytes round-trips.
WP06 Symbol table and births (L4)
- Purpose: resolve names; births by first mention (note §2.1, §6, §10).
- Depends: WP05.
- Deliverables: append-only table name → id (dense, birth ordinal) and id → Symbol; provisional births (discarded on refusal); role defaults; principals self-owned; back-references by id or birth position; per-segment birth lists.
- Method: a miss during resolution is the birth; no separate existence check.
- Tests: births are deterministic across replays; refused entries create nothing; strict-mode policies refuse instead of birthing; back-references resolve to the same id as names.
- Exit: replaying any log twice gives an identical symbol table hash.
WP07 State containers (L5)
- Purpose: the six containers with their algebra (
mathematics.md§5). - Depends: WP06.
- Deliverables: Struct (membership intervals; single-place rule for resources); Reg (last-writer-wins map with ⊥ and
withdrawndistinct); Auth (grant store); Books (posted, reserved, issuer, outside); Open (live establishments and pending items); Sym (from WP06). Each has: apply-delta, undo-delta, root hash, segment summary. Struct, Reg and Books are split into authoritative and observed partitions by F (note §3.5). - Tests: composing segment summaries in any grouping equals sequential application (associativity); Books summaries in any order equal (commutativity); ⊥ is never confused with 0 or withdrawn.
- Exit: state root hash is identical across implementations after every conformance log.
WP08 Derivation, actor and affected party (L6)
- Purpose: F, S, O and c (note §2).
- Depends: WP07.
- Deliverables:
actor(e),affected(e)per relation;F,S,O; assembling c; the stored-versus-derived check when 7 bits are stored. - Tests: a table-driven suite covering every (R, role pattern, owner relation, kind class, source presence) combination; the 75-entry corpus re-read with the mismatch report (feeds WP21).
- Exit: totality: every admitted entry gets F, S, O, or a stated refusal code.
WP09 Laws and citation checks (L6)
- Purpose: the bit laws and the use-once rule (note §3).
- Depends: WP08.
- Deliverables: μ, ν, σ; undo and settle checks; begin/end pairing (end cites an in-progress begin with the same c, and uses it up); Open-items consumption, including in-progress items; refusal codes for each failure.
- Tests: property tests over all 128 values (involution, idempotence, commuting); scenario tests: double settle, double reverse, undo of the wrong type, counterparty settle with ⊕8, settle by the same actor without ⊕8.
- Exit: no sequence of entries can consume an open item twice (fuzzed).
WP10 Guards (L6)
- Purpose: the conjunction of guards in fixed order (note §5).
- Depends: WP09, WP13 for g_O.
- Deliverables: g_F, g_S, g_R, g_D, g_M, g_O, record-right, policy; a stable refusal code table; a "why" explanation per refusal; the rule that packs only add conditions.
- Tests: one positive and one negative test per guard per relation; ordering tests (the first failing guard is the one reported); policy packs cannot weaken a kernel guard.
- Exit: every refusal in the conformance suite has the expected code.
WP11 Effects (L6)
- Purpose: the four operations behind the relations, each with its law (note §3.4, mathematics §5.5): enclose (in), call (is), cross (to), self-application (may).
- Depends: WP10.
- Deliverables:
in: open or close membership; resources move atomically between places.is: set, replace or withdraw a property.may: add or close a grant.to: post both legs, or reserve (M = 1), or invert a cited entry (D = 1);outside:<unit>books; issuer books.- All relations: update Open-items.
- Tests: the four effect laws as property tests; conservation (sum of all books per unit = 0 after every frame entry);
available = posted − reservednever below zero for non-issuer, non-outside books; a hold followed by post, void or timeout leaves the correct balances. - Exit: conservation holds over fuzzed logs of 10⁶ transfers.
WP12 Pipeline, batches and log store (L7)
- Purpose: the ten-step pipeline and durable storage (note §4).
- Depends: WP03–WP11.
- Deliverables:
step(state, entry); atomic batches (each entry typed against the state before the batch, unless the owner decides otherwise); refusal receipts with sticky retries (same digest → same receipt); segment management;open= replay through the pipeline; crash recovery (a torn final line is detected and truncated, never half-applied). - Tests: replay = submission (metamorphic test); kill-and-restart at random points; v1 retry semantics.
- Exit: a log written by one implementation opens with identical state in the other.
WP13 Authority closure (L8)
- Purpose: may-paths, attenuation and revocation (note §3.3, §5).
- Depends: WP07.
- Deliverables: reference semantics = Reader A (finite relational closure, positive rules plus stratified negation); goal-directed evaluation (magic sets or tabling) for per-query cost; incremental maintenance that handles REVOKE (delete-and-rederive or counting); Reader B kept as a comparison machine; the D2 (branching delegation) and D5 (seeded bad edge) probes from the discriminator.
- Tests: A and B agree on all forest-shaped probes; A admits branching delegation; incremental results = full recomputation after every entry; seeded bad edges cannot exist because
openreplays through admission. - Exit: per-query cost within budget (§7) at 10⁵ grants.
WP14 Genesis, setup and policies (L7, L9)
- Purpose: the opening of a log (note §12).
- Depends: WP12.
- Deliverables: GENESIS (atomic; first and only; roots; clock; timezone; seed hash; policy hashes); the setup-policy registry with defaults and strict values; "policies only tighten"; the readiness predicate per principal; the
stream initflow with a root name and a public key (ed25519), and named-trust logs labelled as such. - Tests: the conformance vectors from prep file 05 (first entry not GENESIS; second GENESIS; recorder not a root; seed mismatch; empty roots; broken seal chain together with a genesis failure); every strict-mode setting refuses what it should.
- Exit: a two-line log is valid and lets a root write at once; strict-mode logs refuse births.
WP15 Packs (L9)
- Purpose: BIND and pack content.
- Depends: WP14.
- Deliverables: pack format and hashing (
blobs/<sha256>); one BIND line per pack; conflict rules (identical redeclaration accepted, conflicting refused); kinds with declared class; units with dimension, aliases (€=EUR) and conversions; policy packs; label packs. - Tests: binding a pack twice; conflicting packs; a pack that tries to loosen a policy (refused); aliases resolve to one symbol id.
- Exit: existing
packs/content loads, or a conversion note says what changes.
WP16 Indexes, lenses and checkpoints (L11)
- Purpose: fast reading with no scans (note §10).
- Depends: WP12.
- Deliverables: posting lists by c, kind, owner, unit, boundary and principal; header-only filters; a running-total structure for balances at any position (Fenwick tree or a per-segment prefix); checkpoints at seals with root hashes; cold rebuild = replay.
- Tests: an index equals a brute-force recomputation on random logs; a restart from a checkpoint gives the same state as a full replay.
- Exit: budgets in §7 met at 10⁷ entries.
WP17 Seed language (L10)
- Purpose: the unfolding kernel (note 15's eight forms).
- Depends: WP13, WP16.
- Deliverables: relation, rule, action, activate, invoke, fresh, emit, retire; the three kinds of state (definitions K, base facts B, derived closure C); termination under positive rules plus stratified negation over each entry's own roles; the activation dialogue (propose → check → record → activate → invoke); the seed text v0.1 and the canonical bootstrap transcript (L:1–L:16), run in both readers.
- Tests: the bootstrap transcript passes in A and B; refusal of a definition that uses an inactive rule; closure terminates on adversarial rule sets within the step limit.
- Exit: a seed-built log and a descriptor-built log give the same state for the shared transcript.
WP18 The 128-position table (L9)
- Purpose: positions as data, names as a label pack.
- Depends: WP03, WP15.
- Deliverables:
- Position registry: a data file with 128 rows (c, the seven bits, mirror c⊕1, fact twin c−16 for pending cells, view c⊕8, cell status: named / weak / empty / invalid). Generated, never hand-typed.
- Label pack: verb names per cell from
verb-table-128-fresh.md, with the owner's review edits (the HTML review export), hashed separately so renaming never changes K. - Naming checks: every named cell's mirror is named as its undo; every pending cell's twin is named as its outcome; no two cells share a name; v1 verbs map to their cells.
- Earning tests: for every named cell, one fixture showing the calculable consequence that distinguishes it from its nearest neighbour (note 19 §7). Cells without a fixture are marked weak.
- Empty and invalid cells: a position may be empty (allowed, no name) or invalid (an entry there is refused, with a code). Fact-forms (c, phase) are checked per cell: the kernel allows all 512, and the workbook may mark individual cells invalid.
- Phase names: optional phase-specific names in the label pack (where ZAKO's 13 phase-variant verbs go).
- Tests: registry generation is deterministic; the label pack passes the naming checks; every v1 conformance entry maps to a cell.
- Exit: the owner has accepted a label pack version; empty and invalid cells are marked.
WP19 Notifications and other views (L13)
- Purpose: views computed from bits and roles (note §9.1).
- Depends: WP16.
- Deliverables: a notification feed per principal (inform, awaiting response, undone, answered, reported from outside); balances; boards (membership); timelines (phase); drift (frame·is against world·is on one property); a refusal explorer.
- Tests: each notification class is produced by exactly the bit patterns specified.
- Exit: a demo application shows all five notification classes from a scripted log.
WP20 Interfaces (L12)
- Purpose: how people and services use the system.
- Depends: WP12, WP14.
- Deliverables: CLI (
init,append,batch,open,verify,show,explain <pos>,why-refused <digest>,index rebuild,transcript); a library API mirroring the pipeline; a text spelling for entries; a service endpoint for submissions with idempotent retries. - Exit: the v1 README quick-start works against v0.1b with documented differences.
WP21 Migration from v1
- Purpose: v1 logs under v0.1b.
- Depends: WP08, WP18.
- Deliverables: the v1 verb (phase << 6 | code) → (R, D, M, phase) table; a converter; a mismatch report wherever the derived F/S/O disagree with the verb's implied ones (lemmas L2, L3); the reconciliation of the three control-character definitions and the seal-code discrepancies (COMMIT 0x14 vs 0x15, seal 0x01 vs 0x02); or, if the owner chooses, the rule "v1 logs stay under v1".
- Gated by: Stage H (owner).
- Exit: every v1 conformance log either converts with a clean report or is refused with a stated reason.
WP22 Conformance suite
- Purpose: the shared truth for every implementation.
- Depends: all WPs.
- Deliverables: valid and invalid vectors per WP; the corpus (75 entries) extended with counterexample entries (note: Phase 2 of the work plan); golden logs with expected state hashes; the bootstrap transcript; an expected-refusal table.
- Exit: two implementations agree on every vector.
WP23 Performance and limits
- Purpose: budgets (§7) measured, not assumed.
- Deliverables: benchmarks at 10⁴, 10⁶ and 10⁷ entries; step limits for closure and rule evaluation; size limits (line length, roles, pack size); a regression gate in CI.
WP24 Security
- Purpose: trust and abuse resistance.
- Deliverables: ed25519 keys for roots and principals (the private key never in the log); signature checks for recorders; bounded work per entry (no entry can force unbounded closure work); refusal of oversized or deeply nested input; a dependency review of the hash and signature libraries.
WP25 Documentation and release
- Deliverables: the v0.1b specification text (from the master note once decided); a reader's guide; companion documents updated; release notes produced from the record (labs spec §15); freeze-gate status.
4. Dependency graph
WP01 → WP02 → WP03 ─────────────────────────────┐
│ │
└→ WP04 → WP05 → WP06 → WP07 → WP08 → WP09 → WP10 → WP11 → WP12 → WP14 → WP15 → WP18
│ ↑ │ │
└──────→ WP13 ───────┘ ├→ WP16 → WP17
├→ WP19
├→ WP20
└→ WP21 (needs WP18)
WP22, WP23, WP24 run alongside from WP04 onward; WP25 closes.
5. Milestones
| M | Name | WPs | Exit |
|---|---|---|---|
| M0 | Groundwork | — | repo layout, CI, vector format, decisions in §9 recorded as parameters |
| M1 | v1 byte parity | 01, 02 | all six v1 conformance cases match the Rust kernel |
| M2 | Kernel as data | 03 | identical K and bootstrap transcript in two implementations |
| M3 | Header | 04, 05 | v0.1 vectors pass; v0.1b type field behind wire.type |
| M4 | Names and state | 06, 07 | identical symbol and state roots across replays |
| M5 | Core for in and is |
08–11 (in, is) | derivation, laws, guards, effects for membership and properties |
| M6 | Books | 11 (to) | transfers, holds, reversals, intake, issuers; conservation fuzzed |
| M7 | Authority | 13, 10 (g_O), 11 (may) | grants, mandates, delegation; A/B probes |
| M8 | A working log | 12, 14 | genesis, setup policies, strict modes, open = replay, crash recovery |
| M9 | Packs and the table | 15, 18 | packs load; label pack v1 passes naming checks |
| M10 | Fast reading | 16 | indexes and checkpoints within budget |
| M11 | Seed | 17 | bootstrap transcript runs in both readers |
| M12 | Use | 19, 20 | CLI, API, notifications demo |
| M13 | Migration | 21 | v1 logs convert or are refused with reasons |
| M14 | Second implementation | 22 | full agreement; freeze gates G1–G5 recorded |
| M15 | Release | 23–25 | performance and security gates; Version Alpha with release notes |
6. Testing strategy
| Layer | Kind of test |
|---|---|
| All | unit tests per function; vectors in a shared, language-neutral format (JSON lines: input, expected output or refusal code) |
| Bit laws | exhaustive over 128 values |
| Codec | property round-trips; fuzzing; corruption detection |
| Core | table-driven guard and effect tests; scenario scripts |
| State | algebraic property tests (associativity, commutativity where claimed) |
| Pipeline | metamorphic: replay = submission; crash and restart |
| Authority | differential A vs B; incremental vs full recomputation |
| Whole system | golden logs with expected state roots; differential testing between implementations; long fuzz runs on random valid and invalid logs |
7. Performance budgets (targets, to be measured in WP23)
| Operation | Target |
|---|---|
| Header decode and filter | O(1); about 10⁸ headers/s in a compiled implementation |
| Name resolution | O(1) expected per name (one hash, one probe) |
| Birth | O(1) amortised |
| Derivation of F, S, O | O(1) after resolution |
| Laws | O(1): one or two bit operations plus one set lookup |
| Guards except g_O | O(1) |
| g_O (authority path) | O(depth) on forest-shaped data; O(V + E) worst case with goal-directed evaluation |
| Effect and commit | O(roles) |
| Balance at any position | O(log n) |
| Restart | O(size of one segment) from the latest checkpoint |
| Cold rebuild | O(n), once |
8. Security outline
- Roots are supplied trust (a public key, or a name labelled "named trust"). Nothing in the log can create a root after GENESIS.
- Every recorder's line is signed or arrives over an authenticated channel; signatures are checked before the pipeline runs.
- Bounded work per entry: closure and rule evaluation run under a step limit; exceeding it is a refusal, never a stall.
- Inputs are bounded: line length, role count, pack size and nesting depth.
- Secrets never enter the log, a pack, a refusal reason or an index.
9. Decisions that gate work
| Decision | Gates | Where |
|---|---|---|
| F, S, O meanings | WP08 onward | note §15 Q1 |
| Class rule and intake from outside | WP06, WP11 | note §15 Q2 |
| Trait set | WP06, WP19 | note §15 Q3 |
| Ownership forms | WP10, WP14 | note §15 Q4 |
wire.type (6 bits or 7 checked) |
WP04 | note §15 Q5 |
| Batch typing rule | WP12 | note §15 Q6 |
resource.second-place |
WP10 | note §15 Q7 |
| X06 delta overflow; versioning (G4, G5) | WP04 | D-09 |
| ACT end reading (D-02) | WP18, WP21 | D-02 |
| Migration of v1 logs (Stage H) | WP21 | Stage H |
| Label pack version | WP18 exit | owner review of the 128 table |
| Licence | WP25 | release blocker |
10. Risks
| Risk | Mitigation |
|---|---|
| Derived bits disagree with existing data | WP21's mismatch report makes every disagreement visible before migration |
| Authority closure is too slow at scale | goal-directed evaluation; measured in WP23; Reader B kept as a fallback for forest-only deployments |
| Births by first mention create clutter from typos | aliases in packs; strict mode per deployment; a "rename" view (a new name declared equal to an old id) |
| Two implementations drift | shared vectors; differential tests in CI on every change |
| Scope grows in every direction | each WP's exit is fixed; one milestone at a time |
Appendix A: approach in assembly
Use assembly only where measurement shows it pays, behind a C ABI. Keep a portable C fallback for every routine.
- Good fits: the header alphabet codec (table lookups and shifts); bit-field extraction and the law checks (single instructions:
xor,and,shr); SHA-256 through the CPU's extensions (x86 SHA-NI, ARMv8 crypto) or a vectorised multi-buffer form for seal verification; header-only filtering over a block of headers with SIMD compares (AVX2 or NEON), producing a bitmap of matching lines. - Poor fits: parsing, symbol tables, the closure, policies. Write those in C.
- Practice: pick the targets (x86-64 System V and AArch64) and the assembler (NASM, or GAS syntax). No heap allocation and no global state in assembly routines; the caller passes buffers. Constant-time handling is not needed (no secrets are processed), but determinism is: no floating point. Test each routine against the C fallback on every vector and on random input.
Appendix B: approach in C
A good fit for the fast second implementation, and for embedding in other systems.
- Language and build: C17,
-std=c17 -Wall -Wextra -Werror, with sanitizers (address, undefined) in CI;stdint.hfixed-width types everywhere; no undefined behaviour (no signed overflow, no type punning outsidememcpy). - Memory: arena allocators per segment and per batch; the symbol table as an open-addressing hash map plus a growable array; no allocation inside the pure core beyond the arena handed to it.
- Numbers: quantities as 128-bit scaled integers (two
uint64_t, or__int128where available) with a declared scale per unit; overflow is a refusal. - Errors: functions return a status code; refusal codes are an
enumshared with the vector format. - Hashing and signatures: a vetted library (for example libsodium for ed25519) and a small, tested SHA-256 (or the platform's).
- Testing: a small test framework (Unity or Criterion); libFuzzer or AFL++ harnesses for the codec, canonical parser and pipeline; differential tests against the Python reference through the shared vector files.
- Structure: one header file per layer; the pure core in its own translation units with no I/O.
Appendix C: approach in Python
The reference implementation and the oracle for differential tests.
- Version and style: a current CPython 3; standard library only for the core (
hashlib,json,decimal,dataclasses,enum); type hints throughout, checked with a type checker. - Clarity over speed: frozen dataclasses for records; pure functions
step(state, entry) -> (state, result); state as immutable maps (or copy-on-write dictionaries) so earlier states stay available for debugging. - Numbers:
decimal.Decimalwith a fixed context; neverfloat. - Testing:
unittest(as the repo already uses) plus Hypothesis for property tests (bit laws, codec round-trips, algebraic laws, conservation); the shared vector files as the source of expected results. - Role: generates the position registry (WP18), the bootstrap transcript (WP03) and golden logs (WP22). Every other implementation is checked against it.
- Running untrusted inputs: run with
-Iand keep fixtures in their own directories, as the repo's lab rules already require.
Appendix D: the existing Rust kernel
The v1 kernel in crates/ (21 tests, 6 conformance cases) stays as it is: the reference for v1 logs. Its canonical form, seals and chain code are candidates for reuse in WP01–WP02 because the rules are unchanged. A Rust second implementation of v0.1b would follow Appendix B's structure, with #![forbid(unsafe_code)] in the core. The choice of language for the second implementation is an owner decision.
STREAM v0.1b: how the whole system works
Lab: 2026-11-30-v0-1b-direction-claude · Date: 2026-12-01 · Status: working draft; explains the direction in master-design-note.md, which nothing here overrides.
This is the plain-language account. design-rationale.md explains why each choice was made, and mathematics.md sets out the formal model.
1. What STREAM is
STREAM is a way of keeping a record that services, people and agents can all write to and trust. Everything that happens is written as a line in a log. Nothing is ever changed or deleted. Balances, boards, permissions and timelines are not stored anywhere; they are worked out from the log by reading it from the start.
Applications built on STREAM (a ledger, a task board, an inventory, a permissions screen, a notification feed) are different ways of reading the same log.
2. The parts
| Part | What it is |
|---|---|
| Log | An append-only file of lines, split into sealed segments. Each seal is a hash of the segment, chained to the previous one. |
| Line (entry) | One recorded act or report: a short header plus a body naming the things involved. |
| Kernel | A fixed description of how lines are read: the meaning of each header bit, the checks, and the effects. Its hash is its identity, and every log names it in its first line. |
| Reader | The program that reads the log line by line and keeps the current state. Writing a line and reading it back go through the same steps. |
| State | What the reader knows so far: things and their owners, memberships, property values, permissions, book balances, open items. |
| Packs | Optional bundles of shared vocabulary (units, kinds, verb labels) and policies, adopted by one line each. |
| Views | What applications show: balances, boards, notifications, drift between what was set and what was seen. |
3. Four kinds of relationship
Every line changes one of four kinds of relationship:
| Relation | What it records | Examples |
|---|---|---|
| in | membership: something is inside a boundary | a task on a board, a device on a host, an invoice tagged "urgent" |
| is | the value of a property | a status, a setting, a price, a measured temperature |
| may | a permission | who may record, approve, spend or use something |
| to | a quantity moving between books | a payment, a stock movement, energy used |
4. The six questions every line answers
A line's position is the answer to six questions. Each has exactly two answers, except "which relation", which has four.
| Question | Answers |
|---|---|
| Does the line perform the act, or report something seen outside? | enact / observe |
| Is the thing a record or a resource? | record / resource |
| Is it committed, or pending until a later line settles it? | fact / possible |
| Is the affected party the one acting, or someone else? | self / other |
| Which relation? | in / is / may / to |
| Does it establish something, or undo an earlier line? | into / out of |
Together these give 128 positions. A fifth detail, the phase, says how the act sits in time. It answers two more questions: does this line open a span of time, and does it close one?
| doesn't close | closes | |
|---|---|---|
| doesn't open | sample (a reading inside something ongoing) | end |
| opens | begin | instant (a complete act at one point) |
The 128 positions are what get verb names. Phase is like a verb's tense: the same verb started, completed, or read in progress. So 128 positions × 4 phases = 512 ways a line can be typed. Every relation can use every phase: even a permission can take time to take effect (begin, end) or be read from an outside system (sample). How long a permission lasts is not a phase; it is the permission's validity, and a one-off permission is one that can be used once.
In the header, the position takes one byte and the phase rides in a second byte, together with which roles are present and whether the value is an estimate. Two bytes say what happened and how the record is shaped.
All six answers are written in the line's header, with the phase. Three of them (committed or pending, relation, establish or undo) are simply read. The other three can also be worked out by the reader, and are checked against what's written:
- perform or report: does the line name a source (a sensor, a bank statement, a registry)? If so, it reports.
- record or resource: what kind of thing is it? The kind's class was fixed when the kind first appeared.
- self or other: who owns the affected thing, and is that the party acting?
A line whose written answers disagree with what the reader works out is refused. So the meaning of a line can't contradict what the log already knows, and a tool can still filter lines by any answer from the header alone, without the reader's state. (A compact form that leaves those three out of the header exists for links where every reader keeps state.)
5. How a line is read
- Check the bytes are in canonical form and the segment's seal chain holds.
- Read the header.
- Resolve every name the line mentions: look up each thing in the reader's state. Anything never seen before is born here, owned by whoever is acting.
- Work out the three remaining answers and assemble the position.
- If the line undoes or settles an earlier line, check the link fits (§7).
- Run the guards: the checks that must all pass for the line to be accepted.
- Apply the effect: update memberships, values, permissions or balances.
- Commit. If anything failed, record a refusal instead, with the reason, and nothing is born.
5b. Four operations underneath the four relations
Each relation is the effect of one basic operation, and each operation obeys one rule that the reader checks:
| Relation | Operation | Its rule |
|---|---|---|
| in | enclose: put something inside a boundary | inside of inside is inside; nothing is inside itself; a resource is in one place |
| is | call: give a thing a value under a name | giving the same value twice changes nothing |
| to | cross: move an amount from one side to the other | crossing back undoes it; what leaves one side enters the other |
| may | apply the log's own rules to its later lines | permissions are exactly what can be traced back to a root |
They build on each other in that order, starting from GENESIS, which draws the log's boundary. That boundary's outside is where outside:EUR lives: bringing a holding into the log is a crossing of the log's own boundary.
Reports from outside (lines with a source) are kept apart from what the log itself enacts. A view can compare the two: that comparison is drift.
6. Guards
A guard is a yes/no check. A line is accepted only if every guard passes. Examples:
- A report must name its source.
- A resource can be in only one place at a time, and its books never go negative.
- To undo something, it must still be in force, and not already undone.
- If the affected thing belongs to someone else, the actor must hold a permission (a grant, or for a payment taken from someone else's book, a mandate).
- If an agent writes on someone's behalf, it needs a grant to do so.
- Every policy adopted through a pack must hold. A pack can add checks but can never remove one.
A refused line is still recorded, as a refusal receipt. Asking again with the same line gets the same answer.
7. Lines that refer to earlier lines
Two kinds of line point back at an earlier one:
- An undo reverses what an earlier line established: leave a group, withdraw a value, revoke a permission, reverse a payment. It has the same position as the original with only the establish/undo answer flipped.
- A settlement completes a pending line: a request answered, a hold posted, an offer accepted. It has the same position with "pending" changed to "committed". If the other party records it, the self/other answer also flips, because it is now written from their side.
Each pending line can be settled once, and each established line can be undone once. A pending line can also simply be closed: withdrawn, declined or timed out. That leaves nothing behind except the record that it closed.
8. Money and other quantities
- One line per transfer. It names the book the quantity leaves, the book it enters, the amount and the unit. The reader posts both sides, so every transfer balances by its form.
- Units are written the way people write them,
120 EUR,€120,5 kg, and a new unit symbol is born the first time it is used. - Holdings brought into the log ("this account holds 500 EUR") are a transfer from a book named
outside:EUR, which stands for everything beyond the log. - Holds: a pending transfer reserves the amount. Posting it later cites the hold; voiding it or letting it time out releases the reservation.
- Push and pull: sending from your own book needs nothing more. Taking from someone else's book needs their mandate.
- Issuing: only a book declared as an issuer can create a quantity of a record unit (credits, points). Resource units (kWh, kg) can never be issued; they can only enter from outside.
9. Starting a log
A log needs exactly two lines to begin:
- Preamble: names the kernel by its hash.
- GENESIS: names the log, its root principals, its clock and timezone, and its setup policies. The roots are trusted because they are named here; that trust comes from outside the log.
After that, a root can simply start writing. Names are born as they are mentioned. Further setup is only needed for what the use requires: other writers (a grant each), acting on behalf of others (a grant), taking payments (mandates), issuing credits (an issuer book), shared vocabulary (packs).
Setup policies decide how strict the log is: whether names can be born by first mention or must be declared first, whether ownership can be given away without acceptance, and so on. Packs can make a log stricter later, never looser.
Optionally, for audit, a log can begin with a printout of every step the reader took to start up. It is off by default, because that printout follows entirely from the kernel hash in line 1.
10. Ownership given to someone else
When a line creates something for someone other than the actor, the actor may lose control of it at once. A log can treat this four ways: assign it outright (needs the new owner's prior grant); offer it and wait for acceptance; assign it but keep some rights; or assign it under a standing agreement. Which one applies when nothing was agreed is a setup policy.
11. What applications see
| View | Worked out from |
|---|---|
| Balances | every transfer, with holds shown separately |
| Boards and groups | memberships open at a point in time |
| Settings and status | the latest value of each property |
| Drift | a value that was set compared with the value last reported from outside |
| Permissions | grants in force, traced back to a root |
| Notifications | lines that affect something of yours that you didn't write: done to yours; awaiting your response; undone; your request answered; reported from outside |
| Timelines | phases: begin and end of activities, samples of signals |
12. A short worked log
1 preamble kernel = sha256:…
2 GENESIS log: shop · roots: actor:owner · clock: ntp · tz: UTC · policies: default
3 to from outside:EUR to book:till 500 EUR opening float (book:till born, owned by actor:owner)
4 in member mug-01 boundary shelf:A at: shop-floor the mug is placed; born as an item (a resource: one place at a time)
5 is subject mug-01 property price 12 EUR a price is set on the same mug
6 may holder agent:till-bot action: record sales for actor:owner the till agent may record sales for the owner
7 to from book:till to book:supplier pending, 200 EUR a hold for a supplier payment
8 to from book:till to book:supplier 200 EUR, cites 7 the hold is posted
9 to reverses 8 a mistaken payment is reversed
Reading line 8: committed, relation to, establish; performed, not reported; EUR is a record unit; book:till is the owner's, so "self"; it cites the hold at 7, whose position differs only in pending → committed. Guards: the owner owns the source book; available funds cover 200 EUR. Effect: the reservation is released and both sides post. Line 9 differs from line 8 only in establish → undo, so it posts the exact opposite.
Order matters for births: the mug is first mentioned with a location in line 4, so it is born as an item, a resource. Had the price come first, the mug would have been born as a generic record, and the one-place rule would not apply to it until a pack or declaration said otherwise.
STREAM v0.1b: design rationale
Lab: 2026-11-30-v0-1b-direction-claude · Date: 2026-12-01 · Status: working draft. Records why each element of master-design-note.md takes the form it does, what was tried before, and what was rejected. Nothing here is decided unless marked.
1. The problem v0.1b starts from
Work from 2026-11-26 to 2026-11-29 left four findings:
- The 6-bit stored type could not recover its three context bits.
derive_contextv2, given a kind table, an owner boundary and a frame anchor, recovered all three on 6 of 75 corpus entries. Its lemmas showed why: in the corpus, F, S and O are fixed per verb (L4), so the same stored bits carry different context (L1), the same actor is "self" for one verb and "other" for another (L2), and the same object is "frame" for one verb and "world" for others (L3). - The direction bit had no single meaning. Four uniform readings each passed only their own family's test; the per-relation reading (D1b) and Option 9's 2-bit mode each passed 4 of 5. The remaining disagreement is in the data: the corpus reads ACT end as D = 0, preset QToB4 as D = 1.
- Reader A and Reader B separate only at branching delegation (and at re-checking data seeded by the harness).
- The v1 kernel has known gaps: genesis-first and genesis-only aren't enforced, and
open()doesn't verify seals or run the entry checks.
v0.1b's direction answers 1 and 2 by changing what the bits mean, 3 by treating A and B as two evaluation strategies, and 4 by making open replay through admission.
2. Decisions and their reasons
2.1 One meaning per bit
Choice: each bit asks one question, the same for all four relations (note §1). Why: a bit whose meaning depends on the relation can't be used on its own as a filter, can't be derived from anything outside the verb, and turns every new verb into a fresh argument about what the bit means. With one meaning per bit, behaviour comes from combining bit rules (note §5), and two verbs at the same position behave the same by construction. Rejected: per-relation meanings (D1b), because the filter "all D = 0 lines" then means nothing across relations; verb-keyed tables, because they make the bits a cache of the verb.
2.2 F = enact or observe
Choice: F is 1 exactly when the line names a source.
Why: this is the line between what the system is the authority for and what it only reports. Sensor and observation standards (W3C SOSA/SSN) keep observation separate from actuation for the same reason. Kubernetes keeps desired state (spec) apart from observed state (status) and reconciles them; that pattern becomes a drift view comparing frame and world values of one property. A report can be contradicted later; an act can only be undone.
Rejected: "frame" as "about the record's own structure". It could not be read off a line, and in the corpus it tracked the verb.
2.3 O = is the affected party someone other than the actor?
Choice: O compares the owner of the affected object with the principal the line acts for (note §1, §2). Why: this is the difference that changes the guard. Acting on your own things needs ownership; acting on someone else's needs a grant, a mandate or evidence. It is also relative to who writes the line, which matches Hohfeld's correlatives: one legal relation looks like a right from one side and a duty from the other. That relativity is what lemma L2 had found in the corpus. Consequence: a counterparty's record of the same outcome flips O, so the settlement rule needs ⊕8 (note §3). Rejected: O as "the actor's identity class", which can't be computed, and O as fixed per verb.
2.4 S = record or resource
Choice: S is the class of the affected thing's kind, fixed when the kind is born (note §7.3).
Why: the class has calculable effects. On in, a resource is in one place at a time and a record may be in many. On to, an issuer may exist for a record unit but never for a resource unit.
History (iteration 2 correction): iteration 1 inferred the class from how a quantity first enters (issued means record, observed means resource). That failed because money and kWh both usually enter the same way, as a declared holding brought in from outside. The rule now defaults to record and marks a resource by a location role or a move; packs can declare either.
2.5 D = establish or undo
Choice: D = 1 means the line undoes a cited earlier line (note §1, §3).
Why: "which way something moves" is already said by roles (from, to, member and boundary). Putting it in D as well created the disagreement between readings. Undo has the same shape in every relation, and it is what the append-only rule needs: corrections are new lines that cite what they correct.
Consequences: Option 9's four modes are covered without widening the header (normal = D 0; reversal = D 1; edge = phase; compound = linked lines). ACT end establishes (D = 0) because closing is phase's job; that agrees with the corpus. Preset QToB4 would then read as an undo. D-02 remains an owner decision.
2.6 Three bits derivable, and stored and checked by default
Choice (iteration 3): the header carries the full 7-bit position; F, S and O are derived by the writer's reader and must equal what is stored (note §1.2). A 6-bit profile that omits them is kept for links where every reader holds state. Why: the three bits are total functions of the line and the state before it, so storing them adds no information, but it keeps the v0.1 header's main purpose: deciding from header bits alone whether a line can match a query. Computing them only would make every filter on F, S or O depend on the Register, which is costly for raw scans, archives and tools without state. Storing and checking means they are cheap to read and cannot be wrong. The v0.1 short header stores M and D twice, so even the 7-bit form frees 2 bits. History: iterations 1–2 defaulted to 6 bits; the owner raised the filtering cost, and the default changed in iteration 3.
2.7 Births by first mention
Choice: a name that has never been seen is born by the line that mentions it, owned by the actor (note §6). Why: the plainest use of a log (write one line about something) must work without setup. A rule that refuses unknown names makes every first use fail until someone has declared things, and pushes users into packs before they need them. Safeguards: births are deterministic, recorded as part of the line, and discarded if the line is refused. Principals are born self-owned and can't write until granted. Strict mode turns births off. Rejected: refusing unknown names (iteration 0); requiring a pack for any kind or unit.
2.8 Units are written, not declared
Choice: the symbol written with an amount is the unit, born at first mention (note §7.1).
Why: that is how people write quantities. A pack adds dimensions, aliases and conversions when they are wanted, but a log never needs one to record 5 kg.
2.9 One line per transfer
Choice: a transfer is one line naming from, to, amount and unit; the Books post both sides (note §8).
Why: transfers are the most frequent activity, so they need the leanest form. TigerBeetle stores a transfer as one record with a debit and a credit account and makes two-phase transfers out of a pending record plus a follow-up that posts or voids it. That shape maps onto STREAM's bits: push or pull is O, pending is M, reversal is D, and voiding is closing a pending item. Conservation then holds by the form of each line.
Exchanges: REA accounting pairs the two sides of an exchange (give and take) as linked events. In STREAM that is two linked transfers committed together, not a separate verb.
Rejected: separate lines per leg (two verbs for one event); a verb per transfer variant.
2.10 Declared holdings come from outside
Choice: "this book holds 500 EUR" is a transfer from outside:EUR (note §7.2).
Why: most money and most resources enter a log as a declaration, not by being issued or observed. Accounting books an opening balance against an equity account for the same reason: every amount has a source. The outside book's balance shows how much has been brought in.
2.11 Pending items, closing and duties
Choice: M = 1 lines change nothing committed. They are settled once by a fact that cites them, or closed (withdrawn, declined, voided, timed out) by the seed's retire, which needs no position of its own.
Why: the DEMO transaction pattern separates coordination acts (request, promise) from production acts (execute, state). FIPA's agent messages show that refuse and cancel leave the same state, so they share one operation. A duty (ODRL) is a pending act owed by the duty-holder, discharged by its fact. A prohibition is a guard.
2.12 Delegation and attenuation
Choice: delegation is a grant whose granter's own authority was granted, checked by an order on permissions (actions, scope, validity, depth). Why: object-capability security shows that authority can be narrowed but never widened, and that revocation works through an intermediary. W3C PROV records "acted on behalf of" as an attribute of an agent relation, not as a separate act. So DELEGATE is GRANT plus a check, not its own position.
2.13 Readers A and B
Choice: A's semantics (rules and closure) is the reference; it is evaluated goal-first so each query costs about what B's walk costs. Why: B's single-parent forest is a choice of representation, not a requirement for speed. Walking a branching delegation graph with a visited set is still linear per query.
2.14 open replays through admission
Choice: loading a log runs every line through the same pipeline as submission.
Why: it closes the v1 gap (open() doesn't verify), enforces genesis-first and genesis-only, and makes D-05 unnecessary, because no fact can exist that skipped the guards.
2.15 Setup policies only tighten
Choice: policies are fixed at GENESIS, and packs may only make them stricter (note §12.3). Why: a pack that could loosen policy could grant authority by being loaded. Keeping packs additive to guards keeps authority in grant lines only.
2.16 Printing the start-up
Decided 2026-12-01 (owner): an audit option, verbose-genesis, off by default.
Why: the start-up is fully determined by the kernel hash in the first line, so the printout adds no information; it is useful for teaching and audit. The canonical bootstrap transcript is published once per kernel version.
2.18 Relations as four operations with laws
Choice (iteration 3): Stage 0 defines four operations (enclose, call, cross, and the log applying its own distinctions to later lines), each with one checkable law. The relations in, is, to, may are the names of their effects (note §3.4).
Why: listing the relations and writing each effect separately declares them. Defining operations with laws lets behaviour follow from the laws, gives each relation a test it must pass to earn its name, and fixes an order in which they unfold from GENESIS.
Lineage: this restates note 08 (relations as operators on a common state), DIGEST §3 (the 2×2 and its logic table) and note 16 §9 (typed interpretations of cross, call and re-entry), under v0.1b's conditions: laws become start-up and conformance checks, undo is one cited operation, and outside is the outside of the genesis mark (note §16).
Open: whether may's operation is called re-entry (note §15 Q9).
2.19 Observed and authoritative state
Choice (iteration 3): lines that report (F = 1) write an observed partition; lines that enact (F = 0) write the authoritative one. Guards read the authoritative partition; drift is the difference. Why: it makes F a difference in what a line does, not only a label, and it gives reconciliation a defined place.
2.20 Phase as (opens, closes), kept apart from D, M and not-yet
Choice (iteration 4, direction approved by the owner): phase answers whether a line opens or closes a span of time. D closes a relation's standing; M marks an uncommitted act; the absence code not-yet marks a missing piece. The effect of a durative act lands at its end; the end cites its begin.
Why: before this, leaving a group could be written as in, D=1 or in, D=0, end, and a transfer in progress as a hold or a begin. Two spellings of one event make readers disagree; the ACT-end dispute (D-02) is that disagreement in real data.
Correction (iteration 5, after the owner's challenge): round 4 marked may × {begin, end, sample} invalid. Spans of permission are indeed not phases (they are standing: validity, grant, revoke), but the act of permitting can take time, and permission state can be sampled. So no fact-form is invalid in advance.
Resolves: DIGEST grades phase as forced; notes 05 and 06 say time can't come from a distinction. Both hold: the four-value shape is forced by two yes/no questions; time itself is supplied by the clock.
2.21 The type in one byte
Choice (iteration 4, proposed): the type is c, one byte and one ASCII code; phase is a separate 2-bit field, as in the v0.1 header. The 9-bit (c, phase) value is only a query key. Why: it keeps v1's one-byte type and the "a position is one ASCII character" property, and keeps naming at 128. Putting phase inside the byte (option B) would force F out of the header. Concrete form (iteration 5): two bytes, "what" (change flag + c) and "shape" (extended flag + phase + role presence + estimate). Every v0.1 short-header field fits in 28 bits instead of 30, byte-aligned for parsing and SIMD filtering. It is compression against v0.1 and one bit more than v1's byte for twice the type space. Open: owner decision (design note §15 Q11).
2.17 Primitives stay outside the matrix
Choice: Laws of Form moves, seed forms and kernel framing (OPEN, COMMIT, BIND, ACK) are not positions. Why: the moves are the axes; the seed forms create, close and run lines; the framing structures the log that lines sit in. Giving them positions would mix the level that defines the matrix with the level it describes.
3. What this direction gives up
| Given up | In exchange for |
|---|---|
| A line that shows its full position on its own | three bits that can't contradict the state, and a smaller header |
| Per-relation shades of meaning for direction | one undo rule everywhere, and no header widening |
| Up-front declaration of everything (by default) | a log that works from its first line; strict mode keeps declaration available |
| The v1 verb list as the carrier of meaning | behaviour composed from bit rules; verb names become a separate label pack |
| v1 logs reading identically | a migration report showing exactly where they differ |
4. Sources consulted
- TigerBeetle, two-phase transfers and the transfer reference: https://docs.tigerbeetle.com/coding/two-phase-transfers/
- Resources, Events, Agents (REA): https://en.wikipedia.org/wiki/Resources,_Events,_Agents
- DEMO (Dietz): https://en.wikipedia.org/wiki/Design_%26_Engineering_Methodology_for_Organizations
- Hohfeld's legal relations: https://www.ics.uci.edu/~alspaugh/cls/shr/hohfeld.html
- FIPA communicative acts: https://www.dca.fee.unicamp.br/projects/sapiens/Resources/Agents/Platforms/FIPA/specs/fipa00037/PC00037E.html
- ODRL 2.2: https://w3.org/TR/odrl-model/
- W3C SOSA/SSN 2023: https://www.w3.org/TR/vocab-ssn-2023/
- W3C PROV-O: https://w3.org/TR/prov-o/
- Object-capability model: https://en.wikipedia.org/wiki/Object-capability_model
- Kubernetes controllers: https://kubernetes.io/docs/concepts/architecture/controller/
- In this repository:
docs/compact-header/bitpack-header-draft-v0.1.md,docs/kernel-model/DIGEST.md,spec/kernel.descriptor,spec/conformance/.
STREAM v0.1b: the mathematics
Lab: 2026-11-30-v0-1b-direction-claude · Date: 2026-12-01 · Status: working draft. Sets out the formal model behind master-design-note.md. Proofs are sketches; making them complete is work package WP22 in technical-work-plan.md.
1. Notation
| Symbol | Meaning |
|---|---|
| B = {0, 1} | bits |
| ⊕, ∧, ¬ | XOR, AND, NOT on bit vectors |
| ⊥ | undefined (never set). Distinct from 0, ∅, and w (withdrawn). |
| e, eₙ | an entry; the entry at position n |
| Sₙ | the state after entries 1…n; S₀ is the initial state |
| H | SHA-256 |
| ‖ | byte concatenation |
2. The position space
2.1 Positions are 7-bit vectors
C = B⁷ c = 64F + 32S + 16M + 8O + 2R + D, R = 2r₁ + r₀
bit i of c: 6:F 5:S 4:M 3:O 2:r₁ 1:r₀ 0:D
C is the 7-dimensional cube: 128 vertices; two positions are neighbours when they differ in one bit. Read as a vector space over GF(2) (the two-element field), ⊕ is vector addition.
2.2 Filters are subcubes
A filter fixes some bits: (c ∧ m) = v with mask m and value v (v ⊆ m). Fixing k bits selects a subcube of 2^(7−k) positions.
| Filter | m | v | Positions |
|---|---|---|---|
| all transfers (R = to) | 0000110 | 0000110 | 32 |
| all pending (M = 1) | 0010000 | 0010000 | 64 |
| pending transfers | 0010110 | 0010110 | 16 |
| all undos (D = 1) | 0000001 | 0000001 | 64 |
| world, resource | 1100000 | 1100000 | 32 |
- The intersection of two filters is a filter (combine masks; it is empty if they fix one bit to two values). So any conjunction of conditions on bits is one mask test.
- A union of filters is not a single filter in general. It needs a small set of masks, or a lookup table of 128 bits.
- Testing one line against any filter costs one AND and one compare.
2.3 Distances between related positions
| Relation | Bit change | Hamming distance |
|---|---|---|
| a line and its undo | bit 0 | 1 |
| a pending line and its outcome, same actor | bit 4 | 1 |
| a pending line and its outcome, counterparty | bits 4 and 3 | 2 |
2.4 Phase, and 512 against 128
Iteration 4. Phase is a second, separate space: P = B², read as (opens, closes).
| (opens, closes) | phase |
|---|---|
| (0, 0) | sample |
| (1, 0) | begin |
| (0, 1) | end |
| (1, 1) | instant |
Ordered by bits, P is a lattice with join ∨: begin ∨ end = instant, and sample is the bottom. The end of a begun act is p ⊕ 11.
- C (128) is what gets named: the verbs.
- C × P (512) is every way a line can be typed: each position in each of four aspects. As a query key it is a 9-bit value, and filters over it are still one AND.
- Valid forms: all 512 in the kernel. (Iteration 5 corrected iteration 4, which marked 96
mayforms invalid.) The Stage A workbook may mark individual cells invalid; there is no blanket rule per relation. - Stored: c in one byte and phase in a second byte with role presence (4) and estimate (1); the high bits of the two bytes carry the change and extended-follows flags (design note §1.3.1). 16 bits plus a 12-bit time delta = 28 bits, against v0.1's 30. The 9-bit (c, phase) value is never stored as one field.
- μ, ν, σ act on C only; phase is unchanged by them.
3. The three operations and their monoid
μ(c) = c ⊕ 0000001 (flip D) undo
ν(c) = c ⊕ 0001000 (flip O) the other side's record
σ(c) = c ∧ ¬0010000 (clear M) settle
- μ and ν are translations of the cube: bijections, each its own inverse.
- σ is a linear projection over GF(2): σ(a ⊕ b) = σ(a) ⊕ σ(b), and σ∘σ = σ. It is not invertible: it merges each pending position with its fact twin.
- Each acts on a different bit, so all three commute.
Presentation:
⟨ μ, ν, σ | μ² = 1, ν² = 1, σ² = σ, μν = νμ, μσ = σμ, νσ = σν ⟩
Elements: {1, μ, ν, μν} × {1, σ}, eight in all. These are distinct: σ ≠ 1 because it changes every position with M = 1. The monoid is the direct product of the Klein four-group {1, μ, ν, μν} and the two-element semilattice {1, σ}.
Consequence: every legal link between two lines (undo, settle, counterparty settle, and their combinations) is one of eight maps, each computed with at most two bit operations. The start-up self-check (note §11, 0.3) verifies the six defining relations on all 128 positions: 768 comparisons.
Parallel with Laws of Form: μ and ν are involutions, like crossing (cross twice = return). σ is idempotent, like calling (call twice = once). This is a structural parallel; nothing here derives the kernel from those axioms.
4. Stored and derived bits
4.1 The derivation functions
Let E be the set of entries and 𝒮 the set of states.
F : E → B F(e) = [ source ∈ roles(e) ]
S : E × 𝒮 → B S(e, s) = [ class_s(kind_s(affected(e))) = resource ]
O : E × 𝒮 → B O(e, s) = [ owner_s(affected(e)) ≠ actor(e) ]
c(e, s) = 64F(e) + 32S(e,s) + 16M(e) + 8O(e,s) + 2R(e) + D(e)
s here is the state before e, plus e's own births (§7).
4.2 What "derived" means, precisely
Given the line and the state, F, S and O carry no further information: H(F, S, O | e, s) = 0. Storing them adds nothing a reader with the state doesn't already have. Storing them anyway turns them into a check: stored = derived, or refuse. That is the default from iteration 3 (7 bits checked), because it keeps filtering on every bit possible from the header alone (§2.2) without any state.
4.3 Why the earlier attempt could not work
With F, S, O fixed per verb, the map from stored bits to context was not a function: two lines with equal stored bits needed different context (lemma L1). That is a pigeonhole failure: 16 stored type cells (R, D, M) cannot name 86 distinct named positions without more information. Under v0.1b the extra information is the line's roles and the state, and the map becomes a function by construction.
4.4 Totality
The derivation is total on admitted lines when:
1. every kind has a class (guaranteed: seed kinds are classed; a new kind's class is fixed at birth);
2. every affected object has an owner (guaranteed: births assign one);
3. affected(e) names a role that is present, or the line is refused (an absence code on the affected role, other than "not-applicable", is a refusal).
5. State algebra
The state is a product: S = Struct × Reg × Auth × Books × Open × Sym. Each part has its own algebra, and that algebra decides how fast it can be read.
5.1 Books: an abelian group
Index books by pairs (book, unit). A frame transfer t = (f, g, q, u) is the vector
δₜ ∈ ℤ^(Books×Units), δₜ[f, u] = −q, δₜ[g, u] = +q, 0 elsewhere
(Quantities are integers at the unit's declared scale.)
- Zero sum: Σ_b δₜ[b, u] = 0 for every u. So δₜ lies in the subgroup Z₀ of vectors that sum to zero per unit.
- Closure: Z₀ is closed under addition and negation.
- Conservation (theorem): the balance vector after n entries, β = Σ δₜ over accepted frame transfers, lies in Z₀. Proof: induction on n; β₀ = 0 ∈ Z₀; each step adds an element of Z₀.
- Reversal is the inverse: δ_{μ(t)} = −δₜ.
- Order doesn't matter for sums: addition is commutative, so the balance after any set of transfers is independent of their order. Per-segment sums combine in any grouping.
Holds. A reservation vector ρ ≥ 0 sits beside β:
hold(f, q): ρ[f] += q
post(hold): ρ[f] −= q; β += δ
void / timeout: ρ[f] −= q
available = β − ρ
The one ordered check. For books that are neither issuer nor outside: available ≥ 0 after every line. The set {x ≥ 0} is not a subgroup (it isn't closed under negation), so this check depends on order and runs line by line. It is the only Books check that does.
Balances at any position. Keep a Fenwick tree (binary indexed tree) per (book, unit) over positions: update O(log n), prefix sum O(log n). Or keep per-segment totals: O(number of segments) + O(segment).
5.2 Register and membership: last-writer-wins maps
A Register update is a one-key map {k ↦ v}. Define override: (a ⊳ b)(k) = b(k) if k ∈ dom(b), otherwise a(k).
- ⊳ is associative: (a ⊳ b) ⊳ c = a ⊳ (b ⊳ c). The empty map is its identity. So (maps, ⊳) is a monoid.
- ⊳ is not commutative: later writes win.
- Consequence: per-segment summaries (the map of last writes in a segment) combine in a tree, and the Register at any position = checkpoint ⊳ (replay of at most one segment).
Value domain: V⊥ = V ∪ {⊥, w}. ⊥ is "key absent" and is never written; w (withdrawn) is a written value that overrides. So "never set" and "removed" stay distinct.
Membership: per (member, boundary), a state in {⊥, in, out} under the same override monoid. A resource adds a constraint: at most one boundary with state in per member. Like non-negativity, this is checked line by line.
5.3 Authority: base facts and a least fixed point
Base facts are grants, each live or revoked, held in an override map by grant id. Authority is a derived relation:
can(x, a) ⇐ root(x)
can(x, a) ⇐ grant(y, x, g) ∧ covers(g, a) ∧ held(y, g)
held(y, g) ⇐ root(y)
held(y, g) ⇐ grant(z, y, g′) ∧ g ⪯ g′ ∧ held(z, g′)
covers(g, a) holds when the act a (its position, object and time) falls within g's actions, scope and validity. held(y, g) says y holds at least g, so y may grant it.
The order ⪯ on permissions: g ⪯ g′ when actions ⊆, scope ⊆, validity ⊆, and depth strictly less. It is a partial order (a product of subset orders and the order on ℕ). Depth strictly decreases along a delegation chain, so every chain has length at most the root depth. That bounds every walk.
Fixed point. The immediate-consequence operator T of the rules is monotone on sets of facts within each stratum. By the Knaster–Tarski theorem it has a least fixed point, reached by iterating T from ∅. On a finite domain that takes at most |facts| iterations. With stratified negation (§6), strata are computed in order, each reaching its own least fixed point.
Cost. Evaluating the full closure per query is what makes Reader A expensive (294 rule applications per can query in the discriminator). Goal-directed evaluation (the magic-sets transformation, or tabling) computes only facts relevant to the query: O(V + E) for reachability, about the cost of Reader B's walk, with A's semantics (branching delegation included).
Incremental upkeep. Adding grants: semi-naive evaluation (only new consequences). Revoking: delete-and-rederive (DRed) or counting, because removing a base fact can remove derived facts that had other support.
5.4 Open items: a use-once set
Open is a set of positions. Establishing or opening a pending item inserts; undoing, settling or closing deletes. Use-once invariant: each element is deleted at most once. A second consumption finds the element absent and is refused. This is the same structure as unspent outputs in a UTXO ledger.
5.5 The four effect laws
Iteration 3. Each relation is the effect of one operation, and each operation satisfies one law. These are the algebraic facts of §5.1–5.4 restated as the defining property of each relation:
| Relation | Operation | Law | Algebraic statement |
|---|---|---|---|
| in | enclose | transitive, irreflexive | containment is a strict partial order on live memberships |
| is | call | idempotent | {k ↦ v} ⊳ {k ↦ v} = {k ↦ v} |
| to | cross | involution, zero sum | δ_{μ(t)} = −δₜ; Σ_b δₜ[b, u] = 0 |
| may | self-application | least fixed point | Auth = lfp(T); every derivation ends at a root |
The 2×2 as properties. in and may build relations whose chains compose (transitive closure). is and to attach values to keys that fold (override, sum). in and is relate a thing to its place or value; may and to relate two parties. So the grid is: {closure, fold} × {one thing, two parties}.
Self-check. At start-up and in conformance, each law is tested on a fixed sample state: set twice = set once; post then reverse = no change, and legs sum to zero; enclose a in b and b in c implies a in c, never a in a; the authority closure equals one more application of the rules to itself, and every chain ends at a root.
Partitions. The state is split by F into authoritative (frame) and observed (world) parts with the same structure. Guards read the authoritative part. Drift for a property p of x is the pair (authoritative(x, p), observed(x, p)) when they differ.
5.6 The fold
step : 𝒮 × E → 𝒮 × Result
Sₙ = π₁(step(Sₙ₋₁, eₙ))
step is total: it returns either an accepted state change or a refusal receipt (which also advances n). The log acts on states as a sequence; it is not a group action, because guards make some lines inapplicable in some states.
6. Logic of the seed language
- Positive rules with every variable bound and no
freshinside rules: least-fixed-point semantics; polynomial in the size of the data; always terminates. - v0.1b adds stratified negation over each entry's own finite set of roles (needed for F = "no source role") and the built-in ≠ (needed for O). Stratified programs have a unique perfect model and still terminate.
- Time-indexed facts: ownership and class are read "as of position n". Either the closure is evaluated over Sₙ₋₁ (the proposed pipeline), or position is an explicit argument of every predicate.
- Step limits: each evaluation runs under a fixed budget. Exceeding it is a refusal, so no line can stall the reader.
7. Births and the symbol table
- Ids are birth ordinals: the k-th name ever born gets id k. The map name → id is injective, and only grows.
- Resolution: one hash of the canonical name and one probe: expected O(1). A miss is a birth.
- Provisional births: for line e, s⁺ = s ⊕ births(e, s). If e is refused, s⁺ is discarded. So births happen exactly for accepted lines.
- Counts: the number of things of each kind is a counter updated at birth.
- Large tables: with a Bloom filter of m bits, k hash functions and n names, the false-positive rate is about (1 − e^(−kn/m))^k. At m/n = 10 and k = 7 it is about 0.8%. There are no false negatives, so "the filter says absent" means "definitely new": a birth with no disk read. Only false positives cost a lookup.
8. Kind traits
A kind's traits form a bitset T ∈ B⁹ (note §7.4). At each accepted line, T ← T ∨ t(e), where t(e) is the trait bits the line exercises.
- T only grows. Traits form the lattice (B⁹, ⊆), and the update is a join.
- A class of kinds (book, place, item, principal…) is a mask pattern on T. Testing it is one AND.
- A conflict is a forbidden pair of bits (for example a resource placed in two boundaries at once). Detecting it is one AND against a conflict mask.
9. The hash chain
seg_hashₖ = H(bytes of segment k before its seal line)
hₖ = H( hex(hₖ₋₁) ‖ hex(seg_hashₖ) ), h₀ = 0²⁵⁶
Changing any byte of segment k changes seg_hashₖ (unless an attacker finds a SHA-256 collision), and so changes hₖ and every later h. Verification recomputes every segment hash: O(total bytes).
A checkpoint at seal k records hₖ and a root hash of the state. Because the state is a deterministic function of the prefix, anyone who replays segment k from checkpoint k−1 can confirm checkpoint k.
10. Header arithmetic
The v0.1 short header is 30 bits (five 6-bit characters).
The default from iteration 3 is the 7-bit checked form.
| Type encoding | Type bits | Freed | Time delta bits | Range (units) | At 1 s per unit |
|---|---|---|---|---|---|
| v0.1 (Position 7 + Phase 2 + Modality 1 + Direction 1) | 11 | 0 | 12 | 0–4,095 | about 68 minutes |
| v0.1b, 7 bits checked (c + phase) | 9 | 2 | 14 | 0–16,383 | about 4.5 hours |
| v0.1b, 6 bits (R, D, M, phase) | 6 | 5 | 17 | 0–131,071 | about 36 hours |
| v0.1b two-byte form (iteration 5): byte 1 change + c; byte 2 ext + phase + roles + estimate | 9 | 2 | 12 (or 14) | 0–4,095 (or 16,383) | 68 min (or 4.5 h) |
The freed bits could go elsewhere; giving them to the delta answers most of the X06 overflow question.
11. Proof obligations, with sketches
| # | Claim | Sketch |
|---|---|---|
| P1 | Determinism: two readers with the same kernel and log reach the same Sₙ | Induction on n. step reads only Sₙ₋₁ and eₙ, and uses no clock, randomness, floating point or hash-map order. |
| P2 | Conservation | §5.1. |
| P3 | Use-once | §5.4: deletion from a set succeeds once. |
| P4 | Links are well-typed | Every accepted undo has c = μ(c_t); every accepted settlement has c ∈ {σ(c_t), νσ(c_t)}; both are checked before the guards. |
| P5 | Totality of derivation | §4.4. |
| P6 | Termination | Closure: §5.3 and §6. Every other step is bounded by the line's size. |
| P7 | Replay = submission | The same function step runs in both cases (note §4). |
| P8 | Packs can't grant authority | Packs add conjuncts to guards and tighten policies. can reads only grant facts. Adding a conjunct can only turn an acceptance into a refusal. |
| P9 | Bit laws | Exhaustive check at start-up over all 128 positions (§3). |
12. Cost summary
| Operation | Cost | Why |
|---|---|---|
| filter a line on header bits | O(1) | §2.2: one AND, one compare |
| check a link (undo, settle) | O(1) | §3: one or two bit operations, one set lookup |
| resolve or birth a name | O(1) expected | §7 |
| derive F, S, O | O(1) after resolution | §4 |
| guards other than authority | O(1) | lookups and compares |
| authority check | O(depth) on forests; O(V + E) worst case | §5.3 |
| balance at any position | O(log n) | §5.1 |
| Register at any position | O(one segment) from a checkpoint | §5.2 |
| verify the chain | O(total bytes) | §9 |
Exchange log
Lab: 2026-11-30-v0-1b-direction-claude · Kept since: round 5 (2026-12-01), back-recorded for rounds 1–4.
Each row is one owner question, challenge or decision, in order, and what came of it. The owner's words are paraphrased. "Round" is the lab iteration the outcome went into (iterations.csv, design note §17). This keeps the reasoning between rounds, not only the results.
| # | Date | Round | Owner asked or said | Outcome |
|---|---|---|---|---|
| 1 | 2026-11-29 | — | Study the work plan and propose solutions. | Review of the plan: the 6-bit claim is really a choice between storing the coordinate and storing the verb; the seed doesn't need the wire decision first; test D-01 against both ACT-end readings; replay through admission on open. |
| 2 | 2026-11-29 | — | Review the 128-positions, Genesis and Kernel pages for design and mathematical efficiency. | F/S/O in the corpus behave as verb classes, not operand relations; masks on D alone are meaningless under per-relation direction; the conservation claim mixed type counts with quantities; fold speed-ups by container algebra; A vs B as evaluation strategy. |
| 3 | 2026-11-29 | — | Remind me what F, S, O are. | Their bits, steps and what v2 needed to recover them; lemmas L2–L4. |
| 4 | 2026-11-29 | — | Confirm understanding of the first verb table before a fresh attempt; unsure whether primitives belong in the matrix. | Model of the first attempt confirmed; drift points listed (M with three senses, O shifting with S, to cells naming legs); primitives kept out of the matrix. |
| 5 | 2026-11-29 | — | Transfers must stay trim; do web research; attempt all 128 at once. | verb-table-128-fresh.md: research (TigerBeetle, REA, DEMO, Hohfeld, FIPA, ODRL, SOSA, PROV-O, ocap, Kubernetes); one entry per transfer; O recorder-relative; F/S/O derivable. |
| 6 | 2026-11-29 | — | Explain the header changes: how it is built and read. | Derivation functions, reading algorithm, D as establish/undo, μ/ν/σ arithmetic, transfers in the header, filter costs. |
| 7 | 2026-11-29 | — | How does this affect the kernel's mathematics? | Type depends on prior state; behaviour factors by bit; the 8-element monoid; citation graph; per-container algebra; stratified negation; proof obligations. |
| 8 | 2026-11-29 | — | Kinds, subjects and objects needn't be in the kernel; ownership is a setup matter; why do F, S, O need the Register; unroll the order of operations; explain guards. | Four seed kinds; ownership via for; F needs only the line, S and O need state; Stage 0 order; guards in detail. |
| 9 | 2026-11-30 | 1 | Let a log entry name and so create objects, books and kinds; class shouldn't burden the recorder; unroll Stage 0 fully; which entries set up a log? | Births by first mention; class inferred; Stage 0 D1–D16; two required lines. |
| 10 | 2026-11-30 | 1 | Write it up as a lab design note; avoid index scans; track strict modes in setup policies; ownership given to others; more inferable kinds. Correction: amounts carry their unit symbols, so a pure entry must not need a unit pack. Unsure how tags and groups sit in a log entry; printing every kernel operation at log opening? | Lab created; master design note round 1. Unit symbols born at first mention; class by origin (later withdrawn); index cost section; setup policy table; ownership forms; kind traits; tags as boundaries; bootstrap transcript option. |
| 11 | 2026-12-01 | 2 | How do name lookups work and why? What are kind traits? Money mostly enters by declaration of ownership. Decided: printing the start-up is an audit option, off by default. Write a work plan and companion documents. | Name resolution (§2.1); intake from outside:<unit> (§7.2); class-by-origin withdrawn (§7.3); work plan, overview, rationale, mathematics. |
| 12 | 2026-12-01 | 2 | Combine the five documents into one tabbed HTML page in the lab. | v02-direction.html (later v01b-direction.html). |
| 13 | 2026-12-01 | — | Are lab page layout and population already scripted? | Partly: babb-home builds lab pages from a fixed list of four files; lab pages from the lab record are planned, not built. Another agent is building the scripts. |
| 14 | 2026-12-01 | — | Does the maths create distinctions from operations, not only declarations: how are in, is, may, to established? | As written they were declared. Proposed: four operations with laws, an unfolding order from GENESIS. |
| 15 | 2026-12-01 | 3 | Concern: computed F, S, O make bit-masking costlier. Much of "relations as operations" may repeat earlier notes; check. Decided: name the direction v0.1b, not v0.2. Plan how a lab shows a series of iterations. | Default wire changed to 7 bits checked (§1.2); lineage against notes 06, 08, 16 and DIGEST (§16), with may's operation left open (Q9); lab renamed; iteration recording (§17, iterations.csv, snapshots). |
| 16 | 2026-12-01 | — | Analyse phase and how it sits outside c. | Phase as (opens, closes); overlap with D, M and not-yet; effect timing; c for naming, (c, p) for mechanics. |
| 17 | 2026-12-01 | 4 | Explain 512 against 128. Approved the phase direction. Concern: a 9-bit type breaks the one-byte goal. | Round 4 (§3.6); type-byte options A/B/C (§1.3); proposed A. |
| 18 | 2026-12-01 | 5 | Challenge: permissions have spans and one-off forms, so may should take phases; don't agree to unneeded elements just because I raised it. Could two ASCII characters hold a fuller set of details? Is option A backwards or compression? | Spans stay standing (validity, grant, revoke); one-off = use count; but may does take every phase (grants that take time; access scans), so the "96 invalid" rule was withdrawn. The is example corrected. Option A in full: two bytes, "what" and "shape", carrying every v0.1 short-header field in 28 bits (§1.3.1). |
| 19 | 2026-12-01 | 5 | Write round 5 and back-record the evidence of progression. | This log; round 5 rows in iterations.csv; dated lab notes; snapshot artifacts/iteration-05.html. |
Iterations
Generated from iterations.csv. One row per element changed per round. decided_by is filled only when the owner decided. How this is kept: design note §17.
By round
Round 5 · 2026-12-01
| Element | Change | Summary | Decided by | Refs |
|---|---|---|---|---|
| EL-phase | corrected | Withdrew 'may x {begin,end,sample} invalid': grants can take time to take effect and permission state can be sampled; no fact-form invalid in advance; spans stay standing; one-off permissions are a use count; is example corrected | exchanges.md #18 | |
| EL-wire | added | Option A in full: two-byte 'what + shape' layout carrying every v0.1 short-header field in 28 bits | ||
| EL-guards | changed | g_P now checks the workbook per cell, not a per-relation rule | ||
| EL-stage0 | changed | D2 wire is the two-byte form; invalid-forms clause removed | ||
| EL-decisions | changed | Q11 points to the two-byte form; Q12 printability added | ||
| EL-process | added | exchanges.md: owner questions and outcomes, back-recorded from 2026-11-29 | ||
| EL-math | corrected | All 512 fact-forms allowed; two-byte storage; header table row | ||
| EL-overview | corrected | Every relation takes every phase; two bytes in the header | ||
| EL-rationale | corrected | 2.20 correction; 2.21 concrete two-byte form | ||
| EL-workplan | changed | WP04 two-byte layout; WP18 per-cell fact-form checks |
Round 4 · 2026-12-01
| Element | Change | Summary | Decided by | Refs |
|---|---|---|---|---|
| EL-phase | added | Phase as (opens, closes); separation rule against D, M and not-yet; effect lands at instant and end; begin/end pairing; may x {begin,end,sample} invalid (96 of 512); ACT end = D0 end | owner | DIGEST step 10; notes 05, 06 |
| EL-wire | added | Type in one byte: options A/B/C; proposed A (c in one byte, phase separate) | ||
| EL-guards | changed | Added g_P (phase valid for relation; end cites an in-progress begin) | ||
| EL-stage0 | changed | D2 phase space and 9-bit query key; D11 pairing; pipeline step 7 | ||
| EL-decisions | changed | Q10 phase numbering; Q11 type byte; D-02 supported by the separation rule | ||
| EL-math | changed | Phase lattice, 512 vs 128, 416 valid forms | ||
| EL-overview | changed | Phase explained as two questions; 512 and 416 | ||
| EL-rationale | changed | Added 2.20 phase and 2.21 type byte | ||
| EL-workplan | changed | WP04 type byte and phase table; WP09 pairing; WP18 invalid fact-forms and phase names |
Round 3 · 2026-12-01
| Element | Change | Summary | Decided by | Refs |
|---|---|---|---|---|
| EL-bits | decided | Direction renamed v0.2 -> v0.1b | owner | |
| EL-wire | changed | Default wire.type = 7 bits checked to keep header-only filtering on every bit; 6 bits kept as a compact profile | ||
| EL-derive | changed | F, S, O derivable and, by default, stored and checked | ||
| EL-relops | added | Relations as four operations with laws; effect-law self-check; unfolding order; operational reading of each bit; observed and authoritative partitions | note 08; DIGEST 3; note 16 9; note 06; mark-boundary | |
| EL-stage0 | changed | D1 no longer lists relations; D13 defines four operations; start-up step 0.3b | ||
| EL-decisions | changed | Q5 proposed default; Q8 answered; Q9 added (operation behind may) | ||
| EL-lineage | added | Lineage against notes 06, 08, 16, DIGEST and mark-boundary | ||
| EL-process | added | Iteration recording: element ids, iterations.csv, snapshots, commits, Iterations tab | ||
| EL-workplan | changed | WP03 effect-law self-check; WP04 default wire; WP07 partitions; WP11 effects as operations | ||
| EL-overview | changed | Header carries all six answers; three are checked | ||
| EL-rationale | changed | Added relations as operations, wire default, partitions; 2.6 revised | ||
| EL-math | changed | Stored-and-checked default; effect laws section; header table default |
Round 2 · 2026-12-01
| Element | Change | Summary | Decided by | Refs |
|---|---|---|---|---|
| EL-kinds | corrected | Class by origin withdrawn: money and kWh both enter as declared holdings. Intake from outside:<unit>; class by location or move; seed kind item | ||
| EL-derive | changed | Added name resolution (2.1) | ||
| EL-wire | added | v0.1 vs new type-bit budget; v0.1 stores M and D twice | bitpack-header-draft-v0.1 | |
| EL-stage0 | decided | Printing the start-up into a log is an audit option, off by default | owner | |
| EL-workplan | added | Technical work plan: 25 work packages, milestones, assembly/C/Python appendices | ||
| EL-overview | added | System overview | ||
| EL-rationale | added | Design rationale | ||
| EL-math | added | Mathematics |
Round 1 · 2026-11-30
| Element | Change | Summary | Decided by | Refs |
|---|---|---|---|---|
| EL-bits | added | One meaning per bit, the same for every relation | ||
| EL-derive | added | F, S, O derived from roles and state; 6-bit stored type | DERIVE-CONTEXT-V2 report | |
| EL-laws | added | mu/nu/sigma bit laws, citation checks, state laws | ||
| EL-pipeline | added | Ten-step reading pipeline; open replays through admission | ||
| EL-guards | added | Guards as an ordered conjunction; packs only add conditions | ||
| EL-births | added | Births by first mention; role defaults; principals self-owned | ||
| EL-kinds | added | Unit symbols as kinds; class by origin; trait bitset; tags as boundaries | ||
| EL-transfers | added | One line per transfer; push/pull = O; holds = M; reversal = D | TigerBeetle; REA | |
| EL-ownership | added | Four ownership forms; notification classes from bits | ||
| EL-indexes | added | No scans: births are resolution misses; append-only indexes; checkpoints | ||
| EL-stage0 | added | Stage 0 definitions D1-D16 and start-up sequence | ||
| EL-setup | added | Two required lines; conditional setup; setup policies with strict modes | ||
| EL-kernel-math | added | Consequences for kernel mathematics; proof obligations | ||
| EL-decisions | added | Effects on D-01/02/03/05/11; open questions |
By element
| Element | Iterations | Rounds | Latest change |
|---|---|---|---|
| EL-bits | 2 | 1, 3 | Direction renamed v0.2 -> v0.1b |
| EL-derive | 3 | 1, 2, 3 | F, S, O derivable and, by default, stored and checked |
| EL-laws | 1 | 1 | mu/nu/sigma bit laws, citation checks, state laws |
| EL-pipeline | 1 | 1 | Ten-step reading pipeline; open replays through admission |
| EL-guards | 3 | 1, 4, 5 | g_P now checks the workbook per cell, not a per-relation rule |
| EL-births | 1 | 1 | Births by first mention; role defaults; principals self-owned |
| EL-kinds | 2 | 1, 2 | Class by origin withdrawn: money and kWh both enter as declared holdings. Intake from outside:<unit>; class by location or move; seed kind item |
| EL-transfers | 1 | 1 | One line per transfer; push/pull = O; holds = M; reversal = D |
| EL-ownership | 1 | 1 | Four ownership forms; notification classes from bits |
| EL-indexes | 1 | 1 | No scans: births are resolution misses; append-only indexes; checkpoints |
| EL-stage0 | 5 | 1, 2, 3, 4, 5 | D2 wire is the two-byte form; invalid-forms clause removed |
| EL-setup | 1 | 1 | Two required lines; conditional setup; setup policies with strict modes |
| EL-kernel-math | 1 | 1 | Consequences for kernel mathematics; proof obligations |
| EL-decisions | 4 | 1, 3, 4, 5 | Q11 points to the two-byte form; Q12 printability added |
| EL-wire | 4 | 2, 3, 4, 5 | Option A in full: two-byte 'what + shape' layout carrying every v0.1 short-header field in 28 bits |
| EL-workplan | 4 | 2, 3, 4, 5 | WP04 two-byte layout; WP18 per-cell fact-form checks |
| EL-overview | 4 | 2, 3, 4, 5 | Every relation takes every phase; two bytes in the header |
| EL-rationale | 4 | 2, 3, 4, 5 | 2.20 correction; 2.21 concrete two-byte form |
| EL-math | 4 | 2, 3, 4, 5 | All 512 fact-forms allowed; two-byte storage; header table row |
| EL-relops | 1 | 3 | Relations as four operations with laws; effect-law self-check; unfolding order; operational reading of each bit; observed and authoritative partitions |
| EL-lineage | 1 | 3 | Lineage against notes 06, 08, 16, DIGEST and mark-boundary |
| EL-process | 2 | 3, 5 | exchanges.md: owner questions and outcomes, back-recorded from 2026-11-29 |
| EL-phase | 2 | 4, 5 | Withdrew 'may x {begin,end,sample} invalid': grants can take time to take effect and permission state can be sampled; no fact-form invalid in advance; spans stay standing; one-off permissions are a use count; is example corrected |