Install any skill in seconds. Free to start, no credit card required.
Get Started Free →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).
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-03 | ✗→✓ | ▲ Improved | 13% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 92% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 85% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 160% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 96% | 0% |
This skill analyzes codebases to identify subdomains (Core, Supporting, Generic) and suggest bounded contexts following Domain-Driven Design Strategic Design principles.
Apply this skill when:
Core Domain: Competitive advantage, highest business value, requires best developers
Supporting Subdomain: Essential but not differentiating, business-specific
Generic Subdomain: Common functionality, could be outsourced
An explicit linguistic boundary where domain terms have specific, unambiguous meanings.
Scan codebase for business concepts (not infrastructure):
@Entity, class, domain models*Service, *Manager, *Handler*UseCase, *Command, *Handler*Controller, *Resolver, API endpointsFor each concept, determine:
Primary Language Context
Subscription, Invoice, Payment → Billing languageMovie, Video, Episode → Content languageUser, Authentication → Identity languageLinguistic Boundaries
Concept Relationships
A subdomain has:
Common Domain Patterns:
Classify Each Subdomain:
Use this decision tree:
Is it a competitive advantage?
YES → Core Domain
NO → Does it require business-specific knowledge?
YES → Supporting Subdomain
NO → Generic SubdomainHigh Cohesion Indicators ✅
Low Cohesion Indicators ❌
Cohesion Score Formula:
Score = (
Linguistic Cohesion (0-3) + // Shared vocabulary
Usage Cohesion (0-3) + // Used together
Data Cohesion (0-2) + // Entity relationships
Change Cohesion (0-2) // Change together
) / 10
8-10: High Cohesion ✅
5-7: Medium Cohesion ⚠️
0-4: Low Cohesion ❌Rule 1: Linguistic Mismatch
User (identity) + Subscription (billing) in same serviceRule 2: Cross-Domain Dependencies
Rule 3: Mixed Responsibilities
Rule 4: Generic in Core
Rule 5: Unclear Boundaries
For each subdomain identified, suggest bounded context:
Bounded Context Characteristics:
Integration Patterns:
For each domain/subdomain:
markdown## Domain: {Name} **Type**: Core Domain | Supporting Subdomain | Generic Subdomain **Ubiquitous Language**: {key business terms} **Business Capability**: {what business problem it solves} **Key Concepts**: - {Concept} (Entity|Service|UseCase) - {brief description} **Subdomains** (if applicable): 1. {Subdomain} (Core|Supporting|Generic) - Concepts: {list} - Cohesion: {score}/10 - Dependencies: → {other domains} **Suggested Bounded Context**: {Name}Context - Linguistic boundary: {where terms have specific meaning} - Integration: {how it should integrate with other contexts} **Dependencies**: - → {OtherDomain} via {interface/API} - ← {OtherDomain} via {interface/API} **Cohesion Score**: {score}/10
markdown## Cross-Domain Cohesion | Domain A | Domain B | Cohesion | Issue | Recommendation | | -------- | -------- | -------- | ------------------ | ----------------------- | | Billing | Identity | 2/10 | ❌ Direct coupling | Use interface | | Content | Billing | 6/10 | ⚠️ Usage tracking | Event-based integration |
markdown## Issues Detected ### Priority: High **Issue**: {description} - **Location**: {file/class/method} - **Problem**: {what's wrong} - **Concepts**: {involved concepts} - **Cohesion**: {score}/10 - **Recommendation**: {suggested fix} ### Priority: Medium {similar format}
markdown## 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
For Each Concept:
For Each Domain:
For Cohesion Analysis:
Analyze business capability
└─ Is it competitive advantage?
├─ YES → Core Domain
└─ NO → Is it business-specific?
├─ YES → Supporting Subdomain
└─ NO → Generic SubdomainSame 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 groupingClear 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 everywhereBig Ball of Mud
All-Inclusive Model
Mixed Linguistic Concepts
Good domain identification has:
Other measured skills in the registry, with their headline benchmark lift.