Status: done (2026-11-19) Priority: 3 Size: S Arch: debt Phase: implement Design ref: design.md, Goods, production and animals: Animals, Customs of the animals; docs/plans/VB-141.md (section 2.3); design.md, Custom dimensions; Hay and the hard winter limit Goal: How hard a household stocks for winter is a custom of its village (Kim, 16 Nov): keep the herd counts with a margin of 0.8, the cost falls on the lean-day and starvation rules as built, and no feed comes from the village store. The hard winter limit becomes a choice, and the count is where a household chooses between a larger herd and meat. Acceptance criteria:
DIMS entry stocking in src/culture.js: label “Stocking for winter”, options hay (“To the hay”) and herd (“Keep the herd”), malleability m 0.6, value hay in every entry of ARCHETYPES; a phrase for each option in SAID (src/page/customs.js); tests/head.js and the customs tab pick it up.autumnCount (sim/byre) takes its margin from HERD.margins[option], the option read through the village’s practice as optionOf in sim/commons reads commons: HERD.margins = { hay: 1.1, herd: 0.8 } replaces HERD.margin, with its meaning in the comment (the count keeps the animals whose winter’s need times the margin the hay covers: over 1 keeps a reserve, under 1 expects the hay stretched). The household’s head does the counting (principle 16); the custom is the norm he follows.sim/leanings: a household whose herd is at its byre’s cap, or that holds over two winters’ hay, leans to herd; one that lost a head to starvation or to an emergency slaughter in the last 3 years leans to hay. If nothing records such a loss, use what sim/byre already keeps (herd.lean) and add no state; the task file says which.node tools/same.js --base REF equal; or, if the new custom’s attitudes shift a seeded stream, the difference is shown to come from that alone and is reported.tests/suites.js: six cows and hay for four cows’ winter (84 units): hay keeps 3 (3 × 21 × 1.1 = 69.3) and herd keeps 5 (5 × 21 × 0.8 = 84); a bad winter (hay for 60% of the stall days) gives the herd household lean days and, past starveDays, a head lost a day, and no fodder comes from the village store.herd against every village on hay, at populous small seeds 3, 7, 11 and 42 (15 years) and founders tiny seed 7: head wintered a household, lean days a herd a winter, head lost to starvation, emergency slaughters, milk a cow the next summer, meat a household, hungry days a household (the distribution), in the task file and the PR; and which households are better off under herd and which worse.herd’s margin tried in at most five short runs (0.7, 0.8 and 0.9 at the least; seeds and map named; the values and what each gave, in the task file): kept where herd winters more head in an ordinary year and loses head in a bad one, so that neither option wins every year. What stays out is a row of docs/tuning.md (parameter HERD.margins.herd).medium-ref (VB-184’s estimate, not measured here: the measure is VB-715’s). No new counter, no new state.docs/architecture/modules.md, Adding things, is followed for the new custom.Noted by VB-141, 16 November 2026.
sim/society refreshInterests (where every interest is; sim/leanings is a read-only view): a holder whose cattle fill the byre (HERD.byre) or whose barn holds over two winters’ hay leans to herd; one whose herd has herd.lean > 0 (days without fodder since the last count, about the last year) to hay. Nothing records a loss over 3 years, so the window is the year of herd.lean; no state added. The page gets a “Husbandry” head in the charter.same.js is not equal under the default, as the criterion allows: a new DIMS entry adds attitudes and shifts the seeded streams (first diffs: cenv.people[].att[50..51], then herd names and births). tests/probe-based cowwant.js rebuilt its pair (the seeded herds moved); legs.js tolerance 1e-6 to 1e-5 (float32 wear). autumnCount compares with 1e-6 slack: 6 x 21 x 0.8 summed down to 84.00000000000001 and dropped a head.herd 0.8 kept (Kim’s value); tries in the table below.Numbers (populous small, 15 years, every village forced; head kept a household after the count / lean days a herd a winter / starved / emergency-slaughtered head / milk a cow a year / meat a household a year / hungry days a household mean, p90, max). founders tiny 7: identical under both (5 households, 5.04 head, 13 starved, no emergency, no hungry day).
| seed | option | kept | lean | starved | emerg | milk | meat | hungry |
| 3 | hay / herd | 7.92 / 7.70 | 1.21 / 1.25 | 238 / 215 | 201 / 979 | 6.2 / 6.2 | 13.3 / 11.9 | 0.5,0,22 / 0.3,0,11 |
| 7 | hay / herd | 11.67 / 11.37 | 0.78 / 0.39 | 278 / 272 | 194 / 1939 | 6.4 / 7.1 | 18.8 / 18.2 | 0.1,0,9 / 0.4,0,16 |
| 11 | hay / herd | 9.31 / 7.38 | 2.43 / 2.69 | 253 / 232 | 179 / 1093 | 6.8 / 6.4 | 15.3 / 12.0 | 0.2,0,9 / 0.3,0,11 |
| 42 | hay / herd | 7.55 / 7.42 | 1.58 / 1.85 | 208 / 207 | 92 / 888 | 6.7 / 6.2 | 15.0 / 12.8 | 0.3,0,19 / 0.3,0,20 |
Reading: herd keeps more at the count but the hay runs out, so emergency slaughters rise 5-10x and meat a household falls; head wintered is not higher at the next count, starvation and lean days are about equal. Hungry days: a few households worse under herd (max up in 3 of 4 seeds), mean within noise; the p90 is 0 in both. Which households gain is not measured per household (only the herd-full or hay-heavy ones should, by the attitudes).
Margin tries (seeds 3 and 42, herd 0.7 / 0.8 / 0.9): kept 7.72/7.70/6.95 and 7.24/7.42/7.30; emergency head 1174/979/906 and 1018/888/984; starved 220/215/200 and 230/207/229. Differences are within seed noise: 0.8 stays. The criterion “herd winters more head in an ordinary year” is not met by this measure: unticked; HERD.margins.herd stays a row of docs/tuning.md (exists).
Not exact: emergency count sums ‘Hay runs short’ event heads (a head can be counted on several days).