techygarg/lattice-domain-driven-design
Apply DDD tactical patterns when working with domain code. Enforces aggregate design, value objects over primitives, entity identity rules, and bounded context boundaries. Use when creating or modifying domain models, designing aggregates, working in the domain layer, or when the user mentions 'domain', 'aggregate', 'value object', 'entity', 'bounded context', or 'DDD'.
This is a copy. The original lives at techygarg/domain-driven-design.
npx skills add https://github.com/techygarg/lattice --skill domain-driven-design
Skill support project-custom. Resolution:
.lattice/config.yaml repo rootpaths.ddd_principles custom doc pathmode:mode: override (or no mode): Custom doc full precedence.Use instead embed default. Must comprehensive -- sole reference.
mode: overlay: Read embed ./references/defaults.md first, then applycustom doc section on top. Section custom replace match
section default (match by heading). New section append after default.
./references/defaults.mdpaths.language_idioms exist in config, read "Type System & Object Model" section and adapt entity, value object, and aggregate implementation patterns to language constructs (e.g., struct vs class, trait vs interface, data class vs record). Language idioms take precedence over pseudocode defaults.STOP after generating each component. Verify ALL before proceeding. STOP: If any check fails, fix before presenting. If check is a judgment call with multiple valid approaches (see Ambiguity Signals), flag — present options and reasoning rather than silently choosing.
Order.create(...)) or standalone factory class? Initial creation and reconstitution from persistence handle separate?After verify checklist above, scan output these specific anti-pattern. If find any, fix before present code.
Address or Money) may or may not need identity depend domain complexity. Apply identity test, but acknowledge when borderline.Skill operate within single repo, single bounded context (e.g., one API -- Order, User, Pricing). Cover tactical DDD pattern only -- not strategic DDD (no context map, no microservice topology, no bounded context integration).
If task appear span multiple bounded context (e.g., Order feature call Shipping logic), flag before proceed: "This task touches [Context A] and [Context B]. Cross-context integration is strategic DDD — outside this skill's scope. Would you like to scope to one context, or proceed knowing cross-context coordination is your responsibility?"
framework:architecture provide structural envelope -- where code live, which layer exist, which direction dependency flow. This skill define how craft domain *within* envelope: rich model, invariant, aggregate boundary, ubiquitous language.
See ./references/defaults.md for aggregate design rules, entity/value object/domain service/domain event/repository/creation patterns with code examples, inline anti-pattern warnings, and decomposition guide.
Take techygarg/lattice-domain-driven-design from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.