New: Earn 20% as an AgentAlley affiliate. Share your link and earn on every sale you refer. Join now New: Earn 20% as an affiliate. Join now

Model software around the business domain using bounded

Domain-Driven Design Framework

by wondelai · MIT license · ★ 2,235 on GitHub · updated Sep 10

Domain-Driven Design Framework cover

Model software around the business domain using bounded contexts, aggregates, and ubiquitous language. Use when the user mentions "domain modeling", "bounded context", "aggregate root", "ubiquitous language", "anti-corruption layer",…

---
name: domain-driven-design
description: 'Model software around the business domain using bounded contexts, aggregates, and ubiquitous language. Use when the user mentions "domain modeling", "bounded context", "aggregate root", "ubiquitous language", "anti-corruption layer", "context mapping", "domain events", "strategic design", "the code doesnt match the business", or "how do we split this big system". Also trigger when breaking a monolith into services, defining service boundaries, or aligning code structure with business processes. Covers entities vs value objects, domain events, and context mapping strategies. For architecture layers, see clean-architecture. For complexity, see software-design-philosophy.'
license: MIT
metadata:
  author: wondelai
  version: "1.4.0"
---

# Domain-Driven Design Framework

Framework for tackling software complexity by modeling code around the business domain. The greatest risk in software is not technical failure -- it is building a model that does not reflect how the business actually works.

## Core Principle

**The model is the code; the code is the model.** Software should embody a deep, shared understanding of the business domain. When domain experts and developers speak the same language and that language is directly expressed in the codebase, complexity becomes manageable and the system evolves gracefully as the business changes.

## Scoring

Overview

Framework for tackling software complexity by modeling code around the business domain. The greatest risk in software is not technical failure -- it is building a model that does not reflect how the business actually works.

Manual install (npx, ZIP)
Claude Codenpx skills add wondelai/skills --skill domain-driven-design -g -a claude-code
Claude Code (manual)mkdir -p ~/.claude/skills && curl -sL https://codeload.github.com/wondelai/skills/tar.gz/c172996495be \ | tar -xz -C ~/.claude/skills --strip-components=1 skills-c172996495be/domain-driven-design
Windows (PowerShell)New-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null; Invoke-WebRequest "https://m.agentalley.io/zip/1d3dc4f0d9df81b307b6/domain-driven-design.zip" -OutFile "$env:TEMP\domain-driven-design.zip"; Expand-Archive "$env:TEMP\domain-driven-design.zip" -DestinationPath "$HOME\.claude\skills" -Force
Claude.ai / desktopDownload the ZIP and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md15.0 KB
  • references/6 files · 79.6 KB
Read the files here
wondelai/c1729967 files
SKILL.md
Show the full text195 lines

Domain-Driven Design Framework

Framework for tackling software complexity by modeling code around the business domain. The greatest risk in software is not technical failure -- it is building a model that does not reflect how the business actually works.

Core Principle

The model is the code; the code is the model. Software should embody a deep, shared understanding of the business domain. When domain experts and developers speak the same language and that language is directly expressed in the codebase, complexity becomes manageable and the system evolves gracefully as the business changes.

Scoring

Goal: 10/10. Score a domain model by awarding 1 point per satisfied row of the Quick Diagnostic (7 rows) plus up to 3 points for depth: +1 if the Core Domain has a genuinely rich model (not just CRUD), +1 if invariants live inside aggregates rather than in services, +1 if the ubiquitous language is consistent across conversation, code, and tests. Bands: 9-10 = expert-readable names, explicit context boundaries with ACLs, small aggregates, behavior-rich entities, events for cross-aggregate flow, an identified Core Domain; 5-6 = some domain language but leaky boundaries or anemic objects; <=3 = technical naming, one model for everything, logic scattered in services. Report the score and the specific diagnostic rows failing.

Framework

1. Ubiquitous Language

Core concept: A shared, rigorous language between developers and domain experts, used consistently in conversation, documentation, and code. When the language changes, the code changes -- and awkward naming in code feeds back into refining the language.

Why it works: Ambiguity is the root cause of most modeling failures. When a developer says "order" and an expert means "purchase request," bugs are inevitable; a ubiquitous language forces every name in code to map to a concept the business recognizes and validates.

