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:
QUESTION_ARCHIVE.md); reopened by the vision of 3 Nov.design.md v0.4: Vision and scope (the player role and the scale of society) and The player and what they see; VB-191 writes the first into the skeleton. Written into section 15, The player and what they see: Kim’s answers Decided, the rest Proposed; ambitions postponed in Vision and scope.KINDS record’s available(st, holder), the posting rules of refreshJobs moved there, golden unchanged); Opportunities.forPawn; VB-169 (take control) widened to inhabiting; Decisions.answer over today’s meeting; the player’s succession; ambitions read from the record (with what of VB-099 they need); saves in the page (from VB-077’s plan); what the player sees of its pawn. Written as VB-208 to VB-215 and VB-169; by Kim’s answers, Decisions.answer became advocacy (VB-211) and ambitions were postponed (no task).QUESTION_ARCHIVE.md, “VB-079”, question 8; design.md, Saving; VB-214).docs/review-architecture.md, section 3): Kim adopted the review’s vision: the player inhabits one pawn of any station and lives a life the game does not prescribe; the family line becomes the default way to go on after a death, and the line’s prestige one ambition among several. The answer of 30 Oct is reopened until Kim approves the proposed design.md text; the questions are in QUESTIONS.md, “Architecture review”.QUESTION_ARCHIVE.md, architecture review, questions 1 to 4: the player role, which pawn, ambitions without a fixed score, the scale of society). Set ready; this plan raises what a pawn knows (question 5, still open) and the player and the floor where its design needs them.kin-help, VB-182), which touches other files; carried over from the pick order of 3 November, now retired.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.
issue (src/sim/commands.js:157); the planner is today’s one source of work, at four sites: idle pawns bid
every 6 minutes (src/sim/clock.js:95-104, src/sim/jobs.js:193), working pawns look up each hour (jobs.js:130), cooks are called
off other work (jobs.js:32), and all go home at the end of work (clock.js:40-46). A player is a second caller of the same verbs,
and those four sites are where the planner must step aside.jobs.js:45-94); a job’s id is its posting order
(jobs.js:22) and matching visits jobs by id (jobs.js:126, 181). Moving the rules into the kinds keeps the golden file only if
the posting order is kept.src/culture.js:240-248), and practice
moves when the leading option beats it by a margin (culture.js:249-268). A pawn’s one lever is advocacy over years
(culture.js:212, the debug verb argue, commands.js:136). An answer has to be a new term in that mean.recordOf filters the whole record per query (src/sim/records.js:19-26): ambitions cannot read it in a step (110,278 events at
small year 40, VB-199).src/sim/saves.js:102-113), in Node only. docs/bench/budget.md (5 November,
stale fixtures): save 1.09 s, load 0.32 s, 19 MB of JSON at medium-y5; save 6.0 s at medium-y60.src/page/animate.js:144-150, src/page/words.js:166), about 4 game hours at
30×; what it shows of a pawn’s opportunities is computed at that rate, in the page.src/sim/heirs.js:19), kin (records.js:177-193), ties
(src/sim/relations.js:259).QUESTION_ARCHIVE.md, 3 November); saves in IndexedDB, the last 3, other builds refused (30 October); a controlled pawn left alone
by the planner until released (VB-076, answer 3).Approach. A design pass, no code. It writes:
design.md section 15, “The player and what they see”, marked Proposed, with the reasoning and costs in
docs/review-life.md;available refactor (golden unchanged);Opportunities.forPawn with the actor view;Decisions.answer);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:
Opportunities.forHolder for every holder now: slice 2 needs one pawn on demand. Every holder every hour is slice 3’s cost risk
(roadmap, section 3.3), and its plan designs the cache.Impact. The plan itself changes no module. The tasks it writes would touch:
sim/kinds and sim/jobs (the refactor);sim/opportunities, read-only;sim/commands, sim/clock and sim/jobs (the player as a source: one new state field, st.player);culture and sim/lifecycle (ballots at the meeting);sim/saves and the page;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.
refreshJobs runs at 14 hours a day (hours 5 to 18) over every farm. It must post through a callback, without arrays
per kind, and keep “jobs refresh and matching” within 5% of before (33.5 ms a day at medium-y5, measured below).forPawn: one pawn, on demand, in the page (its household’s and its village’s open work, the empty farms and households it could
go to); under 1 ms a call at the late reference, at most four calls a second.recordOf; events of the player’s line come through
VB-199’s pawn index once it lands.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).
--report perf.forPawn reads.recordOf for one pawn: ms a call and the record’s length, at small-y40.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.
Summary:
design.md’s Saving row is revised.Detail:
design.md:
The reasoning, the seams in the code (the four planner sites, with file and line), the costs and the tasks are in
docs/review-life.md. The roadmap’s section 3.2 has a dated note.
QUESTION_ARCHIVE.md, “Archived 8 November 2026”), and VB-169’s open question
(home at dark) with them. No question is left open for slice 2.4ee11e9, all stale golden hash): the table under the plan. A pawn may take 1.3 to 1.5 open jobs on
average at 10:00, at most 48, so forPawn is cheap. recordOf for one holder takes 1.76 ms at small-y40 and 10.4 ms at medium-y60,
so nothing in slice 2 reads the whole record. The generated world’s typed arrays are 6.2 MB at small and 14.3 MB at medium (the cost
of saving the whole world, which Kim declined).Decisions.answer over today’s meeting; Decisions waits for the first question that needs the player’s
answer (slice 3’s holder plan, or slice 5’s testament). Target-v2’s section 4.7 still lists it as a door.sim/jobs); VB-210 for the page; then VB-211, VB-212 and VB-213. VB-214 may run beside them. VB-215 waits for the yardstick (VB-199,
VB-202, VB-204).docs/bench/budget.md is generated, so the slice’s line
is added by the wrap-up (VB-078).