What problem does it solve? Domain invariants often get scattered across services and duplicated in application code, causing inconsistent business rules and concurrency bugs. This Skill guides the implementation of a single Aggregate root that owns its invariants in one place, tested once, with state protected from outside mutation. ## Core Features & Use Cases - Invariant ownership: Writes each declared invariant exactly once inside the Aggregate root, with one invariant-test per invariant translating the user's natural-language tests (tests_nl) into executable contract tests. - State confinement: Enforces private setters, named predicates instead of raw field exposure, soft-delete only, and primitive/Published Language identity at the boundary. - Concurrency correctness: Requires genuinely multi-threaded contention tests for any concurrency claim and guards against check-then-act (TOCTOU) bugs with atomic all-or-nothing operations. - Use Case: When a building-block manifest marks a block as type = aggregate — for example a Product block with the rule "a deactivated product cannot be sold" — the worker loads this Skill to produce the root, its value objects, and JVM-safe INV-n tagged tests that stay green on their own. ## Quick Start Ask the worker to realize the aggregate block from your building-blocks manifest, for example: implement the Product aggregate with its invariants and invariant tests.