Status: done (2026-11-16)
Priority: 3
Size: M
Arch: year
Phase: implement
Design ref: The player, commands and views; Systems overview. External review of 2 November (docs/review-external.md).
Goal: To see why a village struggles, the player now opens household after household. One panel per village shows its state at a glance and warns of trouble ahead, from numbers the simulation already keeps.
Decided (Kim, 10 November; QUESTION_ARCHIVE.md, “VB-162 and VB-165”): what the overview shows, as in the criteria.
Acceptance criteria:
villageSummary(st, v)), so tools/sim.js --report villages prints the same numbers; a test checks the function against a hand count on a tiny world.st (lint); the panel costs under 1 ms to build at populous medium. (The lint passes. The time is not taken on a quiet machine: on tonight’s shared one, Sim.villageSummary at populous medium seed 7, day 30 (830 living, 19 villages) took a mean of 0.90 and 1.14 ms a village in two runs, a description, not a result; owed to VB-662 by VB-926.)node tools/same.js --base REF prints same.docs/slices.md, section 3.3; the slices Decided by Kim): moved to slice 3, arch year. blocked until the slice’s plan (VB-164) confirms, rewrites or closes it; its questions in QUESTIONS.md wait for that plan, which may reframe them.QUESTIONS.md, “VB-162, VB-163 and VB-165”. Its idle share is reported with no target (Kim, 10 November).QUESTION_ARCHIVE.md, “VB-162 and VB-165”); no longer waits for Kim.
Notes:showVillage, src/page/cards.js: people and households, fence, founding, farms, customs), opened by selecting a village, and the Village panel of the first criterion extends that card; the design ref points at v0.4’s section 15.docs/review-blocks.md): by principle 14 (AGENTS.md: the future is someone’s estimate) the two warnings that foretell (food short of the days to the next harvest; fewer working adults than the fields need) show the estimate of the pawn the player inhabits, and say so; the counted facts (people, hungry days, idle share) stay exact. villageSummary takes the viewer.src/page/meter.js; AGENTS.md, Deciding without Kim, 15): the village store as a supply (VB-667’s cells, against its target: VB-457), its common fields and its work as the farm’s Land tab shows a farm’s, people by age band and food against need as graphs, and each warning as a chip on the farm’s row it concerns (VB-667’s chips). Read VB-667 and VB-668 when it is taken.Sim.villageSummary(st, v, viewer) in a new derived module, src/sim/overview.js (read-only, stored
nowhere; layer derived, after sim/opportunities): food in store (each household’s grain less its seed, flour, larder, fresh food,
meals and sheaves in the barn, and the village store less its seed) and its days of the village’s need; the latest harvest (the
households’ sheaves and the village’s grain from the ledgers) against a year’s need; people by band 0-14, 15-49, 50+, now and a year
ago; households in which someone ate short on any day of the window; the share of the hands’ work hours not at a task (from
household.workHours, sim/agents’ count); and the four warnings, each the households it concerns. tools/sim.js --report villages
prints the same numbers as columns; tests/overview.js checks each against a hand count on the probe’s village (ages, stores,
hunger logs, work hours and ledgers set by hand), and that the summary writes nothing. The village card (src/page/cards.js) shows
them as stats on the one meter (food marked at the harvest, harvest at a year’s need), people by band as three meters with the change
in a year, the warnings with their farms as chips (a chip selects the farm) and the warned farms’ rows marked by the warning’s icon;
its common fields and its work are shown as a farm’s Land tab shows a farm’s (workStats, now shared by both). tests/smoke.js
makes a household hungry and checks the stats, the chip, the row’s mark and that the chip selects the farm.
Decisions (Deciding without Kim; noted in the inbox):
OVERVIEW in sim/overview). No new state.horizonOf its skill): a pawn that reacts looks a day ahead, one
with a horizon of one season to the season’s end, two a season further, never past the next harvest; and the fields a hand can
till by its own household’s plan (targets.perHand, its head’s bias), FIELDS.perHand without one. The card says whose reckoning
and how many days ahead.overviewWalk).heirRanking’s, alive and a member.node tools/same.js --base 0d2a9ed prints same (founders, heirs, seeds 7 and 42, tiny, 2 years).
tools/sim.js --scenario founders --seed 7 --map small --years 2 --report villages: Asklunda 9 people, 214 days of food, harvest of
year 2 488% of a year’s need, idle 53%, no warning; Vallen 3 people, 212 days, 1 household hungry, warned of food and hunger (5) and
hands (3), by pawn 6’s reckoning, 12 days ahead. Populous tiny seed 7, year 2 autumn: Sandsta 34 people, 90 days of food, harvest
74%, 1 of 6 households hungry, idle 37%, warned of food (Vallen, a household just moved in) and hands (Lunden). Cost: overviewWalk
is the pawns ever (835 a call at populous medium, day 30); heirRanking is called only for holders 60 and over; the simulation
never calls it, so no counter of a run moves. Screenshot: docs/img/vb162-village-overview.jpg.