StoicBuilder

HandbookVII the BasilicaModelling the domain

VIIthe Basilica, Build the right thing

Modelling the domain

1 min readUpdated 28 November

In plain words

A domain model is a plain list of the things your business deals with, like members, events and RSVPs, what each one knows, and how they relate.

Where you see it

Guildhall's agent made a single users table with a role column, so nobody can be an admin in one guild and a plain member in another. Twenty minutes listing the nouns and how they link (a person belongs to many guilds, with a role in each) would have caught it before any table existed.

Notion pageagent
Guildhall: the domainPerson: name, emailGuild: name, invite codeMembership: one person in one guild, with a role (owner, admin, member)Event: belongs to one guild; has a date and a placeRSVP: one person, one event, going or not
Membership was the missing noun. The role belongs there, not on the person.

What goes wrong

  1. Letting the tables design themselves

    Ask for a feature and the agent creates tables to fit that one feature. Ten features later you have overlapping tables nobody planned.

  2. Three words for one thing

    Members on screen, users in the code, customers in the emails. Agree one word per thing and put the list in your rules file, so the agent uses it too.

  3. Forgetting how many

    "A note has a tag" and "a note has many tags" need different tables. Say one or many on each side of every link.

What to tell your agent

Copy this into Lovable, Bolt, Cursor or any agent
Before creating any tables, list the main things this app deals with, what each one stores, and how they relate, saying one or many on each side. Point out anywhere my words are ambiguous, and create nothing until I agree.

Quick check

Sign in to earn +10 XP for it

Quill users want to put one note in several folders. How should the domain model say it?

Got a prompt that touches modelling the domain?

Paste it. You get a better prompt first, then the cards that explain it.

Check your own prompt

Free, no sign-up.