Kobayashi Maru
README.md
km.night.runtime
Act 1, the night before. Publishes KM.services.night = { begin(run), stop(), state() }. begin puts the cadet on foot in the dorm (KM.setView("walk")) with three time blocks; the interact control (E / pad west / touch) at the desk, bunk, intercom or door opens the choice cards (study, rest, rally, find the test's author, sneak into the lab), and every commit goes through km.scenario.nightChoose and emits night:choice, then plays its short in-character scene. The lab: crouch toggles (KM.setView("walk", {crouch=true})), the security cadet's cone raises suspicion through nightSeen (emits night:seen; full suspicion = caught → the caught scene → the night ends), and the open core's reprogramming screen applies nightEdit patches (emits night:edit), each showing the source line it rewrites and its trace size. When the blocks run out (or you are caught) it calls KM.call("flow", "go", "test", { from = "night", run, caught }), or sets the test phase when no flow service is published. Words live in km.night.text, screens in km.night.screens.