V3 DDD Architecture
Domain-Driven Design architecture for claude-flow v3. Implements modular, bounded context architecture with clean separation of concerns and microkernel pattern.
Install / Use
npx skills add spencermarx/open-code-review --skill v3-ddd-architectureInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of V3 DDD Architecture
V3 DDD Architecture scores 85/100 on our quality scale, 2544th of 4,716 Development & Engineering skills we index.
Its SKILL.md is 11 KB long, well organised into 33 sections with 17 code examples: a thorough specification that gives an agent plenty to work with.
It has 368 GitHub stars, a meaningful sign that others use it.
Maintenance, license and trust
- The repository was last updated about 4 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
- Our last check on 2026-11-04 found the source still online.
- It is released under the Apache-2.0 license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 98/100, with no cautions. These come from repository metadata, not a code audit ā read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-10-07. Automated pattern scan on 2026-10-07. It catches known dangerous patterns, not every risk ā read a skill before letting an agent act on it.
V3 DDD Architecture compared with similar skills
All 4 of these similar skills score higher than V3 DDD Architecture; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| V3 DDD Architecture (this skill)by spencermarx | 85 | 368 | 4mo ago | SKILL.md |
| taste-skillby Leonxlnx | 100 | 118.9k | 11d ago | CLAUDE.md |
| hyperframesby heygen-com | 100 | 87.1k | today | CLAUDE.md |
| ai-job-searchby ai-job-search-dev | 100 | 72.6k | today | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 47.5k | 5d ago | CLAUDE.md |
Frequently asked questions
- How do I install V3 DDD Architecture?
- Run
npx skills add spencermarx/open-code-review --skill "V3 DDD Architecture". The install tabs above show the steps for each supported agent. - Which AI agents does V3 DDD Architecture work with?
- It is written for Claude Code, as a SKILL.md file. Other agents that read the same format can often use it too.
- Is V3 DDD Architecture safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is Apache-2.0-licensed and scores 98/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is V3 DDD Architecture still maintained?
- The repository was last updated about 4 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
Skill content
View source on GitHubname: "V3 DDD Architecture" description: "Domain-Driven Design architecture for claude-flow v3. Implements modular, bounded context architecture with clean separation of concerns and microkernel pattern."
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
# 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
// 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
// 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
// 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
// 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
// core/plugins/
interface DomainPlugin {
name: string;
version: string;
dependencies: string[];
initialize(kernel: ClaudeFlowKernel): Promise<void>;
shutdown(): Promise<void>;
}
// Example: Swarm Coordination Plugin
export class SwarmCoordinationPlugin implements DomainPlugin {
name = 'swarm-coordination';
version = '3.0.0';
dependencies = ['task-management', 'session-management'];
async initialize(kernel: ClaudeFlowKernel): Promise<void> {
const taskDomain = kernel.getDomain<TaskManagementDomain>('task-management');
const sessionDomain = kernel.getDomain<SessionManagementDomain>('session-management');
// Register swarm coordination services
this.swarmCoordinator = new UnifiedSwarmCoordinator(taskDomain, sessionDomain);
kernel.registerService('swarm-coordinator', this.swarmCoordinator);
}
}
Domain Events & Integration
Event-Driven Communication
// core/shared/domain-events/
abstract class DomainEvent {
public readonly eventId: string;
public readonly aggregateId: string;
public readonly occurredOn: Date;
public readonly eventVersion: number;
constructor(aggregateId: string) {
this.eventId = crypto.randomUUID();
this.aggregateId = aggregateId;
this.occurredOn = new Date();
this.eventVersion = 1;
}
}
// Task domain events
export class TaskAssignedEvent extends DomainEvent {
constructor(
taskId: string,
public readonly agentId: string,
public readonly priority: Priority
) {
super(taskId);
}
}
export class TaskCompletedEvent extends DomainEvent {
constructor(
taskId: string,
public readonly result: TaskResult,
public readonly duration: number
) {
super(taskId);
}
}
// Event handlers
@EventHandler(TaskCompletedEvent)
export class TaskCompletedHandler {
constructor(
private metricsRepository: IMetricsRepository,
private sessionService: SessionLifecycleService
) {}
async handle(event: TaskCompletedEvent): Promise<void> {
// Update metrics
await this.metricsRepository.recordTaskCompletion(
event.aggregateId,
event.duration
);
// Update session state
await this.sessionService.markTaskCompleted(
event.aggregateId,
event.result
);
}
}
Clean Architecture Layers
// Architecture layers
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā Presentation ā ā CLI, API, UI
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā Application ā ā Use Cases, Commands
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā Domain ā ā Entities, Services, Events
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā Infrastructure ā ā DB, MCP, External APIs
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
// Dependency direction: Outside ā Inside
// Domain layer has NO external dependencies
Application Layer (Use Cases)
// core/application/use-cases/
export class AssignTaskUseCase {
constructor(
private taskRepository: ITaskRepository,
private agentRepository: IAgentRepository,
private eventBus: DomainEventBus
) {}
async execute(command: AssignTaskCommand): Promise<TaskResult> {
// 1. Validate command
await this.validateCommand(command);
// 2. Load aggregates
const task = await this.taskRepository.findById(command.taskId);
const agent = await this.agentRepository.findById(command.agentId);
// 3. Business logic (in domain)
task.assignTo(agent);
// 4. Persist changes
await this.taskRepository.save(task);
// 5. Publish domain events
task.getUncommittedEvents().forEach(event =>
this.eventBus.publish(event)
);
// 6. Return result
return TaskResult.success(task);
}
}
Module Configuration
Bounded Context Modules
// core/domains/task-management/module.ts
export const taskManagementModule = {
name: 'task-management',
entities: [
TaskEntity,
TaskQueueEntity
],
valueObjects: [
TaskIdVO,
TaskStatusVO,
PriorityVO
],
services: [
TaskSchedulingService,
TaskValidationService
],
repositories: [
{ provide: ITaskRepository, useClass: SqliteTaskRepository }
],
eventHandlers: [
TaskAssignedHandler,
TaskCompletedHandler
]
};
Migration Strategy
Phase 1: Extract Domain Services
// Extract services from orchestrator.ts
const extractionPlan = {
week1: [
'TaskManager ā task-management domain',
'SessionManager ā session-management domain'
],
week2: [
'HealthMonitor ā health-monitoring domain',
'LifecycleManager ā lifecycle-management domain'
],
week3: [
'EventCoordinator ā event-coordination domain',
'Wire up domain events'
]
};
Phase 2: Implement Clean Interfaces
// Clean separation with dependency injection
export class TaskController {
constructor(
@Inject('AssignTaskUseCase') private assignTask: AssignTaskUseCase,
@Inject('CompleteTaskUseCase') private completeTask: CompleteTaskUseCase
) {}
async assign(request: AssignTaskRequest): Promise<TaskResponse> {
const command = AssignTaskCommand.fromRequest(request);
const result = await this.assignTask.execute(command);
return TaskResponse.fromResult(result);
}
}
Phase 3: Plugin System
// Enable plugin-based extensions
const pluginSystem = {
core: ['task-management', 'session-management', 'health-monitoring'],
optional: ['swarm-coordination', 'learning-integration', 'performance-monitoring']
};
Testing Strategy
Domain Testing (London School TDD)
// Pure domain logic testing
describe('Task Entity', () => {
let task: TaskEntity;
let mockAgent: jest.Mocked<AgentEntity>;
beforeEach(() => {
task = new TaskEntity(TaskId.create(), 'Test task');
mockAgent = createMock<AgentEntity>();
});
it('should assign to agent when valid', () => {
mockAgent.canAcceptTask.mockReturnValue(true);
task.assignTo(mockAgent);
expect(task.assignedAgent).toBe(mockAgent);
expect(task.status.value).toBe('assigned');
});
it('should emit TaskAssignedEvent when assigned', () => {
mockAgent.canAcceptTask.mockReturnValue(true);
task.assignTo(mockAgent);
const events = task.getUncommittedEvents();
expect(events).toHaveLength(1);
expect(events[0]).toBeInstanceOf(TaskAssignedEvent);
});
});
Success Metrics
- [ ] God Object Elimination: orchestrator.ts (1,440 lines) ā 5 focused domains (<300 lines each)
- [ ] Bounded Context Isolation: 100% domain independence
- [ ] Plugin Architecture: Core + optional modules loading
- [ ] Clean Architecture: Dependency inversion maintained
- [ ] Event-Driven Communication: Loose coupling between domains
- [ ] Test Coverage: >90% domain logic coverage
Related V3 Skills
v3-core-implementation- Implementation of DDD domainsv3-memory-unification- AgentDB integration within bounded contextsv3-swarm-coordination- Swarm coordination as domain pluginv3-performance-optimization- Performance optimization across domains
Usage Examples
Complete Domain Extraction
# Full DDD architecture implementation
Task("DDD architecture implementation",
"Extract orchestrator into DDD domains with clean architecture",
"core-architect")
Plugin Development
# Create domain plugin
npm run create:plugin -- --name swarm-coordination --template domain
Related Skills
taste-skill
118.9kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
hyperframes
87.1kAI video you can actually edit. HyperFrames is a free, open-source AI video editor. Describe any video and get a real project you can change down to the frame.
ai-job-search
72.6kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
47.5kA visual, example-driven guide to Claude Code ā from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit ā see the Safety scan above for what the skill file itself contains.
