Part 6 · 6.3 Functional Specification

The specification: four axes, one region map

Where and how flows form, and where the key vectors between planes are fixed in the code.

Source: lib/TOPOLOGY.md ("the axes that hold the spinning machine", working charter v4) and lib/README.md (the incubator lid). The machine's own figure for this whole part: a flywheel spins only smoothly while it stays level on fixed axes — four of them, each with a stated purpose, the planes it carries, the files that fix it, and — the part worth reading closely — an explicit list of what it forbids.

§Axis I — Rotation (the wave axis)

Purpose. Motion made irreversible and countable: every committed tuple is propagated exactly once, in order; a wave runs to full quiescence before anything else happens; nothing overlaps, nothing rewinds. Fixed by the engine's inner loop, the settle loop's run/sweep alternation, and the two independent cursors (1.4) that never move backwards.

Forbids: redelivery to a listener that already saw a tuple; two settles running at once (a caller error, never a queue); delivering a fact to a listener registered after that fact was committed (Vol. 02 §5.1 — the rule behind Part 3's "registration precedes facts"); correlating by position in the log instead of by a named id.

§Axis II — Truth (the axle)

Purpose. One axle for all rotation: the append-only log is the only truth. Machine registers, computed readings, stored snapshots — everything else is a cache of a fold over the log, valid only at the exact position it was cut, and discarded the instant it disagrees.

Forbids: editing or renumbering a committed tuple, ever, by anyone; a cache outranking the log (a stale snapshot cannot append — a mismatched watermark is refused at commit, 4.3); tuples travelling inside a state snapshot (state and log are different kinds of thing and must never merge into one).

§Axis III — Contours (the radial axis) — the rings of 6.1, named

This is the axis 6.1's picture stands for, and here are its actual names, inside out:

ring (technical name)directorywhat it holdsits one door out
K0 · register file & stationslib/core/{wave,registers,topology,membrane,cells,runtime,serialise}the log, the state protocol, the topology processor, CellSpace, the settle looplib/core/*/gate.ts per unit
K1 · doorslib/machine/the only outside access to K0: createMachine, settleMachine, extractMachineState, restoreMachinelib/machine/gate.ts
K2 · harnesslib/session/one serialised ingress lane per session; the store ports (wave, machine-state, projection-state)lib/session/gate.ts
K3 · applicationlib/application/acts (fact factories returning receipts) and readings (named, watermarked snapshot contracts)lib/application/gate.ts (implied by the ring-discipline guard)
K4 · entry / formationlib/entry/ (the engine's own transport) and huid/formation/ (the Next skin over it)the wave API's three HTTP rootslib/entry/gate.ts, huid/formation/gate.ts
K5 · surfacehuid/modules/, app/ route files, debug/every screen component(consumes K4 only, over HTTP or its typed wrapper)

Forbids: skipping a ring (application never imports doors or raw registers directly — application only names them via the K1/K2 gates as needed; the surface never imports anything below K4); private closure state anywhere in K0–K3 (all state lives in the one register file, moved only through journalled operations — 1.4); any component reading machine registers directly instead of through a committed tuple; wiring built anywhere but the one declared assembly record.

§Axis IV — Observation (the gauge axis)

Purpose. Knowing the spin without touching it. Every way of seeing the machine — a reading, the debug trace, this very region map — is derived, rebuildable, and inert: it measures balance, it never pushes the wheel.

Forbids: an observer influencing anything (a reading emits nothing, registers nothing, and no machine decision may ever depend on one); a silent whole-log re-fold when a reading's stored position cannot be reached from where it is asked — that failure is loud, naming the one explicit recovery path, never a quiet fallback; trusting a model's own self-graded number (the machine recomputes an assessment's aggregate itself — 7.3); an act branching on a reading rather than on its own settle fragment — the one honest gap the charter itself names as "held by review, not yet by a mechanical gauge."

§The four-coordinate placement rule

The charter closes with a genuinely useful test for locating any new piece of work: state which turn it belongs to (Axis I), whether it is truth or cache and at what watermark if cache (Axis II), which ring it sits in (Axis III), and whether it moves the machine or only observes it (Axis IV). A piece of work that cannot state all four is not yet placed — and placing it correctly is most of the design decision, not an afterthought to it.

§The region map, concretely

lib/README.md's own table, condensed — every directory as one topology coordinate, crossing only through its gate.ts:

directoryrole
core/wave/the tuple envelope, the station contracts, the engine's inner loop
core/registers/the register file and the whole self-journalling state protocol
core/topology/knot strategies, bind kinds, dispatch, configuration parsing
core/membrane/the one sweep station — the sole crossing to the world
core/cells/the Cell protocol, admission, CellSpace ([[07-the-cell/07-the-cellPart 7]] in full)
core/runtime/the settle loop
machine/the K1 doors
session/the K2 harness and its three store ports
application/acts, readings, the declared assembly, the ingest and projection registers
side/world/controllers — the actual crossings beyond the membrane
side/stores/store adapters, one per port, one per backend
side/observers/the reading folds themselves
side/figures/declared, non-executing P3 content — corpora, fixtures, the composer's own blueprint
entry/K4, the engine's own HTTP transport
huid/formation/, huid/board/, huid/modules/K4's Next skin and every K5 screen component