village-builder

VB-379: The dependency check reads the import graph

Status: blocked Waits for: VB-378 Priority: 3 Size: S Arch: yardstick Phase: implement Design ref: none (code structure). docs/typescript-plan.md (P7); the survey in backlog/VB-055.md. Goal: tools/writes.js finds each module’s dependencies by looking for VB['key'] in its syntax tree and calls a lookup inside a function a “late” one; tests/dependencies.js and tools/dependencies.js check them against the layers of src/layers.json (20 upward edges of 500, all through command dispatch or culture and the like, on 12 November). After VB-378 the edges are import declarations: read those, keep the layer rule and the rule that every cycle passes through sim/commands, and give each import a flag “used at load” or “used only in functions”. src/manifest.json stays as the list of modules (for the lint and the fixtures hash) with no order meaning; a test checks it equals the files reachable from the entry. Acceptance criteria: