jonnify·bcs /bcs

B0 · Orientation — the Branded Component System course

Boundaries around systems.
Identity as a contract.

Encapsulation boundaries are drawn around systems, not objects. The only values that cross are identities, and messages about identities. And identity is a contract — the 14-byte branded snowflake: typed by its namespace, ordered by its mint time, placed by its hash, identical in meaning across five runtimes against one canon.

The course teaches the BCS manuscript Part for Part. Every figure on every page is quoted verbatim from a committed output — a frozen transcript, a normative vector, a bench record. The worked project is a trading system; the bus between its systems is EchoMQ 2.0, backed by Valkey.

The id anatomy — the canon's encode vector: USR0KHTOWnGLuC ⇆ snowflake 274557032793636864 (content/contract.md, content/vectors.json)
USR namespace · 3 × [A–Z] 0KH TOW nGL uC payload · 11 × Base62, left-padded · ≤ MAX_PAYLOAD “AzL8n0Y58m7” ts · 41 bits ms since epoch 1704067200000 · horizon September 2093 node · 10 1024 minters seq · 12 4096 per ms
readout · Select a segment. Four gates guard the form: USRzzzzzzzzzzz → range · usr0KHTOWnGLuC → namespace · USR0KHTOWnGLu → length · USR0KHTOWnGL!C → charset (content/vectors.json, rejects).
§1

The law, in three clauses

content/bcs1.md

Clause one

Systems own their state and behavior

A system is the unit that encapsulates: a property store, the code allowed to touch it, and a boundary everything else stays behind. Ownership is total or it is not ownership; a sweep over somebody else’s table is a data race wearing a method’s clothing.

failure retired · the reach-through — a change to one system’s representation breaks code in another system’s file.

Clause two

Only identities, and messages about identities, cross

A message may say generate an image for this id with this prompt; it may never carry the entity itself, a pointer to it, or a live structure entangled with one. An identity is the one value that copies freely without forking truth, because it names state rather than carrying it.

failure retired · the traveling object — the entity, handle, or pointer that escapes its owner.

Clause three

Identity is a typed, ordered, placed contract

The value everything crosses on cannot be the weakest value in the program. The contract gives identity four load-bearing properties — namespace, order, placement, canon — and each one retires a failure that otherwise reappears as bespoke machinery, system by system.

failures retired · the silent join · the second clock · the routing table · the dialect

The composition: clause one makes the crossings enumerable → clause two makes every crossing typeable → clause three makes the typing checkable before anything runs. Three clauses, one law — the inter-system architecture verified by the type checker, the schema compiler, and the storage domain.

§2

The contract, property by property

content/contract.md

typed

The namespace rides in the first three bytes and in the type parameter. The wrong-table join dies at compile time, at the schema layer, and at the storage domain — before runtime.

ordered

String order is mint order — the order theorem. A table keyed by branded id is already a timeline; a feed is a descending sort; a time window is two synthetic cursors.

placed

hash32 is placement any holder computes identically: the same function routes a CHAMP slot, a cache shard, and a hash partition — arithmetic, not a directory service.

canonical

One Rust source, one C reference, one vector file, a conformance suite per runtime. Which language a system is in becomes a deployment detail.

§3

The evidence ethic — frozen transcripts

committed outputs, quoted verbatim

Every manuscript chapter that narrates built work is backed by a rung: an executable check script and a frozen transcript, committed beside the prose. The course inherits the ethic — a number that is not in a committed output does not appear on a page. Three samples:

content/contract.md · the normative vectorsfrozen
encode("USR", 274557032793636864)        = "USR0KHTOWnGLuC"
hash32(274557032793636864)               = 234878118   ← Elixir, Rust, C, TypeScript, wasm, Go, SQL agree
base62(2^63 − 1)                         = "AzL8n0Y58m7"  ← MAX_PAYLOAD, the range gate’s ceiling
content/bcsA.md · the connector gate, against live Valkeyfrozen
fence claimed                 echomq:2.0.0   ← typed, fatal on mismatch
sequential INCR               29456 ops/s
pipelined SET                 454483 ops/s   ← fifteen times the sequential figure, same socket
pipelined EVALSHA             161192 ops/s   ← declared-keys law at speed
script_loads                  1              ← exactly one NOSCRIPT load
10000-command pipeline        returned 1..10000 in order
gate record                   PASS 8/8
content/bcs1.1.md · the first rung — the smallest faithful systemfrozen
gate · private-ETS property store · supervisor
six gates refuse the architecture’s canonical crimes on stage
gate record                   PASS 6/6
§4

The chapters

B0–B8 ⇆ manuscript Parts I–VIII

The course mirrors a book being written in this repository. B1–B3 build over written Parts (Part III is in progress); the manuscript plans Parts IV–VIII. A chapter card becomes a link when its pages ship — and not before.

§5

The doors

the sibling courses
§6

References

sources · related

Sources

Related