Status: done (2026-11-13) Priority: 2 Size: M Arch: animals Phase: implement Design ref: Animals (Herds). QUESTION_ARCHIVE.md, VB-284, question 5; docs/bench/food-balance.md Goal: Households without cattle are 69% of household-seasons and all of the growth, and make 0.71 of their need on 3 fields (with cattle 1.33); new farms hold 0.9 meadows against 5.9. The animals’ yields stay; the herd spreads to new households. Acceptance criteria:
HERD.milk and SOIL.perLoad are unchanged.tools/bands.js. Whether the old households that give are worse off.
Notes:AGENTS.md, Deciding without Kim); the question and its numbers are in QUESTION_ARCHIVE.md as the Design ref names.plan.want of the household’s standing plan, {what: 'cow', from, kind, by}, owned by sim/exchange (deals between parties)
as plan.reserved is sim/stores'; made or dropped at each review (reviewWant, called by sim/plans’ reviewed) by cowWanted:
HERD.want.hands (2) working hands (14 to 59, not retired, as fieldsWorkable counts them), a meadow, no cattle.sim/exchange, “the gift for now”;
payment in goods waits for the fair, VB-302). On its planning day an open want asks the households of its village, kin first
(kinHouseholds, moved from sim/help to sim/exchange, which sim/help now reads), for a heifer, else a cow, that the giver spares by
giveAnimal’s rule (it keeps a cow, so its own want, and its winter’s hay) and whose allowance toward the household (the gift’s rule)
covers the animal’s customary worth (Culture.norm('worth'): heifer 20, cow 40). When the animal is home its worth is booked as goodwill
the receiver’s holder owes the giver’s.wed, sim/lifecycle), the old household of the spouse who moved in, in the same village, gives a heifer it spares as a
start in life, not booked (as a new household’s start at the cottage, VB-140).lead (record in sim/exchange, type husbandry, 0.5 h, urgency
other) is posted at the receiver’s farm while the want has a giver and the herds are out of the byre (an animal led home in winter would
come to a barn without its hay); a member walks to the giver’s byre and, back home, the animal moves (payInAnimals, now with the kinds it
may pay in) with the hay above the giver’s winter need. A giver that can no longer spare it leaves the want open. The page does not draw
the led cow yet (carry cow has no sprite; follow-up below).cowSeek (new, its key in
tests/counters.json at 0.1305 a pawn-day on the counters probe). Measured on small-y40 (one year from the save, sources of this branch):
cowSeek 0.019 a living pawn-day (14.7 a day); oppAsk 11.01 -> 11.35 a living pawn-day (+3 %, the lead rule asked at each farm’s review);
every other counter within 3 %. The ms a day of the two runs is not comparable (the machine was loaded 18 to 33 by parallel agents: 205 and
463 ms a day for the same code paths); the counters are the measure. On the counters probe oppAsk 13.21 -> 13.60 (already out on main).npm run verify --verbose, against 1df68b8): 11 out against 10. Moved by this change: counters/oppAsk 13.21 -> 13.60 a
pawn-day (out before, residual +2.61 -> +3.00; the lead rule asked at each review); scaling.cowSeek new, Infinity against 1.15 (the
2-village probe has no open want, so 0 to some reads as infinite growth; the work is one village’s households a want, linear in wants).
counters/cowSeek in (0.1305, its key added). The other 9 out as on the base.npm test, npm run verify (93/93); tests/cowwant.js (new, fast): the want, the deal booked, a seller that cannot spare, a lone
hand, kin’s heifer at a marriage not booked, and the animal moving only after a member took the lead job; tests/lib/invariants.js
checks plan.want.claude/laughing-hopper-inbn4h at 1df68b8) and after, years 16 to 30, populous small at seeds 3, 7, 11, 42, 30 years
(5,989 to 6,098 household-years; a measuring script as tools/balance.js, reading the ledger and the record):
tools/bands.js was not run (its full runs would have taken hours on the loaded machine); these are the same runs’ populations, by the
bands’ formula, so the nightly bands will show the growth target’s change.wantsMeadow).cow) beside its leader (S, page). No tuning was done.