domain-model
Skill2 starsChanged 49 days agoMITView on GitHub
Models the domain with the person: entities, states and transitions with who triggers them, invariants, awkward scenarios, a logic prototype, a data sketch. Use when things change state, who-can-do-what is unclear, a schema is due, or terms clash.
11 other projects use a version of this.
Adopted by
Most recently taken up by
- thoughtbot/rails-consultanttheir own version, first seen Nov 8, 2026
- evelan-de/claude-code-pluginstheir own version, first seen Oct 17, 2026
- stevepolitodesign/skillstheir own version, first seen Oct 14, 2026
- tslateman/skillstheir own version, first seen Oct 11, 2026
- joelhooks/joelclawtheir own version, first seen Oct 8, 2026
- mik2win/foureyestheir own version, first seen Oct 8, 2026
Used with
Projects with it also use codebase-design, tdd and 2 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
GoogleSkillcodebase-design
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
Also in 3 projects that use this
GoogleSkilltdd
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
Also in 3 projects that use this
MicrosoftSkillhandoff
Compact the current conversation into a handoff document for another agent to pick up.
Also in 3 projects that use this
- +1 more from google
Other versions11 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 11
- ayoubben18/ab-method★ 192same name
- joelhooks/joelclaw★ 65same name
- thoughtbot/rails-consultant★ 29same name
- stevepolitodesign/skills★ 10same name
- evelan-de/claude-code-plugins★ 3same name
- mik2win/foureyes★ 2same name
- witi-projects/Skills★ 2same name
- tslateman/skills★ 1same name
- zyphr-labs/bounty-harness★ 1same name
- ltatarev/skills★ 0same name
1 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository25 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-designSkill
- agents-mdSkill
- bug-diagnosisSkill
- builder-osSkill
- business-caseSkill
- delivery-disciplineSkill
- evidence-ledgerSkill
- gate-checksSkill
- go-to-marketSkill
- ideation-methodsSkill
- opportunity-mappingSkill
- outcome-reviewSkill
- pressure-testingSkill
- problem-framingSkill
- product-analysisSkill
- release-opsSkill
- research-methodsSkill
- spec-writingSkill
- system-designSkill
- tracking-standardsSkill
- using-builder-osSkill
- ux-architectureSkill
- wayfindingSkill
The file
Files
Domain Model
ux-architecture designs what the screen shows when something is empty, loading or broken. This skill designs the things the product is about: what they are, what states they move through, who moves them, what must always be true, and how they are stored. A ticket reopened after it is closed, an invoice edited after it is sent: these are product decisions, and left to the build an agent makes them silently, one if at a time.
Mode. Standalone models the supplied domain and returns the entities, the rules and the prototype. In the lifecycle it runs in phase 4 after the flows and before the visual direction and the stack (the store depends on the shape of the data), writes DESIGN.md → ## Domain model, and gate 4.10 checks it. Both per operating modes. Read the domain method for the tables, the scenario technique, the logic prototype and a worked example.
Procedure
- Start from what is settled. Read the project's
DOMAIN.md, and the schema, migrations and status enums whererepo.readresolved. On a product that exists, model the delta: the entities this work adds, the states and transitions it adds or changes, the invariants it touches. Every existing rule it changes is named as a change, with the initiative that set it, and asked as a round question. Where an invariant tightens, count the existing rows that already break it (db.query) and hand the number to the spec's Impact on what exists. Done when you can list what exists, what this work changes, and the rows affected. - Name the things. From the flows, the spec scope and
PRODUCT.md: the entities the person acts on, each with a one-line definition in the product's words, checked againstPRODUCT.md→ Language. A term used two ways, or two terms for one thing, is a question for the person ("is a project the same as a workspace?"), settled first and written into Language. Done when every term has one meaning. - Give each entity its states and transitions. Per transition: who can trigger it, the guard (what must be true first), and the effect (notifications, other entities that change, what becomes irreversible). Draw each lifecycle under its table as a Mermaid
stateDiagram-v2, one arrow per transition labeled with who, every state of the table in it (gate 4.20); the person reads the drawing when the rules are put to them. An entity with no lifecycle gets a line saying so. Done when every transition has who, guard and effect, and every lifecycle is drawn. - Write the invariants: the rules that hold whatever happens ("a ticket has exactly one assignee or none", "a paid invoice changes only by credit note"). Each is a candidate test and, where the store allows, a constraint. Done when every rule the flows imply is written as an invariant.
- Stress it with scenarios. Walk concrete, awkward stories through the model: two people move the same ticket at once; the assignee leaves the team; a payment arrives for a cancelled order; the person undoes. Done when every scenario has an answer from the model or is listed as an undecided rule.
- Put the rules to the person, in their words. Every undecided rule becomes a
pressure-testinground question: options with what each means for the people using the product, a recommendation and why ("Can a closed ticket be reopened? A. Yes, by anyone… B. Only by its author… C. A new one is opened and linked…"). Hard-to-reverse ones (deletion, money, permissions) become ADRs. Done when every undecided rule has the person's answer. - Build a logic prototype when an entity has more than two states, a guarded transition, or a rule the person hesitated on: one HTML file at
.builderos/initiatives/{initiative}/design/domain-prototype.html, a button per action, guided scenarios from step 4, the full state shown after every click, in the product's language. The logic sits in one pure, in-memory script module the build can lift. Done when the person has played it, before accepting the model. - Sketch the data. Per entity: the fields that matter, the relationships, and what is deleted with what. The shape, short of a migration: enough for
system-design(stack) to choose a store and for the build to write the schema with every rule already decided. Done when each entity has fields, relationships and deletion behavior. - Record and explain. Write
## Domain modelinDESIGN.mdper the design template; at ship, phase 6 promotes it intoDOMAIN.md(gate 6.9), and standalone work on a product with aDOMAIN.mdproposes the edit there. Add a plain-language paragraph to the spec's## What we chose: the main objects and the two or three rules that will surprise someone. New terms go intoPRODUCT.md→ Language. Done when gate 4.10 passes on the file.
Watch for
| Do | Instead of |
| States, transitions, who, guard, effect | A status string whose rules get decided inside handlers |
| Ask "can it be reopened?" as a round question | A product rule made by whoever wrote the endpoint |
| One word per thing, written in Language | Two tables for one concept |
| An in-memory prototype with buttons | A prototype wired to the real database, testing plumbing |
| The entities this work touches | Weeks modeling the whole product |
| "Not applicable" only when nothing changes state or shape | Skipping the riskiest rules on a status change |
Capabilities
| Capability | Used for | Floor if absent |
repo.read | Existing entities, schemas, migrations, enums, status fields | Ask what exists; mark the model unverified against the code |
db.query | The real distribution of states and the rows that break the rules today | Model from the rules; mark counts unknown |
ui.render | Showing the logic prototype | A self-contained HTML file the person opens |
files.read / files.write | PRODUCT.md → Language, DESIGN.md, the prototype | Inline answers need no write; lifecycle writes require it |
Output Contract
## DOMAIN MODELED with the entities, the transitions with who and guard, the invariants, the rules the person decided, the prototype path when built, and the data sketch.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

