| name | domain-modeling |
| description | Actively build and refine a project's domain model as you design. Use when the user wants to nail down domain terminology or a ubiquitous language, capture an architectural decision as an ADR, or when another skill needs to keep the domain model current. |
Domain Modeling
Shape the project's domain model while you design โ this is the active craft, not passive reading. You challenge loose terms, invent scenarios that expose edge cases, and commit the glossary and decisions to disk the instant they firm up. (Simply consulting CONTEXT.md to reuse a word is not this skill; that's a habit any skill already has. Reach for this skill when you are changing the model, not merely reading it.)
File structure
Most repositories hold a single context:
/
โโโ CONTEXT.md
โโโ docs/
โ โโโ adr/
โ โโโ 0001-event-sourced-orders.md
โ โโโ 0002-postgres-for-write-model.md
โโโ src/
A CONTEXT-MAP.md at the root signals multiple contexts. The map records where each one lives:
/
โโโ CONTEXT-MAP.md
โโโ docs/
โ โโโ adr/ โ system-wide decisions
โโโ src/
โ โโโ ordering/
โ โ โโโ CONTEXT.md
โ โ โโโ docs/adr/ โ context-specific decisions
โ โโโ billing/
โ โโโ CONTEXT.md
โ โโโ docs/adr/
Create these files lazily, the moment you have something worth writing โ not before. Write the first CONTEXT.md when you resolve the first term; create docs/adr/ when the first ADR earns its place.
During the session
Hold terms against the glossary
The moment the user reaches for a word that clashes with the language already in CONTEXT.md, stop and name the clash: "Your glossary pins 'cancellation' to X, but you're describing Y โ which do you mean?"
Sharpen fuzzy language
When a word is vague or carries two meanings at once, offer a single precise term to replace it: "You said 'account' โ is that the Customer or the User? They're not the same thing."
Pressure-test with concrete scenarios
As domain relationships come up, ground them in specific cases. Invent scenarios that push on the edges and force the user to state exactly where one concept ends and the next begins.
Reconcile claims against the code
When the user explains how something behaves, check whether the code tells the same story. Surface any mismatch: "The code cancels a whole Order, but you just said a partial cancellation is allowed โ which one holds?"
Record terms in CONTEXT.md as you go
Resolve a term, write it down immediately. Never let these pile up for a later pass โ capture each one in the moment. Follow the layout in CONTEXT-FORMAT.md.
Keep CONTEXT.md free of any implementation detail. It is not a spec, a scratch pad, or a home for design decisions โ it is a glossary, and only that.
Reach for an ADR sparingly
Propose an ADR only when all three hold:
- Hard to reverse โ undoing the choice later would cost real effort
- Surprising without context โ a future reader will ask "why on earth did they do it this way?"
- Born of a genuine trade-off โ real alternatives existed and you chose one for specific reasons
Miss any one of the three and there's no ADR to write. Follow the layout in ADR-FORMAT.md.