Status: done (2026-11-15)
Priority: 2
Size: S
Design ref: none (code structure). backlog/VB-415.md; backlog/VB-418.md, backlog/VB-228.md; docs/architecture/target-v2.md, principle 18
Goal: VB-415’s lint counts every export of a module as interface. Some are not: a function exported only so that a registry can call it back (a job kind’s done in sim/kinds, a calendar entry’s run in sim/clock, a verb’s body in sim/commands) is read by one module, which knows every domain by design, and no other domain can come to depend on it. Counting them made the lint ask for splits of modules far under 700 lines (sim/fields 420, sim/meadows 336: VB-434, VB-435), where a split adds a module and takes away no coupling. Leave them out of the count, so the width lint measures what it is for: how much of a module other domains can lean on.
Acceptance criteria:
tests/lint.js names the registries in one list (sim/kinds, sim/clock, sim/commands; a module joins it only by this list, with its reason beside it). An export of another module that no module of src/manifest.json but a registry reads is not counted towards that module’s width. The sim facade and the page do not count as readers, as today the facade is not counted. The readers come from the sources (tools/writes.js already lists each import), not from a hand-kept table.tests/width-baseline.json is re-recorded with the new count; no module’s number rises, and the PR lists each module’s before and after. Expected by a grep on 15 November: sim/fields 28 to 18, sim/meadows 23 to 16, sim/byre 16 to 6 (off the baseline).tests/lint-rules.js’ suite on a small constructed case: an export read by a registry alone is left out; the same export read by a second module is counted.AGENTS.md (Conventions, the width line), docs/gates.md and docs/architecture/modules.md (Adding things) say so.
Notes / questions:hoed, weeded, binned and finishBreak of sim/fields are named once, in the field kinds’ records; byreDay and shearing once, in CALENDAR. The registry is central on purpose (it holds the order: ASK, the calendar’s ORDER), so its knowing the name is no new coupling between domains. Counted as interface, these names made the lint open split tasks for modules of 336 and 420 lines, and a split there moves the names to a new module without removing one reader.sim/clock is a composition root and keeps its entries, since the order of a day is one decision; its callbacks stay exports for good. And until VB-418 lands, the lint would go on asking for splits.tests/lint-rules.js: exportReaders(sources) finds each export’s readers in the text (destructuring = VB['m'], VB['m'].a, alias A.a; a namespace passed whole counts as reading every export, '*'); leftOut(names, readers, registries). tests/lint.js holds REGISTRIES with a reason each. tools/writes.js lists state fields, not import names, so the readers are read with a small scan of the same pattern instead; a cross-check by hand for sim/fields and sim/byre matched.sim facade does not read; the page is not scanned.tests/lintrules.js (suite line exists), a constructed case.