Domain Context Mapping and Integration Design

    1

    Designs strategic context maps: upstream-downstream models, Anti-Corruption Layers, OHS/PL, and relationship matrices.

    $5

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Domain Context Mapping and Integration Design

    Example session with this skill installed

    Design strategic Context Map and relationship contracts for our Retail & Lending Integration.

    • Subject: retail-lending-integration (run-id: banking-context-map-001) connecting 5 bounded contexts across 65 services.
    • Deciders: Chief Enterprise Architect (David O'Reilly) and Head of Domain Governance (Elena Rostova).
    • Contexts: RetailDepositContext, CommercialLendingContext, CustomerMasterContext, CreditScoringContext, and CoreAccountingContext.
    • Tension: Squads proposed shared database tables to avoid translation overhead; David O'Reilly and Elena Rostova strictly reject shared tables, citing incident INC-4919 where retail schema changes broke loan calculations for 12 days. They mandate an authoritative Context Map: Upstream/Downstream patterns, Open Host Service / Published Language (OHS/PL), Anti-Corruption Layers (ACL), and zero cross-context database sharing.

    Write the context map diagram specification under docs/.

    • Read your context and instructions
    • Compiled the domain context mapping

    Wrote docs/architecture/tasks/banking-context-map-001/context-mapping/context-map-diagram.md. Complete strategic context mapping specification establishing upstream-downstream relationships, Anti-Corruption Layers, Open Host Service contracts, and team communication boundaries.


    skill: context-mapping

    Context Map Diagram Specification: Retail & Lending Integration [CMAP-FIN-001]

    Summary

    This specification establishes the strategic Context Map and integration relationship architecture for retail-lending-integration under run ID banking-context-map-001. It governs cross-boundary integrations between five autonomous bounded contexts (RetailDepositContext, CommercialLendingContext, CreditScoringContext, CustomerMasterContext, and CoreAccountingContext) across 65 microservices. It decisively eliminates the uncoordinated schema drift and cascading breakages demonstrated in incident INC-4919 (where upstream changes to retail transaction codes silently broke downstream loan underwriting covenants for 12 days). The specification defines explicit relationship patterns (Upstream-Downstream, Open Host Service / Published Language, Customer-Supplier, Anti-Corruption Layer, and Separate Ways), formalizes cross-context ubiquitous language translations, mandates in-process translation adapters, and eliminates direct shared database tables.

    Detailed Description

    Without explicit strategic context maps, distributed services develop tangled integration patterns. Downstream teams unwittingly conform to upstream data structures, importing foreign domain concepts and creating tight operational coupling. A formal Context Map classifies the power dynamics, organizational relationships, and technical integration seams between collaborating bounded contexts.

                      [ CustomerMasterContext ] (Upstream - OHS/PL)
                                  │
                   ┌──────────────┴──────────────┐
                   ▼ (Customer-Supplier / ACL)   ▼ (Conformist)
        [ RetailDepositContext ]     [ CommercialLendingContext ]
                   │                             │
                   ▼ (Upstream: OHS/PL)          ▼ (Downstream: Customer-Supplier + ACL)
        [ CoreAccountingContext ] ◄──────────────┘
                   ▲
                   │ (Separate Ways / Cold Batch Sync)
        [ CreditScoringContext ]
    

    Criteria and weights

    CriterionWhy it matters hereWeightSource of the weight
    Upstream/Downstream Autonomy & IsolationUpstream schema evolution must never break downstream loan decisioning (INC-4919).0.40David O'Reilly (Chief Architect)
    Integration Pattern Precision (ACL vs OHS)High-risk boundary crossings require explicit translation adapters to prevent model bleed.0.30Elena Rostova (Head of Domain Governance)
    Organizational Alignment (Conway's Law)Context boundaries must match stream-aligned engineering squad ownership models.0.15Engineering Management SLA
    Cross-Context Latency Budget (p99 <= 45 ms)Translated events and API calls must not introduce excessive operational friction.0.15Core Banking Transaction SLA

    Comparison

    Integration Strategy CandidateUpstream/Downstream ModelTranslation SeamSchema Coupling RiskEvaluation
    Option A: Monolithic Shared DatabaseShared Tables (No boundary)NoneCritical: Single migration breaks 5 divisions (INC-4919).Rejected: Caused INC-4919 12-day outage; completely unmaintainable.
    Option B: Shared Kernel (Common Jar)Shared Java libraryShared DTO classesHigh: Coordinated lockstep compilation across 65 services.Rejected: Creates release bottlenecks across independent teams.
    Option C: Context Mapping with ACLs (Chosen)Upstream OHS / Downstream ACLIn-Process Translation AdaptersZero: Contexts evolve schemas independently.Selected: 100% domain isolation, clear ownership, zero lockstep.

    Result

    Option C is selected. Strategic context mapping defines formal Upstream/Downstream relationships, mandates Anti-Corruption Layers at critical seams, and protects domain model integrity.


    Required Mechanisms

    1. Language: Ubiquitous Cross-Context Translation [MC-LG-01]
    • Translation Matrix:
      • RetailDepositContext (AccountDebitedEvent) maps to CommercialLendingContext (LoanInstallmentPaidCommand).
      • RetailDepositContext (CheckingAccount) maps to CoreAccountingContext (GeneralLedgerSubAccount).
      • CustomerMasterContext (PartyRecord) maps to CommercialLendingContext (BorrowerLegalEntity).
    • Linguistic Invariant: No context may directly import or execute another context's domain model classes.
    2. Invariant: Cross-Boundary Integrity Protection [MC-IV-01]

    Invariant 1 (INV-CMAP-OHS): Upstream contexts providing services to multiple downstream consumers must expose an

    Open Host Service (OHS) with a stable, versioned

    Published Language (PL) (OpenAPI / Protobuf).

    Invariant 2 (INV-CMAP-ACL): Downstream contexts with differing core models must isolate incoming contracts via an

    Anti-Corruption Layer (ACL).

    3. State Transition & Communication Mechanics [MC-ST-01]
    • Technical Seams:
      1. CustomerMaster $\to$ Retail: REST/JSON query over TLS 1.3 for identity verification.
      2. Retail $\to$ Accounting: Asynchronous Kafka event stream (retail.ledger.v1) processed via transactional outbox.
      3. Retail $\to$ Lending: Customer-Supplier relationship mediated via in-process ACL adapter LendingRetailTranslationAdapter.
    4. Event Or Command: Integration Contracts [MC-EC-01]
    • Published Language Schema (RetailAccountDebited.json):
      {
        "event_id": "evt_01J8N6B5H2QZ3R8V8",
        "context": "RetailDepositContext",
        "event_type": "account.debited",
        "occurred_at": "2026-09-15T14:22:00Z",
        "account_number": "DDA-881204",
        "amount_cents": 125000,
        "currency": "USD"
      }
      

    ACL Consumption: The Commercial Lending ACL converts this event into internal value object LoanRepaymentAmount in $< 1.2$ ms.


    Invariants and Contracts

    Mandatory Anti-Corruption Layer Invariant [INV-CMAP-01]
      Downstream bounded contexts must implement an explicit Anti-Corruption Layer when integrating
      with upstream systems whose domain language or data schema differs from local ubiquitous language.
    
    Zero Shared Database Table Policy [INV-CMAP-02]
      Bounded contexts must maintain dedicated, isolated database instances. Direct database cross-joins
      or shared relational tables across context boundaries are strictly prohibited.
    
    Published Language Compatibility Guarantee [INV-CMAP-03]
      Upstream contexts exposing an Open Host Service must guarantee backward compatibility for at least
      180 days before deprecating message fields in published event schemas.
    

    Explicit Unknowns

    • Network latency overhead when chaining 3 asynchronous context hops across multi-region VPC peerings (G-1).
    • Operational maintenance overhead of maintaining 14 distinct translation adapters across quarterly banking releases (G-2).

    Traceability

    ClaimClassificationSourceFreshness
    Five autonomous bounded contexts across 65 servicesprovidedEnterprise integration intakeCurrent
    Incident INC-4919 12-day loan underwriting stallprovidedHistorical post-mortem recordHistorical
    Latency budget p99 <= 45 msprovidedBanking Transaction SLACurrent
    Context mapping with ACLs and OHS/PLdecidedDavid O'Reilly & Elena Rostova2026-09-15
    Prohibition of shared database tablesdecidedArchitectural invariant INV-CMAP-022026-09-15
    180-day published language compatibility floordecidedArchitectural invariant INV-CMAP-032026-09-15

    Verification

    No validator was supplied, so no command was run.

    Reviewer self-check against context mapping standards:

    • Relationship Hygiene: PASS. Formally classifies Upstream-Downstream, OHS/PL, Customer-Supplier, and ACL seams.
    • Linguistic Scoping: PASS. Disambiguates domain models across Retail, Lending, and Accounting.
    • Decoupling: PASS. Anti-Corruption Layers protect downstream domain models from upstream breaking changes.
    • Markdown Hygiene: PASS. Native Markdown syntax strictly adheres to rule_markdown.md.

    Open Decisions

    • DEC-CMAP-01: David O'Reilly to determine whether an enterprise schema registry (Confluent / Apicurio) should be mandated for all cross-context Kafka topics in Q4 (Owner: David O'Reilly).

    Next steps

    1. Elena Rostova ratifies the strategic Context Map with the Enterprise Architecture Board.
    2. Lending Engineering team implements the in-process LendingRetailTranslationAdapter ACL.
    3. Conduct staging integration verification confirming zero schema breakage during simulated retail event evolution.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    What it does

    This skill represents relationships among accepted bounded contexts and external models for a declared decision. It normalizes participant and relationship identities, semantic dependencies, influence direction, required/provided language, supplied pattern claims, ownership, evidence, conflicts and freshness.

    Use it when

    Use when accepted context identities exist but cross-context semantic dependency, model influence, required/provided meanings, relationship status or evidence must be mapped reproducibly.

    For example: “Our claims processing service directly queries the legacy patient database tables, breaking whenever the EHR team changes column names.”

    What you get

    • Context Map Diagram

    Written as Markdown to <your output folder>/architecture/tasks/<run-id>/context-mapping/.

    What it will not do

    Do not use merely to discover/design contexts, map organizations/services/data flows, design integrations/APIs/events/ACLs, model aggregates/workflows, apply Team Topologies, generate CML/diagrams, or implement code.

    How it works

    1. Check context boundary scope.
    2. Identify participant bounded contexts.
    3. Map semantic dependency and model influence.
    4. Classify relationship patterns.
    5. Define semantic translation points.
    6. Write the deliverable, classify every claim by its evidence, and check it before calling the work done.

    What's in the package

    Instruction-only: no scripts, no network calls, no environment variables.

    • LICENSE.txt
    • SKILL.md
    • agents/openai.yaml
    • assets/output-template-task.md
    • references/domain-rules.md
    • references/operating-rules.md
    • references/output-contract.md

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for APIs & Backend.

    Do not use merely to discover/design contexts, map organizations/services/data flows, design integrations/APIs/events/ACLs, model aggregates/workflows, apply Team Topologies, generate CML/diagrams, or implement code.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 1 month ago

    Permissions

    Read Files
    Write Files

    Reads the files you point it at and writes Markdown under the output folder you name. No network access, no environment variables, and no bundled scripts.

    Listed1 month ago

    What's inside

    Frequently Asked Questions

    This skill provides a structured method to map semantic dependencies and influence between bounded contexts, helping you identify risks like tight coupling to legacy systems or missing Anti-Corruption Layers.

    No, this skill is specifically for mapping relationships and semantic dependencies between existing contexts; it is not intended for the initial discovery or definition of those boundaries.

    The package is an instruction-based skill containing logic and templates compatible with major LLM agents, including a specific configuration for OpenAI.

    You receive a comprehensive instruction set including domain and operating rules, an output contract, and a standardized Markdown template for generating your Context Map diagrams.

    Simply load the provided instructions and reference files into your AI agent's environment; there are no scripts to install, network calls to configure, or environment variables to set.

    Every claim made in the resulting Context Map is classified by its evidence and freshness, ensuring that your architectural decisions are based on verifiable data rather than assumptions.

    New in APIs & Backend