V3 DDD Architecture

Decomposes monolithic orchestrator code into bounded contexts using Domain-Driven Design patterns.

Updated May 8, 2026
One-click install
npx skills add https://github.com/FrekiManagarm/d-chambaud --skill v3-ddd-architecture-frekimanagarm
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: V3 DDD Architecture
Source: https://github.com/FrekiManagarm/d-chambaud/tree/main/.agents/skills/v3-ddd-architecture
Command: npx skills add https://github.com/FrekiManagarm/d-chambaud --skill v3-ddd-architecture-frekimanagarm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Large TypeScript codebases often accumulate god objects—like a 1,440-line orchestrator handling tasks, sessions, health, and lifecycle—which become untestable and hard to maintain. This Skill guides the decomposition of such monoliths into modular, bounded-context domains with clean architecture. ## Core Features & Use Cases - Domain Decomposition: Breaks god objects into focused domains (task management, session management, health monitoring, lifecycle, event coordination) with entities, value objects, services, and repositories. - Microkernel & Plugin Architecture: Implements a core kernel that loads domains and supports optional plugins like swarm coordination with declared dependencies. - Event-Driven Integration: Defines domain events, event handlers, and an event bus for loose coupling between bounded contexts. - Use Case: Refactoring a Claude Flow orchestrator into five independent domains, each under 300 lines, with >90% domain test coverage and clean dependency inversion. ## Quick Start Ask the AI to analyze the current orchestrator architecture and design DDD bounded contexts with clean interfaces and domain events.

Frequently Asked Questions about V3 DDD Architecture

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I break down a god object into DDD bounded contexts?▼

Identify the distinct responsibilities inside the god object, such as task management, session handling, and health monitoring, then extract each into its own domain with entities, value objects, services, and repositories. Wire them together through domain events rather than direct calls.

What is a microkernel architecture pattern in TypeScript?▼

A microkernel architecture uses a small core kernel that loads and manages domain modules at runtime, exposing them through a registry. Plugins declare dependencies on core domains and register additional services, enabling optional features like swarm coordination without modifying the kernel.

How do domain events enable loose coupling between bounded contexts?▼

Domain events let one context publish facts, such as TaskCompletedEvent, without knowing its consumers. Handlers in other contexts subscribe via an event bus and react independently, keeping domains isolated and testable.

When should I not use Domain-Driven Design for refactoring?▼

DDD adds structural overhead, so it is a poor fit for small codebases, simple CRUD applications, or prototypes with few business rules. It pays off mainly when domain logic is complex and multiple teams or modules must evolve independently.

How do I test domain logic after extracting it from an orchestrator?▼

Test entities and services in isolation using mocks for collaborators, verifying state changes and emitted domain events. Because the domain layer has no external dependencies, these unit tests run fast and target high coverage of business rules.