Status: done (2026-11-16)
Priority: 1
Size: M
Design ref: AGENTS.md, Deciding without Kim (7, 9, 16); design.md, Goods, production and animals
Goal: What a household makes of each good is its head’s target: its own need, which the head’s rule sets as today, plus what the head means to give or exchange; the played head sets it by the verb it has.
Acceptance criteria:
target covers every stored good a household can make (the goods registry’s rows with a maker: dried fish, tar, peat, clay, bog iron, quern stones, butter, salt meat, ale; later crafts add theirs), with bounds from what the place and the hands allow (targetBounds); the constants that sized production go, or become the default target’s terms.node tools/same.js --base REF prints same, or the difference is reported; nothing is made for exchange until a head has reason (the task that reads the asks).available rules as a compiled value; no new loop, no pass over goods in a step; the review’s work is counted before and after (node tests/counters.js) on small-y40.Impact: a new module sim/targets (material layer, after sim/stores): the registry of the goods a household makes (code, sealed with
the rules registry; no saved state), target, need, bounds, view, and hands (moved from sim/drying, which re-exports it).
New state: plan.targets.goods (written only by sim/plans: compiled at each review, at a retarget and when the head sets one) and
plan.chosen.goods (the head’s choices, by the verb target, which already existed). Reads: each maker reads its good’s target where it
read its own constant or rule (sim/drying rackfish and the rack’s room, sim/tar burntar, sim/dig wants, sim/quern hewing,
sim/kinds brewWanted, sim/byre churning and salting). No new coupling but makers → sim/targets (downward); sim/targets reads
st.plans (state, not a call). Why a registry and not a branch per good in sim/plans: nine goods now and every later craft adds
one (Deciding without Kim, 4; the third special case was tar, then iron).
bogOre), the quern, butter, salt meat, ale; each declared by its maker with
its need (the default target), its top bound beyond need (place and hands) and its held stock.Drying.wanted; tar the barrels a pit’s household keeps (1, 2 with a boat);
clay and bog iron DIG.stock; ale BREW.stock; a quern 1 (a working quern, a held one counted while not yet due for renewal);
butter, salt meat and peat Infinity (no cap of their own: the milk’s share churned, all fresh meat salted, peat cut to the fuel
pile’s goal, which the woodpile’s target already sets). DIG.stock, BREW.stock and the dried fish wanted become the default’s terms.targetBounds in sim/plans asks Targets.bounds for a made good): [0, need + what the place and the hands allow beyond
it]. Hands: the household’s working hands times TARGET.spareHours (Proposed 200: about a month of a hand’s slack a year), at each
good’s hours a unit (a rack trip and its hanging for a bank’s catch, twice from a boat; a barrel’s hours at the pit; a load’s dig;
a barrel’s brewing). Place: no dried fish beyond need where the village does not fish; no tar beyond the barrels kept without a pit
in a wood with pine; nothing dug beyond the stock where the digging ground has none; no quern beyond its own (no store holds a loose
stone yet: VB-866). Butter and salt meat: what is held and what the cows give over the butter’s keeping days, or the fresh meat and
the herds’ carcasses.Sim.headView(st, id).goods: each made good’s held stock, target now, the custom’s (need), the head’s choice, bounds and unit. The
page’s plan panel does not show it yet (VB-865).planReview times 9),
read by the makers’ available rules as one map lookup; no new loop in a step and no pass over goods in one. Bounds are read only by
the verb and the page’s view.Decisions (Deciding without Kim):
Infinity, not a number: butter and salt meat are what the milk and the meat give, and peat is
cut against the fuel pile’s goal, which is the woodpile’s target; a finite target only caps them (peat: or asks for more, in
summer). Any number would have changed today’s churning and salting (3, 11: no patch; the head’s verb is the way to set one).sim/targets is a new module, not a section of sim/stores or sim/plans: both are over their size lines with split tasks open
(VB-416, VB-431), and the registry is its own concern (goods with a maker), read by the makers below sim/plans.tests/made-targets.js (fast): on a tiny world at seed 7 with herds, a review compiles every made good’s target to its need; the
verb refuses beyond the bounds and half a whole good; clay above its stock is dug on, none at 0; fresh meat is not salted at a target
of 0; a quern target of 0 fetches no stone; ale 3 is read by the view with its bounds; a save holds the targets and choices; cleared,
the need again; invariants hold. tests/head.js: its “no such target” case now names wool (ale is a target).tests/lib/invariants.js): plan.targets.goods absent or one non-negative value a made good, whole where counted
whole; plan.chosen.goods null or non-negative, and the compiled target is the choice.node tools/same.js (founders and heirs, seeds 7 and 42, tiny, 2 years): only the new field plan.targets.goods differs.
Populous small seed 7, 3 years: the same to the end of year 2; diverges in year 3. With the target read live in place of the
compiled one the run is the same throughout: the difference is the compiling (a dried fish need that moves with the household
between its reviews, a boat built), at most a review’s cadence (1 to 3 days) late.node tools/balance.js --scenario populous --seeds 3,7,11,42 --map small --years 10 --from 3, before and after: 2,428 and 2,434
household-years; made/need by household size within run-to-run noise (size 5: 1.91 → 1.94; size 6: 1.82 → 1.80; size 8: 1.42 → 1.39);
hungry household-years 0 to 2% at every size in both. Households are neither better nor worse off: the change is a delay of a
day or two in when a target moves, not a different target.small-y40 (each tree’s own fixture, populous small seed 7, made for its sources; a year on, --report counts), per
living pawn-day before and after: planReview 0.1874 → 0.1872 (7,116 → 6,986 reviews a year); oppAsk 12.96 → 13.26;
digGround 1.281 → 1.292; tarAsk 0.0284 → 0.0245; fishReach 0.0106 → 0.0138. The two runs part from year 3 (above), so these
are two islands of 792 and 787 living, not one; no counter moves beyond that. The compile adds 9 map writes a review (about
63,000 a year here, 1.7 a living pawn-day), each a read of the maker’s need; no new loop in a step. node tests/counters.js passes
unchanged (no counter declared or re-recorded). Times are left to the nightly bench.tests/goods.js: “nothing of the goods in saved state” now checks that no row of the registry is saved (its fields), since a
plan’s target names a made good as a store names its field. Targets.target reads a plan only from the plans’ Map (a JSON copy of
a state, as tests/milk.js makes, falls back to the need).npm run verify after merging the run’s branch: 138 of 138 passed; 8 targets out (advisory), none of them moved by this task’s
checks. No page change, so no screenshot.TARGET.spareHours; three close calls (by-products’ Infinity default and the design line it asks for; VB-644’s
first criterion rewritten as the dried fish target; the target compiled at the review rather than read live).