sim/fieldsStatus: done
Priority: 2
Size: M
Arch: ownership
Phase: implement
Design ref: none (code structure). VB-172’s map, sections 5.1, 5.3 and 7.5; Kim’s answers 1 and 7 of 3 November (QUESTION_ARCHIVE.md, “VB-172: the ownership map”).
Goal: A field’s crop (farmstead.fields[]: stage, sown, reaped, held, weeding) is written in six modules: the kinds’ done and deliver (kinds.js:45-136, 17 sites), the clock’s ripening, weeding schedule, frost and empty farms going to grass (clock.js:69-96, 9 sites), and a farm emptying (heirs.js:161). Sowing order (VB-023), splitting land (VB-034), common fields (VB-100) and job steps (VB-123) each change the crop’s life. Give it one owner, and take its rules out of the clock (Kim’s answer 7).
Acceptance criteria:
sim/fields for each change of a crop: hoed, sown, reaped, hauled, reclaimed, weeded, abandoned (a farm emptying), and a daily step with the ripening, the weeding schedule, frost and empty farms’ fields going to grass, called by the clock in the same place of the day.sim/heirs call them; the random draw of a reaped crop’s size stays in the same order.node tools/writes.js --field farmstead.fields lists only sim/fields, apart from seeding (sim/layout, sim/scenarios) and the save codec.BACKLOG.md: behaviour unchanged, tests/golden.json unchanged, npm run verify passes.
Notes:clock.js:89-93) belong to farm occupancy (the map, 7.7), which waits for a task that touches it (Kim’s answer 1); they stay in the clock until then.docs/roadmap.md places this task in slice 3 (the household’s year).Implementation report (6 November 2026):
sim/fields reads the existing crop records, weather, economy constants and world biomes, and owns
all crop mutations. sim/kinds retains seed consumption and harvest delivery to household stores/ledgers;
sim/heirs retains farm occupancy and extinction; sim/clock retains building decay and scheduling.
The new calls are to an earlier-loaded domain, with no new module, state field, dependency cycle or registry.hoed, sown, reaped, hauled, reclaimed, weeded, abandoned and fieldsDay.
Existing crop statements and conditions were moved without tuning. Reaping draws from st.rng.fields
at the same call site in the work sequence; all existing public Sim API names remain unchanged.tools/writes.js --field farmstead.fields lists only sim/fields plus seeding in sim/layout and
sim/scenarios. Updated the architecture ownership map and rebuilt index.html.tests/crops.js checks insufficient seed leaves a hoed field unchanged, completed weeding stays closed
until due, missed weeding counts once per round, delivered harvest survives frost while waiting stooks
are lost with one event, and an active restoration claim suspends field overgrowth.npm test: 70 scripts passed in 116.7 seconds. Golden states match without re-recording;
tests/golden.json, tests/counters.json and tests/cost-baseline.json are unchanged.npm run verify: 83 scripts passed in 241.7 seconds, using system Chromium and the documented
software-render fixture mode. Desktop/mobile browsers pass; all four late-game fixtures checked, none missing;
five long invariant runs pass; loaded saves continue identically to unbroken runs; all 14 history counters pass
including the existing known excesses. No golden or cost baseline was changed.