In short.
Lattice's domain-driven-design is an AI assistant skill for developers designing business-domain code, with checks whose effectiveness depends on the assistant following its instructions. It combines a component checklist, an anti-pattern scan and supporting examples, and also applies these checks to proposed models before implementation. Project principles can supplement or replace the defaults. Its scope is tactical domain-driven design within one repository and one bounded context; assistant compatibility, reliable checklist adherence and improvements in code quality are not established by the supplied material.
Researched and written by an AI model and checked by a second AI model. How it works
Coverage includes the complete supplied selected folder: skills/domain-driven-design/SKILL.md and skills/domain-driven-design/references/defaults.md, plus the repository-root LICENSE as the related notice, all at revision a772470df20aebdbfd9fa32c435901a876a750f0. Other Lattice skills, project configuration, custom principles, language-idioms documents and the optional collaborative-judgment framework are outside the supplied scope. Neither the skill nor its examples were executed. Installation, assistant compliance, integration behavior and resulting code quality remain unverified.
The overview
identity
This resource is the skills/domain-driven-design folder in techygarg/lattice, containing SKILL.md and references/defaults.md. It supplies instructions and reference material for an AI assistant. Domain-driven design organizes software around business concepts and rules; this skill concentrates on how those concepts become objects, transaction boundaries and events.
The original source location is [https://github.com/techygarg/lattice/tree/main/skills/domain-driven-design]. The supplied snapshot is pinned to revision a772470df20aebdbfd9fa32c435901a876a750f0.
assessment
The skill offers a concrete review structure for teams already using domain-driven design. Its strongest feature is connecting design choices to business invariants: rules that must remain true when state changes. It also identifies decisions with several valid answers, including aggregate size and object-creation patterns.
Its review process is expressed entirely as assistant instructions. A requested pass statement is therefore not independent proof of correctness. Usefulness will depend on the assistant's interpretation and the accuracy of the business requirements supplied to it; neither was assessed through execution.
users
The closest fit is developers and technical leads creating or changing domain models in an existing bounded context, meaning an area where business terms and rules have a consistent meaning. Beginners get definitions and pseudocode; experienced developers get explicit review criteria for invariants, identity, persistence and coordination.
Teams choosing service boundaries or coordinating several bounded contexts will need additional architectural guidance. Those strategic design concerns are explicitly outside the skill's scope.
capabilities
The checklist addresses entity identity, immutable value objects, aggregate boundaries, behavior-rich entities, domain events, pure domain services and object creation. An aggregate groups objects whose shared rules must hold within a transaction. The supporting reference also covers repositories and decomposition of oversized aggregates.
The anti-pattern scan targets data-only entities, meaningful values represented as unchecked primitives, oversized aggregates, cross-aggregate transactions and business logic placed outside the domain layer. Design mode applies the same scrutiny to proposed aggregate lists, classifications, events and contract types before code exists.
Using it
requirements
Practical use requires an assistant able to load the skill instructions and read their referenced files. The supplied material does not identify supported assistant products, models, versions, installation locations or a compatibility matrix.
Customization optionally uses a repository-root .lattice/config.yaml file and project documents. The skill also mentions a framework:collaborative-judgment integration when available; its implementation and availability are not established here.
mechanism
The skill first resolves project principles. A configured document with mode: override replaces the embedded defaults. Overlay mode, including an omitted mode, combines defaults with custom sections, replacing sections by matching headings. A missing configured document triggers a warning and fallback to the defaults.
A configured language-idioms document can adapt patterns through its Type System & Object Model section, taking precedence over pseudocode defaults. The assistant is then instructed to validate each component, scan for anti-patterns, correct violations and expose ambiguous decisions. These are behavioral instructions, with no executable enforcement supplied.
setup
Obtain SKILL.md together with references/defaults.md and preserve their relative paths. The entry file depends on that reference for detailed rules and examples. Retain the repository licence when copying or distributing the material.
Follow the chosen assistant's own skill-loading procedure; a host-specific installer is not documented in these files. Project configuration is optional. Before using custom principles, decide whether they should supplement the defaults or comprehensively replace them.
example
The reference illustrates a Course aggregate that combines enrollment and grading. Its decomposition example moves grading into CourseGradebook, linked by courseId, while Course retains the enrollment-capacity rule. The rationale is that the two areas have independent invariants.
A developer could present a similar model and ask the assistant which rules require an atomic update, which objects need identity and where events are necessary. The source example is pseudocode illustrating a design decision; it supplies no executed implementation or performance result.
Assessment & evidence
limitations
Coverage stops at tactical design in a single repository and bounded context. Context maps, microservice topology and bounded-context integration are excluded. The supplied material contains no automated checker, executable examples, assistant-compliance measurements or code-quality benchmarks.
Several defaults require careful interpretation. The reference strongly favors small aggregates and one aggregate modified per transaction. It also separates creation from persistence reconstitution and suggests bypassing creation-time validation on reload because stored data was previously valid. That assumption needs review where migrations, legacy records or invalid stored data are possible.
reasoning
The guidance is most useful when transaction requirements drive the discussion. Grouping objects by shared invariants provides a concrete basis for aggregate boundaries, while references by identity and pure domain services help separate persistence and orchestration from business rules.
The tradeoff is architectural commitment: splitting aggregates can introduce events, delayed consistency and compensating actions. The skill acknowledges boundary tradeoffs, so recommendations should explain which business rules permit delayed coordination before proposing a split.
alternatives
A developer can use the reference as a manual review checklist without loading the assistant skill. Teams with established principles can use an overlay for targeted differences or an override for a complete replacement, accepting responsibility for the replacement's coverage.
For cross-context architecture, separate strategic DDD guidance is needed. The reference names Evans's Domain-Driven Design and Vernon's Implementing Domain-Driven Design as influences, but their contents and any competing assistant skills were not assessed.
evidence
The skill's configuration behavior, review procedure, ambiguity handling and scope are documented in [https://raw.githubusercontent.com/techygarg/lattice/a772470df20aebdbfd9fa32c435901a876a750f0/skills/domain-driven-design/SKILL.md].
The aggregate, entity, value-object, repository and event guidance, including pseudocode examples, comes from [https://raw.githubusercontent.com/techygarg/lattice/a772470df20aebdbfd9fa32c435901a876a750f0/skills/domain-driven-design/references/defaults.md]. These documents establish intended behavior and teaching content, not observed assistant performance.
Access & freshness
costs
The MIT licence grants the stated permissions free of charge. The supplied files establish no assistant-provider price, subscription requirement, token usage, execution cost or expected savings. Total operating cost is unknown and would depend on the chosen assistant and workload.
rights
The supplied repository-root MIT licence names Rahul Garg as copyright holder, dated 2026. It permits use, copying, modification, publication, distribution, sublicensing and sale, provided the copyright and permission notices accompany copies or substantial portions.
The licence provides the material without warranty and disclaims liability. The supplied scope contains no separate licence notice for either skill file. The original notice is available at [https://raw.githubusercontent.com/techygarg/lattice/a772470df20aebdbfd9fa32c435901a876a750f0/LICENSE].
freshness
The supplied snapshot was captured on 17 November 2026 at 08:35:26 UTC and identifies revision a772470df20aebdbfd9fa32c435901a876a750f0. The pinned source addresses identify that snapshot independently of changes to main.
A release version, last-maintenance date, supported assistant versions and changes after the captured revision are unknown from the supplied material.
actions
Before adoption, compare the default rules with the project's actual consistency requirements and conventions. Choose overlay or override deliberately, and review the persistence-reconstitution assumption against the project's data lifecycle.
For an initial evaluation, use one bounded domain change and supply its business invariants explicitly. Check whether the assistant reads the reference, identifies ambiguous boundaries and gives concrete reasons for proposed changes. These are suggested evaluation steps; no such evaluation was executed.
