Wiring the Referee
Rules don't run themselves. The GM/ folder is the part of the project the referee executes, and it is built on a separation worth keeping: Rules/ is the reference; GM/ is the runtime. The rule files are what players and the referee read; the instruction files are what the referee does.
The always-on core
@Missing file is loaded at all times. It compresses the whole system into a referee's operating manual: which schema fields mean what, resolution in one breath, and the standing conventions — roll on the tables instead of deciding outcomes, read computed rolls off the sheet instead of improvising them, keep the campaign file current. It is deliberately short. Context is a budget; anything the referee can look up on demand belongs in Rules/, not here.
Triggered instructions
The other ten instructions load when their moment arrives, and each is named as its trigger — the filename is the contract:
- @Missing file fires when a character update carries
xpto 1000, and runs the level-up procedure. - @Missing file fires when a spellbook is cast from, and flips that entry's
castTodayflag on the caster's sheet — never on the shared book. - The rest catch attacks, new combat rounds, risky attempts, unclear reactions, morale moments, rests, gear and coin changes, and a knave hitting 0 HP.
A trigger is metadata on the instruction file — the event kind and which file types it watches — set with craft meta or in the app. Keep each instruction to the procedure for its one moment; the moment the referee needs it is the worst time for it to ramble.
The pattern for a new subsystem
Any subsystem you add wants three parts: durable state in a schema (a field or a file type), reference text in Rules/ if players may read it, and a triggered GM instruction that makes it happen at the table. A rule with no instruction doesn't exist in play; an instruction with no stored state resets every session. Wiring hunger? A counter on the character schema, a paragraph in Rules/, and a clause in the rest instruction that ticks it.
Table memory
@Missing file is the durable state of play itself: party roster, current scene, open threads, session log, and the table's house rules. The core instruction tells the referee to maintain it as play progresses — which makes the campaign file the natural home for anything you want remembered across sessions without inventing a new type. Give each table its own campaign file.
The persona
The referee's voice — dry, impartial, counting coppers — is the gm personality in the project settings, separate from all of the above. The instructions define what the referee does; the persona defines how it sounds while doing it. If you reskin the world (chapter 5), reskin the voice to match.