Skip to content
domain-modeling logo

Domain Modeling

domain-modeling

Build and sharpen a project's domain model. Use when the user wants to pin down domain terminology or a ubiquitous language, record an architectural decision, or when another skill needs to maintain the domain model.

mattpocock/skills756.1Kinstalls276.6Kstars

SKILL.md

Full skill instructions

Domain Modeling

Actively build and sharpen the project's domain model as you design. This is the active discipline: challenging terms, inventing edge-case scenarios, and writing the glossary and decisions down the moment they crystallise. (Merely reading GLOSSARY.md for vocabulary is not this skill: that's a one-line habit any skill can do. This skill is for when you're changing the model, not just consuming it.)

File structure

Most repos have a single context:

/
├── GLOSSARY.md
├── docs/
│   └── adr/
│       ├── 0001-event-sourced-orders.md
│       └── 0002-postgres-for-write-model.md
└── src/

If a GLOSSARY-MAP.md exists at the root, the repo has multiple contexts. The map points to where each one lives:

/
├── GLOSSARY-MAP.md
├── docs/
│   └── adr/                          ← system-wide decisions
├── src/
│   ├── ordering/
│   │   ├── GLOSSARY.md
│   │   └── docs/​adr/                 ← context-specific decisions
│   └── billing/
│       ├── GLOSSARY.md
│       └── docs/​adr/

Create files lazily: only when you have something to write. If no GLOSSARY.md exists, create one when the first term is resolved. If no docs/​adr/ exists, create it when the first ADR is needed.

During the session

Challenge against the glossary

When the user uses a term that conflicts with the existing language in GLOSSARY.md, call it out immediately. "Your glossary defines 'cancellation' as X, but you seem to mean Y. Which is it?"

Sharpen fuzzy language

When the user uses vague or overloaded terms, propose a precise canonical term. "You're saying 'account': do you mean the Customer or the User? Those are different things."

Discuss concrete scenarios

When domain relationships are being discussed, stress-test them with specific scenarios. Invent scenarios that probe edge cases and force the user to be precise about the boundaries between concepts.

Cross-reference with code

When the user states how something works, check whether the code agrees. If you find a contradiction, surface it: "Your code cancels entire Orders, but you just said partial cancellation is possible. Which is right?"

Update GLOSSARY.md inline

When a term is resolved, update GLOSSARY.md right there. Don't batch these up: capture them as they happen. Use the format in GLOSSARY-FORMAT.md.

GLOSSARY.md should be totally devoid of implementation details. Do not treat GLOSSARY.md as a spec, a scratch pad, or a repository for implementation decisions. It is a glossary and nothing else.

Offer ADRs sparingly

Only offer to create an ADR when all three are true:

  1. Hard to reverse: the cost of changing your mind later is meaningful
  2. Surprising without context: a future reader will wonder "why did they do it this way?"
  3. The result of a real trade-off: there were genuine alternatives and you picked one for specific reasons

If any of the three is missing, skip the ADR. Use the format in ADR-FORMAT.md.

More skills from mattpocock

setup-matt-pocock-skills logo
mattpocock/skills

setup-matt-pocock-skills

Configuration scaffold for engineering skills to locate issue tracker, triage labels, and domain documentation.

276.6K 941.3K
View
handoff logo
mattpocock/skills

handoff

Summarize conversations into handoff documents for seamless agent-to-agent transitions.

276.6K 919.3K
View
triage logo
mattpocock/skills

triage

State machine-driven issue triage with role-based workflow management and agent brief generation.

276.6K 889.1K
View
prototype logo
mattpocock/skills

prototype

Throwaway code that answers a single design or logic question through an interactive prototype.

276.6K 885.7K
View
grilling logo
mattpocock/skills

grilling

Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.

276.6K 836.2K
View
teach logo
mattpocock/skills

teach

Teach the user a new skill or concept, within this workspace.

276.6K 755.9K
View
codebase-design logo
mattpocock/skills

codebase-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.

276.6K 733.2K
View
diagnosing-bugs logo
mattpocock/skills

diagnosing-bugs

Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.

276.6K 717.4K
View
code-review logo
mattpocock/skills

code-review

Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes — Standards (does the code follow this repo's documented coding standards?) and Spec (does the code match what the originating issue/spec asked for?). Runs both reviews in parallel sub-agents and reports them side by side. Use when the user wants to review a branch, a PR, work-in-progress changes, or asks to "review since X".

276.6K 668.7K
View
ask-matt logo
mattpocock/skills

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

276.6K 661.5K
View
implement logo
mattpocock/skills

implement

Implement a piece of work based on a spec or set of tickets.

276.6K 661.1K
View
wayfinder logo
mattpocock/skills

wayfinder

Plan a huge chunk of work — more than one agent session can hold — as a shared map of decision tickets on your issue tracker, and resolve them one at a time until the way to the destination is clear.

276.6K 611.4K
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View