Ruleset Lab: write a mafia role and prove it

The Ruleset Lab is an editor for EnigMafia roles. Edit any role as JSON, or start a new one. The whole ruleset is re-linted on every keystroke, the role card re-renders, and the scenario corpus runs against your change, entirely in your browser. When you are happy, download the ruleset.

What it checks

  • Lint. Unknown effect blocks, impossible targets and other mistakes are reported as you type.
  • Scenarios. Every mechanical ruling is pinned by a scenario. If your change alters behaviour that a ruling decided, the scenario fails and tells you which one.

Who it is for

Gods (moderators) who design new roles or rebalance old ones and want to know the consequences before players do. The same checks run in continuous integration and in the enigma command-line tool, which can also fuzz random towns to prove the night resolver still replays bit for bit.