
V3 Ddd Architecture
Decompose claude-flow v3 god objects into bounded contexts with clean domain interfaces and a microkernel-style layout.
Overview
V3 DDD Architecture is an agent skill most often used in Build (also Ship, Operate) that designs bounded-context DDD structure for claude-flow v3 and splits orchestrator responsibilities into testable domains.
Install
npx skills add https://github.com/ruvnet/ruflo --skill v3-ddd-architectureWhat is this skill?
- Targets claude-flow v3 decomposition of a ~1,440-line orchestrator god object
- Bounded contexts: task, session, health, lifecycle, and event coordination domains
- Parallel agent tasks for architecture analysis, domain decomposition, and context mapping
- Clean architecture and microkernel pattern guidance for modular, testable agent flows
- Interface design step for domain boundaries under core$domains/
- 1,440-line orchestrator god object called out as problematic
- Five target domain areas under core$domains/
Adoption & trust: 627 installs on skills.sh; 58.5k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your claude-flow orchestrator became a god object that mixes tasks, sessions, health, and events, making changes risky and untestable.
Who is it for?
Indie developers scaling claude-flow v3 or similar agent orchestrators who need explicit domain boundaries before the next feature wave.
Skip if: Greenfield apps with no orchestrator debt or teams wanting a quick CRUD scaffold without architectural refactor work.
When should I use this skill?
Analyze current claude-flow v3 architecture and design DDD boundaries when orchestrator responsibilities are tangled across tasks, sessions, health, lifecycle, and events.
What do I get? / Deliverables
You get a modular DDD target architecture with mapped bounded contexts and domain interfaces ready to implement under core$domains/.
- Bounded context map
- Target modular folder layout under core$domains/
- Clean domain interface definitions
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
First appears in Build when structuring agent orchestration code, but refactoring boundaries also matters before Ship and during Operate maintenance. Backend subphase matches domain modeling, orchestrator splits, and service boundaries—not UI templates.
Where it fits
Map task and session domains before extracting methods from core$orchestrator.ts.
Validate that new PRs respect bounded contexts instead of growing the god object again.
Incremental domain splits when production incidents trace to mixed lifecycle and health logic.
How it compares
Architecture planning skill for agent backends, not a drop-in TanStack or REST API generator.
Common Questions / FAQ
Who is v3-ddd-architecture for?
Builders maintaining claude-flow v3 or comparable multi-agent stacks who need DDD boundaries instead of a single oversized orchestrator module.
When should I use v3-ddd-architecture?
Use it in Build when splitting backend agent code, in Ship before large refactors land, and in Operate when stabilizing modules after production pain from tangled orchestration.
Is v3-ddd-architecture safe to install?
Treat it as design guidance that may drive broad refactors; review Security Audits on this page and validate changes with tests before merging structural moves.
SKILL.md
READMESKILL.md - V3 Ddd Architecture
# V3 DDD Architecture ## What This Skill Does Designs and implements Domain-Driven Design (DDD) architecture for claude-flow v3, decomposing god objects into bounded contexts, implementing clean architecture patterns, and enabling modular, testable code structure. ## Quick Start ```bash # Initialize DDD architecture analysis Task("Architecture analysis", "Analyze current architecture and design DDD boundaries", "core-architect") # Domain modeling (parallel) Task("Domain decomposition", "Break down orchestrator god object into domains", "core-architect") Task("Context mapping", "Map bounded contexts and relationships", "core-architect") Task("Interface design", "Design clean domain interfaces", "core-architect") ``` ## DDD Implementation Strategy ### Current Architecture Analysis ``` ├── PROBLEMATIC: core$orchestrator.ts (1,440 lines - GOD OBJECT) │ ├── Task management responsibilities │ ├── Session management responsibilities │ ├── Health monitoring responsibilities │ ├── Lifecycle management responsibilities │ └── Event coordination responsibilities │ └── TARGET: Modular DDD Architecture ├── core$domains/ │ ├── task-management/ │ ├── session-management/ │ ├── health-monitoring/ │ ├── lifecycle-management/ │ └── event-coordination/ └── core$shared/ ├── interfaces/ ├── value-objects/ └── domain-events/ ``` ### Domain Boundaries #### 1. Task Management Domain ```typescript // core$domains$task-management/ interface TaskManagementDomain { // Entities Task: TaskEntity; TaskQueue: TaskQueueEntity; // Value Objects TaskId: TaskIdVO; TaskStatus: TaskStatusVO; Priority: PriorityVO; // Services TaskScheduler: TaskSchedulingService; TaskValidator: TaskValidationService; // Repository TaskRepository: ITaskRepository; } ``` #### 2. Session Management Domain ```typescript // core$domains$session-management/ interface SessionManagementDomain { // Entities Session: SessionEntity; SessionState: SessionStateEntity; // Value Objects SessionId: SessionIdVO; SessionStatus: SessionStatusVO; // Services SessionLifecycle: SessionLifecycleService; SessionPersistence: SessionPersistenceService; // Repository SessionRepository: ISessionRepository; } ``` #### 3. Health Monitoring Domain ```typescript // core$domains$health-monitoring/ interface HealthMonitoringDomain { // Entities HealthCheck: HealthCheckEntity; Metric: MetricEntity; // Value Objects HealthStatus: HealthStatusVO; Threshold: ThresholdVO; // Services HealthCollector: HealthCollectionService; AlertManager: AlertManagementService; // Repository MetricsRepository: IMetricsRepository; } ``` ## Microkernel Architecture Pattern ### Core Kernel ```typescript // core$kernel$claude-flow-kernel.ts export class ClaudeFlowKernel { private domains: Map<string, Domain> = new Map(); private eventBus: DomainEventBus; private dependencyContainer: Container; async initialize(): Promise<void> { // Load core domains await this.loadDomain('task-management', new TaskManagementDomain()); await this.loadDomain('session-management', new SessionManagementDomain()); await this.loadDomain('health-monitoring', new HealthMonitoringDomain()); // Wire up domain events this.setupDomainEventHandlers(); } async loadDomain(name: string, domain: Domain): Promise<void> { await domain.initialize(this.dependencyContainer); this.domains.set(name, domain); } getDomain<T extends Domain>(name: string): T { const domain = this.domains.get(name); if (!domain) { throw new DomainNotLoadedError(name); } return domain as T; } } ``` ### Plugin Architecture ```typescript // core$plugins/ interfa