Domain Modeling
Build, challenge, and maintain the project's domain model as an active discipline. Do not merely read CONTEXT.md; use it to sharpen language while decisions are being made.
Files
CONTEXT.md: root glossary for resolved domain terms only.
CONTEXT-MAP.md: optional map of bounded contexts. If present, use it to choose which context glossary or terms apply.
docs/adr/: durable architecture decision records.
Create files lazily. Do not create CONTEXT.md, CONTEXT-MAP.md, or docs/adr/ just because the skill is active. Create or update them only when there is resolved content worth preserving.
Core Rules
- Treat language as part of the design. Challenge fuzzy words, overloaded terms, and terms that conflict with existing usage.
- Discuss concrete scenarios before naming abstractions. Prefer examples from real workflows, users, data, and code paths.
- Cross-reference the codebase when possible. If a term already appears in code, inspect the relevant files before asking the user to define it.
- Keep
CONTEXT.md as a glossary only. Do not use it as an implementation spec, scratchpad, backlog, decision log, or meeting notes file.
- Update
CONTEXT.md inline when a term is resolved. Keep entries short, stable, and useful to future agents.
- The user owns product meaning. Recommend clearer language, but ask before overwriting contested terminology.
Modeling Loop
- Identify the current context. If
CONTEXT-MAP.md exists, use it to find the relevant bounded context. If not, work from root CONTEXT.md and the codebase.
- Extract the terms currently being used in the conversation, docs, tickets, UI, APIs, schemas, and code.
- Flag ambiguity, synonyms, conflicts, and terms whose meaning changes by context.
- Ask one focused question that resolves the most important ambiguity.
- Provide your recommended term or definition, plus the scenario that supports it.
- When the user accepts or clarifies the term, update the glossary entry if the content is durable.
- Repeat until the model is sharp enough for the current planning or implementation decision.
Glossary Format
Use concise Markdown entries:
# Context
## Glossary
### <Term>
Definition: <one or two sentences>
Use when: <short concrete usage rule>
Do not use for: <nearby concept or common confusion, if useful>
For multiple bounded contexts, prefer headings or context-specific files only if the existing project already uses that pattern. Otherwise keep the root glossary simple and use CONTEXT-MAP.md only when multiple contexts are real and useful.
ADR Discipline
Offer an ADR sparingly. Create one only when all three are true:
- The decision is hard to reverse.
- The decision would be surprising without context.
- There is a real trade-off between plausible options.
Do not create ADRs for routine implementation details, temporary plans, or obvious local choices. If an ADR is warranted, write it under docs/adr/<yyyy-mm-dd>-<slug>.md using:
# <Decision>
## Status
Proposed | Accepted | Superseded
## Context
What forced this decision, including relevant domain language.
## Decision
The chosen option.
## Consequences
What this enables, constrains, or makes harder.
## Options Considered
- <Option>: benefit and drawback.
Ask before writing an ADR unless the user explicitly requested documentation as part of the workflow.
1---2name: domain-modeling3description: Build and sharpen a project's domain model and ubiquitous language while planning or changing software. Use when the user wants glossary work, bounded-context language, domain terminology cleanup, ADR-worthy decisions, or docs that keep product language aligned with code.4---56# Domain Modeling78Build, challenge, and maintain the project's domain model as an active discipline. Do not merely read `CONTEXT.md`; use it to sharpen language while decisions are being made.910## Files1112- `CONTEXT.md`: root glossary for resolved domain terms only.13- `CONTEXT-MAP.md`: optional map of bounded contexts. If present, use it to choose which context glossary or terms apply.14- `docs/adr/`: durable architecture decision records.1516Create files lazily. Do not create `CONTEXT.md`, `CONTEXT-MAP.md`, or `docs/adr/` just because the skill is active. Create or update them only when there is resolved content worth preserving.1718## Core Rules1920- Treat language as part of the design. Challenge fuzzy words, overloaded terms, and terms that conflict with existing usage.21- Discuss concrete scenarios before naming abstractions. Prefer examples from real workflows, users, data, and code paths.22- Cross-reference the codebase when possible. If a term already appears in code, inspect the relevant files before asking the user to define it.23- Keep `CONTEXT.md` as a glossary only. Do not use it as an implementation spec, scratchpad, backlog, decision log, or meeting notes file.24- Update `CONTEXT.md` inline when a term is resolved. Keep entries short, stable, and useful to future agents.25- The user owns product meaning. Recommend clearer language, but ask before overwriting contested terminology.2627## Modeling Loop28291. Identify the current context. If `CONTEXT-MAP.md` exists, use it to find the relevant bounded context. If not, work from root `CONTEXT.md` and the codebase.302. Extract the terms currently being used in the conversation, docs, tickets, UI, APIs, schemas, and code.313. Flag ambiguity, synonyms, conflicts, and terms whose meaning changes by context.324. Ask one focused question that resolves the most important ambiguity.335. Provide your recommended term or definition, plus the scenario that supports it.346. When the user accepts or clarifies the term, update the glossary entry if the content is durable.357. Repeat until the model is sharp enough for the current planning or implementation decision.3637## Glossary Format3839Use concise Markdown entries:4041```markdown42# Context4344## Glossary4546### <Term>4748Definition: <one or two sentences>4950Use when: <short concrete usage rule>5152Do not use for: <nearby concept or common confusion, if useful>53```5455For multiple bounded contexts, prefer headings or context-specific files only if the existing project already uses that pattern. Otherwise keep the root glossary simple and use `CONTEXT-MAP.md` only when multiple contexts are real and useful.5657## ADR Discipline5859Offer an ADR sparingly. Create one only when all three are true:6061- The decision is hard to reverse.62- The decision would be surprising without context.63- There is a real trade-off between plausible options.6465Do not create ADRs for routine implementation details, temporary plans, or obvious local choices. If an ADR is warranted, write it under `docs/adr/<yyyy-mm-dd>-<slug>.md` using:6667```markdown68# <Decision>6970## Status7172Proposed | Accepted | Superseded7374## Context7576What forced this decision, including relevant domain language.7778## Decision7980The chosen option.8182## Consequences8384What this enables, constrains, or makes harder.8586## Options Considered8788- <Option>: benefit and drawback.89```9091Ask before writing an ADR unless the user explicitly requested documentation as part of the workflow.