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」のような曖昧、多義的な語には 1 つの正確な用語を提案します。
- ストレステスト: 境界ケースを想定して概念間の関係を試し、あなたの説明をコードと突き合わせて矛盾を見つけます。
- GLOSSARY.md をその場で更新: 1〜2 文の明確な定義と「使わない語」の一覧。プロジェクト固有の用語だけを載せます。
- ADR は控えめに提案: 決定が元に戻しにくく、背景なしでは意外で、本当のトレードオフの結果である場合に限ります。
- リポジトリごとの用語集 1 つ、または GLOSSARY-MAP.md に並べた複数のコンテキストに対応します。
向いている場面
人、チケット、コードが同じ言葉を別の意味で使っているチーム。
知っておきたいこと
私たちの試用では、「Customer」と「User」を分け、未解決の問いは推測せずに いくつかの確認質問を返しました。
指示だけのファイルで、スクリプトはなく、ネットワーク接続も行いません。 Skill はエージェントにリポジトリ内の GLOSSARY.md(または GLOSSARY-MAP.md)と docs/adr/ 以下のファイルを作成・編集させ、あなたの説明をコードと突き合わせるために読み取ります。 パッケージには元リポジトリの MIT ライセンス(LICENSE)と agents/openai.yaml(Codex 用の表示名)も含まれます。