Context Mapping Skill Interactive Mapping Configuration Use AskUserQuestion to configure the context mapping session: Use these responses to select the appropriate mapping mode and calibrate discovery depth. Map relationships between bounded contexts using Domain-Driven Design context mapping patterns. Produces Context Mapper DSL (CML) output and integration strategy recommendations. When to Use This Skill Keywords: context mapping, bounded contexts, upstream, downstream, ACL, anti-corruption layer, shared kernel, customer supplier, open host service, published language, conformist, partnersh…

\n```\n\n**Client Generation:**\n\n```bash\n# Generate typed client from OpenAPI spec\ndotnet openapi add url https://catalog.internal/openapi.json \\\n --output-file ProductCatalogClient.cs\n```\n\n---\n\n## Pattern-to-Implementation Quick Reference\n\n| Pattern | Primary Strategy | .NET Technology |\n| ------- | --------------- | --------------- |\n| Shared Kernel | Shared NuGet | Internal NuGet feed |\n| Partnership | Bidirectional events | MediatR, MassTransit |\n| Customer/Supplier | Internal API | Typed HttpClient |\n| Conformist | Direct usage | Reference DTOs directly |\n| ACL | Adapter pattern | Interface + Adapter class |\n| OHS | Formal API | ASP.NET + API versioning |\n| PL | Contract-first | OpenAPI, Protobuf |\n| Separate Ways | None | No integration code |\n","content_type":"text/markdown; charset=utf-8","language":"markdown","size":15958,"content_sha256":"d8bd30b6117f9cd71cf52f7bcb7cc40bf2ec64123cdf5e25f7fd177b3edb8d26"},{"filename":"references/pattern-catalog.md","content":"# Context Mapping Pattern Catalog\n\nComplete reference for all 8 DDD context mapping patterns with examples, use cases, and trade-offs.\n\n## Symmetric Patterns\n\n### Shared Kernel (SK)\n\n**Definition:** Two bounded contexts share a common subset of the domain model, including code and possibly database schema.\n\n**Visual:**\n\n```text\n┌─────────────────┐ ┌─────────────────┐\n│ Context A │ │ Context B │\n│ │ │ │\n│ ┌───────┐ │ │ ┌───────┐ │\n│ │Shared │◄───┼─────┼───►│Shared │ │\n│ │Kernel │ │ │ │Kernel │ │\n│ └───────┘ │ │ └───────┘ │\n└─────────────────┘ └─────────────────┘\n```\n\n**CML Syntax:**\n\n```cml\nContextA [SK]\u003c->[SK] ContextB\n```\n\n**When to Use:**\n\n- Two contexts need identical business rules\n- Shared value objects or entities\n- Tight team collaboration exists\n- Changes to shared code can be coordinated\n\n**Trade-offs:**\n\n| Pros | Cons |\n| ---- | ---- |\n| Eliminates duplication | Tight coupling |\n| Consistent business rules | Coordination overhead |\n| Single source of truth | Risk of growing too large |\n| Simpler integration | Both teams must agree on changes |\n\n**Example:**\n\n```csharp\n// Shared Kernel: CustomerInfo value object\n// Owned by CustomerContext, used by OrderContext and ShippingContext\nnamespace SharedKernel;\n\npublic record CustomerInfo(\n CustomerId Id,\n string Name,\n Address ShippingAddress,\n Email Email\n);\n```\n\n**Warning Signs It's Too Big:**\n\n- More than 2-3 entities/value objects\n- Frequent merge conflicts\n- One team waiting on another for changes\n- Shared kernel grows faster than individual contexts\n\n---\n\n### Partnership (P)\n\n**Definition:** Two contexts have mutual dependency with no clear upstream/downstream. Teams collaborate closely and co-evolve their models.\n\n**Visual:**\n\n```text\n┌─────────────────┐ ┌─────────────────┐\n│ Context A │◄───►│ Context B │\n│ │ │ │\n│ (mutual deps) │ │ (mutual deps) │\n└─────────────────┘ └─────────────────┘\n```\n\n**CML Syntax:**\n\n```cml\nContextA [P]\u003c->[P] ContextB\n```\n\n**When to Use:**\n\n- Neither team is clearly upstream or downstream\n- Bidirectional data/event flow\n- Teams have equal leverage and influence\n- Joint development on shared features\n\n**Trade-offs:**\n\n| Pros | Cons |\n| ---- | ---- |\n| Flexible collaboration | Requires strong communication |\n| Equal team voice | No single owner for decisions |\n| Natural for peer services | Can become chaotic without discipline |\n| Supports innovation | Harder to scale beyond 2 teams |\n\n**Example:**\n\n```cml\n/* Order and Shipping co-evolve the fulfillment process\n * Both teams contribute to the shipping rules\n */\nOrderContext [P]\u003c->[P] ShippingContext\n```\n\n**Anti-Pattern Warning:**\n\nIf one team consistently waits on another, it's not a true Partnership - consider Customer/Supplier instead.\n\n---\n\n## Asymmetric Patterns\n\n### Customer/Supplier (C/S)\n\n**Definition:** Upstream context (Supplier) provides services/data to downstream context (Customer). The customer has some influence over the supplier's priorities.\n\n**Visual:**\n\n```text\n┌─────────────────┐ ┌─────────────────┐\n│ Upstream │ │ Downstream │\n│ (Supplier) │────►│ (Customer) │\n│ │ │ │\n│ Provides │ │ Consumes │\n└─────────────────┘ └─────────────────┘\n```\n\n**CML Syntax:**\n\n```cml\nDownstreamContext [D,C]\u003c-[U,S] UpstreamContext\n```\n\n**When to Use:**\n\n- Clear provider/consumer relationship\n- Downstream team can negotiate API changes\n- Same organization, reasonable collaboration\n- Internal service communication\n\n**Trade-offs:**\n\n| Pros | Cons |\n| ---- | ---- |\n| Clear ownership | Requires negotiation process |\n| Customer voice heard | Slower API evolution |\n| Predictable dependencies | Customer depends on supplier roadmap |\n| Natural internal API pattern | Conflicts if priorities differ |\n\n**Example:**\n\n```cml\n/* Order consumes inventory levels\n * Inventory team accepts feature requests from Order team\n */\nOrderContext [D,C]\u003c-[U,S] InventoryContext\n```\n\n---\n\n### Conformist (CF)\n\n**Definition:** Downstream context adopts upstream model wholesale, with no translation layer. The downstream team has no influence over upstream design.\n\n**Visual:**\n\n```text\n┌─────────────────┐ ┌─────────────────┐\n│ Upstream │ │ Downstream │\n│ (Dictates) │────►│ (Conforms) │\n│ │ │ │\n│ No negotiation│ │ Accepts model │\n└─────────────────┘ └─────────────────┘\n```\n\n**CML Syntax:**\n\n```cml\nDownstreamContext [D,CF]\u003c-[U] UpstreamContext\n```\n\n**When to Use:**\n\n- Third-party system you can't change\n- Upstream model is well-designed for your needs\n- Translation cost exceeds conformance cost\n- Rapid integration needed\n\n**Trade-offs:**\n\n| Pros | Cons |\n| ---- | ---- |\n| Fast integration | Upstream model leaks into domain |\n| No translation overhead | Vulnerable to upstream changes |\n| Simple implementation | Model may not fit domain language |\n| Good for stable APIs | Limited domain expression |\n\n**Example:**\n\n```cml\n/* Analytics conforms to the data warehouse schema\n * No point translating - schema is designed for our reports\n */\nAnalyticsContext [D,CF]\u003c-[U] DataWarehouseContext\n```\n\n**When NOT to Conform:**\n\n- Upstream model conflicts with your domain language\n- Upstream changes frequently\n- Model impedance causes significant friction\n- You have resources for an ACL\n\n---\n\n### Anti-Corruption Layer (ACL)\n\n**Definition:** Downstream context creates a translation layer to isolate itself from an incompatible upstream model.\n\n**Visual:**\n\n```text\n┌─────────────────┐ ┌─────────┐ ┌─────────────────┐\n│ Upstream │ │ ACL │ │ Downstream │\n│ (Foreign) │────►│Translate│────►│ (Protected) │\n│ │ │ │ │ │\n│ External model│ │ Adapter │ │ Domain model │\n└─────────────────┘ └─────────┘ └─────────────────┘\n```\n\n**CML Syntax:**\n\n```cml\nDownstreamContext [D,ACL]\u003c-[U] UpstreamContext\n```\n\n**When to Use:**\n\n- Upstream model doesn't match your domain language\n- Integrating with legacy systems\n- External third-party APIs\n- Protecting domain purity is important\n\n**Trade-offs:**\n\n| Pros | Cons |\n| ---- | ---- |\n| Domain model stays clean | Translation code to maintain |\n| Isolates from upstream changes | Performance overhead |\n| Clear boundary | More moving parts |\n| Enables domain evolution | Duplication of concepts |\n\n**Example:**\n\n```csharp\n// ACL: Translates external payment gateway to domain model\nnamespace Payment.Infrastructure.AntiCorruption;\n\npublic class PaymentGatewayAdapter : IPaymentService\n{\n private readonly ExternalPaymentClient _client;\n\n public async Task\u003cPaymentResult> ProcessPayment(PaymentRequest request)\n {\n // Translate domain model to external format\n var externalRequest = new GatewayPaymentRequest\n {\n Amount = request.Amount.Value,\n Currency = request.Amount.Currency.Code,\n CardToken = request.PaymentMethod.Token\n };\n\n // Call external service\n var response = await _client.ChargeAsync(externalRequest);\n\n // Translate response back to domain model\n return new PaymentResult(\n Success: response.Status == \"approved\",\n TransactionId: new TransactionId(response.Id),\n FailureReason: response.DeclineReason\n );\n }\n}\n```\n\n---\n\n### Open Host Service (OHS)\n\n**Definition:** Upstream context provides a formal, well-documented API for consumers. Multiple downstream contexts can integrate through this standardized interface.\n\n**Visual:**\n\n```text\n┌─────────────────┐ ┌─────────────────┐\n│ Upstream │ │ Downstream A │\n│ (Host) │────►│ │\n│ │ └─────────────────┘\n│ ┌─────────┐ │ ┌─────────────────┐\n│ │ API │───┼────►│ Downstream B │\n│ │(formal) │ │ └─────────────────┘\n│ └─────────┘ │ ┌─────────────────┐\n│ │────►│ Downstream C │\n└─────────────────┘ └─────────────────┘\n```\n\n**CML Syntax:**\n\n```cml\nDownstreamContext [D]\u003c-[U,OHS] UpstreamContext\n```\n\n**When to Use:**\n\n- Multiple consumers need the same data/service\n- API versioning and stability matter\n- External integrations planned\n- Team capacity for API design\n\n**Trade-offs:**\n\n| Pros | Cons |\n| ---- | ---- |\n| Standardized access | API design overhead |\n| Decoupled consumers | Versioning complexity |\n| Scalable integrations | Documentation burden |\n| Clear contract | Change management needed |\n\n---\n\n### Published Language (PL)\n\n**Definition:** A standardized, documented language/schema for cross-context communication. Often combined with Open Host Service.\n\n**CML Syntax:**\n\n```cml\nDownstreamContext [D]\u003c-[U,OHS,PL] UpstreamContext\n```\n\n**Common Formats:**\n\n- OpenAPI/Swagger specifications\n- Protocol Buffers (gRPC)\n- JSON Schema\n- AsyncAPI (for events)\n- GraphQL Schema\n\n**When to Use:**\n\n- Cross-team or cross-organization communication\n- Contractual integration requirements\n- Multiple programming languages involved\n- Long-term API stability needed\n\n**Example:**\n\n```yaml\n# OpenAPI spec as Published Language\nopenapi: 3.0.0\ninfo:\n title: Inventory API\n version: 1.0.0\npaths:\n /products/{id}/availability:\n get:\n summary: Get product availability\n responses:\n '200':\n description: Availability information\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/Availability'\n```\n\n---\n\n## No Integration Pattern\n\n### Separate Ways (SW)\n\n**Definition:** Two contexts have no meaningful relationship and evolve independently. Integration would add complexity without proportional value.\n\n**Visual:**\n\n```text\n┌─────────────────┐ ┌─────────────────┐\n│ Context A │ │ Context B │\n│ │ │ │\n│ Independent │ ✗ │ Independent │\n│ │ │ │\n└─────────────────┘ └─────────────────┘\n```\n\n**CML Syntax:**\n\nNot typically represented in CML (absence of relationship).\n\n**When to Use:**\n\n- No data or process dependencies exist\n- Integration cost exceeds value\n- Contexts serve different business capabilities\n- Duplicate data is acceptable (or required by compliance)\n\n**Trade-offs:**\n\n| Pros | Cons |\n| ---- | ---- |\n| Complete autonomy | Potential duplication |\n| No coordination needed | No shared learning |\n| Simple deployment | Manual sync if needed later |\n| Fast independent evolution | Harder to integrate later |\n\n**Example:**\n\nMarketing analytics context has no relationship with internal HR system - they serve completely different purposes and duplicating employee counts is fine.\n\n---\n\n## Pattern Combinations\n\nPatterns are often combined:\n\n| Combination | Use Case |\n| ----------- | -------- |\n| `[U,S,OHS]` | Supplier provides formal API |\n| `[U,OHS,PL]` | Formal API with documented schema |\n| `[D,C,ACL]` | Customer with translation layer |\n| `[D,ACL]\u003c-[U,OHS,PL]` | Protected consumer of formal API |\n\n**Example Combined:**\n\n```cml\n/* Payment gateway: formal API with schema, consumer uses ACL */\nPaymentContext [D,ACL]\u003c-[U,OHS,PL] ExternalPaymentGateway\n```\n\n---\n\n## Quick Reference Table\n\n| Pattern | Direction | Team Dynamics | Technical Impl |\n| ------- | --------- | ------------- | -------------- |\n| Shared Kernel | Symmetric | Tight collaboration | Shared library |\n| Partnership | Symmetric | Equal peers | Bidirectional events |\n| Customer/Supplier | Asymmetric | Negotiated | Internal API |\n| Conformist | Asymmetric | Accept as-is | Direct model use |\n| Anti-Corruption Layer | Asymmetric | Protected | Adapter pattern |\n| Open Host Service | Asymmetric | Standardized | REST/gRPC API |\n| Published Language | Asymmetric | Contracted | OpenAPI/Protobuf |\n| Separate Ways | None | Independent | No integration |\n","content_type":"text/markdown; charset=utf-8","language":"markdown","size":13804,"content_sha256":"a9471cd745ec89d6f7e58658ba743871920c219acd13ccc40bf1285a2ee778d7"},{"filename":"references/pattern-selection.md","content":"# Context Mapping Pattern Selection Guide\n\nDecision framework for choosing the right context mapping pattern based on team dynamics, technical requirements, and organizational context.\n\n## Decision Flow\n\n### Step 1: Do the Contexts Share Code?\n\n```text\nDo the contexts share actual code (libraries, packages)?\n├── Yes → Consider Shared Kernel\n│ └── Is coordination manageable?\n│ ├── Yes → Shared Kernel [SK]\n│ └── No → Separate or use ACL\n└── No → Continue to Step 2\n```\n\n### Step 2: Is There Data/Service Flow?\n\n```text\nDoes data or service calls flow between contexts?\n├── No → Do teams need to collaborate?\n│ ├── Yes → Partnership [P]\n│ └── No → Separate Ways [SW]\n└── Yes → Continue to Step 3\n```\n\n### Step 3: Determine Direction\n\n```text\nWhich context provides and which consumes?\n├── Neither (bidirectional) → Partnership [P]\n└── Clear direction exists → Identify Upstream/Downstream\n └── Continue to Step 4\n```\n\n### Step 4: Assess Downstream Influence\n\n```text\nCan downstream team influence upstream API/model?\n├── No (external, legacy, or no leverage)\n│ └── Does upstream model fit downstream needs?\n│ ├── Yes → Conformist [CF]\n│ └── No → Anti-Corruption Layer [ACL]\n└── Yes → Customer/Supplier [C/S]\n └── Continue to Step 5\n```\n\n### Step 5: Assess Upstream API Strategy\n\n```text\nDoes upstream serve multiple consumers?\n├── Yes → Open Host Service [OHS]\n│ └── Need formal contract?\n│ └── Yes → Add Published Language [PL]\n└── No → Basic Customer/Supplier sufficient\n```\n\n## Quick Selection Matrix\n\n| Scenario | Pattern | Rationale |\n| -------- | ------- | --------- |\n| Same team, shared entities | Shared Kernel | Minimize duplication |\n| Two teams co-developing feature | Partnership | Equal collaboration |\n| Internal service dependency | Customer/Supplier | Negotiated API |\n| Third-party API integration | ACL | Protect domain |\n| Vendor API with good design | Conformist | Embrace their model |\n| Platform team serving others | OHS + PL | Standardized access |\n| No meaningful dependency | Separate Ways | Avoid coupling |\n\n## Factor Analysis\n\n### Team Dynamics Factors\n\n| Factor | Low | High |\n| ------ | --- | ---- |\n| **Collaboration frequency** | Separate Ways, ACL | SK, Partnership |\n| **Trust level** | ACL, Conformist | SK, Partnership, C/S |\n| **Downstream leverage** | Conformist, ACL | C/S, Partnership |\n| **Coordination capacity** | Separate Ways | SK, Partnership |\n\n### Technical Factors\n\n| Factor | Favors | Avoids |\n| ------ | ------ | ------ |\n| **Model compatibility** | Conformist, SK | ACL |\n| **API stability** | Conformist, OHS | Tight coupling |\n| **Performance critical** | Direct integration | Heavy translation |\n| **Multiple consumers** | OHS, PL | Point-to-point |\n\n### Organizational Factors\n\n| Factor | Pattern Guidance |\n| ------ | ---------------- |\n| **Same team** | SK or no boundary |\n| **Same org, different teams** | C/S, Partnership |\n| **Different orgs** | OHS, PL, ACL |\n| **Vendor/external** | ACL or Conformist |\n\n## Pattern Trade-off Analysis\n\n### Coupling vs Autonomy\n\n```text\nHigh Coupling ◄────────────────────────────► High Autonomy\n\nShared Kernel → Partnership → C/S → Conformist → ACL → Separate Ways\n```\n\n### Integration Effort vs Protection\n\n```text\nLow Effort ◄────────────────────────────► High Protection\n\nConformist → C/S → SK → Partnership → OHS → ACL\n```\n\n### Maintenance Cost\n\n| Pattern | Initial Cost | Ongoing Cost |\n| ------- | ------------ | ------------ |\n| Shared Kernel | Low | Medium-High |\n| Partnership | Medium | Medium |\n| Customer/Supplier | Medium | Low-Medium |\n| Conformist | Low | Low |\n| ACL | High | Medium |\n| OHS | High | Medium-High |\n| PL | High | Medium |\n| Separate Ways | None | None |\n\n## Anti-Patterns to Avoid\n\n### Wrong Pattern Selection\n\n| Situation | Wrong Choice | Why It Fails | Better Choice |\n| --------- | ------------ | ------------ | ------------- |\n| External API | Conformist | Model leaks, breaks on change | ACL |\n| Unstable upstream | Partnership | Assumes stability | C/S or ACL |\n| No real dependency | SK | Artificial coupling | Separate Ways |\n| Multiple consumers | Point-to-point C/S | Doesn't scale | OHS |\n\n### Pattern Smell Indicators\n\n**Shared Kernel Growing:**\n\n- More than 5 entities in kernel\n- Multiple teams blocked by kernel changes\n- Kernel has its own release cycle\n\n**Solution:** Split kernel or convert to C/S\n\n**Partnership Without Collaboration:**\n\n- One team always waiting on other\n- Decisions made unilaterally\n- No joint planning sessions\n\n**Solution:** Convert to C/S with clear upstream\n\n**ACL Without Value:**\n\n- Translation is 1:1 mapping\n- No domain concepts differ\n- ACL code is trivial\n\n**Solution:** Consider Conformist instead\n\n## Decision Record Template\n\nWhen selecting a pattern, document:\n\n```markdown\n## Context Relationship Decision\n\n**Contexts:** ContextA → ContextB\n**Pattern Selected:** [Pattern]\n**Date:** YYYY-MM-DD\n\n### Factors Considered\n- Team dynamics: [description]\n- Technical requirements: [description]\n- Organizational context: [description]\n\n### Alternatives Rejected\n- [Pattern]: [reason not chosen]\n\n### Trade-offs Accepted\n- [Trade-off 1]\n- [Trade-off 2]\n\n### Review Triggers\n- If [condition], reconsider pattern\n```\n\n## Evolution Paths\n\nPatterns can evolve as circumstances change:\n\n```text\nConformist ────────► ACL\n(when model friction increases)\n\nPartnership ────────► Customer/Supplier\n(when direction clarifies)\n\nCustomer/Supplier ──► Open Host Service\n(when more consumers appear)\n\nShared Kernel ──────► Customer/Supplier\n(when kernel becomes burden)\n\nSeparate Ways ──────► Any Pattern\n(when integration need emerges)\n```\n\n## Red Flags Checklist\n\nBefore finalizing pattern selection:\n\n- [ ] Have you identified clear upstream/downstream (if asymmetric)?\n- [ ] Have you assessed team leverage and collaboration capacity?\n- [ ] Have you considered model compatibility?\n- [ ] Have you evaluated future evolution needs?\n- [ ] Have you documented the decision rationale?\n- [ ] Have you identified review triggers?\n","content_type":"text/markdown; charset=utf-8","language":"markdown","size":6433,"content_sha256":"c5ed4c41fa7b21a28f4ecd094afa62f86065e4964c45b8a478c9333176ff04df"},{"filename":"references/team-topologies.md","content":"# Team Topologies and Context Mapping\n\nGuidance for aligning team structures with bounded context relationships.\n\n## Team Topologies Overview\n\nFrom Matthew Skelton and Manuel Pais's Team Topologies:\n\n| Team Type | Purpose | Context Mapping Relevance |\n| --------- | ------- | ------------------------- |\n| **Stream-aligned** | End-to-end flow of value | Owns bounded context(s) |\n| **Platform** | Internal services for others | OHS/PL provider |\n| **Enabling** | Helps others adopt practices | Supports multiple contexts |\n| **Complicated Subsystem** | Deep specialist knowledge | May own complex context |\n\n## Mapping Patterns to Team Structures\n\n### Shared Kernel\n\n**Team Structure:** Same team or tightly coupled teams\n\n```text\n┌─────────────────────────────────────┐\n│ Single Team │\n│ ┌─────────────┐ ┌─────────────┐ │\n│ │ Context A │ │ Context B │ │\n│ │ │ │ │ │ │ │\n│ │ └───────┼─┼──────┘ │ │\n│ │ SK │ │ │ │\n│ └─────────────┘ └─────────────┘ │\n└─────────────────────────────────────┘\n```\n\n**Recommendation:**\n\n- Single stream-aligned team owns both contexts\n- Or: Tight partnership with shared ownership\n- Shared kernel should be small enough for single team\n\n---\n\n### Partnership\n\n**Team Structure:** Two stream-aligned teams with interaction mode X-as-a-Service\n\n```text\n┌─────────────────┐ ┌─────────────────┐\n│ Team A │◄───►│ Team B │\n│ (Stream) │ │ (Stream) │\n│ │ │ │\n│ ┌───────────┐ │ │ ┌───────────┐ │\n│ │ Context A │ │ │ │ Context B │ │\n│ └───────────┘ │ │ └───────────┘ │\n└─────────────────┘ └─────────────────┘\n Collaboration Mode\n```\n\n**Recommendation:**\n\n- Both teams stream-aligned\n- Collaboration interaction mode\n- Regular joint planning sessions\n- Consider merging if collaboration too frequent\n\n---\n\n### Customer/Supplier\n\n**Team Structure:** Provider team and consumer team\n\n```text\n┌─────────────────┐\n│ Consumer Team │\n│ (Stream) │\n│ │\n│ ┌───────────┐ │ Feature\n│ │ Context A │ │◄─── Requests\n│ └─────┬─────┘ │\n└────────┼────────┘\n │ API\n │\n┌────────▼────────┐\n│ Provider Team │\n│ (Stream or │\n│ Platform) │\n│ ┌───────────┐ │\n│ │ Context B │ │\n│ └───────────┘ │\n└─────────────────┘\n```\n\n**Recommendation:**\n\n- Provider: Stream-aligned or Platform team\n- Consumer: Stream-aligned team\n- X-as-a-Service interaction mode\n- Provider roadmap influenced by consumer needs\n\n---\n\n### Conformist\n\n**Team Structure:** Consumer team accepting external model\n\n```text\n┌─────────────────┐\n│ Consumer Team │\n│ (Stream) │\n│ │\n│ ┌───────────┐ │\n│ │ Context A │ │\n│ │ (conforms)│ │\n│ └─────┬─────┘ │\n└────────┼────────┘\n │ Uses as-is\n │\n┌────────▼────────┐\n│ External/ │\n│ Vendor System │\n│ (No team │\n│ influence) │\n└─────────────────┘\n```\n\n**Recommendation:**\n\n- Consumer team accepts external model\n- No negotiation overhead\n- Consider ACL if model friction high\n\n---\n\n### Anti-Corruption Layer\n\n**Team Structure:** Consumer team with protective boundary\n\n```text\n┌─────────────────────────────────┐\n│ Consumer Team (Stream) │\n│ │\n│ ┌───────────┐ ┌───────────┐ │\n│ │ Context A │◄──│ ACL │ │\n│ │ (pure) │ │ (adapter) │ │\n│ └───────────┘ └─────┬─────┘ │\n└────────────────────────┼────────┘\n │ Translates\n │\n ┌──────────▼──────────┐\n │ External System │\n │ (foreign model) │\n └─────────────────────┘\n```\n\n**Recommendation:**\n\n- Consumer team owns ACL code\n- Team maintains translation layer\n- Enabling team may help with patterns\n\n---\n\n### Open Host Service\n\n**Team Structure:** Platform team serving multiple consumers\n\n```text\n ┌─────────────────┐\n │ Platform Team │\n │ │\n │ ┌───────────┐ │\n │ │ Context │ │\n │ │ + OHS │ │\n │ └─────┬─────┘ │\n └────────┼────────┘\n │ Formal API\n ┌───────────┼───────────┐\n │ │ │\n┌─────▼─────┐ ┌───▼───┐ ┌─────▼─────┐\n│ Team A │ │Team B │ │ Team C │\n│ (Stream) │ │(Stream)│ │ (Stream) │\n└───────────┘ └───────┘ └───────────┘\n```\n\n**Recommendation:**\n\n- Provider is Platform team\n- Consumers are Stream-aligned teams\n- X-as-a-Service interaction mode\n- API versioning essential\n\n---\n\n### Published Language\n\n**Team Structure:** Platform team with formal contracts\n\n```text\n┌─────────────────────────────────┐\n│ Platform Team │\n│ │\n│ ┌───────────┐ ┌───────────┐ │\n│ │ Context │ │ OpenAPI │ │\n│ │ │◄──│ Spec │ │\n│ └───────────┘ │ (PL) │ │\n│ └─────┬─────┘ │\n└────────────────────────┼────────┘\n │ Contract-first\n │\n Consumers generate clients\n from published spec\n```\n\n**Recommendation:**\n\n- Contract owned by Platform team\n- Contract-first development\n- Breaking changes managed carefully\n\n---\n\n## Interaction Modes by Pattern\n\n| Pattern | Recommended Mode | Frequency |\n| ------- | ---------------- | --------- |\n| Shared Kernel | Collaboration | High |\n| Partnership | Collaboration | Medium-High |\n| Customer/Supplier | X-as-a-Service | Medium |\n| Conformist | X-as-a-Service | Low |\n| ACL | X-as-a-Service | Low |\n| OHS | X-as-a-Service | Low |\n| PL | X-as-a-Service | Low |\n| Separate Ways | None | None |\n\n## Cognitive Load Considerations\n\n### Context-to-Team Mapping\n\n**Rule of Thumb:** One stream-aligned team should own 1-3 bounded contexts maximum.\n\n**Signs of Overload:**\n\n- Team context-switching between unrelated domains\n- Slow delivery due to too many responsibilities\n- Knowledge silos within team\n\n**Solutions:**\n\n- Split team along context boundaries\n- Create platform team for shared infrastructure\n- Use enabling team to reduce complexity\n\n### Pattern Complexity Impact\n\n| Pattern | Cognitive Load | Team Capacity Needed |\n| ------- | -------------- | -------------------- |\n| Shared Kernel | Medium | High coordination |\n| Partnership | High | High collaboration |\n| Customer/Supplier | Medium | Medium |\n| Conformist | Low | Low |\n| ACL | High | High translation |\n| OHS | High | High API design |\n| PL | High | High contract mgmt |\n| Separate Ways | Low | Independent |\n\n## Organizational Restructuring Signals\n\n### When to Split Teams\n\n- Shared Kernel growing too large\n- Partnership causing delays\n- Too many bounded contexts per team\n\n### When to Merge Teams\n\n- Frequent Partnership interactions\n- Small Shared Kernel with little coordination\n- Related contexts with aligned goals\n\n### When to Create Platform Team\n\n- Multiple OHS consumers\n- Common infrastructure needs\n- Reducing duplication across stream teams\n\n## Anti-Patterns\n\n| Anti-Pattern | Problem | Solution |\n| ------------ | ------- | -------- |\n| Single team, many contexts | Cognitive overload | Split by context boundary |\n| Shared Kernel across teams | Coordination overhead | Convert to C/S or split team |\n| Platform without consumers | Overhead without value | Merge into stream team |\n| Conformist by default | Model pollution | Evaluate ACL value |\n\n## Decision Template\n\nWhen aligning teams with contexts:\n\n```markdown\n## Team-Context Alignment Decision\n\n**Context:** [Context Name]\n**Pattern:** [Mapping Pattern]\n**Team Type:** [Stream/Platform/Enabling/Complicated]\n**Interaction Mode:** [Collaboration/X-as-a-Service/Facilitating]\n\n### Rationale\n[Why this alignment]\n\n### Cognitive Load Assessment\n- Team capacity: [evaluation]\n- Context complexity: [evaluation]\n- Sustainable: [yes/no]\n\n### Evolution Path\n[How this might change]\n```\n","content_type":"text/markdown; charset=utf-8","language":"markdown","size":10284,"content_sha256":"a2c5242c45e486e31ebd9ee24bccf4216ffe9493554cb7c4d1a424b164801f37"}],"content_json":{"type":"doc","content":[{"type":"heading","attrs":{"level":1},"content":[{"text":"Context Mapping Skill","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Interactive Mapping Configuration","type":"text"}]},{"type":"paragraph","content":[{"text":"Use AskUserQuestion to configure the context mapping session:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"yaml"},"content":[{"text":"# Question 1: Mapping Mode (MCP: DDD context mapping methodology)\nquestion: \"What level of context mapping analysis do you need?\"\nheader: \"Mode\"\noptions:\n - label: \"Full Analysis (Recommended)\"\n description: \"Systematically analyze all bounded contexts with CML output\"\n - label: \"Quick Overview\"\n description: \"Identify obvious relationships only (~3K tokens)\"\n - label: \"Guided Discovery\"\n description: \"Interactive, confirm each relationship with user\"\n - label: \"Pattern Focus\"\n description: \"Focus on specific integration patterns (ACL, OHS, etc.)\"\n\n# Question 2: Relationship Clarity (MCP: DDD upstream/downstream patterns)\nquestion: \"How clear are the context boundaries?\"\nheader: \"Clarity\"\noptions:\n - label: \"Well-Defined\"\n description: \"Bounded contexts identified, need relationship mapping\"\n - label: \"Partially Known\"\n description: \"Some contexts identified, may discover more\"\n - label: \"Exploratory\"\n description: \"Start from scratch, discover contexts and relationships\"\n - label: \"From Event Storm\"\n description: \"Use output from prior event storming session\"","type":"text"}]},{"type":"paragraph","content":[{"text":"Use these responses to select the appropriate mapping mode and calibrate discovery depth.","type":"text"}]},{"type":"paragraph","content":[{"text":"Map relationships between bounded contexts using Domain-Driven Design context mapping patterns. Produces Context Mapper DSL (CML) output and integration strategy recommendations.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"When to Use This Skill","type":"text"}]},{"type":"paragraph","content":[{"text":"Keywords:","type":"text","marks":[{"type":"strong"}]},{"text":" context mapping, bounded contexts, upstream, downstream, ACL, anti-corruption layer, shared kernel, customer supplier, open host service, published language, conformist, partnership, CML, integration patterns, domain relationships","type":"text"}]},{"type":"paragraph","content":[{"text":"Use this skill when:","type":"text","marks":[{"type":"strong"}]}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"After event storming when bounded contexts have been identified","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Defining integration strategies between domains","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Documenting domain relationships and dependencies","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Generating context map diagrams (Mermaid/PlantUML)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Creating Context Mapper DSL (CML) output","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Planning team boundaries based on context relationships","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Identifying where anti-corruption layers are needed","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Context Mapping Patterns","type":"text"}]},{"type":"paragraph","content":[{"text":"Eight strategic DDD patterns for defining context relationships:","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Symmetric Patterns (Equal Relationship)","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Pattern","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Abbrev","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Description","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Use When","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Shared Kernel","type":"text","marks":[{"type":"strong"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"SK","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Shared code/model between contexts","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Two contexts need identical domain logic","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Partnership","type":"text","marks":[{"type":"strong"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"P","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Equal collaboration, mutual dependency","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Teams co-evolve, no clear upstream/downstream","type":"text"}]}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Asymmetric Patterns (Upstream/Downstream)","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Pattern","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Abbrev","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Description","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Use When","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Customer/Supplier","type":"text","marks":[{"type":"strong"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"C/S","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Upstream supplies, downstream consumes","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Clear provider/consumer relationship","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Conformist","type":"text","marks":[{"type":"strong"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"CF","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Downstream adopts upstream model","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Downstream team has no leverage to negotiate","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Anti-Corruption Layer","type":"text","marks":[{"type":"strong"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"ACL","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Downstream translates upstream model","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Upstream model doesn't fit downstream needs","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Open Host Service","type":"text","marks":[{"type":"strong"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"OHS","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Upstream provides formal API","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Multiple consumers need standardized access","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Published Language","type":"text","marks":[{"type":"strong"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"PL","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Standardized API format (OpenAPI, etc.)","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Cross-team communication requires contract","type":"text"}]}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"No Integration","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Pattern","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Abbrev","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Description","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Use When","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Separate Ways","type":"text","marks":[{"type":"strong"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"SW","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"No integration, independent evolution","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Contexts have no meaningful relationship","type":"text"}]}]}]}]},{"type":"paragraph","content":[{"text":"For detailed pattern descriptions with examples:","type":"text","marks":[{"type":"strong"}]},{"text":" See ","type":"text"},{"text":"references/pattern-catalog.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/pattern-catalog.md","title":null}}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Pattern Selection Guide","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Decision Flow","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"text"},"content":[{"text":"Do the contexts share code or data model?\n├── Yes → Shared Kernel [SK]\n└── No → Is there a clear data/service flow?\n ├── No → Do teams collaborate equally?\n │ ├── Yes → Partnership [P]\n │ └── No → Separate Ways [SW]\n └── Yes → Identify Upstream (provider) and Downstream (consumer)\n └── Can downstream influence upstream's model?\n ├── No → Does upstream model fit downstream needs?\n │ ├── Yes → Conformist [CF]\n │ └── No → Anti-Corruption Layer [ACL]\n └── Yes → Customer/Supplier [C/S]\n └── Does upstream serve multiple consumers?\n ├── Yes → Add Open Host Service [OHS]\n │ └── Needs contract? → Add Published Language [PL]\n └── No → Basic C/S is sufficient","type":"text"}]},{"type":"paragraph","content":[{"text":"For detailed selection criteria:","type":"text","marks":[{"type":"strong"}]},{"text":" See ","type":"text"},{"text":"references/pattern-selection.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/pattern-selection.md","title":null}}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Context Mapper DSL (CML)","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Basic Syntax","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"cml"},"content":[{"text":"ContextMap \u003cMapName> {\n contains \u003cContext1>\n contains \u003cContext2>\n\n // Asymmetric: Downstream [D] \u003c- Upstream [U]\n \u003cDownstreamContext> [D,\u003cpatterns>]\u003c-[U,\u003cpatterns>] \u003cUpstreamContext>\n\n // Symmetric: Both sides equal\n \u003cContext1> [\u003cpatterns>]\u003c->[\u003cpatterns>] \u003cContext2>\n}","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Notation Reference","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Symbol","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Meaning","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"[D]","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Downstream context","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"[U]","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Upstream context","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"\u003c-","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Asymmetric relationship (upstream to downstream)","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"\u003c->","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Symmetric relationship","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"[D,C]","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Downstream + Customer","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"[U,S]","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Upstream + Supplier","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"[D,ACL]","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Downstream with Anti-Corruption Layer","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"[U,OHS,PL]","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Upstream with Open Host Service + Published Language","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"[SK]","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Shared Kernel (symmetric)","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"[P]","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Partnership (symmetric)","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"[CF]","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Conformist","type":"text"}]}]}]}]},{"type":"paragraph","content":[{"text":"For complete CML syntax:","type":"text","marks":[{"type":"strong"}]},{"text":" See ","type":"text"},{"text":"references/cml-syntax.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/cml-syntax.md","title":null}}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Multi-Mode Execution","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Mode Selection","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Mode","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Description","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Use When","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"full","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Systematically analyze all bounded contexts","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Comprehensive mapping, larger domains","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"quick","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Identify obvious relationships only","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Quick overview, small domains","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"guided","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Interactive, confirm each relationship","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Learning, validation, uncertain relationships","type":"text"}]}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Full Mode Protocol","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Inventory","type":"text","marks":[{"type":"strong"}]},{"text":" - List all bounded contexts with aggregates","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Dependency Scan","type":"text","marks":[{"type":"strong"}]},{"text":" - Identify data flow and service calls","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Pattern Assignment","type":"text","marks":[{"type":"strong"}]},{"text":" - Apply selection criteria systematically","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"CML Generation","type":"text","marks":[{"type":"strong"}]},{"text":" - Produce complete context map","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Diagram Generation","type":"text","marks":[{"type":"strong"}]},{"text":" - Create visual representation","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Review Output","type":"text","marks":[{"type":"strong"}]},{"text":" - Mark uncertain relationships for human review","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Quick Mode Protocol","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Context List","type":"text","marks":[{"type":"strong"}]},{"text":" - Enumerate known bounded contexts","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Obvious Relationships","type":"text","marks":[{"type":"strong"}]},{"text":" - Map clear upstream/downstream pairs","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Basic CML","type":"text","marks":[{"type":"strong"}]},{"text":" - Generate minimal context map","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Skip Ambiguous","type":"text","marks":[{"type":"strong"}]},{"text":" - Flag uncertain relationships for later","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Guided Mode Protocol","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Present Context Pair","type":"text","marks":[{"type":"strong"}]},{"text":" - Show two contexts to user","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Ask Relationship","type":"text","marks":[{"type":"strong"}]},{"text":" - \"Do these contexts interact?\"","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Determine Direction","type":"text","marks":[{"type":"strong"}]},{"text":" - \"Which provides data/services?\"","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Select Pattern","type":"text","marks":[{"type":"strong"}]},{"text":" - Present pattern options with explanations","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Confirm","type":"text","marks":[{"type":"strong"}]},{"text":" - Verify user agrees with classification","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Repeat","type":"text","marks":[{"type":"strong"}]},{"text":" - Continue for all context pairs","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Output Artifacts","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"1. Context Mapper DSL (CML) File","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"cml"},"content":[{"text":"/* Context Map: \u003cDomainName>\n * Generated: \u003cdate>\n * Source: Event storming session\n */\n\nContextMap \u003cDomainName>Map {\n contains \u003cContext1>\n contains \u003cContext2>\n // ... relationships\n}","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"2. Mermaid Diagram","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"mermaid"},"content":[{"text":"graph LR\n subgraph \"Core Domain\"\n A[Context1]\n end\n subgraph \"Supporting\"\n B[Context2]\n end\n A -->|pattern| B","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"3. Integration Strategy Report","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"markdown"},"content":[{"text":"## Integration Strategies\n\n### \u003cContext1> -> \u003cContext2>\n- **Pattern:** Customer/Supplier\n- **Direction:** Context1 (upstream) supplies Context2 (downstream)\n- **Rationale:** \u003cwhy this pattern>\n- **Implementation:** \u003ctechnical approach>\n- **Team Impact:** \u003corganizational considerations>","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"4. Team Topology Suggestions","type":"text"}]},{"type":"paragraph","content":[{"text":"Based on context relationships, suggest team boundaries following Team Topologies patterns (Stream-aligned, Platform, Enabling, Complicated Subsystem).","type":"text"}]},{"type":"paragraph","content":[{"text":"For team topology guidance:","type":"text","marks":[{"type":"strong"}]},{"text":" See ","type":"text"},{"text":"references/team-topologies.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/team-topologies.md","title":null}}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Integration with Event Storming","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Input from Event Storming","type":"text"}]},{"type":"paragraph","content":[{"text":"Context mapping consumes:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Bounded Contexts","type":"text","marks":[{"type":"strong"}]},{"text":" - Named domain boundaries with primary aggregates","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Domain Events","type":"text","marks":[{"type":"strong"}]},{"text":" - Events that cross context boundaries","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Commands","type":"text","marks":[{"type":"strong"}]},{"text":" - Operations that trigger cross-context communication","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Actors","type":"text","marks":[{"type":"strong"}]},{"text":" - Users/systems that interact with multiple contexts","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Workflow Integration","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"text"},"content":[{"text":"Domain Storytelling\n ↓ (understand business flow)\nEvent Storming\n ↓ (discover bounded contexts)\nContext Mapping ← YOU ARE HERE\n ↓ (define relationships)\nModular Architecture\n ↓ (implement structure)\nFitness Functions\n (enforce boundaries)","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Cross-Context Event Identification","type":"text"}]},{"type":"paragraph","content":[{"text":"When mapping contexts, identify:","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Events crossing boundaries","type":"text","marks":[{"type":"strong"}]},{"text":" - Indicate integration needs","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Shared aggregates","type":"text","marks":[{"type":"strong"}]},{"text":" - Potential Shared Kernel candidates","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Translation requirements","type":"text","marks":[{"type":"strong"}]},{"text":" - ACL candidates","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"API contracts","type":"text","marks":[{"type":"strong"}]},{"text":" - OHS/PL candidates","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Integration Strategies","type":"text"}]},{"type":"paragraph","content":[{"text":"For each pattern, there's a recommended technical implementation:","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Pattern","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Implementation Strategy","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Shared Kernel","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Shared NuGet package, common project reference","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Customer/Supplier","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Internal API, MediatR notifications","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Anti-Corruption Layer","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Adapter pattern, translation service","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Open Host Service","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"REST API, gRPC service","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Published Language","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"OpenAPI spec, Protobuf definitions","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Partnership","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Shared event bus, bilateral contracts","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Conformist","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Direct model adoption, no translation","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Separate Ways","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"No integration code needed","type":"text"}]}]}]}]},{"type":"paragraph","content":[{"text":"For detailed implementation guidance:","type":"text","marks":[{"type":"strong"}]},{"text":" See ","type":"text"},{"text":"references/integration-strategies.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/integration-strategies.md","title":null}}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Example Output","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"E-Commerce Domain Context Map","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"cml"},"content":[{"text":"/* Context Map: E-Commerce Platform\n * Generated: 2025-01-15\n * Bounded Contexts from event storming session\n */\n\nContextMap ECommercePlatform {\n contains OrderContext\n contains InventoryContext\n contains PaymentContext\n contains ShippingContext\n contains CustomerContext\n\n /* Order consumes inventory availability\n * Inventory owns stock truth, Order queries it\n */\n OrderContext [D,C]\u003c-[U,S] InventoryContext\n\n /* Payment isolates external gateway\n * Gateway has foreign model, needs translation\n */\n PaymentContext [D,ACL]\u003c-[U,OHS,PL] ExternalPaymentGateway\n\n /* Order and Shipping co-evolve\n * Both teams collaborate on fulfillment flow\n */\n OrderContext [P]\u003c->[P] ShippingContext\n\n /* Customer data shared\n * CustomerInfo value object used by multiple contexts\n */\n OrderContext [SK]\u003c->[SK] CustomerContext\n ShippingContext [SK]\u003c->[SK] CustomerContext\n}","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Honest Limitations","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"What This Skill Does Well","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Systematic pattern identification from bounded contexts","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"CML syntax generation for Context Mapper tooling","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Integration strategy recommendations based on patterns","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Team topology alignment suggestions","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Mermaid/PlantUML diagram generation","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"What Requires Human Input","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Team dynamics","type":"text","marks":[{"type":"strong"}]},{"text":" - Actual organizational politics and relationships","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Business priorities","type":"text","marks":[{"type":"strong"}]},{"text":" - Which integrations matter most","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Legacy constraints","type":"text","marks":[{"type":"strong"}]},{"text":" - Existing systems that limit options","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Change appetite","type":"text","marks":[{"type":"strong"}]},{"text":" - Organizational readiness for restructuring","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Trade-off decisions","type":"text","marks":[{"type":"strong"}]},{"text":" - When multiple patterns could work","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"All outputs clearly distinguish recommendations from requirements and flag uncertain classifications for human review.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Related Skills","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"event-storming","type":"text","marks":[{"type":"strong"}]},{"text":" - Discover bounded contexts (prerequisite)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"domain-storytelling","type":"text","marks":[{"type":"strong"}]},{"text":" - Understand business flow (optional prerequisite)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"modular-architecture","type":"text","marks":[{"type":"strong"}]},{"text":" - Implement module structure (next step)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"adr-management","type":"text","marks":[{"type":"strong"}]},{"text":" - Document integration decisions","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"architecture-documentation","type":"text","marks":[{"type":"strong"}]},{"text":" - Generate architecture diagrams","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"References","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Pattern Catalog","type":"text","marks":[{"type":"link","attrs":{"href":"references/pattern-catalog.md","title":null}}]},{"text":" - All 8 patterns with examples","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"CML Syntax","type":"text","marks":[{"type":"link","attrs":{"href":"references/cml-syntax.md","title":null}}]},{"text":" - Context Mapper DSL reference","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Pattern Selection","type":"text","marks":[{"type":"link","attrs":{"href":"references/pattern-selection.md","title":null}}]},{"text":" - Decision guide","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Integration Strategies","type":"text","marks":[{"type":"link","attrs":{"href":"references/integration-strategies.md","title":null}}]},{"text":" - Technical implementation","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Team Topologies","type":"text","marks":[{"type":"link","attrs":{"href":"references/team-topologies.md","title":null}}]},{"text":" - Organizational alignment","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"User-Facing Interface","type":"text"}]},{"type":"paragraph","content":[{"text":"When invoked directly by the user, this skill maps bounded context relationships.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Execution Workflow","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Parse Arguments","type":"text","marks":[{"type":"strong"}]},{"text":" - Extract bounded contexts source, mode, and output format. If no source provided, check for event storming output in ","type":"text"},{"text":"docs/event-storming/","type":"text","marks":[{"type":"code_inline"}]},{"text":" or ask the user.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Inventory Bounded Contexts","type":"text","marks":[{"type":"strong"}]},{"text":" - Parse input for context names, responsibilities, aggregates, published/consumed events, and team ownership.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Execute Based on Mode","type":"text","marks":[{"type":"strong"}]},{"text":":","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Full","type":"text","marks":[{"type":"strong"}]},{"text":": Spawn the ","type":"text"},{"text":"context-mapper","type":"text","marks":[{"type":"code_inline"}]},{"text":" agent for systematic analysis of all relationships with pattern selection rationale and team topology alignment.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Quick","type":"text","marks":[{"type":"strong"}]},{"text":": Identify obvious relationships from event pairs, API dependencies, and shared data access. Apply default patterns.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Guided","type":"text","marks":[{"type":"strong"}]},{"text":": Interactive relationship-by-relationship confirmation with evidence presentation and pattern suggestions.","type":"text"}]}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Generate Output","type":"text","marks":[{"type":"strong"}]},{"text":" - Produce CML file, Mermaid diagram, summary report with pattern distribution and team topology suggestions.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Save Results","type":"text","marks":[{"type":"strong"}]},{"text":" - Save to ","type":"text"},{"text":"docs/architecture/context-map.cml","type":"text","marks":[{"type":"code_inline"}]},{"text":" and ","type":"text"},{"text":"docs/architecture/context-map.md","type":"text","marks":[{"type":"code_inline"}]},{"text":" (or custom ","type":"text"},{"text":"--dir","type":"text","marks":[{"type":"code_inline"}]},{"text":").","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Suggest Follow-Ups","type":"text","marks":[{"type":"strong"}]},{"text":" - Recommend architecture documentation, ADRs for pattern decisions, fitness functions for boundaries.","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Version History","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"v1.0.0 (2025-12-22): Initial release - Context mapping patterns, CML output, multi-mode execution","type":"text"}]}]}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"Last Updated:","type":"text","marks":[{"type":"strong"}]},{"text":" 2025-12-22 ","type":"text"},{"text":"Model:","type":"text","marks":[{"type":"strong"}]},{"text":" claude-opus-4-5-20251101","type":"text"}]}]},"metadata":{"date":"2026-06-05","name":"context-mapping","author":"@skillopedia","source":{"stars":76,"repo_name":"claude-code-plugins","origin_url":"https://github.com/melodic-software/claude-code-plugins/blob/HEAD/plugins/enterprise-architecture/skills/context-mapping/SKILL.md","repo_owner":"melodic-software","body_sha256":"997c1966627256be05b7b4937267232c398a29239cc668fdbe16dd619dcc5f9e","cluster_key":"fe85cefb468aee5c62a61d1bb8aaba8d171cce01fe426ad7388ca6bf903594d5","clean_bundle":{"format":"clean-skill-bundle-v1","source":"melodic-software/claude-code-plugins/plugins/enterprise-architecture/skills/context-mapping/SKILL.md","attachments":[{"id":"ccc8403b-bb4d-5265-9278-2e4b0b7bf072","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/ccc8403b-bb4d-5265-9278-2e4b0b7bf072/attachment.md","path":"references/cml-syntax.md","size":6716,"sha256":"e78846378a77f633bce2a488360a2de72f44db95202829143d40987ce8bfc443","contentType":"text/markdown; charset=utf-8"},{"id":"9796afa8-e505-5aab-b3b3-003d8ec2df6d","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/9796afa8-e505-5aab-b3b3-003d8ec2df6d/attachment.md","path":"references/integration-strategies.md","size":15958,"sha256":"d8bd30b6117f9cd71cf52f7bcb7cc40bf2ec64123cdf5e25f7fd177b3edb8d26","contentType":"text/markdown; charset=utf-8"},{"id":"36e8ec83-0949-5f9d-8ae5-8bec53fe96e7","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/36e8ec83-0949-5f9d-8ae5-8bec53fe96e7/attachment.md","path":"references/pattern-catalog.md","size":13804,"sha256":"a9471cd745ec89d6f7e58658ba743871920c219acd13ccc40bf1285a2ee778d7","contentType":"text/markdown; charset=utf-8"},{"id":"80faf6ff-d907-57d9-acb6-6b00f9e33dba","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/80faf6ff-d907-57d9-acb6-6b00f9e33dba/attachment.md","path":"references/pattern-selection.md","size":6433,"sha256":"c5ed4c41fa7b21a28f4ecd094afa62f86065e4964c45b8a478c9333176ff04df","contentType":"text/markdown; charset=utf-8"},{"id":"3acfe9b2-0441-5e79-987d-c6c7f87a6407","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/3acfe9b2-0441-5e79-987d-c6c7f87a6407/attachment.md","path":"references/team-topologies.md","size":10284,"sha256":"a2c5242c45e486e31ebd9ee24bccf4216ffe9493554cb7c4d1a424b164801f37","contentType":"text/markdown; charset=utf-8"}],"bundle_sha256":"054609ce54e635453b15af3b0d88b34b378d23e551fb41c6adac3cc47cfc08d0","attachment_count":5,"text_attachments":5,"attachment_storage":"skillopedia-attachments-v1","binary_attachments":0,"excluded_attachments":[]},"cluster_size":1,"skill_md_path":"plugins/enterprise-architecture/skills/context-mapping/SKILL.md","import_metadata":{"date":"2026-06-05","author":"@skillopedia","version":"v1","category":"integrations-apis","category_label":"Integrations"},"exact_dupes_collapsed_into_this":0},"version":"v1","category":"integrations-apis","import_tag":"clean-skills-v1","description":"Map relationships between bounded contexts using DDD context mapping patterns. Use when defining upstream/downstream relationships, integration strategies (ACL, OHS, PL), or generating Context Mapper DSL output. Follows event storming for bounded context discovery.","allowed-tools":"Read, Write, Glob, Grep, Skill, Task, AskUserQuestion","argument-hint":"[bounded-contexts-file] [--mode full|quick|guided] [--output cml|diagram|both] [--input-dir \u003cpath>] [--dir \u003cpath>]"}},"renderedAt":1782986401840}

Context Mapping Skill Interactive Mapping Configuration Use AskUserQuestion to configure the context mapping session: Use these responses to select the appropriate mapping mode and calibrate discovery depth. Map relationships between bounded contexts using Domain-Driven Design context mapping patterns. Produces Context Mapper DSL (CML) output and integration strategy recommendations. When to Use This Skill Keywords: context mapping, bounded contexts, upstream, downstream, ACL, anti-corruption layer, shared kernel, customer supplier, open host service, published language, conformist, partnersh…