village-builder

VB-079: Plan: a life, the player inhabits a pawn (slice 2)

Status: done (2026-11-08) Priority: 1 Size: S Arch: life Phase: plan Design ref: Vision and scope (Player role, reopened 3 Nov); docs/review-architecture.md, section 3; docs/roadmap.md, section 3.2; docs/architecture/target-v2.md, sections 4.5 (Opportunities) and 4.7 (the player), principles 15 and 16. Goal: Kim adopted the vision of a player who inhabits one pawn and lives a life the game does not prescribe (3 Nov). Design slice 2 concretely and write its tasks: the player picks a pawn, chooses what it does from what it may do here, keeps its needs, answers at the meeting, goes on as kin after its death, saves and loads in the page, and picks ambitions. Questions: QUESTIONS.md, Priority 1, “Architecture review: the vision and the first steps”, questions 1 to 5; and “Target architecture v2: decisions waiting”, question 3 (the player and the floor). Acceptance criteria:

Plan (2026-11-07)

Run interactively (started by Kim from the app): the plan is shown, and the real choices are asked; whatever is not answered goes to QUESTIONS.md with a proposed answer.

Context.

Approach. A design pass, no code. It writes:

VB-077 is closed by this plan, since its one open criterion is the save task. VB-098 and VB-099 stay in the arch, needs-review; the wrap-up stops waiting for them, and ambitions take only what they need of VB-099. The fourth door, offers in Exchange, comes with slice 1’s gift (a note in VB-182), not here.

Rejected:

Impact. The plan itself changes no module. The tasks it writes would touch:

The new coupling is one test at each of the four planner sites (“is this pawn the player’s, and held?”). Each task’s impact note says why the existing pieces do not fit where it adds one.

Cost.

Tests. None added by this plan; the golden file and counters are unchanged. node tests/backlog.js checks the new files and rows.

Measurements (before, for the tasks’ criteria).

Save and load are taken from docs/bench/budget.md (5 November). All four fixtures are stale (golden hash), which is usable, and is said with every number.

Measured before (7 November, fixtures 4ee11e9, all stale golden hash; 30 days from the fixture, then 10:00 on the next 6 days; the script is in docs/review-life.md, appendix):

  small-y40 medium-y5 medium-y60 (stress)
Living at the start 725 880 2,492
Simulation, ms a game day 153.5 209.5 783.4
Jobs refresh and matching, ms a game day 22.8 33.5 102.7
Open jobs a pawn of 15 or more may take at 10:00 (mean, p95, max) 1.5, 4, 7 1.3, 6, 48 0.6, 3, 8
Events in st.record 112,356 36,322 514,927
recordOf for one holder (ms a call; events found) 1.76; 197 0.76; 101 10.43; 739

forPawn reads a handful of jobs, so 1 ms a call is generous. recordOf alone breaks it at small-y40 and is ten times over at the stress state, so ambitions and the Life panel must not read the record in full.

Risks.

Completion (2026-11-08)

Summary:

Detail: