ddd-context-mapping

Detailed methodology for DDD (Domain-Driven Design) bounded context identification, context map creation, and event storming execution. Use this skill for 'bounded context', 'DDD', 'domain modeling', 'event storming', 'context map', 'aggregate design', 'ubiquitous language', and other domain analysis tasks. Enhances the domain analysis capabilities of domain-analyst and service-architect. Note: infrastructure deployment and code implementation are outside the scope of this skill.

495 stars

Best use case

ddd-context-mapping is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Detailed methodology for DDD (Domain-Driven Design) bounded context identification, context map creation, and event storming execution. Use this skill for 'bounded context', 'DDD', 'domain modeling', 'event storming', 'context map', 'aggregate design', 'ubiquitous language', and other domain analysis tasks. Enhances the domain analysis capabilities of domain-analyst and service-architect. Note: infrastructure deployment and code implementation are outside the scope of this skill.

Teams using ddd-context-mapping should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/ddd-context-mapping/SKILL.md --create-dirs "https://raw.githubusercontent.com/revfactory/harness-100/main/en/23-microservice-designer/.claude/skills/ddd-context-mapping/skill.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/ddd-context-mapping/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How ddd-context-mapping Compares

Feature / Agentddd-context-mappingStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Detailed methodology for DDD (Domain-Driven Design) bounded context identification, context map creation, and event storming execution. Use this skill for 'bounded context', 'DDD', 'domain modeling', 'event storming', 'context map', 'aggregate design', 'ubiquitous language', and other domain analysis tasks. Enhances the domain analysis capabilities of domain-analyst and service-architect. Note: infrastructure deployment and code implementation are outside the scope of this skill.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# DDD Context Mapping — Domain-Driven Design Context Mapping Guide

Systematic methodology from bounded context identification to context map creation.

## Event Storming Procedure

### Phase 1: Domain Event Collection
```
Rule: Express in past tense verbs
Examples: "Order was created", "Payment was approved", "Shipping was initiated"

Collection order:
1. List events from core business flows in chronological order
2. Add exception/failure events
3. Add external system events
```

### Phase 2: Command -> Event Mapping
```
[User/System] -> {Command} -> [Aggregate] -> <<Domain Event>>
[Customer]    -> {Create Order} -> [Order]  -> <<Order was created>>
[Payment System] -> {Approve Payment} -> [Payment] -> <<Payment was approved>>
```

### Phase 3: Aggregate Identification
```
Aggregate boundary criteria:
1. Transactional consistency boundary — groups of objects that must change together
2. Invariant protection — units that enforce business rules
3. Concurrency boundary — units that manage conflicts during concurrent access
```

### Phase 4: Bounded Context Derivation

| Signal | Meaning |
|--------|---------|
| Same word with different meanings | Context separation needed (e.g., "Account" = user account vs. financial account) |
| Owned by different teams | Organizational boundary = context boundary |
| Different change cadences | Independent deployment needed -> separate |
| Different data stores | Technical boundary = context boundary |

## Context Map Relationship Types

| Relationship | Symbol | Description | Example |
|-------------|--------|-------------|---------|
| **Shared Kernel** | SK | Shared domain model | Two teams using the same Entity |
| **Customer-Supplier** | C/S | Upstream/downstream relationship | Order (upstream) -> Shipping (downstream) |
| **Conformist** | CF | Downstream accepts upstream model as-is | Accepting external API model |
| **Anti-Corruption Layer** | ACL | Insert model translation layer | Integration with legacy system |
| **Open Host Service** | OHS | Provide public protocol | Public REST API |
| **Published Language** | PL | Shared language (schema) | Protobuf/Avro schema |
| **Separate Ways** | SW | Independent operation | Integration unnecessary |
| **Partnership** | P | Equal collaboration | Joint development by two teams |

```
Context Map Example:

+---------------+     OHS/PL      +-----------------+
| Order Mgmt    | ---------------> | Payment Process |
| (Order BC)    |                  | (Payment BC)    |
+-------+-------+                  +--------+--------+
        | C/S                               | C/S
        v                                   v
+---------------+     ACL          +-----------------+
| Shipping Mgmt | <--------------- | External PG     |
| (Shipping BC) |                  | (3rd Party)     |
+---------------+                  +-----------------+
```

## Aggregate Design Principles

### Sizing Criteria
```
Prefer small aggregates:
+-- Minimize transaction scope -> reduce concurrency conflicts
+-- Reduce memory usage
+-- Shrink change impact scope

Exceptions (larger aggregates allowed):
+-- Invariants span multiple entities
+-- Atomic consistency is absolutely required
+-- Cannot be replaced with eventual consistency
```

### Inter-aggregate Reference Rules
```
OK - ID reference: Order.customerId (only holds the Customer aggregate's ID)
NO - Direct reference: Order.customer (directly holds the Customer object)

Reasons:
1. Respects aggregate boundaries
2. Transaction isolation
3. Enables independent storage usage
```

## Ubiquitous Language Dictionary Template

```markdown
| Term | Context | Definition | Synonyms | Confusion/Antonyms |
|------|---------|-----------|----------|-------------------|
| Order | Order Management | Customer's product purchase request | Purchase order | Distinct from Cart |
| Account | User Management | Loginable user unit | User | Distinct from financial account |
| Account | Settlement Management | Settlement target financial account | Bank account | Distinct from user account |
```

## Service Decomposition Anti-patterns

