Status: done (2026-11-13) Priority: 2 Size: M Arch: year Phase: implement Design ref: Work: opportunities, plans and tasks (design.md, section 7); docs/review-work.md; design.md section 15 (Parity of command) Goal: Parity of command (design.md, section 15): every act a pawn may take is the player’s to command. A head’s acts are the choices of its plan. Give each a verb, which the holder’s own rule and the player both go through. Acceptance criteria:
src/sim/commands.js, each checking the act is possible and returning why not: set a target of the plan (within bounds the verb states: hay 0 to 3 winters, fields 0 to what the hands can work, the woodpile 0 to twice the winter goal); choose the tile of the next field or meadow (claims, reach, the farm’s block: the checks of chooseTile and chooseMeadow, moved into the verb); set the order of the season’s routines; choose or drop the project (VB-255’s menu; until it lands, the land step only).source: 'pawn'; the player’s go before it, and where the player has made no choice the holder’s rule runs, as for any pawn (tests/commands.js: only the verbs call the acts they wrap).tests/golden.json unchanged. A test plays a head at seed 7: a tile is chosen and the field is made there; a refused tile (claimed, out of reach) returns its reason; a raised hay target is met by the next winter.Sim API entries for the page (VB-256). npm run verify’s hard checks pass, its targets reported with their residuals.
Cost: none in a run without a player.
Notes:docs/patches/VB-023.patch) is merged (st.plans.seasons, src/sim/plans.js), so the verb that sets it takes effect only then.QUESTION_ARCHIVE.md, “VB-164: the household’s year”): written. Edits src/sim/jobs.js and its neighbours, so the slice’s tasks run one at a time, and not beside VB-241 or VB-247.4d8e9df):
src/sim/commands.js, “the head’s plan”): target({store, n}) for hay (0 to 3 winters), fields (0 to targets.workable,
whole), wood (0 to twice ECON.woodWinter, every season’s goal) and cow (0 or 1, VB-390’s want); n null clears. tile({what, tile})
names the next field’s or meadow’s tile under fieldWhy and meadowWhy (src/sim/fields.js, src/sim/meadows.js: the checks of
chooseTile and chooseMeadow, now one list each, fieldBar and meadowBar, read by the search and by the verb), null or -1 clears.
order({steps}): the season’s routines, each once. project({what, tile}) begins a field or meadow now, or with what: 'none' holds
off projects (null lets go); dropProject({id, hold}) gives up the project under way. Each checks heads: only the household’s
holder, or {household} for a household with none.landBy, src/sim/plans.js) issues project with source pawn, on the tile the plan names while it
still passes the check, else on its own pick (pickField, pickMeadow). startProject and startMeadow are gone (the step is taken
in its parts); tests/commands.js holds setTarget, nameTile, setOrder, holdProject, beginLand and giveUp to the verbs.plan.chosen ({hay, fields, wood, cow, project}, absent until a head chooses), plan.tiles (now written by tile), the
seasonal plan’s by: 'head'; invariants in tests/lib/invariants.js; plain data in the plans’ maps, so saved with them (checked).Sim.head(st, verb, args) (the played pawn, at once, not queued) and Sim.headView(st, household) (targets with choice and bounds,
tiles, order, project, held off) for VB-256.fieldsWanted), not acts, so the rule issues
no target; the verb sets the head’s choice over them (chosenTargets, at each review and each season’s plan). The rule’s one act
of the plan, the land step, goes through project.wantsMeadow reads
WANT times a winter’s need, a parameter of its own). Left as it is.target cow: 0 none, 1 wanted while it holds a meadow and has no cattle,
cowWanted in src/sim/exchange.js); peat (dug against the woodpile’s goal, targets.wood, so target wood moves it). Left out,
with the reason: a field’s course (nothing chooses one yet, every field is barley’s; VB-350 brings the rotation and its rule, and its
verb belongs there, design.md “How the head chooses what to sow”); the quern (hewn and ground by QUERN’s constants, no choice in the
plan); the boat and tar (begun by yearly rules of sim/drying and sim/tar, not by the plan: the head holds them off with project
none, which both now read through Projects.heldOff, and gives one up with dropProject; beginning one by choice is VB-255’s menu).tests/head.js (integration, 3 s; a tiny village at seed 7): a member who is not the head, another head and the household
itself are refused with the reason; a tile is chosen, the land step begins the field there and it is made there in 3 days; another
farm’s field, a tile out of reach, the house and no tile are refused with their reasons (31 refusals, none changes the plan); targets
out of bounds refused, set, kept over the season’s plan and a save, cleared; the order set and the template’s again next season;
projects begun, given up, held off and let go. Hay, a household with a cow and five ewes and four meadows, at the start of winter:
2.51 winters’ need by the template, 3.23 with the target raised to 3 (3.80 at its peak).node tools/same.js --base 4d8e9df, founders, heirs and populous, seeds 7 and 42, tiny, 4 years: same;
founders and populous, seeds 7 and 42, small, 3 years: same (the world and the state at seeding and each year’s end, leaf by leaf).
With no player nothing is chosen, so no number of a run moves; no counter was added or changed. Cost: the verb’s check walks the
house’s reach once more for each land project begun (a few a household’s life), nothing daily.npm run verify: 103 of 104 pass; 16 targets out (advisory; none moved, the runs are the same). The one failure is tests/lint.js,
which asks for split tasks this run could not open (the night’s brief: no backlog.js new): “Refactor: split sim/commands by concern”
(738 lines, over 700; 18 exports, baseline 17), “Refactor: split sim/fields by concern” (28 exports, baseline 26) and “Refactor: split
sim/meadows by concern” (22, baseline 20). sim/plans is at 851 lines and 44 exports (baseline 34) under VB-431. No page change, no screenshot.