All sessions

Session 02 · Rules

Rules as Data

When every rule is a record with an owner and a status, the docs site, the linter and the agents stop disagreeing, because they're all reading the same thing.

2 min read4 sections
Contents+

The story

Before we merged our brand site and our design playbook into one, we put them side by side.

They disagreed. Nothing dramatic: the names of the status colours, whether we use em dashes. But both sites were official, both were confident, and a reader had no way to tell which one was right. Multiply that by every guideline page, Figma annotation and decision made in a thread, and you get a design system whose rules exist in many places and nowhere in particular.

The fix wasn't a better wiki. It was to stop writing rules as prose at all, and write each one once, as data, so every surface reads the same thing.

The shift

Prose is easy to write and impossible to keep in step. Each copy of a rule drifts at its own pace, and after a while nobody can say which one is current.

So rules stopped being prose. Each one is now a small record, and the docs site, the agents' context and the lint rules are all built from it.

01 · Structure

Anatomy of a rule

A rule record is deliberately boring: an id people can cite, the rule in one sentence, a status, an owner, and the rationale. Decisions get the same treatment, so the reason behind a rule is never more than one click away. Boring is the point. A record that small can be read by a person, a build script and a language model alike.

  1. id: "CT-04"

    ← so people can cite it

  2. rule: "Buttons say what they do, in two words or fewer."

    ← one sentence, no essay

  3. status: "ruled"

    ← how much weight it carries

  4. owner: "Content design"

    ← who decides

  5. rationale: "Labels are read, not studied."

    ← why it exists

  6. decision: "D-11"

    ← the record of how it was decided

Figure 1 — Anatomy of a ruleExample record

02 · Distribution

One fact, one home

The record is the only place a rule is written. The docs site renders it, a build step bundles every record into one file for agents, and lint rules point back to the record they enforce. When the record changes, every reader changes with it on the next build.

“Nobody types a rule twice.”
One rule record feeds three readers: the docs site renders it, a plain-text bundle gives it to agents, and a lint rule cites it.Rule recordthe only copyDocs siterenders the record✓Agent fileplain-text bundle✓Lint rulecites the record✓
Figure 2 — One fact, one homeDraft diagram

03 · Governance

Changing a rule

Rules change the same way code does: someone proposes an edit to the record, the owner reviews it, and it merges. The status field makes the lifecycle explicit, from draft, to open for discussion, to ruled, so readers know how much weight a rule carries today.

A rule moves from draft, when an edit is proposed, to open while the owner reviews it, to ruled once it merges.Draftproposed editOpenowner reviewingRuledmergedevery reader updates on the next build
Figure 3 — Changing a ruleDraft diagram

04 · Access

Docs that answer back

Once the rules are data, documentation can do more than display them. A search box can answer “what's the rule for empty states?” by pointing at the record, find the page that explains it, and check a draft against the rules before anyone reviews it. And because the docs are versioned, a delivered page is never silently edited. Every change is a new version.

What's the rule for empty states?

UX-12 · ruled · Design systems

Every content view ships Empty, Loading, Dense and Error states.

Open the guidelineCheck my draftSee the decision
Figure 4 — Docs that answer backExample interaction

Then & now

What changed

  1. ThenGuidelines live in pages, files and threads.

    NowEach rule is one structured record.

  2. ThenCopies of a rule drift apart.

    NowEach rule has one home, and every surface reads it.

  3. ThenAgents get pasted context, or none.

    NowAgents read the same records, bundled as a text file.

  4. ThenChanging a rule means another meeting.

    NowChanging a rule means a reviewed edit to its record.

In practice

  1. 01

    Start with ten rules. Pick the rules people argue about most, and write each one down with its owner and the reason behind it.

  2. 02

    Generate, don't copy. Build your docs and agent context from the records, so there's nothing to keep in sync by hand.

  3. 03

    Make status visible. Showing whether a rule is ruled, open or draft stops drafts from being treated as law.

© 2026 Joshua Piller. All rights reserved.