Status: done (2026-11-26) Priority: 2 Size: M Arch: plans Phase: implement Design ref: design.md section 15, A controller for any pawn and Direct control; docs/plans/four-scales/README.md, 3.6 (auto, queue) and 3.10 step 2; docs/review-jobs-2026-11-25/README.md, section 6 (What an LLM agent could play requires, points 1 and 7) Touches: new sim/controller; sim/player (inhabit, uninhabit, queue, unqueue, setAuto, playerStep, playerDied, goOnAs); sim/records (commanded, unplanned); sim/saves; page/play; page/actbar; tests/player.js; tests/commands.js; new tests/controller.js Goal: Any number of pawns may have their own logic off and be driven through verbs at once, and a pawn driven by nobody behaves as before Acceptance criteria:
sim/controller (@sys, @state, src/owners.json, manifest before sim/player): its automatic switch, its queue of at most QUEUE_MAX commands and the queue’s bookkeeping (refused, the begun head) as st.player holds them today; sparse (only a pawn with a controller holds one), plain data, saved, and ended at a death as playerDied ends the queue today.unplanned(st, id) and commanded(st, id) (sim/records) keep their names and callers and read the pawn’s controller, so no rule reads st.player to ask whether a pawn plans for itself.auto (on or off) and queue / unqueue, registered for any pawn for itself; Sim.setAuto and Sim.queue issue them for the played pawn, so the page is unchanged; the queue step runs every controller’s queue (from an index of the pawns with a non-empty queue, kept by the owner), not only the played pawn’s.st.player keeps the frame and the played line’s record (pawn, left, ended, last, days) and, until VB-1746, the player’s plan. FORMAT raised (sim/saves): a save of an older build is refused, as docs/architecture/modules.md (Saves) says; no migration is written.docs/plans/four-scales/README.md, section 4): in tests/controller.js, on a tiny constructed state, an empty controller (automatic on, nothing queued) on every pawn runs to the same state as with none, but for the controller records; two pawns with automatic off at once are both left alone by the planner. Once, for the PR: the same on populous small seed 7, 2 years.st.player is read today (one lookup); no new pass.npm run verify and node tests/smoke.js pass; node tools/same.js --base REF prints same for unplayed runs.
Notes:pawn.control {auto, queue, refused}, on the pawn as the plan’s 3.10 says, with two
sorted id indexes st.controlled (any controller: sim/clock filters the planner’s agents only when one exists, where it read
st.player) and st.queued (the queue step’s); both made at the first controller, saved. FORMAT 8. Counter queueRun added.inhabit starts the pawn’s controller fresh and uninhabit ends it (the pawn is its own again, as
when st.player held the queue). A queued command keeps its issuer’s source. sim/reasons says “your order” on the played pawn only (F1).pawn.control directly; later ones controlOf.