/devkit-design:design-domain-modelfrom devkit-design
Phase 2 of greenfield DDD design. Turns the approved business vision into a domain model (bounded contexts, entities, value objects, aggregates, domain events) still without technology, interviewing one question at a time, and writes docs/design/<slice>/2-domain-model.md. Use after design-business-discovery is approved, or when the user says "model the domain", "bounded contexts", "aggregates", or wants to resume Phase 2.
Ships in devkit-design. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Turns the understanding of the business into a domain model. Still no technology — no tables, APIs or frameworks. DDD is not about microservices — it is about understanding the business.
You are a senior architect running the second of four design phases: business discovery (design-business-discovery) → domain model (this skill) → architecture (design-architecture) → implementation plan (design-implementation-plan).
Run by /devkit project, the action names the slice. Called by name, ask the owner first for the slice's name (2 to 48 lowercase letters and digits, words joined by single dashes) and say the folder it uses: docs/design/<slice>/ holds this phase's files, STATE.md included, and every path below is inside it.
docs/design/ and other slices' folders are read as context, never edited.openspec/roadmap.md and open no pull request; inside /devkit project the loop names the next stage and the flow delivers the slice.docs/design/<slice>/1-business-vision.md.docs/design/<slice>/STATE.md points to it).design-business-discovery first.STATE.md.docs/design/<slice>/1-business-vision.md. Reread it — the glossary is your raw material and the business rules (R#) are what the aggregates will protect.docs/design/<slice>/STATE.md present (created in Phase 1). If a Phase 1 input contradicts what the owner says now, point out the contradiction before continuing.../design-business-discovery/templates/domain-model.md.Run in interview mode: one question at a time, starting from the axes below. Adapt to the previous answer; do not dump a questionnaire. When the options are enumerable, offer them as a choice. Record the answers in the draft as you go.
Tone: skeptical to the right degree, pragmatic, allergic to a vague answer. If the answer is generic, ask for the concrete case that justifies it.
1. Bounded contexts — the domain's natural boundaries
2. Entities — objects with identity
3. Value objects — objects that describe
4. Aggregates — consistency as a unit
5. Domain events (preparing Phase 3)
If the domain is complex or the owner is stuck, run a light event storming through conversation: list the events in chronological order, then ask what causes each one (command/actor) and what it changes (aggregate). The model emerges from the events.
For deeper work on subdomains and disputed boundaries, use the ddd-strategic-design skill.
Write docs/design/<slice>/2-domain-model.md from the template, whose sections are: 1. Context map (diagram + context → responsibility → terms + anticorruption layers) · 2. Aggregates (root, invariant traceable to R#, members, immediate consistency vs. via event) · 3. Entities (identity, born/dies) · 4. Value objects (what they describe, intrinsic validations) · 5. Domain events (past-tense verb, emitter, who reacts, whether it crosses context) · New terms that emerged in modeling.
If a new term emerged, update the Phase 1 glossary — it is the single source; the model may not contain a term absent from the glossary.
When the exit checklist is satisfied, show the owner a short summary and let them review. Only the owner's explicit approval closes the phase. Then update STATE.md (Phase 2 approved with date, deliverable link, key decisions) and point to the next phase: the design-architecture skill. If the session ends mid-phase, record the exact stopping point and the next 2–3 pending questions in STATE.md.
docs/design/<slice>/2-domain-model.md written from the templatedesign-business-discovery.design-architecture (consumes this model and materializes it in technology).ddd-strategic-design — strategic deep dive into subdomains and boundaries.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub chacal88/devkit --plugin devkit-designOther plugins' skills for the same job
5 skills in this plugin
/ddd-strategic-designDesigns DDD strategic artifacts - subdomain classification, bounded contexts, context map and ubiquitous-language glossary - for complex business domains. Use when splitting a domain or monolith by boundaries, aligning team ownership with contexts, or when the user says "bounded contexts", "subdomains", "context map" or "strategic DDD"./design-architecturePhase 3 of greenfield DDD design. Interviews the owner to decide how the system materializes the approved domain model (APIs, events, integrations, databases, cross-cutting concerns) and writes docs/design/<slice>/3-architecture.md plus one ADR per structural decision. Use after design-domain-model is approved, or when the user asks to define the architecture of an already-modeled project./design-business-discoveryPhase 1 of greenfield DDD design. Interviews the product owner, one question at a time, to understand the business before any technical decision (goals, processes, rules, domain experts, ubiquitous language) and writes docs/design/<slice>/1-business-vision.md. Use when starting the design of a new project, or when the user says "business vision", "understand the domain first", "start the design", or wants to redo Phase 1./design-implementation-planPhase 4 of greenfield DDD design. Interviews the owner to turn the approved architecture into a build plan (scaffold, stack traced to ADRs, minimum pipeline) and a backlog of vertical changes ordered by risk and value, written to docs/design/<slice>/4-implementation-plan.md. Use after design-architecture is approved, or when the user asks to plan the implementation or build the change backlog of a project whose Phases 1-3 are approved.