STREAM · Working prototype · Follows Bitpack Header Draft v0.1

Caps Header Lab

Draft v0.1 packs a log fact into a 5-character short header (30 bits) over a 64-symbol alphabet, plus a 5-character extension to 60 bits. This lab asks a different question: what happens if we take more of ASCII as usable — and what could capitalisation itself mean, if case were a designed bit instead of an accident of the alphabet? A new paired-alphabet mode (section 04) rebuilds the alphabet so case is one bit, on purpose.

Prototype — not the Rust kernel Not Loom Draft v0.1 layout unchanged by this lab New: paired-alphabet mode Fully client-side · no saved state
01 — Bit budget Background · applies to both alphabets

More alphabet, more bits per character

Three alphabets, four header lengths. The 64-symbol alphabet is clean — exactly 6 bits per character, tidy boundaries. Base-95 uses every printable character and gains about half a bit per character, at the cost of arithmetic instead of bit-slicing. Full 128 ASCII gives a clean 7 bits — on paper.

Header length 64 symbols
6.00 bits / char
95 printable ASCII
≈ 6.57 bits / char
128 ASCII
7.00 bits / char
4 characters24 bits26.3 bits28 bits
5 characters30 bits32.8 bits35 bits
8 characters48 bits52.6 bits56 bits
10 characters60 bits65.7 bits70 bits

Base-95 figures are log2(95) ≈ 6.5699 bits per character, multiplied out. A 5-character base-95 string can actually hold a full 32-bit value, because 955 = 7,737,809,375 > 232 — the fractional bits add up across the block.

Visualised — bits at 10 characters

A full fact header — what it costs

  • Position7 bits
  • Phase2 bits
  • Modality1 bit
  • Direction1 bit
  • Role presence (4 roles)4 bits
  • Absence kinds (4 × 3 bits)12 bits
  • Time delta16 bits
  • Object / kind index12 bits
  • Version3 bits
  • Check bits7 bits
  • Change flags5 bits
  • Total70 bits