Key insights:

  • The language emerges from deep collaboration, not a glossary bolted on after the fact
  • If a concept is hard to name, the model is likely wrong -- naming difficulty is a design signal
  • Technical jargon (DataProcessor vs. ClaimAdjudicator) hides domain logic from the experts who could correct it
  • Different bounded contexts may use the same word with different meanings -- and that is fine

Code applications:

Context Pattern Example
Class/method naming Name after domain concepts and verbs LoanApplication, policy.underwrite() -- not RequestHandler, process()
Module structure Organize by domain concept shipping/, billing/ -- not controllers/, services/
Code review Reject technical-only names Flag Manager, Helper, Processor, Utils as naming smells

See: references/ubiquitous-language.md when running modeling sessions or maintaining a glossary -- covers how the language evolves and feeds back into code.

2. Bounded Contexts and Context Mapping

Core concept: A bounded context is an explicit boundary within which a particular domain model applies. The same word ("Customer") can mean different things in different contexts; context maps define the relationships and translation strategies between them.

Why it works: Large systems that try to maintain a single unified model inevitably collapse into inconsistency. Bounded contexts accept that different parts of the business need different models; context maps manage the integration between them.

Key insights:

  • A bounded context is not a microservice -- it is a linguistic and model boundary that may contain multiple services
  • Context boundaries often align with team boundaries (Conway's Law)
  • The nine context mapping patterns describe political and technical relationships between teams
  • Anti-Corruption Layer is the most important defensive pattern -- never let a foreign model leak into your core domain
  • Shared Kernel couples two teams; keep it small and explicitly governed
  • Start by mapping what exists (Big Ball of Mud), then define target boundaries

Code applications:

Context Pattern Example
Service integration Anti-Corruption Layer Translate external API responses into your domain objects at the boundary
Legacy migration Conformist / ACL Wrap the legacy system behind an adapter that speaks your domain language
API design Open Host Service + Published Language Expose a well-documented REST API with a canonical schema

See: references/bounded-contexts.md for the nine mapping patterns and integration strategies.

3. Entities, Value Objects, and Aggregates

Core concept: Entities have identity that persists across state changes. Value Objects are defined entirely by their attributes and are immutable. Aggregates are clusters of entities and value objects with a single root that enforces consistency boundaries.

Why it works: Without these distinctions, everything becomes a mutable, identity-bearing object -- tangled state, inconsistent updates, fragile concurrency. Aggregates draw the line: everything inside is guaranteed consistent; everything outside is eventually consistent.

Key insights:

  • Entity test: "Am I the same thing even if all my attributes change?" (a person changes name and address -- still the same person)
  • Value Object test: "Am I defined only by my attributes?" (any $10 bill is interchangeable with another)
  • Most things should be Value Objects, not Entities -- prefer immutability
  • Keep aggregates small (one root plus a minimal cluster); reference other aggregates by ID, not object reference
  • Immediate consistency only within an aggregate; design for eventual consistency between aggregates

Code applications:

Context Pattern Example
Identity tracking Entity with ID Order identified by orderId, survives state changes
Immutable attributes Value Object Address(street, city, zip) -- replace, never mutate
Consistency boundary Aggregate Root Order is root; OrderLine items exist only through it
Concurrency control Optimistic locking on root Version field on Order; conflict if two edits race

See: references/building-blocks.md for aggregate design rules and consistency boundaries.

4. Domain Events

Core concept: A domain event captures something that happened in the domain that experts care about, named in past tense (OrderPlaced, PaymentReceived) -- a fact that has already occurred.

Why it works: Domain events decouple cause from effect. When OrderPlaced is published, shipping, billing, and notifications each react independently without the ordering context knowing about them -- less coupling, eventual consistency, a natural audit trail.

Key insights:

  • Events are immutable facts -- once published, they cannot be changed or retracted
  • Domain events are internal to a bounded context; integration events cross boundaries
  • Events enable temporal decoupling: the producer does not wait for the consumer
  • Event sourcing stores the full event history as the source of truth, deriving current state by replay
  • Not every state change deserves an event -- only publish what the domain cares about

Code applications:

Context Pattern Example
State transitions Raise event on domain action order.place() raises OrderPlaced
Cross-context integration Publish integration event OrderPlaced triggers ShippingLabelRequested in shipping context
Eventual consistency Async event handlers Inventory handler updates stock asynchronously after OrderPlaced

See: references/domain-events.md for event naming, event sourcing, and integration events.

5. Repositories and Factories

Core concept: Repositories provide the illusion of an in-memory collection of domain objects, hiding persistence. Factories encapsulate complex creation logic so aggregates are always born in a valid state.

Why it works: When persistence and assembly details leak into domain code, every storage change ripples through business rules and aggregates can be constructed in half-valid states. Repositories confine SQL/ORM concerns to infrastructure so the domain stays testable in memory; factories make the only path to an aggregate one that enforces its invariants, so an invalid instance is unrepresentable.

Key insights:

  • The Repository interface belongs in the domain layer; its implementation belongs in infrastructure
  • Repository methods speak the ubiquitous language: findPendingOrders(), not getByStatusCode(3)
  • Collection-oriented repositories mimic add/remove; persistence-oriented ones use save
  • Factories are warranted for complex rules or multi-part assembly; a two-field Value Object just needs a constructor
  • The Specification pattern encapsulates query criteria as domain objects: OverdueInvoiceSpecification

Code applications:

Context Pattern Example
Data access abstraction Repository interface OrderRepository.findByCustomer(customerId) in domain; PostgresOrderRepository in infrastructure
Complex creation Factory method Order.createFromQuote(quote) validates and assembles from a Quote aggregate
Query encapsulation Specification spec = OverdueBy(days=30); repo.findMatching(spec)

See: references/repositories-factories.md for Repository, Factory, and Specification patterns.

6. Strategic Design and Distillation

Core concept: Not all parts of a system are equally important. Strategic design identifies the Core Domain -- where competitive advantage lives -- and distinguishes it from Supporting Subdomains (necessary, not differentiating) and Generic Subdomains (commodity).

Why it works: Applying the same rigor everywhere spreads your best talent thin and over-engineers commodity functionality. Identifying the Core Domain concentrates the best developers and deepest modeling where they matter most.

Key insights:

  • Core Domain: invest your best people and deepest modeling; Supporting: build, but don't over-engineer; Generic (auth, email, payments): buy or use open-source
  • Distillation extracts and highlights the Core Domain from surrounding complexity
  • A Domain Vision Statement is a one-page description of the Core Domain's value proposition
  • Revisit what is "core" as the business evolves -- today's differentiator may become tomorrow's commodity

Code applications:

Context Pattern Example
Build vs. buy Classify subdomain type Build custom pricing engine (core); use Stripe for payments (generic)
Team allocation Best developers on Core Domain Seniors model underwriting rules; juniors integrate the email service
Code organization Separate core from generic domain/pricing/ (deep model) vs. infrastructure/email/ (thin adapter)

See: references/strategic-design.md when deciding where to invest engineering effort -- subdomain classification and distillation techniques.

Common Mistakes

Mistake Why It Fails Fix
Technical names instead of domain language Logic hidden behind DataManager; experts can't validate the model Rename to domain terms (ClaimAdjudicator); if no domain term exists, the concept may be wrong
One model to rule them all A single Customer class for billing, shipping, and marketing becomes bloated and contradictory Bounded contexts: each gets its own Customer with only the attributes it needs
Giant aggregates Concurrency conflicts, slow loads, transactional bottlenecks Keep aggregates small; reference by ID; eventual consistency between them
Anemic domain model Objects are data bags; rules scatter across services and duplicate Move behavior into entities and value objects; services orchestrate only
No Anti-Corruption Layer Foreign models leak in; code couples to external schemas Wrap every external system behind a translation layer
Bounded context = microservice Premature extraction; distributed complexity without benefit A context is a model boundary, not a deployment unit; start with modules in a monolith
Skipping domain experts Developers invent a model that doesn't match reality; expensive rework Regular modeling sessions until experts say "yes, that is how it works"

Quick Diagnostic

Question If No Action
Can a domain expert read your class names and understand them? Technical jargon hides the model Rename classes, methods, events to ubiquitous language
Are bounded context boundaries explicitly defined? Models bleed; same term means different things Draw a context map; define boundaries and translations
Are aggregates small (one root + minimal cluster)? Slow loads, concurrency issues Split aggregates; reference by ID; accept eventual consistency
Do domain objects contain behavior, not just data? Anemic model; logic scattered in services Move business rules into entities and value objects
Are domain events used for cross-aggregate communication? Tight coupling, synchronous chains Introduce events; let aggregates react asynchronously
Is there an Anti-Corruption Layer at every external integration? Foreign models pollute your domain Add a translation layer at each boundary
Have you identified which subdomain is core? Best talent spread thin Classify subdomains; focus deep modeling on the Core Domain

Further Reading

For the complete methodology, patterns, and deeper insights:

About the Author

Eric Evans is a software design consultant and the originator of Domain-Driven Design, developed through work on large-scale systems in finance, insurance, and logistics. His 2003 book Domain-Driven Design: Tackling Complexity in the Heart of Software is one of the most influential software architecture books ever written, and he continues to evolve DDD through his consultancy, Domain Language.

1---
2name: domain-driven-design
3description: 'Model software around the business domain using bounded contexts, aggregates, and ubiquitous language. Use when the user mentions "domain modeling", "bounded context", "aggregate root", "ubiquitous language", "anti-corruption layer", "context mapping", "domain events", "strategic design", "the code doesnt match the business", or "how do we split this big system". Also trigger when breaking a monolith into services, defining service boundaries, or aligning code structure with business processes. Covers entities vs value objects, domain events, and context mapping strategies. For architecture layers, see clean-architecture. For complexity, see software-design-philosophy.'
4license: MIT
5metadata:
6 author: wondelai
7 version: "1.4.0"
8---
9 
10# Domain-Driven Design Framework
11 
12Framework for tackling software complexity by modeling code around the business domain. The greatest risk in software is not technical failure -- it is building a model that does not reflect how the business actually works.
13 
14## Core Principle
15 
16**The model is the code; the code is the model.** Software should embody a deep, shared understanding of the business domain. When domain experts and developers speak the same language and that language is directly expressed in the codebase, complexity becomes manageable and the system evolves gracefully as the business changes.
17 
18## Scoring
19 
20**Goal: 10/10.** Score a domain model by awarding **1 point per satisfied row of the Quick Diagnostic** (7 rows) plus up to 3 points for depth: +1 if the Core Domain has a genuinely rich model (not just CRUD), +1 if invariants live inside aggregates rather than in services, +1 if the ubiquitous language is consistent across conversation, code, and tests. Bands: **9-10** = expert-readable names, explicit context boundaries with ACLs, small aggregates, behavior-rich entities, events for cross-aggregate flow, an identified Core Domain; **5-6** = some domain language but leaky boundaries or anemic objects; **<=3** = technical naming, one model for everything, logic scattered in services. Report the score and the specific diagnostic rows failing.
21 
22## Framework
23 
24### 1. Ubiquitous Language
25 
26**Core concept:** A shared, rigorous language between developers and domain experts, used consistently in conversation, documentation, and code. When the language changes, the code changes -- and awkward naming in code feeds back into refining the language.
27 
28**Why it works:** Ambiguity is the root cause of most modeling failures. When a developer says "order" and an expert means "purchase request," bugs are inevitable; a ubiquitous language forces every name in code to map to a concept the business recognizes and validates.
29 
30**Key insights:**
31- The language emerges from deep collaboration, not a glossary bolted on after the fact
32- If a concept is hard to name, the model is likely wrong -- naming difficulty is a design signal
33- Technical jargon (`DataProcessor` vs. `ClaimAdjudicator`) hides domain logic from the experts who could correct it
34- Different bounded contexts may use the same word with different meanings -- and that is fine
35 
36**Code applications:**
37 
38| Context | Pattern | Example |
39|---------|---------|---------|
40| Class/method naming | Name after domain concepts and verbs | `LoanApplication`, `policy.underwrite()` -- not `RequestHandler`, `process()` |
41| Module structure | Organize by domain concept | `shipping/`, `billing/` -- not `controllers/`, `services/` |
42| Code review | Reject technical-only names | Flag `Manager`, `Helper`, `Processor`, `Utils` as naming smells |
43 
44See: [references/ubiquitous-language.md](references/ubiquitous-language.md) when running modeling sessions or maintaining a glossary -- covers how the language evolves and feeds back into code.
45 
46### 2. Bounded Contexts and Context Mapping
47 
48**Core concept:** A bounded context is an explicit boundary within which a particular domain model applies. The same word ("Customer") can mean different things in different contexts; context maps define the relationships and translation strategies between them.
49 
50**Why it works:** Large systems that try to maintain a single unified model inevitably collapse into inconsistency. Bounded contexts accept that different parts of the business need different models; context maps manage the integration between them.
51 
52**Key insights:**
53- A bounded context is not a microservice -- it is a linguistic and model boundary that may contain multiple services
54- Context boundaries often align with team boundaries (Conway's Law)
55- The nine context mapping patterns describe political and technical relationships between teams
56- Anti-Corruption Layer is the most important defensive pattern -- never let a foreign model leak into your core domain
57- Shared Kernel couples two teams; keep it small and explicitly governed
58- Start by mapping what exists (Big Ball of Mud), then define target boundaries
59 
60**Code applications:**
61 
62| Context | Pattern | Example |
63|---------|---------|---------|
64| Service integration | Anti-Corruption Layer | Translate external API responses into your domain objects at the boundary |
65| Legacy migration | Conformist / ACL | Wrap the legacy system behind an adapter that speaks your domain language |
66| API design | Open Host Service + Published Language | Expose a well-documented REST API with a canonical schema |
67 
68See: [references/bounded-contexts.md](references/bounded-contexts.md) for the nine mapping patterns and integration strategies.
69 
70### 3. Entities, Value Objects, and Aggregates
71 
72**Core concept:** Entities have identity that persists across state changes. Value Objects are defined entirely by their attributes and are immutable. Aggregates are clusters of entities and value objects with a single root that enforces consistency boundaries.
73 
74**Why it works:** Without these distinctions, everything becomes a mutable, identity-bearing object -- tangled state, inconsistent updates, fragile concurrency. Aggregates draw the line: everything inside is guaranteed consistent; everything outside is eventually consistent.
75 
76**Key insights:**
77- Entity test: "Am I the same thing even if all my attributes change?" (a person changes name and address -- still the same person)
78- Value Object test: "Am I defined only by my attributes?" (any $10 bill is interchangeable with another)
79- Most things should be Value Objects, not Entities -- prefer immutability
80- Keep aggregates small (one root plus a minimal cluster); reference other aggregates by ID, not object reference
81- Immediate consistency only within an aggregate; design for eventual consistency between aggregates
82 
83**Code applications:**
84 
85| Context | Pattern | Example |
86|---------|---------|---------|
87| Identity tracking | Entity with ID | `Order` identified by `orderId`, survives state changes |
88| Immutable attributes | Value Object | `Address(street, city, zip)` -- replace, never mutate |
89| Consistency boundary | Aggregate Root | `Order` is root; `OrderLine` items exist only through it |
90| Concurrency control | Optimistic locking on root | Version field on `Order`; conflict if two edits race |
91 
92See: [references/building-blocks.md](references/building-blocks.md) for aggregate design rules and consistency boundaries.
93 
94### 4. Domain Events
95 
96**Core concept:** A domain event captures something that happened in the domain that experts care about, named in past tense (`OrderPlaced`, `PaymentReceived`) -- a fact that has already occurred.
97 
98**Why it works:** Domain events decouple cause from effect. When `OrderPlaced` is published, shipping, billing, and notifications each react independently without the ordering context knowing about them -- less coupling, eventual consistency, a natural audit trail.
99 
100**Key insights:**
101- Events are immutable facts -- once published, they cannot be changed or retracted
102- Domain events are internal to a bounded context; integration events cross boundaries
103- Events enable temporal decoupling: the producer does not wait for the consumer
104- Event sourcing stores the full event history as the source of truth, deriving current state by replay
105- Not every state change deserves an event -- only publish what the domain cares about
106 
107**Code applications:**
108 
109| Context | Pattern | Example |
110|---------|---------|---------|
111| State transitions | Raise event on domain action | `order.place()` raises `OrderPlaced` |
112| Cross-context integration | Publish integration event | `OrderPlaced` triggers `ShippingLabelRequested` in shipping context |
113| Eventual consistency | Async event handlers | Inventory handler updates stock asynchronously after `OrderPlaced` |
114 
115See: [references/domain-events.md](references/domain-events.md) for event naming, event sourcing, and integration events.
116 
117### 5. Repositories and Factories
118 
119**Core concept:** Repositories provide the illusion of an in-memory collection of domain objects, hiding persistence. Factories encapsulate complex creation logic so aggregates are always born in a valid state.
120 
121**Why it works:** When persistence and assembly details leak into domain code, every storage change ripples through business rules and aggregates can be constructed in half-valid states. Repositories confine SQL/ORM concerns to infrastructure so the domain stays testable in memory; factories make the only path to an aggregate one that enforces its invariants, so an invalid instance is unrepresentable.
122 
123**Key insights:**
124- The Repository interface belongs in the domain layer; its implementation belongs in infrastructure
125- Repository methods speak the ubiquitous language: `findPendingOrders()`, not `getByStatusCode(3)`
126- Collection-oriented repositories mimic `add`/`remove`; persistence-oriented ones use `save`
127- Factories are warranted for complex rules or multi-part assembly; a two-field Value Object just needs a constructor
128- The Specification pattern encapsulates query criteria as domain objects: `OverdueInvoiceSpecification`
129 
130**Code applications:**
131 
132| Context | Pattern | Example |
133|---------|---------|---------|
134| Data access abstraction | Repository interface | `OrderRepository.findByCustomer(customerId)` in domain; `PostgresOrderRepository` in infrastructure |
135| Complex creation | Factory method | `Order.createFromQuote(quote)` validates and assembles from a `Quote` aggregate |
136| Query encapsulation | Specification | `spec = OverdueBy(days=30); repo.findMatching(spec)` |
137 
138See: [references/repositories-factories.md](references/repositories-factories.md) for Repository, Factory, and Specification patterns.
139 
140### 6. Strategic Design and Distillation
141 
142**Core concept:** Not all parts of a system are equally important. Strategic design identifies the Core Domain -- where competitive advantage lives -- and distinguishes it from Supporting Subdomains (necessary, not differentiating) and Generic Subdomains (commodity).
143 
144**Why it works:** Applying the same rigor everywhere spreads your best talent thin and over-engineers commodity functionality. Identifying the Core Domain concentrates the best developers and deepest modeling where they matter most.
145 
146**Key insights:**
147- Core Domain: invest your best people and deepest modeling; Supporting: build, but don't over-engineer; Generic (auth, email, payments): buy or use open-source
148- Distillation extracts and highlights the Core Domain from surrounding complexity
149- A Domain Vision Statement is a one-page description of the Core Domain's value proposition
150- Revisit what is "core" as the business evolves -- today's differentiator may become tomorrow's commodity
151 
152**Code applications:**
153 
154| Context | Pattern | Example |
155|---------|---------|---------|
156| Build vs. buy | Classify subdomain type | Build custom pricing engine (core); use Stripe for payments (generic) |
157| Team allocation | Best developers on Core Domain | Seniors model underwriting rules; juniors integrate the email service |
158| Code organization | Separate core from generic | `domain/pricing/` (deep model) vs. `infrastructure/email/` (thin adapter) |
159 
160See: [references/strategic-design.md](references/strategic-design.md) when deciding where to invest engineering effort -- subdomain classification and distillation techniques.
161 
162## Common Mistakes
163 
164| Mistake | Why It Fails | Fix |
165|---------|-------------|-----|
166| Technical names instead of domain language | Logic hidden behind `DataManager`; experts can't validate the model | Rename to domain terms (`ClaimAdjudicator`); if no domain term exists, the concept may be wrong |
167| One model to rule them all | A single `Customer` class for billing, shipping, and marketing becomes bloated and contradictory | Bounded contexts: each gets its own `Customer` with only the attributes it needs |
168| Giant aggregates | Concurrency conflicts, slow loads, transactional bottlenecks | Keep aggregates small; reference by ID; eventual consistency between them |
169| Anemic domain model | Objects are data bags; rules scatter across services and duplicate | Move behavior into entities and value objects; services orchestrate only |
170| No Anti-Corruption Layer | Foreign models leak in; code couples to external schemas | Wrap every external system behind a translation layer |
171| Bounded context = microservice | Premature extraction; distributed complexity without benefit | A context is a model boundary, not a deployment unit; start with modules in a monolith |
172| Skipping domain experts | Developers invent a model that doesn't match reality; expensive rework | Regular modeling sessions until experts say "yes, that is how it works" |
173 
174## Quick Diagnostic
175 
176| Question | If No | Action |
177|----------|-------|--------|
178| Can a domain expert read your class names and understand them? | Technical jargon hides the model | Rename classes, methods, events to ubiquitous language |
179| Are bounded context boundaries explicitly defined? | Models bleed; same term means different things | Draw a context map; define boundaries and translations |
180| Are aggregates small (one root + minimal cluster)? | Slow loads, concurrency issues | Split aggregates; reference by ID; accept eventual consistency |
181| Do domain objects contain behavior, not just data? | Anemic model; logic scattered in services | Move business rules into entities and value objects |
182| Are domain events used for cross-aggregate communication? | Tight coupling, synchronous chains | Introduce events; let aggregates react asynchronously |
183| Is there an Anti-Corruption Layer at every external integration? | Foreign models pollute your domain | Add a translation layer at each boundary |
184| Have you identified which subdomain is core? | Best talent spread thin | Classify subdomains; focus deep modeling on the Core Domain |
185 
186## Further Reading
187 
188For the complete methodology, patterns, and deeper insights:
189 
190- [*"Domain-Driven Design: Tackling Complexity in the Heart of Software"*](https://www.amazon.com/Domain-Driven-Design-Tackling-Complexity-Software/dp/0321125215?tag=wondelai00-20) by Eric Evans
191 
192## About the Author
193 
194**Eric Evans** is a software design consultant and the originator of Domain-Driven Design, developed through work on large-scale systems in finance, insurance, and logistics. His 2003 book *Domain-Driven Design: Tackling Complexity in the Heart of Software* is one of the most influential software architecture books ever written, and he continues to evolve DDD through his consultancy, Domain Language.
195 
View all files on GitHub →

Details

Updated
Sep 10, 2026
License
MIT
Stars on the repo
★ 2,235
Checked
Source
wondelai/skills ↗
Creator
wondelai · 320 listings
View creator

Similar skills

See all →
SkillCreate branded architecture, architecture deltaDiagram designcathrynlavery/diagram-design · by cathrynlaveryCreate branded architecture, architecture delta, IT current-state, flowchart, sequence, state machine, ER/data model, timeline, swimlane, quadrant, radar/spider, polar chart (polar/radial lollipop), loop/flywheel, nested, tree, org chart, layer stack, Venn, pyramid/funnel, treemap and marimekko, heatmap, bar and dumbbell, waterfall, line (slopegraph, ridgeline, streamgraph, bump), Gantt and scatter charts (bubble, beeswarm), high-level, process, medallion, data flow, DP integration, DP security matrix, Sankey, fishbone, Wardley map, kanban, user journey, deployment, dependency graph, UML class, story map, or database schema diagrams as HTML/SVG/PNG, with .drawio, Mermaid, and .excalidraw import, plus lifecycle phase maps, block decomposition trees, and onboarding guidance.★ 43.2k GitHub starsSkillReview a PR against the Pascal architectural rulesReview architecturepascalorg/editor · by pascalorgReview a PR against the Pascal architectural rules — package boundaries (core/viewer/editor/nodes), the registry-driven composition model (def.geometry / def.renderer / def.system), legacy-dispatch regressions, the slots + world-scale-UV convention for new nodes/geometry, hook hygiene (useEditor/useScene/useViewer), and selector performance. Use when the user asks to review a PR, audit a branch, or check that changes respect the codebase's architecture.★ 24.6k GitHub starsSkillCreate and edit draw.io/diagrams.net diagramsDraw.io Architecture StudioAgents365-ai/drawio-skill · by Agents365-aiCreate and edit draw.io/diagrams.net diagrams as editable `.drawio` files. Covers architecture, UML/ERD/sequence, BPMN, network, and swimlane views authored from a description or converted from code, IaC, SQL, and API schemas, plus sync, query, test, review, export, and publish of existing diagrams. Use when the user asks for draw.io/diagrams.net or an editable diagram; prefer Mermaid/PlantUML when diagrams-as-code is enough.★ 9.8k GitHub starsSkillCreate polished dark-themed architecture diagramsArchitecture Diagram SkillCocoon-AI/architecture-diagram-generator · by Cocoon-AICreate polished dark-themed architecture diagrams as self-contained HTML+SVG files. Use when the user asks for system, infrastructure, cloud, security, or network topology diagrams.★ 7.4k GitHub starsSkillThe foundational knowledge distillation pattern for buildingLLM Wiki — Knowledge Distillation PatternAr9av/obsidian-wiki · by Ar9avThe foundational knowledge distillation pattern for building and maintaining an AI-powered Obsidian wiki. Based on Andrej Karpathy's LLM Wiki architecture. Use this skill whenever the user wants to understand the wiki pattern, set up a new knowledge base, or needs guidance on the three-layer architecture (raw sources → wiki → schema). Also use when discussing knowledge management strategy, wiki structure decisions, or how to organize distilled knowledge. This is the "theory" skill — other skills handle specific operations (ingesting, querying, linting).★ 3.5k GitHub starsSkillManage software complexity through deep modulesA Philosophy of Software Design Frameworkwondelai/skills · by wondelaiManage software complexity through deep modules, information hiding, and strategic programming. Use when the user mentions "module design", "API too complex", "shallow class", "complexity budget", "strategic vs tactical", "deep module", "information leakage", "pass-through method", "this code is over-engineered", or "simplify this design". Also trigger when reviewing an interface for simplicity, evaluating whether an abstraction is pulling its weight, deciding whether a comment is worth writing, or choosing between general-purpose and special-purpose approaches. Covers deep vs shallow modules, red flags for complexity, and comments as design documentation. For code quality, see clean-code. For architecture boundaries, see clean-architecture.★ 2.2k GitHub stars

More from wondelai

SkillManage software complexity through deep modulesA Philosophy of Software Design Frameworkwondelai/skills · by wondelaiManage software complexity through deep modules, information hiding, and strategic programming. Use when the user mentions "module design", "API too complex", "shallow class", "complexity budget", "strategic vs tactical", "deep module", "information leakage", "pass-through method", "this code is over-engineered", or "simplify this design". Also trigger when reviewing an interface for simplicity, evaluating whether an abstraction is pulling its weight, deciding whether a comment is worth writing, or choosing between general-purpose and special-purpose approaches. Covers deep vs shallow modules, red flags for complexity, and comments as design documentation. For code quality, see clean-code. For architecture boundaries, see clean-architecture.★ 2.2k GitHub starsSkillMetrics are the language of validated learningActionable metrics guidewondelai/skills · by wondelaiMetrics are the language of validated learning. The wrong metrics create the illusion of progress while the startup drifts toward failure.…★ 2.2k GitHub starsSkillAdvertising media is the vehicle that carries your messagewondelai/skills · by wondelaiAdvertising media is the vehicle that carries your message to your target market. Choosing the right media is not about what is trendy — it…★ 2.2k GitHub starsSkillAn affordance is a relationship between an objectAffordances: Designing for Actionwondelai/skills · by wondelaiAn affordance is a relationship between an object and a person that determines how the object could possibly be used. A chair affords…★ 2.2k GitHub starsSkillLean UX was designed to work inside Agile development teamsAgile integration for lean UXwondelai/skills · by wondelaiLean UX was designed to work inside Agile development teams, not alongside them. The central mechanism is dual-track agile, where a…★ 2.2k GitHub starsSkillThis reference translates the AMP framework from theoryAMP Applied: Practical Applications of Autonomy, Mastery, and Purposewondelai/skills · by wondelaiThis reference translates the AMP framework from theory into practice across six domains: product gamification, team management,…★ 2.2k GitHub stars