domain-model
/domain-model
Buduje i doszlifowuje model domeny projektu: język wszechobecny w CONTEXT.md, konteksty, agregaty, niezmienniki i model danych.
- Autor
- hemi1986 ↗
- Repozytorium
- kataster ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 07.11.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 3
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 07.11.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Buduje i doszlifowuje model domeny projektu: język wszechobecny w CONTEXT.md, konteksty, agregaty, niezmienniki i model danych.
Oryginalny opis (EN)
Build and sharpen the project's domain model – the ubiquitous language in CONTEXT.md, bounded contexts, context map, aggregates/invariants and the logical, stack-neutral data model based on docs/domain/events.yaml. Use when discussing domain terminology, writing or editing CONTEXT.md, or modeling contexts, aggregates and data.
Jak działa
- Files
- 1. Language (during every session)
- 2. Bounded Contexts & Context Map
- 3. Aggregates
- 4. Logical Data Model (docs/architecture/data-model.md)
- 5. Quality Check Before Hand-off
Podgląd SKILL.md
--- name: domain-model description: Build and sharpen the project's domain model – the ubiquitous language in CONTEXT.md, bounded contexts, context map, aggregates/invariants and the logical, stack-neutral data model based on docs/domain/events.yaml. Use when discussing domain terminology, writing or editing CONTEXT.md, or modeling contexts, aggregates and data. --- # Domain Modeling Actively build and sharpen the domain model as you go. This is the *active* discipline: challenging terms, inventing edge-case scenarios, and writing the glossary and the model down the moment they crystallise. (Merely *reading* `CONTEXT.md` for vocabulary is not this skill: that's a one-line habit every skill and agent has. This skill is for when you're changing the model, not just consuming it.) Architecture decisions (ADRs, tech stack) belong to the `architect` skill. The domain comes first. ## Files | What | Where | |---|---| | Glossary (ubiquitous language) | `CONTEXT.md` at the repo root – format: [CONTEXT-FORMAT.md](./CONTEXT-FORMAT.md) | | Event storming model incl. `bounded_contexts`, `aggregates` | `docs/domain/events.yaml` | | Target context map | `docs/domain/context-map.md` – where the domain is going | | As-is context map | `docs/domain/context-map.as-is.md` – recovered from code, written only by `/adopt` | | Gap register | `docs/domain/gap-register.md` – links as-is and target, generated rows + user decisions | | Logical data model | `docs/architecture/data-model.md` – template: `templates/data-model.md` | ## 1. Language (during every session) ### Challenge against the glossary When the user uses a term that conflicts with the existing language in `CONTEXT.md`, call it out immediately. "Your glossary defines 'invoice' as X, but you seem to mean Y. Which is it?" ### Sharpen fuzzy language When the user uses vague or overloaded terms, propose a precise canonical term. "You're saying 'order': do you mean the customer's request, or the shipment that fulfils it? Those are different things." ### Discuss concrete scenarios When domain relationships are being discussed, stress-test them with specific scenarios. Invent scenarios that probe edge cases and force the user to be precise about the boundaries between concepts. "A customer reports the same problem on an item that already has an open case – a new case or the same one?" ### Cross-reference with docs and code When the user states how something works, check whether `docs/domain/events.yaml`, the stories (and the code, once it exists) agree. If you find a contradiction, surface it. A source that contradicts the model is a grilling question, not a silent rewrite of the model (see the `research` skill). ### Update CONTEXT.md inline When a term is resolved, update `CONTEXT.md` right there. Don't batch these up: capture them as they happen. `CONTEXT.md` is totally devoid of implementation details. It is a glossary and nothing else – not a spec, not a scratch pad. Same word, different meaning in two places → a hint at a bounded context boundary (see 2). ## 2. Bounded Contexts & Context Map - Draw boundaries along language (same word, different meaning → different context) and responsibility (who decides?). - `docs/domain/context-map.md` is the **target** map: per context its purpose, core terms, owner role. Relationships as a Mermaid `flowchart` using the patterns Customer/Supplier, Conformist, Anti-Corruption Layer, Shared Kernel, Published Language. - `docs/domain/context-map.as-is.md` is the **as-is** snapshot: what the code does today, with evidence. Only `/adopt` writes it; every other discovery path writes the target. The gap register links both. - 2–4 contexts are typical for a small system. More only with justification. - Maintain them in `events.yaml` under `bounded_contexts`, and group the terms in `CONTEXT.md` by context. ## 3. Aggregates - An aggregate protects invariants that must be consistent **immediately**. Everything else is eventually consistent via events/policies. - Keep them small. Reference other aggregates by ID only. - Per aggregate in `events.yaml`: `context`, `invariants` (as testable statements). Assign commands and events via `aggregate`. - **An invariant is stated once, on the aggregate** (user, 2026-10-01). A command's `rules` list only what it adds beyond them: defaults, actor permissions no invariant carries, required input, checks across aggregate or context boundaries, and consequences of the transition. Everything the stored state has to satisfy is an invariant, not a rule – the spec engineer reads both when deriving scenarios. - Sign of a wrong aggregate: a command needs data from several aggregates to check a rule. ### Aggregate status: target, as-is, unresolved Every aggregate carries a status; a missing `status` means `target`, so existing models stay valid. | Status | Meaning | Rule | |---|---|---| | `target` | The boundary the project wants. The default in greenfield and in a confirmed target model. | Only a user decision makes an inferred boundary `target`. | | `as-is` | The factual consistency boundary recovered from code. | Requires `evidence`: the table, service method or path that marks it. | | `unresolved` | The boundary is unclear. | Requires an open hotspot (`refs: [AGG-…]`) and grilling. No story on it can become ready. | **Prefer `as-is` or `unresolved` over an invented aggregate.** `/adopt` never writes `target` for something it inferred from code. If you cannot name the table, method or path that holds the boundary together, it is not `as-is` – it is `unresolved`. After changing a status or evidence, refresh the gap register: ```bash node .claude/skills/adopt/scripts/gap-register.ts ``` ## 4. Logical Data Model (`docs/architecture/data-model.md`) - Per aggregate: root entity, entities, value objects, attributes with **domain** types (e.g. `SerialNumber`, `Money`, `Timestamp`), required/optional. - Lifecycle as a Mermaid `stateDiagram-v2` (derive states from the events). - Overall view as a Mermaid `erDiagram` (logical, no database types). - **Traceability**: every attribute comes from the `data` of an event or the `fields` of a read model. Attributes without a source → hotspot. - Stack-neutral until an ADR decides the stack. After that, a "Physical Model" section may follow. ## 5. Quality Check Before Hand-off - Every term used in events, commands and stories is in `CONTEXT.md`; no `_Avoid_` term is used anywhere. - Every event has an aggregate or context, every command a trigger (actor or policy). - No open hotspots that affect an aggregate or a context boundary – otherwise present them to the user. - `node .claude/skills/event-storming/scripts/validate-events.ts` passes.
Pliki w paczce (3)
- CONTEXT-FORMAT.md 2 KB
- SKILL.md 7 KB
- templates/data-model.md 1 KB
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · hemi1986/kataster | 100 | MIT |
| sammcj/agentic-coding | 100 | Apache-2.0 |
| andreibesleaga/gabbe | 100 | CC-BY-4.0 |
| ayoubben18/ab-method | 100 | MIT |
| mkurman/zorai | 100 | MIT |
| OutlineDriven/odin-codex-plugin | 100 | Apache-2.0 |
| paivot-ai/paivot-graph | 95 | Apache-2.0 |
| redpanda-data/ui-harness | 90 | MIT |
| biliboss/skills | 90 | MIT |
Migawka bazy z 13.11.2026 · wersja paczki 6857b6ad11ee (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 2 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100domain-modeling
Buduje i doszlifowuje model domeny projektu, gdy omawia się terminy z kodu, pisze CONTEXT.md lub zapisuje ADR. - 95domain-modeling
Buduje i doprecyzowuje model domeny projektu, w tym terminologię i język wszechobecny. - 100domain-modeling
Buduje i doprecyzowuje model domeny projektu: ustala terminologię i język wszechobecny, zapisuje decyzje architektoniczne i pomaga innym skillom utrzymywać model domeny. - 95domain-modeling
Buduje i wyostrza model domeny projektu: terminologię, plik CONTEXT.md i zapisy ADR. - 100domain-modeling
Buduje i doszlifowuje model domeny projektu, gdy omawia się terminy z kodu, pisze GLOSSARY.md lub zapisuje ADR. - 100domain-modeling
Buduje i doszlifowuje model domeny projektu, gdy omawia się terminologię, pisze GLOSSARY.md lub zapisuje decyzje ADR.