[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6N7PC57ME1D8AWN75DM9K99":3,"skill-same:01M6N7PC57ME1D8AWN75DM9K99":64},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":24,"linkOnly":25,"markdownContent":26,"markdownBody":27,"frontMatter":28,"refName":29,"commitSha":30,"skillDirectory":31,"forksCount":32,"repositoryHtmlUrl":33,"repositoryHomepageUrl":6,"ownerHtmlUrl":34,"ownerBlogUrl":35,"ownerDescription":36,"updatedAt":37,"install":38,"resources":51},"01M6N7PC57ME1D8AWN75DM9K99","mh-cto-sdlc-domain-model",null,"Imad-Oute\u002FMicroHard","Imad-Oute","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F139675528?v=4","01M6N68WHDQ53HQJQ5Y84AGMWX","imad outemgount","01M6N68WP1YPV15H5RTGQHM02G",2,"MIT","https:\u002F\u002Fgithub.com\u002FImad-Oute\u002FMicroHard\u002Fblob\u002Fmain\u002Fsrc\u002Fdepartments\u002Fcto\u002Fsdlc\u002Fphase-1-analysis\u002Fmh-cto-sdlc-domain-model\u002FSKILL.md",[],[18,19,20,21,22,23],"model","sdlc","domain","domain model","cto","mh cto sdlc domain model","2026-11-10 10:12:30",false,"---\nname: mh-cto-sdlc-domain-model\ndescription: Phase 1 Analysis — builds the domain model for the problem space using DDD principles. Identifies core entities vs. value objects, aggregates, bounded contexts, context maps, and domain events. Establishes the ubiquitous language the entire team and all downstream skills will use. Updates mh-project-context.md with validated domain vocabulary. Run after user research. Trigger phrases: \"domain model\", \"define the domain\", \"what are the core concepts\", \"ubiquitous language\", \"domain entities\", \"build the domain model\", \"bounded contexts\", \"DDD\", \"aggregates\".\nmetadata:\n  author: MicroHard\n  version: 2.0.0\n  phase: 1-analysis\n  module: cto-sdlc\n---\n\n# Phase 1 — Domain Model\n\nYou are building the shared language and structure of the problem space.\n\nThe domain model is NOT the database schema (that belongs to Phase 4). It is the vocabulary\nand the rules — the named concepts, their boundaries, their relationships, and the invariants\nthat govern them — that everyone involved in this project must use consistently.\n\nA domain model built here means Phase 2 PRDs, Phase 3 UX, and Phase 4 architecture all speak\nthe same language. Skipping this or doing it loosely is how terminology drift produces\ncontradictory requirements six weeks later.\n\n**Load `ddd-reference.md` before beginning.** It contains quick-reference definitions for\nall DDD patterns used in this skill.\n\n## Before You Begin\n\nLoad user research synthesis, persona sketches, and project context from `persistent_facts`.\nThe behavioral patterns and persona workflows from user research are the raw material — they\nreveal what the domain actually consists of.\n\n## Step 1 — Entities vs. Value Objects\n\nWork through the user research output. Ask: \"What are the things that exist in this domain?\"\n\nFor each candidate concept, decide: **Entity or Value Object?**\n\n**Entity** — has identity; you can distinguish one instance from another. Has a lifecycle\n(created → modified → archived). Identity persists even when attributes change.\nExamples: User, Order, Project, Invoice, Campaign.\n\n**Value Object** — defined entirely by its attributes. No meaningful identity. Immutable and\nreplaceable — two instances with the same attributes are interchangeable.\nExamples: Money (amount + currency), Address, DateRange, EmailAddress, Color.\n\n**Why it matters:** Entities need IDs, lifecycle tracking, and repositories. Value Objects\nneed none of this — they are cloned, not updated. Treating a Value Object as an Entity\nadds accidental complexity.\n\nFor each candidate entity:\n\n- Does it have identity — can you distinguish one from another beyond its attributes?\n- Does it have a lifecycle — does it get created, modified, completed, archived?\n- Is this a domain concept or an implementation artifact? (Only domain concepts here)\n- Is this project-specific, or a general concept? (Only project-specific here)\n\nExtract the core concepts. Aim for 5–12 Entities. Value Objects are discovered alongside them.\n\n## Step 2 — Aggregate Design\n\nGroup related Entities and Value Objects into **Aggregates**. An Aggregate is a cluster of\nobjects that must change together to keep the domain consistent.\n\n**Rules for Aggregates:**\n\n1. **One Aggregate Root per Aggregate.** The root is the single entry point. Nothing outside\n   the aggregate holds a direct reference to internal entities — only to the root.\n\n2. **Cross-aggregate references use IDs only.** An Order references a Customer by `customerId`,\n   not by holding a Customer object. This prevents cascading changes across boundaries.\n\n3. **The Aggregate Root enforces invariants.** All business rules that span multiple entities\n   inside the aggregate are enforced by the root — not by individual entities.\n\n4. **Keep Aggregates small.** A well-designed aggregate is 1–3 entities. If an aggregate\n   has 7 entities inside it, decompose it. Large aggregates are a design smell.\n\nFor each identified aggregate:\n\n- Name the **Aggregate Root** (the entity that represents the aggregate externally)\n- Name the **internal entities** (only accessible through the root)\n- Name the **value objects** the aggregate contains\n- State the **invariant the root enforces** (the business rule that spans the aggregate)\n\n**Signal that your aggregate boundaries are wrong:**\n\n- You need to load the whole aggregate to do a simple read\n- Two aggregates always change in the same transaction\n- Internal entity IDs are referenced directly from outside\n\n## Step 3 — Relationship Mapping\n\nFor each pair of related Entities (at the aggregate root level), define the relationship explicitly:\n\n- Cardinality: one-to-one \u002F one-to-many \u002F many-to-many\n- Direction: which entity \"owns\" or \"contains\" the other?\n- Reference type: same aggregate (direct reference) or cross-aggregate (ID reference)?\n- Lifecycle coupling: when one is deleted or archived, what happens to the other?\n\nWrite relationships as declarative statements:\n\"An **Order** belongs to exactly one **Customer** (by customerId).\"\n\"A **Customer** has zero or many **Orders**.\"\n\"An **Invoice** is produced by exactly one **Order**.\"\n\nSurface ambiguous relationships explicitly — these are design decisions, not facts.\n\n## Step 4 — Bounded Context Identification\n\n**A Bounded Context is the boundary within which a particular model applies.** The same word\ncan mean entirely different things in different bounded contexts. \"Product\" in a catalog\ncontext is a different object from \"Product\" in an order fulfillment context — same word,\ndifferent model, different rules.\n\nAsk: \"Are there places in this system where the same word means different things to different\nteams, departments, or workflows?\"\n\n**Signals that a Bounded Context boundary exists:**\n\n- Different teams own different parts of the domain\n- The same term gets \"qualified\" in conversation (\"the billing customer vs. the marketing customer\")\n- A change in one area rarely touches the other\n- Two areas have their own separate data lifecycles\n- One area doesn't care about most of what the other tracks\n\nFor each Bounded Context identified:\n\n- Give it a name (noun phrase describing the domain within the boundary)\n- Name the Aggregate Roots that live inside it\n- Name the team or role responsible for it\n- Identify which terms are shared with other contexts (and which are context-specific)\n\n**If this is a small early-stage product:** You may have one Bounded Context, or two at most.\nThat is correct for this stage. Do not invent boundaries that don't exist yet. Name the one\nBounded Context and proceed. Premature context splitting is over-engineering.\n\n## Step 5 — Context Map\n\nIf more than one Bounded Context was identified, map the relationships between them.\n\nFor each pair of Bounded Contexts that share data or communicate:\n\n| Relationship pattern            | When to use                                                                                                                                                                                  |\n| ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **Shared Kernel**               | Two contexts share a small subset of the model. Changes to the shared part require both teams to agree. Use sparingly.                                                                       |\n| **Customer-Supplier**           | Upstream context produces; downstream context consumes. Upstream has power. Downstream requests changes.                                                                                     |\n| **Anti-Corruption Layer (ACL)** | Downstream translates the upstream model into its own model at the boundary. Protects the downstream from upstream changes. Use when the upstream model is messy or doesn't fit your domain. |\n| **Open Host Service**           | Upstream context exposes a stable, versioned API (a \"published language\") that multiple downstream contexts consume.                                                                         |\n| **Conformist**                  | Downstream accepts and uses the upstream model as-is. Use only when the upstream is stable and its model is acceptable.                                                                      |\n\nFor each context relationship:\n\n- Name the two contexts\n- Name the pattern\n- Identify who owns the translation\u002FAPI layer\n- State what data crosses the boundary\n\n**This becomes the integration design map in Phase 4 (integration-design).**\n\n## Step 6 — Strategic Classification\n\nClassify each Bounded Context as one of three strategic types:\n\n**Core Domain** — the differentiating part of your business. This is why your product exists.\nCompetitors cannot easily replicate this. **Invest heavily here** — best engineers, most\ndeliberate design, deepest testing.\n\n**Supporting Subdomain** — necessary to run the business but not differentiating. Useful,\nbut a competitor could build the same thing. Custom-build only if existing solutions don't\nfit. Apply good-enough engineering.\n\n**Generic Subdomain** — commodity functionality available in off-the-shelf solutions.\nAuthentication, billing infrastructure, email delivery. **Do not custom-build** — buy, use\na SaaS, or use an open source library. Building generics is one of the most common forms\nof waste in product development.\n\nFor each Bounded Context, state its classification and the reasoning:\n\"The **Order Fulfillment** context is Core Domain because our differentiation is the\nreal-time order routing algorithm — this is what customers pay for.\"\n\"The **Authentication** context is Generic Subdomain — we will use Auth0.\"\n\n## Step 7 — Invariants and Business Rules\n\nFor each Aggregate and cross-context boundary, surface the rules that must always be true:\n\n- \"An **Order** cannot be submitted without at least one **LineItem**.\"\n- \"An **Invoice** amount must equal the sum of its **LineItems**.\"\n- \"A **User** cannot be deleted if they have active **Orders**.\"\n\nAsk: \"What can NEVER be true in your domain? What would be data corruption?\"\nNegative constraints are often clearer than positive rules.\n\nThese become acceptance criteria in Phase 2 and test cases in Phase 5.\n\n## Step 8 — Domain Events\n\nName the significant state transitions — things that happen that other parts of the system\n(or other Bounded Contexts) care about.\n\nFormat: **{Entity}{PastTensedAction}** (e.g., OrderPlaced, InvoiceSent, UserDeactivated)\n\nFor each domain event:\n\n- Which Bounded Context does it originate in?\n- Which other Bounded Contexts consume it?\n- Is it consumed within the same aggregate, across aggregates, or across context boundaries?\n\nCross-context domain events become the integration contracts in Phase 4. Surface them now so\nPhase 4 doesn't invent them ad hoc.\n\n## Step 9 — Update Project Context\n\nUpdate `mh-project-context.md` at the project root with all validated domain terms.\nFollow the CONTEXT-FORMAT schema from `project-context-format.md`:\n\nFor each Entity and Aggregate Root: add a Language entry with definition and _Avoid_ alternatives.\nFor each Bounded Context: add a context entry naming the boundary and its scope.\nFlag any terms that were used ambiguously in Flagged Ambiguities.\n\n**Every term that appears in Phase 2 PRDs must exist in this file.** If Phase 2 introduces a\nterm that isn't here, the domain model is incomplete — return here to add it.\n\n## Red Flags — STOP and Revisit\n\n- An Entity has no lifecycle (it never changes state) — likely a Value Object\n- An Aggregate Root has 6+ entities inside it — split the aggregate\n- Two aggregates always change together in the same transaction — they may be one aggregate\n- A \"core\" entity appears in every Bounded Context — it's a Shared Kernel or you have one context\n- A term means different things in different conversations but no context boundary was drawn\n- Every context is \"Core Domain\" — reclassify honestly; generics should be bought, not built\n- The domain model reads like a database schema — you've modeled persistence, not the domain\n\n## Output Artifact\n\nSave to `_mh-output\u002Fcto\u002Fsdlc\u002Fdomain-model\u002F{date}_{run}_domain-model.md`:\n\n```markdown\n# Domain Model\n\n**Version:** 2.0\n**Date:** {date}\n**Context:** {project name}\n\n## Bounded Contexts\n\n| Context           | Type                        | Aggregate Roots | Owner       | Strategic classification  |\n| ----------------- | --------------------------- | --------------- | ----------- | ------------------------- |\n| **{ContextName}** | Core \u002F Supporting \u002F Generic | {root names}    | {team\u002Frole} | {rationale, one sentence} |\n\n## Context Map\n\n| Context A  | Relationship pattern                           | Context B  | Translation owner   | Data crossing boundary |\n| ---------- | ---------------------------------------------- | ---------- | ------------------- | ---------------------- |\n| {ContextA} | Customer-Supplier \u002F ACL \u002F Shared Kernel \u002F etc. | {ContextB} | {who owns the seam} | {what crosses}         |\n\n## Aggregates\n\n| Aggregate Root | Internal Entities  | Value Objects | Invariant enforced           |\n| -------------- | ------------------ | ------------- | ---------------------------- |\n| **{Root}**     | {entity1, entity2} | {vo1, vo2}    | {the rule the root enforces} |\n\n## Entities vs. Value Objects\n\n| Concept    | Type                  | Definition     | Lifecycle states                                  |\n| ---------- | --------------------- | -------------- | ------------------------------------------------- |\n| **{Name}** | Entity \u002F Value Object | {one sentence} | {for entities: created → active → archived, etc.} |\n\n## Relationships\n\n{Written as declarative statements, one per line}\n\n- A **{Entity}** belongs to exactly one **{Entity}** (by {entityId})\n- A **{Entity}** has zero or many **{Entity}**\n\n## Invariants\n\n| #   | Rule                  | Aggregate \u002F Context | Consequence of violation |\n| --- | --------------------- | ------------------- | ------------------------ |\n| 1   | {must always be true} | {where it lives}    | {what breaks}            |\n\n## Domain Events\n\n| Event              | Origin context | Consumer contexts    | Crosses context boundary? |\n| ------------------ | -------------- | -------------------- | ------------------------- |\n| **{EntityAction}** | {context}      | {context1, context2} | Yes \u002F No                  |\n\n## Flagged Ambiguities\n\n| Term   | Was confused with | Resolution                        |\n| ------ | ----------------- | --------------------------------- |\n| {term} | {other term}      | {clear distinction, one sentence} |\n\n## mh-project-context.md Update Summary\n\n{List the terms added or updated in the context file this session}\n```\n\n## Completion\n\n\"Domain model complete. [N] bounded contexts, [N] aggregates, [N] entities, [N] value objects,\n[N] invariants, [N] domain events.\n\nStrategic classification: [N] Core Domain, [N] Supporting, [N] Generic Subdomain.\n\n`mh-project-context.md` updated with [N] new or revised terms.\n\n**Next:** `\u002Fmh-cto-sdlc-journey-map` — map the current-state user journey through this domain.\"\n","# Phase 1 — Domain Model\n\nYou are building the shared language and structure of the problem space.\n\nThe domain model is NOT the database schema (that belongs to Phase 4). It is the vocabulary\nand the rules — the named concepts, their boundaries, their relationships, and the invariants\nthat govern them — that everyone involved in this project must use consistently.\n\nA domain model built here means Phase 2 PRDs, Phase 3 UX, and Phase 4 architecture all speak\nthe same language. Skipping this or doing it loosely is how terminology drift produces\ncontradictory requirements six weeks later.\n\n**Load `ddd-reference.md` before beginning.** It contains quick-reference definitions for\nall DDD patterns used in this skill.\n\n## Before You Begin\n\nLoad user research synthesis, persona sketches, and project context from `persistent_facts`.\nThe behavioral patterns and persona workflows from user research are the raw material — they\nreveal what the domain actually consists of.\n\n## Step 1 — Entities vs. Value Objects\n\nWork through the user research output. Ask: \"What are the things that exist in this domain?\"\n\nFor each candidate concept, decide: **Entity or Value Object?**\n\n**Entity** — has identity; you can distinguish one instance from another. Has a lifecycle\n(created → modified → archived). Identity persists even when attributes change.\nExamples: User, Order, Project, Invoice, Campaign.\n\n**Value Object** — defined entirely by its attributes. No meaningful identity. Immutable and\nreplaceable — two instances with the same attributes are interchangeable.\nExamples: Money (amount + currency), Address, DateRange, EmailAddress, Color.\n\n**Why it matters:** Entities need IDs, lifecycle tracking, and repositories. Value Objects\nneed none of this — they are cloned, not updated. Treating a Value Object as an Entity\nadds accidental complexity.\n\nFor each candidate entity:\n\n- Does it have identity — can you distinguish one from another beyond its attributes?\n- Does it have a lifecycle — does it get created, modified, completed, archived?\n- Is this a domain concept or an implementation artifact? (Only domain concepts here)\n- Is this project-specific, or a general concept? (Only project-specific here)\n\nExtract the core concepts. Aim for 5–12 Entities. Value Objects are discovered alongside them.\n\n## Step 2 — Aggregate Design\n\nGroup related Entities and Value Objects into **Aggregates**. An Aggregate is a cluster of\nobjects that must change together to keep the domain consistent.\n\n**Rules for Aggregates:**\n\n1. **One Aggregate Root per Aggregate.** The root is the single entry point. Nothing outside\n   the aggregate holds a direct reference to internal entities — only to the root.\n\n2. **Cross-aggregate references use IDs only.** An Order references a Customer by `customerId`,\n   not by holding a Customer object. This prevents cascading changes across boundaries.\n\n3. **The Aggregate Root enforces invariants.** All business rules that span multiple entities\n   inside the aggregate are enforced by the root — not by individual entities.\n\n4. **Keep Aggregates small.** A well-designed aggregate is 1–3 entities. If an aggregate\n   has 7 entities inside it, decompose it. Large aggregates are a design smell.\n\nFor each identified aggregate:\n\n- Name the **Aggregate Root** (the entity that represents the aggregate externally)\n- Name the **internal entities** (only accessible through the root)\n- Name the **value objects** the aggregate contains\n- State the **invariant the root enforces** (the business rule that spans the aggregate)\n\n**Signal that your aggregate boundaries are wrong:**\n\n- You need to load the whole aggregate to do a simple read\n- Two aggregates always change in the same transaction\n- Internal entity IDs are referenced directly from outside\n\n## Step 3 — Relationship Mapping\n\nFor each pair of related Entities (at the aggregate root level), define the relationship explicitly:\n\n- Cardinality: one-to-one \u002F one-to-many \u002F many-to-many\n- Direction: which entity \"owns\" or \"contains\" the other?\n- Reference type: same aggregate (direct reference) or cross-aggregate (ID reference)?\n- Lifecycle coupling: when one is deleted or archived, what happens to the other?\n\nWrite relationships as declarative statements:\n\"An **Order** belongs to exactly one **Customer** (by customerId).\"\n\"A **Customer** has zero or many **Orders**.\"\n\"An **Invoice** is produced by exactly one **Order**.\"\n\nSurface ambiguous relationships explicitly — these are design decisions, not facts.\n\n## Step 4 — Bounded Context Identification\n\n**A Bounded Context is the boundary within which a particular model applies.** The same word\ncan mean entirely different things in different bounded contexts. \"Product\" in a catalog\ncontext is a different object from \"Product\" in an order fulfillment context — same word,\ndifferent model, different rules.\n\nAsk: \"Are there places in this system where the same word means different things to different\nteams, departments, or workflows?\"\n\n**Signals that a Bounded Context boundary exists:**\n\n- Different teams own different parts of the domain\n- The same term gets \"qualified\" in conversation (\"the billing customer vs. the marketing customer\")\n- A change in one area rarely touches the other\n- Two areas have their own separate data lifecycles\n- One area doesn't care about most of what the other tracks\n\nFor each Bounded Context identified:\n\n- Give it a name (noun phrase describing the domain within the boundary)\n- Name the Aggregate Roots that live inside it\n- Name the team or role responsible for it\n- Identify which terms are shared with other contexts (and which are context-specific)\n\n**If this is a small early-stage product:** You may have one Bounded Context, or two at most.\nThat is correct for this stage. Do not invent boundaries that don't exist yet. Name the one\nBounded Context and proceed. Premature context splitting is over-engineering.\n\n## Step 5 — Context Map\n\nIf more than one Bounded Context was identified, map the relationships between them.\n\nFor each pair of Bounded Contexts that share data or communicate:\n\n| Relationship pattern            | When to use                                                                                                                                                                                  |\n| ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| **Shared Kernel**               | Two contexts share a small subset of the model. Changes to the shared part require both teams to agree. Use sparingly.                                                                       |\n| **Customer-Supplier**           | Upstream context produces; downstream context consumes. Upstream has power. Downstream requests changes.                                                                                     |\n| **Anti-Corruption Layer (ACL)** | Downstream translates the upstream model into its own model at the boundary. Protects the downstream from upstream changes. Use when the upstream model is messy or doesn't fit your domain. |\n| **Open Host Service**           | Upstream context exposes a stable, versioned API (a \"published language\") that multiple downstream contexts consume.                                                                         |\n| **Conformist**                  | Downstream accepts and uses the upstream model as-is. Use only when the upstream is stable and its model is acceptable.                                                                      |\n\nFor each context relationship:\n\n- Name the two contexts\n- Name the pattern\n- Identify who owns the translation\u002FAPI layer\n- State what data crosses the boundary\n\n**This becomes the integration design map in Phase 4 (integration-design).**\n\n## Step 6 — Strategic Classification\n\nClassify each Bounded Context as one of three strategic types:\n\n**Core Domain** — the differentiating part of your business. This is why your product exists.\nCompetitors cannot easily replicate this. **Invest heavily here** — best engineers, most\ndeliberate design, deepest testing.\n\n**Supporting Subdomain** — necessary to run the business but not differentiating. Useful,\nbut a competitor could build the same thing. Custom-build only if existing solutions don't\nfit. Apply good-enough engineering.\n\n**Generic Subdomain** — commodity functionality available in off-the-shelf solutions.\nAuthentication, billing infrastructure, email delivery. **Do not custom-build** — buy, use\na SaaS, or use an open source library. Building generics is one of the most common forms\nof waste in product development.\n\nFor each Bounded Context, state its classification and the reasoning:\n\"The **Order Fulfillment** context is Core Domain because our differentiation is the\nreal-time order routing algorithm — this is what customers pay for.\"\n\"The **Authentication** context is Generic Subdomain — we will use Auth0.\"\n\n## Step 7 — Invariants and Business Rules\n\nFor each Aggregate and cross-context boundary, surface the rules that must always be true:\n\n- \"An **Order** cannot be submitted without at least one **LineItem**.\"\n- \"An **Invoice** amount must equal the sum of its **LineItems**.\"\n- \"A **User** cannot be deleted if they have active **Orders**.\"\n\nAsk: \"What can NEVER be true in your domain? What would be data corruption?\"\nNegative constraints are often clearer than positive rules.\n\nThese become acceptance criteria in Phase 2 and test cases in Phase 5.\n\n## Step 8 — Domain Events\n\nName the significant state transitions — things that happen that other parts of the system\n(or other Bounded Contexts) care about.\n\nFormat: **{Entity}{PastTensedAction}** (e.g., OrderPlaced, InvoiceSent, UserDeactivated)\n\nFor each domain event:\n\n- Which Bounded Context does it originate in?\n- Which other Bounded Contexts consume it?\n- Is it consumed within the same aggregate, across aggregates, or across context boundaries?\n\nCross-context domain events become the integration contracts in Phase 4. Surface them now so\nPhase 4 doesn't invent them ad hoc.\n\n## Step 9 — Update Project Context\n\nUpdate `mh-project-context.md` at the project root with all validated domain terms.\nFollow the CONTEXT-FORMAT schema from `project-context-format.md`:\n\nFor each Entity and Aggregate Root: add a Language entry with definition and _Avoid_ alternatives.\nFor each Bounded Context: add a context entry naming the boundary and its scope.\nFlag any terms that were used ambiguously in Flagged Ambiguities.\n\n**Every term that appears in Phase 2 PRDs must exist in this file.** If Phase 2 introduces a\nterm that isn't here, the domain model is incomplete — return here to add it.\n\n## Red Flags — STOP and Revisit\n\n- An Entity has no lifecycle (it never changes state) — likely a Value Object\n- An Aggregate Root has 6+ entities inside it — split the aggregate\n- Two aggregates always change together in the same transaction — they may be one aggregate\n- A \"core\" entity appears in every Bounded Context — it's a Shared Kernel or you have one context\n- A term means different things in different conversations but no context boundary was drawn\n- Every context is \"Core Domain\" — reclassify honestly; generics should be bought, not built\n- The domain model reads like a database schema — you've modeled persistence, not the domain\n\n## Output Artifact\n\nSave to `_mh-output\u002Fcto\u002Fsdlc\u002Fdomain-model\u002F{date}_{run}_domain-model.md`:\n\n```markdown\n# Domain Model\n\n**Version:** 2.0\n**Date:** {date}\n**Context:** {project name}\n\n## Bounded Contexts\n\n| Context           | Type                        | Aggregate Roots | Owner       | Strategic classification  |\n| ----------------- | --------------------------- | --------------- | ----------- | ------------------------- |\n| **{ContextName}** | Core \u002F Supporting \u002F Generic | {root names}    | {team\u002Frole} | {rationale, one sentence} |\n\n## Context Map\n\n| Context A  | Relationship pattern                           | Context B  | Translation owner   | Data crossing boundary |\n| ---------- | ---------------------------------------------- | ---------- | ------------------- | ---------------------- |\n| {ContextA} | Customer-Supplier \u002F ACL \u002F Shared Kernel \u002F etc. | {ContextB} | {who owns the seam} | {what crosses}         |\n\n## Aggregates\n\n| Aggregate Root | Internal Entities  | Value Objects | Invariant enforced           |\n| -------------- | ------------------ | ------------- | ---------------------------- |\n| **{Root}**     | {entity1, entity2} | {vo1, vo2}    | {the rule the root enforces} |\n\n## Entities vs. Value Objects\n\n| Concept    | Type                  | Definition     | Lifecycle states                                  |\n| ---------- | --------------------- | -------------- | ------------------------------------------------- |\n| **{Name}** | Entity \u002F Value Object | {one sentence} | {for entities: created → active → archived, etc.} |\n\n## Relationships\n\n{Written as declarative statements, one per line}\n\n- A **{Entity}** belongs to exactly one **{Entity}** (by {entityId})\n- A **{Entity}** has zero or many **{Entity}**\n\n## Invariants\n\n| #   | Rule                  | Aggregate \u002F Context | Consequence of violation |\n| --- | --------------------- | ------------------- | ------------------------ |\n| 1   | {must always be true} | {where it lives}    | {what breaks}            |\n\n## Domain Events\n\n| Event              | Origin context | Consumer contexts    | Crosses context boundary? |\n| ------------------ | -------------- | -------------------- | ------------------------- |\n| **{EntityAction}** | {context}      | {context1, context2} | Yes \u002F No                  |\n\n## Flagged Ambiguities\n\n| Term   | Was confused with | Resolution                        |\n| ------ | ----------------- | --------------------------------- |\n| {term} | {other term}      | {clear distinction, one sentence} |\n\n## mh-project-context.md Update Summary\n\n{List the terms added or updated in the context file this session}\n```\n\n## Completion\n\n\"Domain model complete. [N] bounded contexts, [N] aggregates, [N] entities, [N] value objects,\n[N] invariants, [N] domain events.\n\nStrategic classification: [N] Core Domain, [N] Supporting, [N] Generic Subdomain.\n\n`mh-project-context.md` updated with [N] new or revised terms.\n\n**Next:** `\u002Fmh-cto-sdlc-journey-map` — map the current-state user journey through this domain.\"\n",{},"main","2ec3bbf5ba353f3fdd2c6d842b791fd75d08a635","src\u002Fdepartments\u002Fcto\u002Fsdlc\u002Fphase-1-analysis\u002Fmh-cto-sdlc-domain-model",0,"https:\u002F\u002Fgithub.com\u002FImad-Oute\u002FMicroHard","https:\u002F\u002Fgithub.com\u002FImad-Oute","https:\u002F\u002Fimad369.vercel.app\u002F","I'm just starting my Journey.","2026-05-13 03:02:22",{"source":7,"skillName":5,"commands":39,"prompt":49,"zipAvailable":50},[40,43,46],{"tool":41,"command":42},"npx","npx skills add Imad-Oute\u002FMicroHard --skill mh-cto-sdlc-domain-model",{"tool":44,"command":45},"bunx","bunx skills add Imad-Oute\u002FMicroHard --skill mh-cto-sdlc-domain-model",{"tool":47,"command":48},"pnpm","pnpm dlx skills add Imad-Oute\u002FMicroHard --skill mh-cto-sdlc-domain-model","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FImad-Oute\u002FMicroHard\u002Fblob\u002Fmain\u002Fsrc\u002Fdepartments\u002Fcto\u002Fsdlc\u002Fphase-1-analysis\u002Fmh-cto-sdlc-domain-model\u002FSKILL.md",true,[52,58],{"path":53,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":56,"sourceHtmlUrl":57},"customize.toml","OTHER","其他",607,"https:\u002F\u002Fgithub.com\u002FImad-Oute\u002FMicroHard\u002Fblob\u002Fmain\u002Fsrc\u002Fdepartments\u002Fcto\u002Fsdlc\u002Fphase-1-analysis\u002Fmh-cto-sdlc-domain-model\u002Fcustomize.toml",{"path":59,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":62,"sourceHtmlUrl":63},"mh-skill-manifest.yaml","REFERENCE","参考文档",544,"https:\u002F\u002Fgithub.com\u002FImad-Oute\u002FMicroHard\u002Fblob\u002Fmain\u002Fsrc\u002Fdepartments\u002Fcto\u002Fsdlc\u002Fphase-1-analysis\u002Fmh-cto-sdlc-domain-model\u002Fmh-skill-manifest.yaml",[65,92,109,123,140,157],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":24},"01M6N8JYRPSHVW4Y76X5SAGRDX","mh-vo-vault-brief","Weekly vault intelligence report — health score, pipeline status, OS alignment, and top issues. Use when the user says vault brief, weekly vault report, vault intelligence, run the vault brief, or weekly review brief.","https:\u002F\u002Fgithub.com\u002FImad-Oute\u002FMicroHard\u002Fblob\u002Fmain\u002Fsrc\u002Fmodules\u002Fvo\u002F5-report\u002Fmh-vo-vault-brief\u002FSKILL.md",[],[72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91],"mh vo vault brief","brief","vault","intelligence report","top","weekly","os","pipeline","health","issues","report","run","status","review","weekly review","user","use","pipeline status","alignment","intelligence",{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":24},"01M6N8JCK7E7Y19940RBB51R96","mh-vo-output-bridge","Scan _mh-output\u002F for new artifacts and create or update corresponding vault entries. Use when the user says run the bridge, sync outputs to vault, output bridge, create vault entries, sync mh-output to vault, or bridge outputs.","https:\u002F\u002Fgithub.com\u002FImad-Oute\u002FMicroHard\u002Fblob\u002Fmain\u002Fsrc\u002Fmodules\u002Fvo\u002F4-bridge\u002Fmh-vo-output-bridge\u002FSKILL.md",[],[99,100,101,74,102,103,83,104,105,106,87,107,108,88],"bridge","output","mh vo output bridge","artifacts","update","create","sync","for","entries","scan",{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":24},"01M6N8HXW3ENQ939C93R59W371","mh-vo-moc-builder","Create or update Maps of Content for vault sections and ensure every note is reachable from a MOC. Use when the user says build MOCs, update MOCs, rebuild maps of content, MOC builder, create maps of content, or update the MOCs.","https:\u002F\u002Fgithub.com\u002FImad-Oute\u002FMicroHard\u002Fblob\u002Fmain\u002Fsrc\u002Fmodules\u002Fvo\u002F3-connect\u002Fmh-vo-moc-builder\u002FSKILL.md",[],[116,117,106,118,119,120,121,104,88,74,122,103,87],"builder","mh vo moc builder","note","build","rebuild","maps","content",{"skillNo":124,"name":125,"nameZh":6,"description":126,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":127,"categories":128,"keywords":129,"publishedAt":24},"01M6N8HHZ30706B2ZS33X3MR42","mh-vo-link-architect","Identify missing vault connections and generate precise link recommendations. Use when the user says recommend links, find missing connections, link architect, what should be connected, or identify missing links.","https:\u002F\u002Fgithub.com\u002FImad-Oute\u002FMicroHard\u002Fblob\u002Fmain\u002Fsrc\u002Fmodules\u002Fvo\u002F3-connect\u002Fmh-vo-link-architect\u002FSKILL.md",[],[130,131,132,87,133,134,135,136,137,88,138,74,139],"mh vo link architect","link","architect","recommend","links","missing","recommendations","connections","find","generate",{"skillNo":141,"name":142,"nameZh":6,"description":143,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":144,"categories":145,"keywords":146,"publishedAt":24},"01M6N8H6FKWGTNFWS5PTPPTEN0","mh-vo-base-builder","Generate Obsidian Bases (.base files) for live database views of vault data. Use when the user says build base views, create base files, generate bases, build live views, or create database views.","https:\u002F\u002Fgithub.com\u002FImad-Oute\u002FMicroHard\u002Fblob\u002Fmain\u002Fsrc\u002Fmodules\u002Fvo\u002F3-connect\u002Fmh-vo-base-builder\u002FSKILL.md",[],[147,148,149,116,74,150,151,152,139,104,153,87,106,154,119,155,156,88],"mh vo base builder","base builder","base","obsidian bases","data","database","obsidian","live","files","bases",{"skillNo":158,"name":159,"nameZh":6,"description":160,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":161,"categories":162,"keywords":163,"publishedAt":24},"01M6N8GSRETQW3B9C843F1S1CP","mh-vo-taxonomy-enforcer","Audit vault tags and frontmatter, find drift, and apply corrections. Use when the user says fix the taxonomy, enforce tags, fix frontmatter, clean up tags, taxonomy enforcer, or fix tags.","https:\u002F\u002Fgithub.com\u002FImad-Oute\u002FMicroHard\u002Fblob\u002Fmain\u002Fsrc\u002Fmodules\u002Fvo\u002F2-route\u002Fmh-vo-taxonomy-enforcer\u002FSKILL.md",[],[164,165,166,167,168,169,170,171,172,173,88,174,87,138,74,175],"mh vo taxonomy enforcer","taxonomy","enforce","apply","frontmatter","tags","drift","clean","vault tags","up","fix","audit"]