CONTEXT.md 的格式规范 — 属于 domain-modeling 技能
# {Context Name}
{One or two sentence description of what this context is and why it exists.}
## Language
**Order**:
{A one or two sentence description of the term}
_Avoid_: Purchase, transaction
**Invoice**:
A request for payment sent to a customer after delivery.
_Avoid_: Bill, payment request
**Customer**:
A person or organization that places orders.
_Avoid_: Client, buyer, account# {上下文名称}
{一两句话描述该上下文的含义及其存在理由。}
## Language
**Order**:
{对术语的一两句描述}
_Avoid_: Purchase, transaction
**Invoice**:
向客户发送的付款请求,在交付之后发出。
_Avoid_: Bill, payment request
**Customer**:
下单的个人或组织。
_Avoid_: Client, buyer, account_Avoid_._Avoid_ 下。Single context (most repos): One CONTEXT.md at the repo root.
单上下文(大部分仓库): 一个 CONTEXT.md 放在仓库根目录。
Multiple contexts: A CONTEXT-MAP.md at the repo root lists the contexts, where they live, and how they relate to each other:
多上下文: CONTEXT-MAP.md 放在仓库根目录,列出各上下文的位置及其相互关系:
# Context Map
## Contexts
- [Ordering](./src/ordering/CONTEXT.md) — receives and tracks customer orders
- [Billing](./src/billing/CONTEXT.md) — generates invoices and processes payments
- [Fulfillment](./src/fulfillment/CONTEXT.md) — manages warehouse picking and shipping
## Relationships
- **Ordering → Fulfillment**: Ordering emits `OrderPlaced` events; Fulfillment consumes them to start picking
- **Fulfillment → Billing**: Fulfillment emits `ShipmentDispatched` events; Billing consumes them to generate invoices
- **Ordering ↔ Billing**: Shared types for `CustomerId` and `Money`# Context Map
## Contexts
- [Ordering](./src/ordering/CONTEXT.md) — 接收和跟踪客户订单
- [Billing](./src/billing/CONTEXT.md) — 生成发票和处理付款
- [Fulfillment](./src/fulfillment/CONTEXT.md) — 管理仓库拣货和发货
## Relationships
- **Ordering → Fulfillment**: Ordering 发出 `OrderPlaced` 事件;Fulfillment 消费后开始拣货
- **Fulfillment → Billing**: Fulfillment 发出 `ShipmentDispatched` 事件;Billing 消费后生成发票
- **Ordering ↔ Billing**: 共享 `CustomerId` 和 `Money` 类型The skill infers which structure applies:
CONTEXT-MAP.md exists, read it to find contextsCONTEXT.md exists, single contextCONTEXT.md lazily when the first term is resolved技能自动推断适用哪种结构:
CONTEXT-MAP.md,读取它来查找上下文CONTEXT.md,则是单上下文CONTEXT.mdWhen multiple contexts exist, infer which one the current topic relates to. If unclear, ask.
存在多个上下文时,推断当前话题属于哪一个。如果不确定,就问用户。