| 1 | # GLOSSARY.md Format |
| 2 | |
| 3 | ## Structure |
| 4 | |
| 5 | ```md |
| 6 | # {Context Name} |
| 7 | |
| 8 | {One or two sentence description of what this context is and why it exists.} |
| 9 | |
| 10 | ## Language |
| 11 | |
| 12 | **Order**: |
| 13 | {A one or two sentence description of the term} |
| 14 | _Avoid_: Purchase, transaction |
| 15 | |
| 16 | **Invoice**: |
| 17 | A request for payment sent to a customer after delivery. |
| 18 | _Avoid_: Bill, payment request |
| 19 | |
| 20 | **Customer**: |
| 21 | A person or organization that places orders. |
| 22 | _Avoid_: Client, buyer, account |
| 23 | ``` |
| 24 | |
| 25 | ## Rules |
| 26 | |
| 27 | - **Be opinionated.** When multiple words exist for the same concept, pick the best one and list the others under |
| 28 | - **Keep definitions tight.** One or two sentences max. Define what it IS, not what it does. |
| 29 | - **Only include terms specific to this project's context.** General programming concepts (timeouts, error types, utility patterns) don't belong even if the project uses them extensively. Before adding a term, ask: is this a concept unique to this context, or a general programming concept? Only the former belongs. |
| 30 | - **Group terms under subheadings** when natural clusters emerge. If all terms belong to a single cohesive area, a flat list is fine. |
| 31 | |
| 32 | ## Single vs multi-context repos |
| 33 | |
| 34 | **Single context (most repos):** One `GLOSSARY.md |
| 35 | |
| 36 | **Multiple contexts:** A `GLOSSARY-MAP.md |
| 37 | |
| 38 | ```md |
| 39 | # Glossary Map |
| 40 | |
| 41 | ## Contexts |
| 42 | |
| 43 | - [Ordering](./src/ordering/GLOSSARY.md |
| 44 | - [Billing](./src/billing/GLOSSARY.md |
| 45 | - [Fulfillment](./src/fulfillment/GLOSSARY.md |
| 46 | |
| 47 | ## Relationships |
| 48 | |
| 49 | - **Ordering → Fulfillment**: Ordering emits |
| 50 | - **Fulfillment → Billing**: Fulfillment emits |
| 51 | - **Ordering ↔ Billing**: Shared types for |
| 52 | ``` |
| 53 | |
| 54 | The skill infers which structure applies: |
| 55 | |
| 56 | - If `GLOSSARY-MAP.md` exists, read it to find contexts |
| 57 | - If only a root `GLOSSARY.md` exists, single context |
| 58 | - If neither exists, create a root `GLOSSARY.md` lazily when the first term is resolved |
| 59 | |
| 60 | When multiple contexts exist, infer which one the current topic relates to. If unclear, ask. |