Maps business domains and suggests service boundaries in any codebase using DDD Strategic Design. Use when asking "what are the domains in this codebase?", "where should I draw service boundaries?", "identify bounded contexts", "classify subdomains", "DDD analysis", or analyzing domain cohesion. Do NOT use for grouping existing components into domains (use domain-identification-grouping) or dependency analysis (use coupling-analysis).
This skill analyzes codebases to identify subdomains (Core, Supporting, Generic) and suggest bounded contexts following Domain-Driven Design Strategic Design principles.
When to Use
Apply this skill when:
Analyzing domain boundaries in any codebase
Identifying Core, Supporting, and Generic subdomains
Mapping bounded contexts from problem space to solution space
Assessing domain cohesion and detecting coupling issues
Planning domain-driven refactoring
Understanding business capabilities in code
Core Principles
Subdomain Classification
Core Domain: Competitive advantage, highest business value, requires best developers
Indicators: Complex business logic, frequent changes, domain experts needed
Supporting Subdomain: Essential but not differentiating, business-specific
## Suggested Bounded Contexts
### {ContextName}Context
**Contains Subdomains**:
- {Subdomain1} (Core)
- {Subdomain2} (Supporting)
**Ubiquitous Language**:
- Term: Definition in this context
**Integration Requirements**:
- Consumes from: {OtherContext} via {pattern}
- Publishes to: {OtherContext} via {pattern}
**Implementation Notes**:
- Separate persistence
- Independent deployment
- Explicit API boundaries
Best Practices
Do's ✅
Focus on business language, not code structure
Let Ubiquitous Language guide boundaries
Measure cohesion objectively
Identify clear integration points
Classify every subdomain (Core/Supporting/Generic)
Look for linguistic boundaries first
Don'ts ❌
Don't group by technical layers
Don't force single global model
Don't ignore linguistic differences
Don't couple domains directly
Don't create contexts by architecture
Don't eliminate all dependencies (some are necessary)
Analysis Checklist
For Each Concept:
What business language does it belong to?
What domain/subdomain is it part of?
Is it Core, Supporting, or Generic?
What other concepts does it relate to?
Are dependencies within same domain?
Any linguistic mismatches?
For Each Domain:
What is the Ubiquitous Language?
What are the key concepts?
What are the subdomains?
Which is the Core Domain?
What are cross-domain dependencies?
Is internal cohesion high?
Are boundaries clear?
For Cohesion Analysis:
Calculate cohesion scores
Identify low cohesion areas
Map cross-domain dependencies
Flag linguistic mismatches
Note tight coupling
Suggest boundary clarifications
Quick Reference
Subdomain Decision Tree
Analyze business capability
└─ Is it competitive advantage?
├─ YES → Core Domain
└─ NO → Is it business-specific?
├─ YES → Supporting Subdomain
└─ NO → Generic Subdomain
Cohesion Quick Check
Same vocabulary? → High linguistic cohesion
Used together? → High usage cohesion
Direct relationships? → High data cohesion
Change together? → High change cohesion
All high → Strong subdomain candidate
Mix of high/low → Review boundaries
All low → Likely wrong grouping
Bounded Context Signals
Clear boundary signs:
✅ Distinct Ubiquitous Language
✅ Concepts have unambiguous meaning
✅ Different meanings across contexts
✅ Clear integration points
Unclear boundary signs:
❌ Same terms with same meanings everywhere
❌ Concepts used identically across system
❌ No clear linguistic differences
❌ Tight coupling everywhere
Anti-Patterns to Avoid
Big Ball of Mud
Everything connected to everything
No clear boundaries
Mixed vocabularies
Prevention: Explicit bounded contexts
All-Inclusive Model
Single model for entire business
Impossible global definitions
Creates conflicts
Prevention: Embrace multiple contexts
Mixed Linguistic Concepts
Different vocabularies in same context
Example: User/Permission with Forum/Post
Prevention: Keep linguistic associations
Notes
This is strategic analysis, not tactical implementation
Focus on WHAT domains exist, not HOW to implement
Some cross-domain dependencies are normal
Low cohesion doesn't always mean "bad," it means "needs attention"
Generic Subdomains naturally have lower cohesion
Always validate with domain experts when possible
Validation Criteria
Good domain identification has:
✅ Clear boundaries with distinct Ubiquitous Language