Status: done (2026-11-25) Priority: 2 Size: S Arch: plans Phase: implement Design ref: docs/plans/four-scales/README.md, 3.10 (the gate); design.md section 7, Plans at four scales (The build and its gate); backlog/VB-1546.md (the stuck tasks, counted by hand); docs/testing.md; AGENTS.md, Commands (a new tool starts with tools/help.js) Touches: new tools/gate.js; new tests/gate-tool.js; docs/testing.md; docs/commands.md Goal: Each task of the arch checks the gate with one command against the result of the task before it, and no agent improvises it Acceptance criteria:
node tools/gate.js (it starts with tools/help.js and answers --help) runs the six runs (founders and populous, small map, seeds 7, 11 and 42, 10 years; side by side where the machine allows) and prints a line a run: the settlements at year 0 and 10, each one extinct and why (hunger, or another cause, read from the record’s last deaths), the living at year 0 and 10 by settlement, the tasks held over 48 hours without progress (VB-1546’s count, now a function of the tool), the stocks’ unexplained (the accounts report), hungry household-days and deaths by hunger; --json.--out FILE keeps the result; --base FILE compares and exits non-zero when the gate fails: a settlement extinct by hunger that the base keeps alive; a settlement collapsed; more tasks held over 48 hours than the base; unexplained larger than the base’s beyond a tolerance the help states. Hunger and deaths are printed beside the base and never fail.docs/testing.md.docs/gate/, or the fixtures’ local cache keyed by the sources, as docs/testing.md prefers: say which), its numbers in the PR.tests/gate-tool.js (a line in tests/suites.js): the comparison on constructed results (a settlement extinct, a decline under and over the bound, shared and not shared by the base, a stuck task) fails and passes as stated, without running the simulation.docs/commands.md gets its line.
Notes:Decided: collapse = living at 10 under half its year 0 and under half the base’s (as the task says; a settlement the base lacks, its own year 0 only). Held task = claimed, done unmoved, rate nil, 48 h sampled every 6 h. unexplained = sum of |
yearly food unexplained | ; tolerance 1 ration + 0.1% of produce. |