Status: done (2026-11-13) Priority: 2 Size: S Arch: yardstick Phase: implement Design ref: none (code structure). backlog/VB-381.md, backlog/VB-055.md, backlog/VB-414.md Goal: The exports half of VB-381, landed before the move to TypeScript since counting exports needs no formatter, and with VB-414’s mechanism in place of a ratchet that only falls: a wide module may still gain an export, but only with an open task that splits it. Acceptance criteria:
tests/lint.js counts each module’s exports on its loaded namespace (constants included, as VB-381 counts them). A module over 15, and over its count in tests/width-baseline.json, fails unless an open task titled “Refactor: …” names its key (splitTask, VB-414); with one it prints a line and passes.tests/width-baseline.json holds the modules over 15 at today’s counts; node tests/lint.js --update lowers it and drops a module that is back at 15. A new module starts at 15.sim, the facade, is not counted. sim/rules is counted like the rest.AGENTS.md, docs/gates.md and docs/architecture/modules.md say so; VB-381 and question 4 of “VB-055: the move to TypeScript” in QUESTIONS.md get a note.
Notes / questions:sim/rules could take no new table of tunables and sim/records no new writer, and the way out would be a refactor of its own, so a task mid-feature would fold things into one export or export from the wrong module, as the cap on length packed lines (VB-413). With an open split task a wide module may grow.sim only gathers the others, so there is nothing to split it into, and every act the page gains adds a name to it.sim/rules is not exempt: of its 59 exports 47 are tables and 12 are functions (fertility, hazard, patronym, workRate, …), so its width is partly a mix of concerns, and tunables already live in other modules too (sim/kinds, gen/rivers, culture). The rule costs it one opened task, the first time it gains an export; an exemption would say it may grow unseen for good.sim 107 not counted): sim/rules 59, sim/records 52, sim/stores 42, sim/agents 34, sim/plans 34, sim/relations 32, sim/names 31, sim/herds 30, sim/fields 26, sim/layout 21 (23 at the merge), culture 20, sim/lifecycle 20, sim/meadows 19 (20 at the merge), sim/claims 18, sim/hunger 18, sim/routes 17, sim/farmclaims 17, sim/commands 17, sim/heirs 17, sim/byre 16, sim/expansion 16. VB-381 counted 18 over on 12 November.sim/hunger (19) fails against its baseline of 18 with the message; restored.export declarations once the modules are ES modules.main (the carts and the villages’ layout, written before this rule): sim/layout had gained two exports and sim/meadows one, so the baseline starts them at 23 and 20, the counts when the rule lands. The three tasks were renumbered from VB-410 to VB-412, which main had taken.