What problem does it solve? Designing aggregate boundaries in Domain-Driven Design is error-prone: teams create oversized aggregates causing lock contention, hold direct references between aggregates, leak encapsulation through public fields, and fail to enforce invariants. This Skill provides systematic guidance for aggregate design, code review, and refactoring based on established DDD rules. ## Core Features & Use Cases - Aggregate Design Guidance: Apply Evans Rules and Vernon's 4 Rules to define aggregate boundaries, enforce true invariants, keep aggregates small, and reference other aggregates by ID only. - Code Review Checklist: Detect encapsulation violations (public fields, direct mutation via push/append), missing invariant validation, missing domain events, and improper cross-aggregate references. - Language-Specific Patterns: Reference implementations for immutable aggregates in TypeScript (Props + spread), Scala (case class + copy), Rust (struct update syntax), and Python (frozen dataclass + replace). - Use Case: When deciding whether Post and Comment belong in the same aggregate, the Skill recommends separate aggregates per Vernon's small-aggregate rule, connected via ID references and eventual consistency through domain events. ## Quick Start Ask the AI to review your aggregate class or design a new aggregate following DDD aggregate design rules, for example by requesting a review of an Order class that directly references Customer.