Kobayashi Maru
README.md
km.director
Act 2 in real time (scenario slice). Mounted by the main scene entrypoint in play; publishes KM.services.test:
start(run?, opts?)—beginTest, emitstest:begin,state:changed,viewscreen("freighter"), the distress-call alert/caption, then opens beat 1.opts.beatSecondsoverrides the 25 s beat (for tests).choose(orderId, args?)— applies throughkm.scenario.applywhile a beat is open;ui:ordercalls it. Disabled orders emitorder:rejectedand change nothing.stop(),isRunning(),current()→{ running, open, beat, remaining, reports, cards, run }.
Each beat emits test:beat(beat, reports, cards, deadline) and captions the loudest officer plus whoever disagrees; a beat that runs out is a stall. Each outcome emits order:applied, the rules' viewscreen/alert events (also passed to KM.services.bridge.stage), paced officer:line captions and state:changed; the end emits test:over(cause, run) 3.5 s after the final outcome. Looking at a station (station:focus) captions that officer's report and recommendation.