VB-1657: Refactor: split sim/playerplan by concern
Status: done (2026-11-24)
Priority: 1
Size: M
Design ref: src/sim/playerplan.js; AGENTS.md, Conventions (VB-414)
Goal: The plan module holds one concern a module.
Acceptance criteria:
sim/playerplan (792 formatted lines after VB-1653 and VB-1655) is split by its concerns, each where it belongs: the plan’s ops and state (plan, planDay, planBegun), the chains declared as data (CHAINS: plant, hay, harvest, fell, firewood, farmstead, with chainWhere, chainSteps, chainGone), what comes next and why it waits (nextOf, taskCmd, chainCmd, WAITS, waitsOf), and the page’s reads (planView, fireView); the task says which module holds each and why.
sim/playerplan (125 lines): the plan’s state and its writes: the ops (plan), the feeder’s (planDay, planBegun), a fell task’s trips home
(timberHome); it stays the owner of st.player.plan, so every write to the plan is in one module. asleepAt, empty, today live here: rules of the plan’s state.
sim/planchains (441): CHAINS and their reads (chainWhere, chainWhy, chainSteps, chainGone, taskAt, pileOf, headCmd); reads only, loaded first since the ops check through chainWhy.
sim/plannext (140): nextOf, taskCmd, chainCmd, WAITS, waitsOf: the one choice and why each task waits, read by sim/player’s feeder and the views.
sim/planview (103, layer derived, beside sim/agenda): planView, fireView, the page’s reads; no simulation module reads it.
No re-export shims; agenda, player, sim.js, tests/plan.js and tests/lib/invariants.js read the new homes. Behaviour: same.js founders, solo against 025f393: same.