Domain-Driven Design scaffolding -- bounded contexts, aggregate roots, domain events, and anti-corruption layers.
Transforms business domains into well-structured bounded contexts with aggregate roots, value objects, domain events, repositories, and anti-corruption layers. Stores the domain model as a navigable graph in AgentDB with hierarchical nodes and causal edges for context dependencies.
claude --plugin-dir plugins/ruflo-ddd| Agent | Model | Role |
|---|---|---|
domain-modeler |
sonnet | Map domains to bounded contexts, design aggregates with invariants, define domain events, generate ACL interfaces |
| Skill | Usage | Description |
|---|---|---|
ddd-context |
/ddd-context <context-name> |
Create a bounded context with standard directory structure |
ddd-aggregate |
/ddd-aggregate <context> <aggregate-name> |
Scaffold an aggregate root with entity, value objects, repository, events, and test stubs |
ddd-validate |
/ddd-validate |
Detect cross-context import violations and aggregate invariant issues |
# Context management
ddd context create <name>
ddd context list
# Aggregate scaffolding
ddd aggregate <context> <name>
ddd event <context> <name>
# Validation & visualization
ddd validate # Check domain boundary violations
ddd map # Visualize context map with relationshipssrc/<context-name>/
domain/
entities/ # Entities and aggregate root
value-objects/ # Immutable value objects
events/ # Domain events
services/ # Domain services
repositories/ # Repository interfaces
application/ # Use cases / application services
infrastructure/ # Repository implementations, ACL adapters
index.ts # Public API of the context
Detected via import analysis: upstream/downstream, ACL, shared kernel, published language. Boundary violations (direct cross-context imports) are flagged by ddd validate.
- CLI: pinned to
@claude-flow/cliv3.6 major+minor. - Verification:
bash plugins/ruflo-ddd/scripts/smoke.shis the contract.
This plugin owns the ddd-patterns AgentDB namespace (kebab-case, follows the convention from ruflo-agentdb ADR-0001 §"Namespace convention"). Reserved namespaces (pattern, claude-memories, default) MUST NOT be shadowed.
ddd-patterns stores reusable bounded-context shapes, aggregate templates, and event vocabularies for cross-project reuse. Accessed via memory_* tools (namespace-routed).
bash plugins/ruflo-ddd/scripts/smoke.sh
# Expected: "10 passed, 0 failed"ruflo-agentdb— namespace convention owner; backing store for the domain graphruflo-adr-- Document domain decisions as Architecture Decision Recordsruflo-sparc-- Architecture phase leverages DDD bounded context patternsruflo-migrations-- Align migration boundaries with aggregate roots
MIT