| Anti-pattern | Symptoms | Resolution |
|-------------|----------|-----------|
| **Nanoservice** | Service is too small, only 1-2 APIs | Merge related services |
| **Distributed Monolith** | All services in synchronous call chains | Switch to event-driven async |
| **CRUD Service** | Acts as DB proxy without domain logic | Internalize domain logic |
| **God Service** | Excessive responsibilities in one service | Re-decompose based on bounded contexts |
| **Shared DB** | Multiple services using the same tables | Separate data ownership |

Related Skills

stakeholder-mapping

495
from revfactory/harness-100

crisis stakeholder mapping framework. situation-analyst and message-strategist agent crisis when stakeholderby response strategy establishto do when reference. 'stakeholder analysis', 'crisis etc.grade', 'impact assessment' request when usage. However, rate specialistdocument versus scope outside.

process-mapping

495
from revfactory/harness-100

process mapping method. process-analyst agent work flow analysisand visualizationto do when reference mapping technique and tabletechnique. 'SIPOC', 'process map', 'Value Stream Map' request when usage. However, BPM whensystem building specialist development scope outside.

type-mapping-encyclopedia

495
from revfactory/harness-100

RDBMS-to-RDBMS data type mapping tables, RDBMS-to-NoSQL conversion patterns, character set/collation conversion, and special type handling guide. Use this skill for requests involving 'type mapping', 'data type conversion', 'MySQL PostgreSQL conversion', 'Oracle migration', 'character set conversion', 'collation', 'AUTO_INCREMENT sequence', 'JSON type', etc. Enhances schema-mapper's type conversion capabilities. Note: ETL script writing and validation queries are outside the scope of this skill.

sustainability-audit

495
from revfactory/harness-100

Full audit pipeline for ESG/sustainability where an agent team collaborates to generate environmental, social, and governance assessments along with an integrated report and improvement plan. Use this skill for requests such as 'run an ESG audit', 'write a sustainability report', 'ESG assessment', 'carbon emissions calculation', 'ESG rating diagnosis', 'governance review', 'social responsibility assessment', 'GRI report', 'TCFD disclosure', 'ESG improvement plan', and other ESG/sustainability tasks. Also supports assessment of specific pillars (E/S/G) only or improving existing reports. However, actual on-site audit execution, third-party verification certificate issuance, ESG rating agency score changes, and carbon credit trading are outside the scope of this skill.

materiality-assessment

495
from revfactory/harness-100

ESG materiality assessment matrix. Referenced by the esg-reporter and improvement-planner agents when evaluating ESG issue materiality and setting priorities. Use for 'materiality assessment', 'importance analysis', or 'Materiality Matrix' requests. Stakeholder surveys and external certification are out of scope.

ghg-protocol

495
from revfactory/harness-100

GHG Protocol detailed guide. Referenced by the environmental-analyst agent when calculating and reporting greenhouse gas emissions. Use for 'GHG Protocol', 'carbon emissions', 'Scope 1/2/3', or 'carbon footprint' requests. Carbon credit trading and CDM project execution are out of scope.

citation-standards

495
from revfactory/harness-100

Academic citation and reference standards guide. Referenced by the paper-writer and submission-preparer agents when composing citations and references. Use for 'citation format', 'APA', or 'references' requests. Original paper retrieval and professional database access are out of scope.

academic-paper

495
from revfactory/harness-100

Full research pipeline for academic paper writing where an agent team collaborates to generate research design, experiment protocols, analysis, manuscript writing, and submission preparation. Use this skill for requests such as 'write an academic paper', 'research paper writing', 'help me write a paper', 'design a study', 'run statistical analysis', 'prepare journal submission', 'manuscript writing', 'research methodology design', 'hypothesis testing', 'academic writing', and other academic research paper tasks. Also supports analysis, rewriting, and submission preparation when existing data or drafts are available. However, actual data collection execution, official IRB submission, journal system login and upload, and running actual statistical software are outside the scope of this skill.

product-copy-formulas

495
from revfactory/harness-100

Product copy formula library. Referenced by the detail-page-writer and marketing-manager agents when writing purchase-driving copy. Use for 'product copy', 'marketing copy', or 'ad copy' requests. Ad placement and design mockup creation are out of scope.

ecommerce-launcher

495
from revfactory/harness-100

Full launch pipeline for e-commerce products where an agent team collaborates to generate product planning, detail pages, pricing strategy, marketing, and CS setup all at once. Use this skill for requests such as 'launch an e-commerce product', 'prepare a product launch', 'register a product on Naver Smart Store', 'launch on Coupang', 'create a detail page', 'develop a pricing strategy', 'create a marketing plan', 'launch prep', 'product planning brief', 'e-commerce CS manual', and other e-commerce product launch tasks. Also supports supplementing pricing/marketing/CS even when existing briefs or detail pages are provided. However, actual platform API integration (automated product registration), payment system development, logistics system integration, and real-time order management are outside the scope of this skill.

conversion-optimization

495
from revfactory/harness-100

Purchase conversion optimization framework. Referenced by the detail-page-writer and pricing-strategist agents when designing detail pages and pricing with a conversion focus. Use for 'conversion rate optimization', 'CRO', or 'purchase psychology' requests. A/B testing tool setup and funnel automation are out of scope.

real-estate-analyst

495
from revfactory/harness-100

Real estate investment analysis pipeline. An agent team collaborates to produce market research, location analysis, profitability analysis, risk assessment, and investment reports. Use this skill for requests such as 'analyze this real estate', 'apartment investment analysis', 'studio apartment yield', 'real estate market research', 'location analysis', 'real estate investment report', 'buy vs lease', 'reconstruction investment analysis', 'commercial property yield analysis', and other general real estate investment analysis tasks. Actual purchase contracts, brokerage services, interior design, and property management are outside the scope of this skill.