Wiring the Referee
Rules don't run themselves. The referee is Craft's Game Master, and this project tells it how to play Knave through its GM instructions: the Game Master settings in the app. The split is worth keeping: Rules/ is the reference; the GM instructions are the runtime. The rule files are what players and the referee read; the instructions are what the referee does.
Always on
Four instructions sit in front of the referee every turn: Premise (what a knave is, and why the world wears them down), The core roll (d20 + bonus over 15 or a defense, which ability fits, and the dice the game uses), When to roll (only when the outcome is uncertain and failure has consequences — Knave's own rule, which replaces Craft's default) and Fights (initiative, attacks, criticals, stunts and morale). Fights is always on because a single combat turn touches nearly all of it. Context is a budget; anything the referee can look up on demand belongs in Rules/.
One instruction per moment
Everything else is situational, and the referee brings in at most five a turn, judged on each instruction's trigger and its opening lines. So the instructions are grouped by the moment at the table, not one per rule: gear, coins and hirelings; meeting someone new (reaction rolls and creatures with no file); time passing (light, rations, rest and dawn); casting and finding spellbooks; making a knave; levelling up; and dropping to 0 HP. Each trigger names every moment it covers, and each body opens with a line naming the rules inside. When you add a rule, put it in the instruction for its moment instead of starting a new one, and keep each body under 1,000 characters.
Leave out what the Game Master already does. It keeps its own memory, the scene, the turn order and the map, and it writes changes onto the sheets as it narrates them. "Set castToday on the caster's sheet" adds nothing; "each book casts once per day and is ready again at dawn" is the rule it actually needs.
Player options
Knave's variants are player options, picked when a game starts:
- Who rolls the dice — shared, or players roll everything.
- New knave options — the designer's optional rules: reroll low starting HP, buy starting gear, trade the armor roll for a spellbook.
- Experience — XP for risky deeds, XP for treasure, or milestones.
- Raising abilities — the player chooses, or random.
- Character death — permadeath as written, or the player's choice.
Each choice carries its own instructions, so a game holds only the rules its table picked. Short add-ons (reroll low HP, random abilities, the XP rule) are always-on so they never compete for the five situational slots; the death choices carry the whole 0 HP rule. Every default is Knave as written. Once games exist, rename an option's label if you must, but never its key.
The pattern for a new subsystem
A subsystem you add wants up to three parts: durable state in a schema (a field or a file type), reference text in Rules/ if players may read it, and a situational GM instruction for the moment it happens at the table. Wiring hunger? A counter on the character schema, a paragraph in Rules/, and a line in the rest instruction saying what an empty belly costs. If the rule is optional, make it a player option rather than an edit. Don't build logs or tracker files for the referee: it remembers the game itself, and a leftover tracker only gives it a wrong place to write.
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.