Status: done (2026-11-16) Priority: 2 Size: M Arch: year Phase: implement Design ref: Work: opportunities, plans and tasks (design.md, section 7); docs/review-work.md; design.md section 7 (foresight, Traits before slice 7) Goal: Layer 2 of how a holder chooses: a head plans from an estimate of what its household needs, and heads differ in how good it is. This is where a capable head’s household does better for a reason the player can read. Acceptance criteria:
wits, husbandry, diligence, ambition and generosity, one number in 0 to 1 per pawn and trait, drawn at birth (and for the living at the start of a run) from the stream traits, uniform, so neutral on average; read through one function, Traits.of(st, pawn, name), which slice 7 re-points to the real traits. @state, invariants, the save. (VB-249’s diligence becomes one of these.)traits: within ±30% × (1 − skill). It multiplies the template’s target in that household’s plan; the template is untouched. The household panel’s plan (VB-256) shows the head’s target beside the custom’s.headView reports keepsOrder. The B3 check holds: 3/3/3 crops at seeds 3, 7, 11, 42 for a head of skill 0.5) The template’s order: heads of skill under 0.1 do not keep it (sowing first is not enforced for them); all others do. tests/heirs.js’s criterion (VB-023) holds for a head of skill 0.5, forced with fix.npm run verify’s hard checks pass, its targets reported with their residuals.
Cost: a few multiplications per review; five numbers per pawn in the save (about 40 bytes a pawn: name it in the PR against the save’s line).
Notes:QUESTION_ARCHIVE.md, “VB-164: the household’s year”): written. Edits src/sim/jobs.js and its neighbours, so the slice’s tasks run one at a time, and not beside VB-227, VB-241 or VB-247.QUESTION_ARCHIVE.md, VB-333): the fields a household wants (fieldsWanted) count its hands at the harvest here. VB-389 changes the same function (net of seed): one at a time.docs/review-blocks.md): now on the path of the blocks plan: VB-475 draws its stand-in skill by type of work from the same stream, and VB-476 reads skill as head for which causes a head reckons with and adds one more bias, the lean on its estimate of time, drawn as the others are. Kim’s order (15 Nov): VB-471 to VB-474, then this, then VB-475 onward. No criterion changes.src/sim/traits.js (kernel layer, new): pawn.traits, an array of five numbers in [0, 1) to a thousandth, in the order of Traits.NAMES, drawn from the stream traits at birth (sim/births) and for the living at the start (sim/scenarios’ new startStreams, after the streams are split, so seeding’s own stream is untouched); old saves draw theirs at load, keeping VB-249’s diligence. Traits.of(st, pawn, name) is the one read; Traits.skill is skill as head; Traits.biasOf draws one multiplier. sim/plans: plan.head {pawn, since, bias {wood, hay, seed, fields}}, drawn when the plan is made and on the event newHead (emitted by sim/heirs at a succession; an event, not a call, so no new upward call), never at a review; the cadence reads diligence through Traits.of. The bias multiplies the template’s targets when the seasonal plan is made (biased); the horizon adds at each review what the head projects the hearth will burn and the herd eat in the stall days before its horizon ends (project, kept in targets.ahead, taken off at the next review so the review still reads the plan, VB-252); none on a target the head chose (VB-253). The fields wanted are times the bias, whole, from 1 to what the hands can till. Sim.headView gives each target’s custom (the template’s) beside now (the head’s), and the head’s skill, horizon and keepsOrder, for VB-256’s panel (the panel itself is VB-256’s).jobs.fit says “not worth the walk” only when the bid plus MATCH.noise is at most nothing, as bid does (a fix: tests/opportunities.js failed on a bid in between once targets moved).tests/traits.js (new, fast tier): the traits, a birth, skill, horizon by thirds, the bias’s bounds, a succession’s new head, the projection at the season’s end and a season further, the hay’s stall days, a review drawing nothing, the custom’s targets in the view. Invariants: every living pawn’s traits; every plan’s head is its holder’s, with the four biases in bounds. tests/heirs.js: B3’s crops in years 1 to 3 with a head of skill 0.5 (fix on the stream): 3/3/3 at every seed. Tests written against the template’s targets make their heads plan by it (tests/lib/heads.js: tests/plans.js, and one block of tests/head.js).| seed | hungry before -> after | wood out | hay out | living | after, by third (low / mid / high): hungry per 1,000 hh-days; wood out of stints |
|---|---|---|---|---|---|
| 3 | 8 -> 50 | 31 -> 33 | 4 -> 5 | 612 -> 585 | 3.40 / 0.10 / 0.08; 10 of 46 / 19 of 193 / 6 of 117 |
| 7 | 29 -> 12 | 49 -> 45 | 4 -> 4 | 611 -> 644 | 0 / 0.03 / 0.18; 7 of 61 / 27 of 186 / 12 of 112 |
| 11 | 54 -> 71 | 47 -> 45 | 6 -> 5 | 582 -> 591 | 0.12 / 0.36 / 0.75; 5 of 58 / 31 of 205 / 14 of 137 |
| 42 | 4 -> 12 | 50 -> 53 | 6 -> 4 | 656 -> 676 | 0.39 / 0.10 / 0; 9 of 55 / 33 of 196 / 14 of 127 |
The mean of hungry household-days moves 23.75 -> 36.25 (+53%, against a tenth allowed); hunger is under 0.06% of household-days either way, so a few bad households move it (seed 3’s lowest third: 38 days in 11,168). The top third does better than the bottom at seeds 3 and 42, worse at 7 and 11; wood running out is a little rarer in the top third at seeds 3 and 42 (5 to 11% of stints) and not at 7 and 11. Living ends higher at three seeds of four. Households are not clearly better off; the stand-ins are not shown neutral. One run of the parameters as built (two earlier runs were stopped for code changes); the remaining tries were not spent, as each takes about 40 minutes on the shared machine: left for the tuning run (docs/tuning.md, from the inbox).
npm run verify --verbose): out against the base’s 7: counters/helpBid 0.3015 against 0.2921 (+0.0095), counters/helpOffer 4.061 against 4.056, scaling.helpBid 1.198 against 1.15 (new out, the help between households, moved by the heads’ targets); scaling.cowSeek in again; the other six as on the base.pawn.buffer (inbox task).docs/tuning.md. The order criterion is moot since VB-023 was closed. Proposed: close this task as done on that evidence. VB-255 no longer waits for it (it needed this task’s code, which is merged).