English version: English
When to Use
- Domain discovery is complete (event streams and command/event candidates are ready), and the domain needs to be divided into subdomains.
- A strategic decision is needed to clarify "what is the core competitiveness and what can be outsourced/reused".
ddd-context-mapWhen a "god context" or subdomain misclassification is reported, re-execute as a backtracking target.
Input Requirements
- Required: event streams, command/event candidates, boundary clues (from
ddd-discover)。 - Optional: current system capability list or module list, business differentiation hypotheses, competitive advantage description (from
ddd-scope)。
Process
- Extract capability set: extract business capabilities (Capability) from event streams, deduplicate and merge synonymous capabilities.
- Attribute annotation: annotate each capability with business value, complexity, change frequency, and degree of external dependency.
- Classification: classify by DDD subdomain type—Core (core differentiation), Supporting (necessary but non-differentiating), Generic (general-purpose reusable).
- Core domain statement: form a core domain statement document—why it is core, measurement metrics, long-term evolution direction.
- Ownership recommendation: recommend team ownership, align language boundaries and consistency boundaries; annotate cross-team collaboration points.
- Output boundary candidates: for
ddd-contextsprovide preliminary mapping recommendations from subdomains to contexts.
Output
| Artifact | Structural Requirements |
|---|---|
| Capability list | Table: capability, description, associated events, upstream/downstream dependencies |
| Subdomain classification table | Table: capability/capability group, subdomain type (Core/Supporting/Generic), classification rationale, recommended investment |
| Core domain statement | Within 1 page: value, boundaries, measurement metrics, risks, evolution direction |
| Ownership recommendation | Table: capability/subdomain, recommended team, dependents, collaboration method |
| Boundary candidates | List: preliminary mapping recommendations from subdomains to contexts |
Validation checklist
- Each capability has a classification rationale, acceptable to both business and technical stakeholders
- The core domain statement includes measurable business metrics
- At least 3 cross-team collaboration points are identified with collaboration recommendations
- The number of Core subdomains ≤ 1/3 of total subdomains (there should not be too many core domains)
- Boundary candidates can be directly consumed by
ddd-contextsDirect consumption
Backtracking triggers
- Unable to distinguish Core from Supporting (all capabilities appear equally important) → backtrack to
ddd-scope, the business value proposition needs to be re-clarified. - Triggered by
ddd-context-mapto backtrack: circular dependencies or a "god context" suggest that the subdomain division is incorrect.
Example
@ddd-subdomains
基于以下事件流和边界线索,帮我识别子域并分类:
[粘贴 ddd-discover 的事件流表与边界线索]
请输出能力清单、子域分类表、核心域声明与所有权建议。