village-builder

VB-258: Plans and the cache: a standing plan per household and village, golden unchanged

Status: done (2026-11-10) Priority: 2 Size: M Arch: year Phase: implement Design ref: Work: opportunities, plans and tasks (design.md, section 7); docs/review-work.md, sections 2, 4 and 5 (task 1) Goal: refreshJobs (src/sim/jobs.js) runs over every occupied farm and village 14 times a game day and posts what each kind’s available reports; no one holds a plan. Give each household and village a standing plan whose review is that same pass, so that later tasks can change what a review chooses and when it runs, with nothing changed yet. Acceptance criteria:

Implementation (10 Nov 2026).

Numbers (tools/sim.js --report perf, with the group split locally into refreshJobs and callCooks + lookUp + planRound; noisy machine):

Validation (10 Nov 2026): npm test (86 scripts) and node tests/golden.js pass; npm run verify passes but for tests/history.js, which fails on the local fixtures (stale, made at 498a87a) at HEAD too, on routeExpand, routeRefresh, walkTies, roundPairs, heirRank and roundRank; this branch adds no failure to it. By a script not kept: from small-y40, two years with checkState daily keep one plan per live household and village through 22 dissolutions, 40 new households and 2 new villages; a save from before plans loads with plans for every holder, and a save and load of the new state keeps them.