village-builder

VB-207: death.hazard: the cause read from its contributions

Status: done (2026-11-11) Priority: 3 Size: S Arch: yardstick Phase: implement Design ref: none (code structure). docs/architecture/target-v2.md, section 4.1 (rules and explain); VB-197 (the rules registry). Goal: The registry lets each contribution to a rule name its cause, but deathRoll (src/sim/deaths.js:28-33) does not read it. It computes the base hazard a second time (hazard(a) / YEAR_DAYS) and calls any death above it “hunger”. That is right today only because both contributions, hunger and frailty, have the cause hunger. Deaths from the first contribution with another cause (disease, slice 8) would be counted as hunger. The roll should take the cause from the rule. Acceptance criteria:

Implementation notes