internal/ was 141 packages side by side, so nothing but a reader's memory
said which were foundations and which assembled the rest. Each now sits in a
layer directory, and the directory is the declaration:
base L0 foundation with no domain in it
contract L1 types and interfaces the layers above agree on
model, tools, safety, ext, state, platform
L2 subsystems, peers of one another
runtime L3 the turn engine
session L4 the controller
assembly L5 the composition root
frontend L6 cli, serve, acp and the host adapters
Only paths change: package names, code and behaviour do not. Imports,
repolint and coverage baselines, sensitive paths, CI package lists and docs
follow the new paths; release notes keep the paths they were written with,
and sample paths inside tests and fixtures keep theirs.
repolint gains layer-order: a package may import its own layer and those
below it, read from where it lives. The 47 imports that point upward today
are recorded as that rule's opening debt (-allow-widen, a new rule's first
baseline) and can only go down. Most of it is config, which still reaches
into eight subsystems and is the next thing to take apart; the rest is
event, history and a few tools reaching into runtime for types that belong
in contract.
catalog-detector
Who owns "the skills listing is owed again"?
The listing is delivered once. Something has to decide when the model's copy stopped matching the registry, and there are three candidates: rebuild the projection and compare it, fingerprint the files' metadata, or trust that every write announced itself.
go run ./benchmarks/catalog-detector -real "$PWD"
Owed is measured, not declared. The probe renders the block before and after each transition; owed means those differ. That definition is what makes a touched mtime and a body-only edit not owed — neither changes what the model would be sent — and it is why the projection detector is the definition rather than an estimate of it. What the arms measure is where the two cheaper detectors diverge from it.
Cost is timed without the instrument attached: files and bytes are counted in a separate walk, because timing a detector with the accounting inside it measures the accounting. Numbers are macOS/APFS with a warm cache; the ratio between detectors is what transfers, not the absolute.