Status: done (2026-11-23)
Priority: 1
Size: M
Design ref: AGENTS.md, Conventions (a module’s length); docs/architecture/target-v2.md, section 2
Goal: sim/jobs holds the posted jobs alone; the weighing and the head’s day are modules of their own
Acceptance criteria:
sim/jobs went to 702 formatted lines with VB-1582 (water first in the allotment, the vital kinds’ fit). It holds four responsibilities; the split follows them, not the line count.
sim/jobs: post, sweep, refreshJobs, islandJob, the hourly asking of the kinds’ rules and lookForWork, which calls the others in order.sim/fit): urgency, prioOf, plotPrio, standOf, joined, floored, tooYoung, score, takeBar, matchBar, appraise, bid, fit, explainIdle, idleLine: read-only, drawing nothing, read by the matcher, the head’s day and the Actions list (sim/opportunities).sim/day): allot, allotChanged, eveningCall, takeDay, dayHours, hoursLeft, with the @state plan.day line; it reads the weighing and the posted jobs and writes only plan.day.dutyRound, idleAbout, assign, slot, mergeById) go where their concern lives: with the days owed and the hands lent, or stay with lookForWork; the task says which and why.node tools/same.js --base REF on the starting commit; tests/lint.js passes with sim/jobs under 700 lines and no module over 15 exports that was not; docs/architecture/modules.md and the @sys lines updated; src/owners.json names the owner of plan.day.Noted by VB-1582, 23 November 2026.
Done by VB-1591, 23 November 2026 (same against 75fc4a0; sim/jobs 702 to 235 lines, 15 exports to 3; 29 imports to 16).
sim/fit, sim/day, sim/idle, sim/jobs: the board notes the holders whose tasks changed and calls allotChanged(st, changed, c) at the end of a review or a look, as before. The other way (the clock calling the allotment after refreshJobs) would make the layering strict but change what refreshJobs does for its 13 test callers: left, a close call.jobsFor (with mergeById) and workCommand are sim/fit’s: the jobs a pawn weighs and the one command that takes one, read by sim/day and sim/opportunities; sim/day could not read them from sim/jobs, which loads after it.allotted (whom the head allots today) is sim/fit’s too, since standOf reads it; sim/day imports it.dutyRound is sim/day’s: a pawn on duty takes of the creditor’s day as takeDay takes of its own, by the same command. Not sim/days or sim/hands: it serves both, and both load before the weighing, which reads them (a cycle).idleAbout and IDLE are a module of their own, sim/idle: it reads nothing of the jobs or the weighing (company, pose, the legs), so neither lookForWork nor the day is its concern. slot went with allot, its one caller.assign, called by nothing since the head’s day (VB-466). Changed, a commit of its own: the morning’s asks are an argument of allot (asking), not a variable of the module’s closure.takeDay’s missed repeats allotted but for the commanded pawn (VB-1597); docs/architecture/ownership.md’s tables of 18 November still name sim/jobs.