agentleFS
shumingyang-opencodeshumingyang-opencode/mattpocock-skills-zh-tw/skills/engineering/domain-modeling/SKILL.md

domain-modeling

Skill3 starsChanged 4 months agoMITView on GitHub

建立並磨利專案的領域模型。當使用者想釐清領域術語或通用語言、記錄架構決策,或另一個技能需要維護領域模型時使用。

171 other projects use a version of this, 1 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use which-skill and setup-skills.

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.
  • risadamsSkill

    which-skill

    Router over this pack's skills and flows. Ask it "which skill fits X" when you don't remember what's available.

    Also in 5 projects that use this

  • pahwarangerSkill

    setup-skills

    Sets up an `## Agent skills` block in AGENTS.md/CLAUDE.md and `docs/agents/` so the engineering skills know this repo's ticket tracker (GitHub or local markdown), triage label vocabulary, and domain doc layout. Run before first use of `to-tickets`, `to-prd`, `triage`, `diagnose`, `tdd`, `improve-codebase-architecture`, or `zoom-out` — or if those skills appear to be missing context about the ticket tracker, triage labels, or domain docs.

    Also in 7 projects that use this

The file

Files
SKILL.md

領域模型

在設計過程中主動建立並磨利專案的領域模型。這是主動的紀律——挑戰術語、發明邊緣案例情境,並在術語定案的那一刻把詞彙表和決策寫下來。(光是讀 CONTEXT.md 來取得詞彙不是本技能——那是一行程式碼習慣,任何技能都能做。本技能是用於當你在改變模型,而不只是消費它。)

檔案結構

多數 repo 只有單一上下文:

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

如果根目錄有 CONTEXT-MAP.md,表示 repo 有多個上下文。地圖指向每個上下文所在位置:

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

惰性地建立檔案——只在有東西要寫時才建。如果沒有 CONTEXT.md,第一個術語定案時建立一個。如果沒有 docs/adr/,需要第一個 ADR 時建立。

會話期間

對照詞彙表挑戰

當使用者使用的術語與 CONTEXT.md 中既有的語言衝突時,立刻點出來。「你的詞彙表把 'cancellation' 定義為 X,但你似乎指的是 Y——哪個才對?」

磨利模糊的語言

當使用者使用含糊或過載的術語時,提出精確的規範術語。「你說 'account'——你指的是 Customer 還是 User?那是不同的東西。」

討論具體情境

當領域關係正在被討論時,用具體情境壓力測試它們。發明探索邊緣案例、迫使使用者對概念之間的邊界精確起來的情境。

與程式碼交叉比對

當使用者陳述某個東西如何運作時,檢查程式碼是否同意。如果發現矛盾,把它浮上檯面:「你的程式碼取消整個 Order,但你剛才說可以部分取消——哪個才對?」

內嵌更新 CONTEXT.md

當一個術語定案時,就地更新 CONTEXT.md。不要累積再一次處理——邊發生邊捕捉。使用 CONTEXT-FORMAT.md 中的格式。

CONTEXT.md 應該完全不含實作細節。不要把 CONTEXT.md 當成規格、便條紙,或實作決策的倉庫。它是詞彙表,而且僅此而已。

斟酌提供 ADR

只有三個條件都成立時,才主動提出建立 ADR:

  1. 難以逆轉——之後改變心意的成本是實際的
  2. 沒有上下文會令人驚訝——未來的讀者會想「為什麼他們要這樣做?」
  3. 真實取捨的結果——存在真正的替代方案,你基於特定理由選了其中一個

如果三個條件缺一,就跳過 ADR。使用 ADR-FORMAT.md 中的格式。

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.