Status: done (2026-11-01)
Priority: 1
Size: M
Arch: claims
Phase: implement
Design ref: Claims, ownership and territory (Claims: Decided; Compact tile data: Proposed; Infield, outland and wilderness: Decided 1 Nov). Review: docs/review-claims.md.
Goal: Owners exist; claims do not. The village’s outland (VB-156), its borders (VB-157), households’ stakes (VB-158) and empty farms (VB-033) all start with a claim, so give claims one representation and one place to settle disputes. Built on the tiny-world test kit (VB-155).
Acceptance criteria (Kim answered VB-041 on 2026-10-30 and the claims review on 2026-11-01):
src/sim/claims.js: st.claims, a Map from tile to an array of claims, since most tiles have none. A claim is { by: {type, id}, state: 'unrealised' | 'realised', why, since, renewed, seq, until }; type is pawn, household or village (all three may claim); why names its source (outland, field, meadow, birthright); seq orders claims made at the same hour; until ends a realised claim (a birthright), else null.strength(st, c), falls linearly from 1 to 0 over CLAIMS.years = 3 game years since renewed; work on the tile or a renewal (renewClaim) sets renewed to now. Once a day lapseClaims drops unrealised claims at 0 and realised claims past until, and returns them, so their owners can react.dispute, a DIMS entry with a value in each ARCHETYPES entry), malleability 0.7, options first (the first claim stands), strongest (the most strength; on a tie, the first), kin (kin of the tile’s last holder first, by kinship; then the first) and meeting (the meeting decides by voice-weighted support: for households, the holder with the most ties to the village’s voices; for villages, the village with more voices; then the first). Old Nordic default first. settle(st, tile, claims, rule) returns the winning claim. It shows in the customs panel and changes at meetings like the others.claimsOn(st, tile), claimOf(st, tile, by), addClaim(st, tile, by, why, opts), renewClaim(st, tile, by), dropClaim(st, tile, by), realise(st, tile, by) (makes the claimant the owner via setOwner and drops its claim). setOwner and every helper add the tile to st.landDirty, a Set the page clears after redrawing (VB-004).holdings(st): the land each household and village holds, by kind (house, fields, meadows, outland, other) and claims held, for the land report (VB-155) and, later, a land tax.@state lines for st.claims, st.claimSeq and st.landDirty; invariants in tests/lib/invariants.js (claims on valid tiles, by existing claimants, no claimant twice on a tile, strengths in 0..1).tests/claims.js on a tiny world: adding, renewing, lapsing after 3 years, realising, and each dispute option deciding a constructed dispute.renewed rather than stored, so it needs no daily update; why and until added for the birthright (VB-033); settle takes the rule so village disputes can use the culture’s custom when two villages differ (VB-157). The tile panel’s list of claims moved to VB-004.src/sim/claims.js. Also: aggrieve and rulesFor record on a losing household the rules that would have let it win (hh.grievance), and its adults lean towards them for CLAIMS.grievanceYears = 5 (sim/society); holders lean towards first and kin, the landless towards strongest and meeting. The new custom shifts the random draws, which made three tests depend on chance outcomes they did not test: tests/hands.js (a team of oxen and manure now taken out of its case), tests/interrupts.js (manure) and tests/herds.js (the bull’s 3% chance of dying over winter, turned off for the calving check). Golden re-recorded: every scenario’s cenv, pawns and what follows from them, and the new claims, claimSeq and landDirty.