ddd-tactical-patterns

Implement domain-driven design tactical patterns for aggregates, value objects, and domain events.

1|Updated Sep 11, 2025
One-click install
npx skills add https://github.com/Dhumitech/DHUMI-AI-RESOURCE --skill ddd-tactical-patterns-dhumitech
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ddd-tactical-patterns
Source: https://github.com/Dhumitech/DHUMI-AI-RESOURCE/tree/main/AI-Engineer-planner-Skills/00-plan/ddd-tactical-patterns
Command: npx skills add https://github.com/Dhumitech/DHUMI-AI-RESOURCE --skill ddd-tactical-patterns-dhumitech

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Guides developers to implement domain-driven design tactical patterns, ensuring invariants, boundaries, and rich domain behavior are correctly modeled in code.

Core Features & Use Cases

  • Invariants-first design to identify and model aggregates.
  • Immutable value objects for validated concepts.
  • Domain behavior encapsulated within domain objects rather than controllers.
  • Emission of domain events for meaningful state transitions.
  • Repositories positioned at aggregate root boundaries to maintain consistency.

Quick Start

Create a minimal Order aggregate example that enforces an invariant, supports a submit action, and emits a domain event on state change.

Frequently Asked Questions about ddd-tactical-patterns

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

FAQPage Schema
How do I model domain-driven design aggregates that enforce business invariants?

To model domain-driven design aggregates, define aggregate boundaries that encapsulate domain behavior and enforce invariants. Repositories should be positioned at the aggregate root to maintain consistency and prevent invalid state transitions across the domain layer.

When do I need domain events in a microservices architecture?

You need domain events in a microservices architecture when meaningful state transitions occur within an aggregate. Emitting domain events allows event-driven domain logic to communicate changes across microservices without tightly coupling the services.

What is the best way to design immutable value objects?

The best way to design immutable value objects is to validate concepts upon creation and ensure they remain unchanged. Immutability where appropriate guarantees that validated domain concepts maintain their integrity throughout their lifecycle.

Does domain-driven design work for layered architectures beyond microservices?

Yes, domain-driven design works for layered architectures beyond microservices. Applying tactical patterns ensures clear boundaries, invariant enforcement, and rich domain behavior encapsulation within domain objects rather than controllers across any architectural style.

How do I start building an Order aggregate that emits domain events?

To start building an Order aggregate, create a minimal example that enforces an invariant and supports a submit action. The aggregate should emit a domain event upon state change to signal the transition to other parts of the system.