Status: done (2026-11-02)
Priority: 2
Size: M
Arch: core
Phase: implement
Design ref: Commands, time steps and views (Unified commands, Non-person entities: Decided); answer 4 to VB-076: the meeting issues decide(custom, option); kill, retire and argue become debug commands.
Goal: A village meeting changes its practice by writing the settlement’s customs directly (Culture.meeting, called from holdMeetings in src/sim/lifecycle.js), and the debug drawer acts through Sim.killPawn, Sim.retireHolder, p.advocate and the like. Make them commands, so every change of customs and every debug action has a source, a reason when refused, and a place where a player’s command will join later. Depends on VB-167.
Acceptance criteria:
{ actor: { settlement: id }, verb: 'decide', args: { dim, option }, source: 'meeting' }. Culture.meeting returns the changes it would make and holdMeetings issues one decide for each; the custom changes, is logged and recorded (custom) as today.debug: kill (cause killed), retire (a holder hands over), argue (a pawn takes up a cause: args { dim, option }), rally (a fifth of a village argues for an option), skip (advance the state by hours); the debug drawer issues them through Sim.command, and shows a refusal’s reason.tests/commands.js: each verb, and its refusals (a dead pawn, a pawn holding no farm, an option out of range).tests/golden.json unchanged; npm run verify passes; the debug drawer works as before (browser smoke test).Culture.meeting asks hooks.decide(s, dim, option) when the caller gives it, else writes the change itself (so tests/calibrate.js, which has no simulation, is unchanged); the simulation’s hooks(st).decide issues decide from source meeting. Each custom’s decision depends only on its own practice and on support counted before the loop, so deciding through a command changes nothing (golden: only the Sim API keys, for Sim.command).kill, retire, argue, rally and skip (no actor; the drawer still skips a day at a time, so the page stays responsive) in src/sim/commands.js; those carried out by modules loaded after it (sim/heirs, sim/lifecycle, sim/clock) are looked up when they run. The debug drawer acts through Sim.command and shows a refusal’s reason.tests/commands.js: each verb on the heirs scenario, and eight refusals that change nothing. tests/smoke.js had stopped killing anyone from the debug panel (it looked for farm names of an older world); it now kills the first settler and fails unless a death is reported.