CONTEXT.md Format
Structure
# {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
Rules
- Be opinionated. 同一概念有多种词时,选最好的,其余列在
_Avoid_下。 - Keep definitions tight. 最多一两句。定义它 是什么,不是它 做什么。
- Only include terms specific to this project's context. 一般编程概念(timeout、error type、utility pattern)即使项目大量使用也不属于。加 term 前问:这是本 context 独有概念,还是一般编程概念?只有前者属于。
- Group terms under subheadings — 自然 cluster 出现时。若所有 term 属于单一 cohesive 区域,flat list 即可。
Single vs multi-context repos
Single context(多数 repo): repo root 一个 CONTEXT.md。
Multiple contexts: repo root 的 CONTEXT-MAP.md 列出 context、位置及彼此关系:
# Context Map
## Contexts
- Ordering (`./src/ordering/CONTEXT.md`) — 接收并跟踪客户订单
- Billing (`./src/billing/CONTEXT.md`) — 生成发票并处理付款
- Fulfillment (`./src/fulfillment/CONTEXT.md`) — 管理仓库拣货与发货
## 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`
skill 推断适用哪种结构:
- 若存在
CONTEXT-MAP.md,读取找 context - 若仅有 root
CONTEXT.md,single context - 若都不存在,第一个 term resolved 时 lazy 创建 root
CONTEXT.md
multiple context 时,推断当前话题属于哪个。若不 clear,问。