Architecture & API Design
Compatible with Cursor, Claude Code, Cline, Roo Code, Antigravity

Monolith Decomposition into DDD Bounded Contexts

Deconstruct monoliths or complex systems into bounded contexts with clear domain events and data ownership.

MicroservicesDDDArchitectureSystem Design
Skill Objective

Decompose monolithic domain models into isolated bounded contexts, establishing single sources of truth, transactional outbox patterns, and event schemas.

Execution Workflow Procedure

Ordered steps the coding agent executes when performing this skill.

1

Map Core Domains & Bounded Contexts

Group business features into Core Domains, Supporting Subdomains, and Generic Subdomains.

2

Establish Data Ownership & Sagas

Assign exclusive database ownership per service and design Saga orchestration for distributed transactions.

3

Design Anti-Corruption Layers & Events

Define domain event schemas and ACLs to protect new services from legacy monolithic models.

Agent Safety Guardrails & Anti-Hallucination Rules

  • DO NOT share database tables across service boundaries.
  • DO NOT introduce distributed transactions without the Transactional Outbox pattern.

Expected Output Format

Bounded context map, event schemas, and Saga workflows.

🗺️ Bounded Context Map: Context boundaries and relationships.
⚡ Domain Event Schemas & Sagas: Asynchronous integration specifications.

Domain Verification Checks

Single Data Ownership: Guarantees database-per-service isolation.
Transactional Outbox: Guarantees reliable message publishing.
Anti-Corruption Layer: Protects new services from legacy coupling.

Example Agent Invocations

"Decompose our monolithic e-commerce application into isolated bounded contexts for order fulfillment and billing."
"Design the event-driven integration and Saga flow between user management and invoicing."

Install / Configure This Skill

# Place in .cursorrules or create .cursor/rules/monolith-ddd-bounded-context-decomposition.mdc
# Trigger: Whenever you perform monolith decomposition into ddd bounded contexts

---
name: monolith-ddd-bounded-context-decomposition
description: Decompose monolithic applications into Domain-Driven Design (DDD) bounded contexts with independent data ownership.
version: 1.0.0
compatibility: [Cursor, Claude Code, Cline, Roo Code, Antigravity]
---

# Monolith Decomposition into DDD Bounded Contexts

## Objective
Decompose monolithic systems into clean, decoupled bounded contexts with independent databases and event-driven Sagas.

## Workflow
1. **Context Mapping**: Identify core and supporting subdomains.
2. **Data Isolation**: Enforce single data ownership and define Transactional Outbox publishing.
3. **Integration Sagas**: Design event schemas and compensating transaction flows.
Complementary Agent Prompt

Need a quick one-time prompt for chat?

Try the Microservices Boundary & Domain-Driven Design Decomposition — a lightweight version designed for 1-click copying directly into Claude, ChatGPT, or Cursor chat.

View Prompt

SprintKit Workflow Integrations

Complementary tools and checklists to pair with this agent workflow.

Related Agent Skills

Explore related procedural workflows in this discipline.

All Skills

Technical Design Document (RFC / ADR) Generation

Generate thorough, engineering-ready Request for Comments (RFC) and Architecture Decision Records (ADRs).

ArchitectureRFCADR+2
4 workflow stepsView skill

Backward-Compatible RESTful API Design & OpenAPI Spec

Design or review RESTful API contracts for idempotency, pagination, error models, and non-breaking versioning.

APIRESTOpenAPI+2
4 workflow stepsView skill

Safe Legacy Code Modernization with Golden Master Tests

Safely modernize fragile legacy codebases using Martin Fowler refactoring patterns and characterization tests.

RefactoringClean CodeDesign Patterns+1
4 workflow stepsView skill