Status: done (2026-11-25)
Priority: 3
Size: M
Arch: debt
Phase: implement
Design ref: Land, ecology and rights, Land and rights (Slice 5’s rights; Owner and user); Claims, ownership and territory (Ownership, Decided); docs/architecture/target-v2.md, section 4.3 (Land)
Goal: Foreclosure, tenancy and splitting between heirs all need a holding whose owner is not the household that works it. Today st.owner (src/sim/ownership.js) holds one party a tile, and every rule of work reads it as the one who works the tile. Keep that reading, so the hot paths do not change, and record the owner beside it only where the two differ.
Touches: sim/ownership (ownerOf, titleAt, ownedCodes, holdingsOf, fieldsOwned, split, transfer, grant, end); sim/claims (holdings); sim/scopes (inScope); sim/terms (estateWorth); tests/lib/invariants.js; tests/suites.js; new tests/titles.js
Acceptance criteria:
sim/ownership (or a module sim/land that takes it over, if sim/ownership would pass 400 lines) owns st.owner as the user of each tile (the one who works it), and a new st.titles: a Map of holding to {owner, since, basis, rent} for holdings whose own lies with another party. A holding is a farm (its house and yard tiles), a field or a meadow, named by its tiles as today’s farmstead and field records name them.ownerOf(st, tile) (the title’s owner, else the user), holdingsOf(st, party, 'own' | 'use'), split(st, farm, field, why) (a field becomes a holding of its own), transfer(st, holding, 'own', to, basis, why), grant(st, holding, 'use', to, rent, why) and end(st, holding, why); each marks st.landDirty.SHARES) and the land each holds (Claims, Land and tax) count own, and every rule of work keeps reading the user; until a title exists the two are the same, so nothing in play changes.tests/lib/tiny.js): split a field off a farm, pass its own to a neighbour with the farm’s household keeping use; the field’s work still goes to its user; ownerOf and holdingsOf answer both ways; ending the title returns the field to one holder.checkState: a title’s holding exists and its owner and user are live parties, or the owner a village), src/owners.json; node tools/same.js --base REF prints same.
Cost: none in play until slice 5’s remedies make titles: a title a foreclosed field or let farm, so tens at medium-ref after decades; no per-tile array is added.
Order: beside VB-310 and VB-313. VB-316 (foreclosure), VB-317 (tenancies) and VB-034 (splitting between heirs) build on it; VB-309 (a farm in trust) may reuse its grant of use.
Notes:st.owner keeps meaning who works the tile, as target-v2 4.3 has it, and the owner is recorded beside it; design.md’s Decided row “each tile records its owner” stands, since both are recorded.own.kind, farm, user and why, so st.owner stays a cache derivable from the titles (checkCaches) and why needs no log line.
split makes a title with own and use as the farm’s (basis ‘split’); end makes the holding its farm’s again, owned and worked as the
farm is (the tenancy’s end: the farm works it). grant sets st.owner only: the field record stays with its farm, so moving a let field’s
work to the tenant is VB-317’s. rent is a share of the harvest (0..1). Titles of a party that ends are not yet passed or ended: VB-1728.
same: tiny, founders and heirs, seeds 7, 42, 2 years. tests/titles.js.