Skip to content

ddd-architect skill

Designs domain-driven architectures, from the bounded contexts of a system to the aggregates of one module, and reviews existing code against a catalogue of DDD rules with fixed severities. You get a strategic design in one shape, tactical code that follows the project’s own pattern choices, and review reports you can compare from one run to the next.

Models know domain-driven design, but unaided designs leave out what matters most and change shape at every run: context-map relationships with no pattern, aggregates without the invariants that fix their boundaries, primitive ids, effects on other aggregates made by direct calls or in a shared transaction, and review reports whose shape and severities differ each time. In tests without the skill, every tactical design used primitive ids and changed another aggregate by a direct call; with it, every design and review run passed. This skill guides the model to the same checks every time and follows the conventions each project chose, without imposing a form.

Ask in your own words; Claude Code picks the skill:

here are the PRD and the glossary of our ticketing platform: design the bounded contexts and the context map
design the aggregates for seat reservation and payment, with EF Core
review the Ordering module for DDD problems
show me how this repository implements DDD, as the reference for new code

On first use it may ask what the repository does not show. The strategic design goes where the project keeps working documents, or comes back in the reply with a question on where to save it. Reviews run in the ddd-reviewer agent, independent of whoever wrote the code, and come back as they are. When you explicitly ask for a design that breaks a rule, the skill builds it and records the waiver as a proposed ADR.

  • Tailoring file: .eng-skills/ddd-architect.md, or the path the project’s AGENTS.md / CLAUDE.md gives, created on first use from what the repository shows: stack, topology, modules and pattern choices. Before a review without one, the skill offers to create it.
  • Strategic design: one document with fixed sections, from subdomains and bounded contexts to the context map, the aggregates and the decisions to record.
  • Review report: a table with severity, rule ID, path:line and fix, a mentoring note per finding (why it matters, the next step, the pattern), the strengths to keep, the cases a project ADR waives, the decisions needed and what the review read.
  • Audit report: how the code implements each tactical pattern, described and not judged, with the commit, a path:line reference and the signature; it proposes the tailoring’s pattern choices and a pointer in AGENTS.md, applied only on your yes. When a reference file changes later, the skill warns.
  • ADRs: the decisions a design or review takes, offered to the adr skill as proposed.

A model of Sonnet class or above.

  • It does not write ADRs itself (the adr skill does) and is not for drawing diagrams alone.
  • Not for general code review that is not about the domain model.
  • Pattern templates are references, not binding implementations; stack-specific guidance covers .NET and EF Core only.
  • Not for layering or folder scaffolding of CRUD code with no domain rules.