village-builder

VB-378: ES modules, part 3: the rest, the late lookups, the shim gone

Status: blocked Waits for: VB-377 Priority: 3 Size: M Arch: yardstick Phase: implement Design ref: none (code structure). docs/typescript-plan.md (P6); the survey in backlog/VB-055.md. Goal: Convert modules 43 to 63 (sim/eligibility, sim/agents, sim/commands, sim/occasions to sim.js). Then the late lookups go: the 17 later('...') calls of sim/commands (nine modules: sim/lifecycle 5, sim/heirs 2, sim/settle 2, sim/occasions 2, sim/farmclaims 2, sim/service, sim/membership, sim/cottage, sim/clock 1 each) and the four issue shims become plain imports. All 19 cycles tools/writes.js finds pass through sim/commands, command dispatch, the one upward door; ES modules allow such a cycle if no module uses an import of the cycle at load, only inside functions, so they stay as they are (decision, with the evidence: tools/writes.js and the new import graph). VB.register, the VB object in src/vb.js, and the codemod go; src/load.js builds globalThis.VB for the tests from the namespaces, as the only place that still does (the 120 test and tool files keep VB['sim/x']). Acceptance criteria: