Skip to content

Learn · Rulebooks

Write a rulebook

Take a domain you know and turn it into a pack other people can install.

Checked against the product on · written for people publishing rule packs

Authoring runs in four passes: name the labels, teach each one, ship starter rules, and add examples. Each pass makes the pack read more like the domain it came from.

Pass one: name the labels

  1. Create a rulebook shell and give it a slug.

    The slug is how the library addresses it forever.

  2. Write the groups first.

    A group gathers labels that share a cause. Three to eight groups suits most domains.

  3. Write one warning label per thing a rule needs to react to.

    Name it for the observation, so a rule reads as a sentence.

  4. Give each label a seriousness from 1 to 5.

Note. A label names something seen. An action names something done. Keeping a label free of the action a reader would take is what lets two buyers install one pack and respond to it differently.

Pass two: teach each label

  1. Write a fragment per label saying what it means in this domain.

  2. Write a fragment per group saying what the group covers.

  3. State the boundary between labels that sit close together.

    Two labels that overlap produce a pack whose grade falls.

Pass three: ship starter rules

  1. Write one rule per label a buyer will want on the day they install.

  2. Pick the action from the fixed list.

  3. Mark a rule sensitive when the action touches a buyer’s systems.

    A sensitive rule is held for a person on their side.

Pass four: add examples

  1. Add events that show each label being applied correctly.

  2. Add events near the boundary that show it staying unapplied.

    Boundary examples do more for a grade than more central ones.

Before you submit

  • Every label has a fragment.
  • Every group has a fragment.
  • No two labels describe the same observation.
  • Every starter rule names an action from the fixed list.
  • The examples cover each label and each boundary you care about.