Status: done (2026-11-02)
Priority: 2
Size: M
Arch: core
Phase: implement
Design ref: People, households and family records (Life events); Systems overview (Chronicle: missing; finding 6).
Goal: The village log keeps the last 40 lines of text (log in src/sim/records.js), and pawns keep text events. Nothing can ask “every death in Ulsäter”, “what happened at Norrgården” or “when did this custom change”, which is what the family stories, the panels, notifications and the tests need.
Acceptance criteria:
st.record is an append-only array of events {t, kind, pawn, other, household, farm, village, n, text}; fields that do not apply are absent. @state documented. Kinds at least: born, died (cause in text), married, moved, inherited, share, cause, custom (a meeting or reckoning change), split, harvest, frost, empty (a farm stood empty), settled (scenario start), year.log(...) and personEvent(...) call site also writes its event; st.events and p.events are unchanged, so the page needs no change.Sim.recordOf(st, {pawn, household, farm, village, kinds, from, to}) returns matching events in time order.born event, every dead pawn a died event, and every union a married event.false on one of them says the other records it; a parent’s “Child born” is the child’s born event. Seeding writes the history before the start (births, deaths, marriages of the people on record), so the record answers for every pawn, not only those born in play. died keeps its cause in text, as asked; other events keep their log line or person event’s text.log call without its event is an error, and tests/record.js checks every call in src/sim statically.friend and fellOut are 63% of the events in founders and 83% in populous (12,899 and 5,876); if the record grows too large for saves, they are the first to drop or to keep only for the last few years.