✓ At 7 bits per character: fits, exactly 10 characters × 7 bits = 70 bits. The full fact header above fits in 10 characters with nothing to spare — every field, including absence kinds, version and check bits.
✗ At 6 bits per character: does not fit 10 characters × 6 bits = 60 bits — 10 bits short. Something has to be left out, split off, or moved to the payload. That shortfall is exactly why Draft v0.1 uses a short header plus an extension, and why absence kind lives only in the extended half.
Base-95 gets close, not all the way 10 characters × ≈6.57 bits = ≈65.7 bits — about 4 bits short of 70. Better than 60, still not the whole fact in 10 characters.
The 128 figure is theoretical. Control characters 0–31, DEL (127) and space cannot go in a text log line — space is the field separator, and controls break terminals, editors and parsers. Quotes (") and backslash (\) need escaping in JSON, which would break the plain-text, fixed-width idea. So the practical alphabet is the printable subset: 95 characters at most, and fewer if you also drop characters that break shells or URLs.
02 — The centrepiece v0.1 exploration · caps as an idea only — not real in v0.1

Caps as… what?

Eight entries from a fabrication workshop — meter samples and steel transfers, the same actors and objects across most lines, only time and measure changing. Each entry has a 5-character short header. Pick a meaning for capitalisation and watch the same eight headers re-render. Then tap any line to read what its caps are saying.

Header character positions, for the diff reading: 1 position/verb · 2 phase · 3 role set · 4 time delta · 5 object/kind. Capital letters are shown in orange.

Reading the selected line

Important: in the Draft v0.1 64-symbol alphabet, case is alphabet position, not a free bit — A and a are simply different symbols at different positions, the way B and 7 are different. So none of these four meanings exist in v0.1 today. Each one needs either a letter-based alphabet (where case really is one bit per character, bit 5 in ASCII) or a separate home for the caps channel. This lab is exploring the idea — it is not claiming v0.1 already does it.
03 — Base-95 encoder Lab exploration · base-95 — neither v0.1 nor the paired alphabet

The same fields, in printable ASCII

A live encoder/decoder using the 95 printable ASCII characters as a base-95 number, most significant character first, computed with BigInt. A counting note the lab had to learn the hard way: codes 33–126 (! to ~) are only 94 characters — the 95 printable characters are codes 32–126, space included. So space is a digit here too, assigned the highest digit value (94) so headers seldom begin with it; where a space digit appears inside a header it is displayed as ␣. The short fields are exactly Draft v0.1's: position 7, phase 2, modality 1, direction 1, role presence 4, estimate 1, change 1, time delta 12, extended-follows 1 — 30 bits of field, carried in a 32-bit value space and shown as 5 base-95 characters. With the extension, the absence kinds (3 bits per role), object/kind index (12 bits) and check bits (6-bit XOR fold) bring the total to 60 bits, shown as 10 characters.

Short-header fields

Role presence · 4 bits

Extended fields (used when extended follows = 1)

Computed automatically as an XOR fold of the other 54 bits. Not set by hand.
Base-95 header · live

—

Decode it back

Type or paste any 5- or 10-character base-95 header (printable ASCII, !–~, plus space as digit 94 — shown as ␣ in displays). The fields below are recovered from the string alone.

Draft v0.1 presets, re-encoded

The three presets from the adopted draft, with their original v0.1 headers beside the base-95 form produced by the encoder above. Load any preset into the controls to inspect its fields.

04 — Paired alphabet New · paired alphabet — not Draft v0.1

Case as a designed bit

A second mode for the lab, built so capitalisation can actually carry meaning. Everything in this section is the paired alphabet; sections 01–03 stay as they were and are labelled v0.1 or base-95 where they belong.

Why v0.1 cannot do this — and what changed

In Draft v0.1, case is already spent

The v0.1 alphabet is A–Z a–z 0–9 -_, in that order: A is value 0 and a is value 26. They are not the same character in two cases — they are two unrelated symbols that happen to look like a pair. Flipping the case of a character does not flip one bit; it adds or subtracts 26 and scrambles whatever field the character was carrying. So in v0.1 a capital cannot mean “this field changed”, or “this role is present”, or anything else separate — there is no separate bit left for it to be. Case there is alphabet position, not a free bit.

In the paired alphabet, case is one bit — on purpose

The alphabet is rebuilt as pairs that differ only by ASCII bit 5 (0x20) — the case bit itself. Each character is now 5 bits of pair identity plus 1 bit of case: the pair says which symbol it is, the case bit is a separate, assignable flag riding on that symbol. Still 6 bits per character, still 30 bits in a 5-character header — no capacity is lost versus v0.1. What changed is the bookkeeping: case stopped being part of the value and became a designed bit with a named meaning per character, assigned in the layout table below.

The 31 usable pairs (first form = case bit 0, second form = case bit 1; pair number = the 5-bit identity):
0 @ / ` · 1–26 A/a B/b C/c D/d E/e F/f G/g H/h I/i J/j K/k L/l M/m N/n O/o P/p Q/q R/r S/s T/t U/u V/v W/w X/x Y/y Z/z · 27 [ / { · 28 \ / | · 29 ] / } · 30 ^ / ~
Pair 31 would be _ / DEL — excluded, because DEL is not printable, so pair 31 is reserved and never appears in a valid header. The digits 0–9 are excluded too: a digit has no uppercase form, so it cannot carry a case bit.

The pairing is not a trick of the table — it is ASCII itself: a pair's two forms are exactly 0x20 apart, the pair identity is the character code with bit 5 removed, and the case bit is bit 5. Any tool that can read an ASCII code can split a paired character into its 5 + 1 without a lookup table.

Re-aligned header layout — paired alphabet

The v0.1 layout packs one continuous 30-bit stream and slices it into 6-bit characters, so fields spill across character boundaries (the 7-bit position field leaks one bit into character 2, and so on). That cannot survive here: if a field straddled characters arbitrarily, a character's case bit would belong to no one field. So the paired layout is re-aligned into per-character 5-bit slots. Every field either occupies whole characters or a named bit range inside exactly one character, and each character's case bit is assigned to exactly one named flag — the five one-bit fields of v0.1 (extended-follows, estimate, change, modality, direction) no longer sit in the data stream at all; they are the case bits of characters 1–5.

Character5-bit value fieldCase-bit meaning
1Position bits 0–4 (low 5 of 7)Extended-follows — second form = a 5-character extension follows
2Time delta bits 0–4 (low 5 of 12)Estimate — second form = the entry's value is an estimate
3Time delta bits 5–9 (middle 5 of 12)Change — second form = context changed on this line
4Role presence bits 0–3 (actor, counterparty, object, measure), with time-delta bit 10 in the top bitModality — first form = asserted, second form = other modality
5Phase bits 0–1, position bits 5–6 (bits 2–3), time-delta bit 11 in the top bitDirection — first form = inbound / to, second form = outbound / from
6 (ext)Object / kind index bits 0–4Check bit 0
7 (ext)Object / kind index bits 5–9Check bit 1
8 (ext)Object bits 10–11 (bits 0–1) + absence kind, actor (bits 2–4)Check bit 2
9 (ext)Absence kind, counterparty (bits 0–2) + absence kind, object, bits 0–1 (bits 3–4)Check bit 3
10 (ext)Absence kind, object, bit 2 (bit 0) + absence kind, measure (bits 1–3) + check bit 5 (top bit)Check bit 4

Where the layout had to change to fit the 5+1 alignment — said plainly

Live paired-alphabet encoder / decoder

Every v0.1 short-header field has a control, and every case-bit flag has its own control — changing a flag flips only the form of its character; the letter (the pair identity) does not move. The extension fields and the computed check bits work as in the layout table above.

Value fields · 5 bits per character

Split: low 5 in char 1, high 2 in char 5.
Chars 2–3, plus bits 10–11 in chars 4–5.

Role presence · 4 bits (char 4)

Case-bit flags · 1 bit each, carried by case

Extended fields (used when char 1 case = extended)

Expressed in 5-bit pair values across chars 6–8 — this alphabet has no digits.
Computed as an XOR fold of the other 54 bits. Bits 0–4 ride in the case of chars 6–10; bit 5 in char 10's top data bit. Not set by hand.
Paired-alphabet header · live

—

Decode it back

Type or paste any 5- or 10-character paired header. Only the 62 paired symbols are valid — digits, space and _ are rejected, and an extended header whose case was flipped will fail its check bits.

The three Draft v0.1 presets, in the paired alphabet

The same field values as the adopted presets, encoded both ways, side by side. Same fields, same bit totals — different alphabet, and in the paired column the case of every character is a flag you can read off the layout table. Load any preset into the paired controls to inspect it.

The four caps meanings — now actually working

The same eight workshop entries as section 02, with the same letter skeletons — but here the skeletons are pair identities, so flipping a character's case changes only its case bit and leaves its 5-bit value untouched. That is what section 02 could only pretend at. In this demo the case channel is assigned to the meaning you pick below (a different assignment from the encoder layout's flags — the paired alphabet makes either possible, because the bits are real and independent; a draft picks one assignment and sticks to it). Tap any line to read its caps.

Reading the selected line · paired alphabet

Diff close-up — what changes the pattern, and what doesn't

Line 1 → line 2 is the same sample, same phase, same roles, same object — only the time delta moved. In the paired alphabet the line-2 header is smpLq: four characters stay in their first form because their fields stayed the same, and exactly one — character 4, the time delta — flips to its second form. Compare line 4, where a new kind of entry starts and every field changes: ACTTR, all five in second form. And a line where nothing in the header changed would be all first-form — a pure continuation you can spot without decoding anything. In v0.1 none of this could be shown honestly, because flipping a character's case there would have changed its value, not just its form.

A note on forms: for letter pairs the two forms are upper and lower case. For the five symbol pairs (@/`, [/{, \/|, ]/}, ^/~) “case” means the second ASCII form — same bit, less familiar shape. Headers built mostly from letters read as caps; headers that land on symbol pairs read as form flips.

05 — Self-test Base-95 (v0.1 fields) above · paired alphabet below

Does it round-trip?

Run on load, and again whenever you press the button. Random headers are encoded and decoded and every field is compared. The corruption test takes one extended header, changes a single character, and checks that the check bits reject it. The paired-alphabet tests below do the same for the new mode, plus the test v0.1 could never run: flip one character's case — same letter, other form — and the check bits must reject the header. Results are shown as they come out — a failure would be shown as a failure.

—
Short headers (5 chars) round-tripped
—
Extended headers (10 chars) round-tripped
—
One-character corruption
Running…

Paired alphabet — self-test

Random paired headers, generated field by field and round-tripped through the paired encoder and decoder in section 04. A generated combination whose 5-bit chunk would be 31 — the reserved _/DEL pair — has no paired encoding; those draws are skipped and counted openly below, never silently counted as passes.

—
Paired short headers (5 chars) round-tripped
—
Paired extended headers (10 chars) round-tripped
—
Case-flip corruption (one character, case only)
Running…

06 — Caveats, in plain words

What could bite