I added Customer and User to GLOSSARY.md, with "Account" on the avoid list for both. Order.account_id in src/orders.py:21 still uses the old word. Renaming it to customer_id would bring the code in line with the glossary, and I can do that if you want. I left the code alone for now because the rename may affect the database and any APIs that use the field.
One question on User: can one person log in for more than one Customer, for example a consultant who orders for two of your clients? If yes, then "User belongs to a Customer" is wrong, and the definition needs to say so.
"Cancelled": this needs a decision from you
The code and support are using one word for two different actions:
- Code (
src/orders.py:25-28): cancelling applies to the whole Order, and it's refused if any line has shipped. - Support: "cancel" also means "stop the lines that haven't shipped yet and refund them," on an Order that stays partly delivered.
Here's a scenario to test the options. An Order has 3 lines: line A has shipped, and lines B and C haven't. The Customer says, "Don't send the rest."
- What happens to the Order? Is its status
CANCELLEDeven though line A was delivered and paid for? Or does it count as complete (just A), with B and C individually cancelled? Today the code only hasPLACED / SHIPPED / CANCELLEDon the Order, and only ashippedflag on each line, so there's no way to record "B and C were cancelled." - Is the refund part of the cancellation, or a separate thing? Support refunds by hand today. Should cancelling unshipped lines automatically trigger a refund for them, or is a Refund its own concept with its own rules (for example, it could also be used for damaged goods)?
- What if the Customer wants to cancel just line C and still get line B? If that should be allowed, the concept works per line, not as "the rest of the Order."
My recommendation: use two terms.
- Order Cancellation: stopping an entire Order before any line has shipped. This is what the code already does.
- Line Cancellation: stopping one or more unshipped lines while the rest of the Order goes ahead. A Refund for the cancelled lines follows from it.
Support would then say "cancel lines B and C," never "cancel the order," when something has already shipped. This also tells you what to change in the code: lines need their own cancelled state, and partial cancellation should no longer go through a manual refund.
Answer questions 1–3 (and the User question) and I'll add the cancellation terms to the glossary. If you go with per-line cancellation and automatic refunds, I'd also suggest a short ADR. Changing the Order/line state model is hard to undo, and someone reading the code later could reasonably wonder why Order.cancel() refuses partly shipped Orders when line cancellation exists.
Change recorded in the trial sandbox (git diff of GLOSSARY.md):
diff --git a/GLOSSARY.md b/GLOSSARY.md
index a218c96..a1a541a 100644
--- a/GLOSSARY.md
+++ b/GLOSSARY.md
@@ -7,3 +7,11 @@ Receives customer orders and tracks them until delivery.
**Order**:
A request from a Customer to buy one or more products, placed in a single checkout.
_Avoid_: Purchase, basket
+
+**Customer**:
+The company that places Orders and pays us for them.
+_Avoid_: Account, client, company
+
+**User**:
+A person who logs in to act on behalf of a Customer.
+_Avoid_: Account, login, member
Real run recorded with claude-code / claude-opus-5-5. Run in a temporary directory with a sample glossary and order code. The last block is the git diff of GLOSSARY.md recorded when the trial ended. The model output is unmodified.
它做什麼
在你做設計的同時,主動建立並打磨專案的領域模型,而不只是讀一遍術語表。術語與決定一旦敲定就立刻記錄。
運作方式
- 質疑術語: 與既有術語表衝突的用法會被立即指出;對「account」這類含糊或一詞多義的詞,提出一個精確的標準說法。
- 壓力測試: 虛構邊界情況來檢驗各概念之間的關係,並把你的說法與程式碼核對,找出矛盾。
- 就地更新 GLOSSARY.md: 以一到兩句話的明確定義,並列出「避免使用」的說法,只收錄你專案特有的術語。
- 謹慎建議 ADR: 只有決定難以撤銷、缺少背景會令人費解、且確實是權衡取捨的結果時才提出。
- 支援每個儲存庫一份術語表,或以 GLOSSARY-MAP.md 列出多個上下文。
適合情境
人、工單與程式碼對同一個詞各有說法的團隊。
需要了解
我們試用時,它把「Customer」與「User」區分開來,對一個懸而未決的問題沒有擅自猜測,而是追問了幾個釐清問題。
純指令檔:沒有腳本、不連網。 Skill 會讓代理在你的儲存庫中建立並修改 GLOSSARY.md(或 GLOSSARY-MAP.md)與 docs/adr/ 下的檔案,並讀取你的程式碼來核對你的說法。 壓縮檔中另附原始儲存庫的 MIT 授權檔 LICENSE 與 agents/openai.yaml(供 Codex 使用的顯示名稱)。