village-builder

VB-428: A household that would want a cow makes a meadow first

Status: done (2026-11-13) Priority: 3 Size: S Arch: animals Phase: implement Design ref: design.md, Goods, production and animals (cattle, meadows); backlog/VB-390.md Goal: VB-390 gave a household with a meadow and no cattle the want of a cow, but wantsMeadow asks for a herd first, so a new farm without herds holds no meadow and never wants one: founders small was identical run for run. Decide by Deciding without Kim whether a household with the hands for a cow makes its first meadow at the land step, and build it. Acceptance criteria:

Decision (13 November, without Kim): yes. A household with no herd and no meadow that has the hands for a cow (HERD.want.hands, 2 working hands of 14 to 59, not retired: the count of cowWanted, sim/exchange) starts one meadow at its land step, by the same project, the same choice of tile and the same work as any meadow (wantsFirstMeadow beside wantsMeadow in startMeadow, sim/meadows). One meadow only: the second waits for the herd, by wantsMeadow as before. Not at generation: generated farms without animals still start with none and make it by work. Reasons: it extends a system and gives the player nothing new (Deciding without Kim, 4); design.md has no Decided point on who makes a meadow (its “2 to 3 tiles to a farm that keeps animals” is marked Open); a peasant farm mowed its meadow before it could winter a cow (5, 7); nothing appears without work (the meadow is cleared by its hours, the cow still led home by VB-390’s deal). No new tunable: the threshold is VB-390’s HERD.want.hands. A lone hand makes none, as it wants no cow.

Implementation: src/sim/meadows.js (wantsFirstMeadow, read by startMeadow); no new state, export, counter or loop over a growing collection (a household’s members, capped). tests/cowwant.js: two hands, no herd, no meadow start a meadow project; one hand does not. tests/meadows.js: the check that a household without animals holds no meadow is gone (the rule changed); the others stand.

Validation: npm run format, npm test, npm run verify (103/103 passed; 18 targets out, advisory; the base’s count was not re-run on the loaded machine, and no counter key was added or re-recorded; tests/counters.js passes). No page change, no screenshot.

Numbers, before and after, small map, seeds 7 and 42 (a measuring script as VB-390’s, reading the ledger and the record; household-years counted from the year named, cattle at the year’s start, hay and meadows at its end):

Found on the way: the count of a household’s working hands (14 to 59, living, not retired) is now written out in five modules (sim/fields, sim/drying, sim/hunger, sim/exchange, sim/meadows); a follow-up should give it one home (S, refactor), described to the orchestrator.