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.
- License 许可
- MIT
- 最近更新
- 2026-07-09
- Stars
- ★ 18
- Forks
- 4
01 前言 Front Matter
- name
- domain-modeling
- description
- 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.
02 资源文件 2
- 参考文档ADR-FORMAT.md3.8 KB
- 参考文档CONTEXT-FORMAT.md4.4 KB
03 SKILL.md 正文
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 the knowledge bundle's glossary 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
The domain model lives in an Open Knowledge Format (OKF) knowledge bundle at knowledge/ in the repo root. Most repos have a single context:
knowledge/
├── index.md ← bundle map (reserved: no frontmatter)
├── log.md ← change history, newest first (reserved: no frontmatter)
├── glossary/ ← one file per term (the glossary)
│ ├── index.md
│ ├── order.md
│ └── customer.md
└── adr/ ← one file per decision
├── index.md
├── adr-0001-event-sourced-orders.md
└── adr-0002-postgres-for-write-model.md
For multiple bounded contexts, each context is a subdirectory inside the one bundle (knowledge/ordering/glossary/, knowledge/billing/glossary/, …) and knowledge/index.md is the context map. See CONTEXT-FORMAT.md.
Create files lazily — only when you have something to write. If no knowledge/glossary/ exists, create it when the first term is resolved. If no knowledge/adr/ exists, create it when the first ADR is needed. Whenever knowledge changes, update the concept AND append to knowledge/log.md.
Extending the bundle (new concept categories)
glossary/ and adr/ are the two categories every bundle has; spec/ (written by /to-spec) is the third canonical one. But OKF is an open format — type is a free field and the bundle is not limited to a fixed set of folders. When you meet a durable domain entity that genuinely fits none of them — a recurring kind of thing the project needs recorded in its own right — a new concept category is legitimate.
Don't spin one up silently. When you judge a new category is warranted:
- Propose it — name the category, say what kind of entity it holds and why glossary/adr/prd don't fit.
- Get the user's sanction before creating the directory.
- Register it in
knowledge/index.md(and give it anindex.mdlike every other category) so the bundle map stays honest.
Default to the existing three. A new category is the exception, not the reflex.
During the session
Challenge against the glossary
When the user uses a term that conflicts with the existing language in the glossary, 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 the glossary inline
When a term is resolved, write it to knowledge/glossary/ right there. Don't batch these up — capture them as they happen. Use the format in CONTEXT-FORMAT.md.
The glossary should be totally devoid of implementation details. Do not treat it 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:
- Hard to reverse — the cost of changing your mind later is meaningful
- Surprising without context — a future reader will wonder "why did they do it this way?"
- 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.
04 同仓库更多 Skills
write-skill
Reference for writing and editing skills well — the vocabulary and principles that make a skill predictable.
which-skill
Ask which skill or flow fits your situation. A router over the skills in this repo.
wayfinder
Plan a huge chunk of work — more than one agent session can hold — as a shared map of investigation tickets on your issue tracker, and resolve them one at a time until the way to the destination is clear.
vet
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/PRD 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".
triage
Move issues and external PRs through a state machine of triage roles — categorise, verify, grill if needed, and write agent-ready briefs.
to-tickets
Break a plan, spec, or the current conversation into a set of tracer-bullet tickets, each declaring its blocking edges, published to the configured tracker — edges as text in a local file, or native blocking links on a real tracker.