Status: done (2026-11-24) Priority: 2 Size: M Design ref: docs/ui2/HANDOFF.md; src/sim/estimate.js; src/sim/reasons.js (windowLeft, cause); src/sim/player.js; src/sim/projects.js Goal: The player sees what a plan costs in hours and days before choosing it (Kim, 24 Nov: making the player’s choices matter). Acceptance criteria:
sim/agenda, a view computed when asked, as sim/reasons is: it writes nothing, draws nothing, and no simulation module reads it (a check as in tests/reasons.js). On the facade: Sim.agenda(st), null with no played pawn.queue: each command of the player’s queue in turn: its verb, its job’s kind and tile (site, or -1), hours {lo, mid, hi} (the played pawn’s own estimate of the work left with its own hands, sim/estimate; principle 14: what is shown of the future is some pawn’s estimate), the walk to it where that is cheap to reckon, and starts and ends in game hours, the commands laid end to end from now (a command under way from its work left); a verb with no hours of work (a walk, going home) by its walk alone.open: the open work the played pawn may take and has not queued (from sim/opportunities, one entry a job): its key, kind, tile, hours {lo, mid, hi}, and why, what presses, in the words of sim/reasons’ cause (export it if needed).deadline: {t (game hour), what (a few words)} or null: the sowing window of its field’s crop, the expected frost for reaping and carrying in (as windowLeft, the head’s estimate, never this year’s draw), the haymaking window for mowing; and verdict: in time, tight (the range’s hi passes the deadline) or late (its mid does), for a queued entry from its ends, for an open one as if begun now.sim/projects), then: the steps left after it before the field can be sown, each with its kind and estimated hours, and the sowing deadline they lead to, with the verdict for the whole chain; so that the first spring’s question, whether a field broken now can still be sown, has an answer. If the later steps’ hours cannot be estimated before their jobs are posted, use the kinds’ norm hours and say so in the entry (rough: true).day: the working hours left today and the hours of work queued.tests/agenda.js on a small constructed state, in tests/suites.js: two queued jobs lie end to end and their hours equal sim/estimate’s; a sowing that cannot end within its window is late; open work not queued is listed with its deadline; a field project’s step carries then; the state is the same before and after a read (as tests/reasons.js shows it).src/sim/player.js, src/sim/mood.js); both add a line to src/sim.js and src/manifest.json. Do not read sleep here: a later task joins them.sim/agenda, a derived view (src/layers.json), Sim.agenda(st). Work and walks are laid in working hours (WORK), closed form (after).
open: every posted job of workFor (new in sim/opportunities: forPawn’s work only) not queued and not in hand, with barred (the opportunity’s why, null when it may be taken now) beside why (reasons’ cause, exported with windowLeft; meadows exports MOW_LAST).
The walk is as the crow flies at a meadow’s pace (hexDist / SPEED): cheap, never above the road’s. A begun command is estimated from its work left, its walk from its walk left.
Deadlines close at the end of work on the window’s last day. The field chain aims at this year’s sowing window if not yet closed, else next year’s (what says so); the thaw, a draw, is not reckoned in the window’s opening.
The plan’s later steps are estimated at their plan hours (rough: false); the hoeing and sowing of the field not yet made at the crop’s hours (rough: true).
The read of the kinds fills sim/drying’s memo village.fishing when first asked (Sim.opportunities does too); tests/agenda.js fills it before comparing the state.