Map Bounded Contexts
Purpose
Make the model boundaries and the power relationships between them explicit, so that integration contracts, translation layers and team responsibilities follow deliberate choices instead of accidental coupling.
When to use
- After
event-storming has revealed pivotal events and candidate boundaries.
- Before splitting a monolith or assigning services to teams.
- When the same term means different things in different parts of the system and causes defects.
- When a downstream team keeps breaking because of upstream model changes.
When not to use
- Boundaries are not yet discovered at all. Start with
event-storming.
- The question is how to cut deployable services and own data. Use
service-decomposition.
- Only the transport mechanism between two systems must be chosen. Use
integration-pattern-selection.
Inputs
Required:
- The list of subdomains, modules or systems in scope, with a sentence on what each does.
Optional:
- Owning teams, existing integrations, known pain points, glossary conflicts.
- Event storming output, org chart, external vendors and their contracts.
If no list of parts is given, ask for it. Mark unknown ownership or directions as [UNKNOWN].
Process
- Classify subdomains as core (differentiating), supporting or generic; this drives where to invest in modeling and where to buy or conform.
- Define each bounded context: name, responsibility, key terms of its ubiquitous language, owning team and whether it is internal or external.
- Find terms that cross contexts with different meanings (e.g., "Customer" in CRM vs. Billing) and record each meaning per context; do not force a single enterprise model.
- For every pair that exchanges data or behavior, decide upstream (whose model changes propagate) and downstream (who is affected).
- Classify each relationship by pattern: Partnership, Shared Kernel, Customer-Supplier, Conformist, Anticorruption Layer (ACL), Open Host Service (OHS), Published Language (PL), Separate Ways, or Big Ball of Mud for legacy areas.
- Check pattern fit against team reality: Shared Kernel and Partnership need tight collaboration; a downstream core context facing an external or legacy upstream should normally have an ACL rather than conform.
- Note the integration style per relationship (synchronous API, events, file, shared DB) and flag shared databases as coupling risks.
- Mark every relationship you inferred rather than were told as
[ASSUMPTION], and list problems: missing ACLs, circular dependencies, one team owning many unrelated contexts, contexts split across teams.
- Produce the map as a diagram-as-code (e.g., Mermaid or Context Mapper DSL) plus a relationship table.
- Recommend changes in priority order, each with the pain it removes and the cost it adds.
- If the goal continues, suggest
service-decomposition for deployment boundaries, aggregate-design inside a core context or team-topology to align team ownership.
Output format
# Context Map: <landscape>
## Bounded Contexts
| Context | Subdomain type | Responsibility | Key terms | Owner team | Internal/External |
|---|---|---|---|---|---|
## Relationships
| Upstream | Downstream | Pattern | Integration style | Notes / risks |
|---|---|---|---|---|
## Diagram
<Mermaid or Context Mapper DSL source, e.g. flowchart LR; Catalog -- "OHS/PL" --> Ordering>
## Term Conflicts
- <term>: <context A meaning> vs <context B meaning>
## Problems and Recommendations
1. <problem> → <recommended change> — benefit / cost
## Assumptions and Open Questions
- [ASSUMPTION] ...
Quality checklist
Common pitfalls
- Drawing the map as the desired future while presenting it as today. Keep an as-is map and a to-be map separate.
- Equating one context with one microservice. A context can contain several deployables, and one deployable should not span contexts.
- Labeling everything Customer-Supplier. If the upstream ignores downstream needs, the honest pattern is Conformist.
Example
Input: "Ordering calls the external PSP; Warehouse reads the Ordering DB directly; Pricing and Catalog teams share a Product library."
Excerpt of output:
- Ordering (downstream) ← PSP (upstream, external): Conformist today; recommend ACL to keep PSP status codes out of the ordering model.
- Warehouse ← Ordering: shared database, high coupling risk; recommend Ordering publish "Order Placed" events (OHS/PL).
- Pricing ↔ Catalog: Shared Kernel (Product library)
[ASSUMPTION: joint change process exists].
1---2name: bounded-context-map3description: "Produces a context map that names each bounded context, its ubiquitous language and ownership, and classifies the relationships between contexts (partnership, shared kernel, customer-supplier, conformist, anticorruption layer, open host service, published language, separate ways) with upstream/downstream direction and integration style. Use when defining module or service boundaries, onboarding a team to a landscape, or diagnosing coupling and translation problems between teams."4license: MIT5metadata:6 source: https://skillmd.com/skills/muratdincer/bounded-context-map7 version: "1.0.0"8 language: en9 category: 04-architecture10 role: software-architect11 area: domain12 title: "Map bounded contexts"13 related: "event-storming, service-decomposition, aggregate-design, integration-pattern-selection, team-topology"14 prompt: "Draw a context map for our retail platform: catalog, pricing, ordering, payment (external PSP), warehouse and CRM, owned by four teams."15---1617# Map Bounded Contexts1819## Purpose20Make the model boundaries and the power relationships between them explicit, so that integration contracts, translation layers and team responsibilities follow deliberate choices instead of accidental coupling.2122## When to use23- After `event-storming` has revealed pivotal events and candidate boundaries.24- Before splitting a monolith or assigning services to teams.25- When the same term means different things in different parts of the system and causes defects.26- When a downstream team keeps breaking because of upstream model changes.2728## When not to use29- Boundaries are not yet discovered at all. Start with `event-storming`.30- The question is how to cut deployable services and own data. Use `service-decomposition`.31- Only the transport mechanism between two systems must be chosen. Use `integration-pattern-selection`.3233## Inputs34Required:35- The list of subdomains, modules or systems in scope, with a sentence on what each does.3637Optional:38- Owning teams, existing integrations, known pain points, glossary conflicts.39- Event storming output, org chart, external vendors and their contracts.4041If no list of parts is given, ask for it. Mark unknown ownership or directions as `[UNKNOWN]`.4243## Process441. Classify subdomains as core (differentiating), supporting or generic; this drives where to invest in modeling and where to buy or conform.452. Define each bounded context: name, responsibility, key terms of its ubiquitous language, owning team and whether it is internal or external.463. Find terms that cross contexts with different meanings (e.g., "Customer" in CRM vs. Billing) and record each meaning per context; do not force a single enterprise model.474. For every pair that exchanges data or behavior, decide upstream (whose model changes propagate) and downstream (who is affected).485. Classify each relationship by pattern: Partnership, Shared Kernel, Customer-Supplier, Conformist, Anticorruption Layer (ACL), Open Host Service (OHS), Published Language (PL), Separate Ways, or Big Ball of Mud for legacy areas.496. Check pattern fit against team reality: Shared Kernel and Partnership need tight collaboration; a downstream core context facing an external or legacy upstream should normally have an ACL rather than conform.507. Note the integration style per relationship (synchronous API, events, file, shared DB) and flag shared databases as coupling risks.518. Mark every relationship you inferred rather than were told as `[ASSUMPTION]`, and list problems: missing ACLs, circular dependencies, one team owning many unrelated contexts, contexts split across teams.529. Produce the map as a diagram-as-code (e.g., Mermaid or Context Mapper DSL) plus a relationship table.5310. Recommend changes in priority order, each with the pain it removes and the cost it adds.5411. If the goal continues, suggest `service-decomposition` for deployment boundaries, `aggregate-design` inside a core context or `team-topology` to align team ownership.5556## Output format57```markdown58# Context Map: <landscape>5960## Bounded Contexts61| Context | Subdomain type | Responsibility | Key terms | Owner team | Internal/External |62|---|---|---|---|---|---|6364## Relationships65| Upstream | Downstream | Pattern | Integration style | Notes / risks |66|---|---|---|---|---|6768## Diagram69<Mermaid or Context Mapper DSL source, e.g. flowchart LR; Catalog -- "OHS/PL" --> Ordering>7071## Term Conflicts72- <term>: <context A meaning> vs <context B meaning>7374## Problems and Recommendations751. <problem> → <recommended change> — benefit / cost7677## Assumptions and Open Questions78- [ASSUMPTION] ...79```8081## Quality checklist82- [ ] Every context has one owning team or is marked `[UNKNOWN]`.83- [ ] Every relationship has a direction and one named pattern.84- [ ] Conflicting terms are listed per context, not unified by force.85- [ ] External and legacy upstreams feeding a core context are protected by an ACL or the risk is stated.86- [ ] Shared databases between contexts are flagged.87- [ ] All checks pass; if any fails, revise the output and re-run this checklist before answering.8889## Common pitfalls90- Drawing the map as the desired future while presenting it as today. Keep an as-is map and a to-be map separate.91- Equating one context with one microservice. A context can contain several deployables, and one deployable should not span contexts.92- Labeling everything Customer-Supplier. If the upstream ignores downstream needs, the honest pattern is Conformist.9394## Example95Input: "Ordering calls the external PSP; Warehouse reads the Ordering DB directly; Pricing and Catalog teams share a Product library."9697Excerpt of output:98- Ordering (downstream) ← PSP (upstream, external): Conformist today; recommend ACL to keep PSP status codes out of the ordering model.99- Warehouse ← Ordering: shared database, high coupling risk; recommend Ordering publish "Order Placed" events (OHS/PL).100- Pricing ↔ Catalog: Shared Kernel (Product library) `[ASSUMPTION: joint change process exists]`.