ddd-tactical-design

Implements DDD tactical patterns including aggregates, value objects, repositories, and domain events.

3|2|Updated Feb 13, 2026
One-click install
npx skills add https://github.com/Yoodaddy0311/artibot --skill ddd-tactical-design-yoodaddy0311
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ddd-tactical-design
Source: https://github.com/Yoodaddy0311/artibot/tree/main/plugins/artibot/skills/ddd-tactical-design
Command: npx skills add https://github.com/Yoodaddy0311/artibot --skill ddd-tactical-design-yoodaddy0311

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Domain logic scattered across controllers and services leads to anemic models, broken invariants, and corrupted state under concurrent writes. This Skill structures business rules into proper Domain-Driven Design tactical patterns so invariants are enforced inside the domain model itself. ## Core Features & Use Cases - Tactical Pattern Guidance: Provides rules and TypeScript examples for Entity, Value Object, Aggregate, Repository, Domain Service, and Domain Event patterns. - Invariant-First Aggregate Design: Enforces consistency boundaries, ID-based references between aggregates, and one-transaction-per-aggregate rules. - Anti-Pattern Detection: Lists red flags such as public setters on aggregate roots, present-tense event names, and repositories returning child entities directly. - Use Case: When refactoring an order management module, use this Skill to convert an anemic Order class into a rich aggregate that validates submission rules, emits an OrderSubmitted domain event, and is persisted only through an OrderRepository interface. ## Quick Start Ask the AI to design the domain model for your order workflow using DDD tactical patterns with aggregates, value objects, and domain events.

Frequently Asked Questions about ddd-tactical-design

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

FAQPage Schema
How do I design an aggregate in DDD?▼

Identify the invariants the aggregate must protect first, then keep the aggregate small with a root entity and few child objects. Reference other aggregates by ID only, and limit each transaction to changing a single aggregate.

What is the difference between an entity and a value object?▼

Entities are compared by identity and can change state over their lifecycle, while value objects are immutable and compared by their attributes. Value objects validate at construction so invalid states can never exist in the domain.

When should I not use DDD tactical patterns?▼

Avoid DDD tactical patterns for simple CRUD APIs, admin dashboards, or data pipeline scripts where the domain has no invariants worth protecting. The aggregate, repository, and domain event overhead is unjustified without complex domain logic.

How should domain events be named and used?▼

Domain events use past-tense names like OrderSubmitted or PaymentReceived and are published only for meaningful state transitions. They can be dispatched synchronously within a transaction and trigger reactions in other aggregates or services.

Why should repositories only access aggregate roots?▼

Repositories restricted to aggregate roots preserve the consistency boundary and prevent external code from mutating child objects directly. Methods like findByItem that bypass the root leak persistence concerns and break invariants.