Status: done (2026-11-02)
Priority: 1
Size: L
Arch: tooling
Phase: implement
Design ref: none (code structure)
Goal: src/body.html is the largest source file (about 1,600 lines; its input section alone is 640) and lies outside the module system, the structure lint (@sys, 400 lines, 160 characters) and the @sys module map. Move its script into modules so the same rules and tools cover it. Depends on VB-025 (a real-browser check, so a broken page is caught); if it is not done, mark this blocked.
Acceptance criteria (amended 2 Nov 2026 by Kim’s choice of approach; the first draft is kept below):
src/page/<name>.js, each with an @sys page/<name> header and under 400 lines (the largest, farmart, 233). They keep their order (src/page.json) and are spliced by build.py into the one closure in src/body.html, without their header line, so the built index.html is byte-identical to the one before the split.VB modules and there is no VB['page/state']: the files share the closure’s variables as before. src/load.js loads only the simulation modules, as before.src/body.html keeps the markup, the styles and the closure’s first and last lines (103 lines).tests/lint.js checks the page files for the @sys header, 400 lines and 160 characters, and for writes to st (the page rule); not the clock rule. The 133 lines over 160 characters are in tests/lint-baseline.json and are wrapped by VB-161.npm run verify passes (60 scripts, the Chromium check of VB-025 among them) and tests/golden.json is unchanged.w, st, sel, cam, speed, the sprite lists) and 98 functions that call each other both ways. Real modules with a shared state object would have rewritten several hundred references, which the refactor rules (verbatim, no renames) forbid. Kim chose files spliced at build time. The first draft of the criteria, for the record: modules registered as VB['page/<section>'] with shared state in VB['page/state'], listed in src/manifest.json.