Status: done (2026-11-22)
Priority: 3
Size: M
Design ref: none (code structure). backlog/VB-413.md; docs/architecture/target-v2.md section 4
Goal: sim/agents is 776 formatted lines and exports 40 names since VB-287 (journeys between villages). Split it by concern, each move checked with tools/same.js: the journeys (VB-287: setting out, legs, provisions, arrival), the attention slots (VB-251: hold, unhold, stepSide, offerWhy) and the awake set (VB-205) are the candidates; walking and the job’s phases stay. Before giving any of them an owner, find it in target-v2 section 4.
Acceptance criteria:
sim/agents is under 700 lines and at most its 34 exports of tests/width-baseline.json, or what is left is one concern and the task says why it stays whole; each new module has its @sys line, its place in src/manifest.json and its owners in src/owners.json.node tools/same.js --base REF prints same for each move; its line is in the PR.sim/agents over the line, as AGENTS.md (Conventions) asks.sim/agents (work, walkTo, goHome, idle, haltForTalk) into this module: split it with them in place.docs/review-blocks.md): the awake set, one of the three candidates, goes with VB-473, and walking is rewritten there: split after VB-473, when the concerns are legs, journeys and attention. Now waits for VB-473.sim/pose (where a pawn
is, read only, and the bed: material layer, since sim/heirs reads stayOf), sim/legs (the leg and st.legDue; owns agent.leg,
path, x, y), sim/work (the block of work; owns job.at, rate, due, st.workDue, household.workHours), sim/attention
(the side slots). Every call stays downward: a leg’s change reaches sideCheck by the event legChanged, a background task held out
of reach reaches the walk by sideAway, and dueWork takes the ends (ended, sideEnded) as callbacks. What stays in sim/agents
is the job’s phases, the step, a journey’s walking and the verbs: they write agent.phase, anim, inside, the fields it owns.
same.js: same for each of the four moves (tiny, 2 years) and for the whole against 3cad6f6 (founders, heirs; seeds 3, 7, 42; small; 5 years).
Found: loaded cleared st.away[].due (sim/away’s) under the name j, which the writes map read as a job’s; named stay, hinted in
tools/writes.js and allowed with its reason (lint-allow); moving it into sim/away needs a load hook there (not done).