[Documentation] Use when generating, smart-merging or refactoring the root AI context (CLAUDE.md, AGENTS.md) and its Claude/Codex projections. Config file only: project-config.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
[Architecture] Use when a workflow step or the user asks for DDD domain modeling: contexts, aggregates, entities, ERD and events. --mode=review checks entity and value-object design.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
설치 방법 보기설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.
[BLOCKING] Mode routing — detect FIRST. Explicit
--mode=reviewselects the DDD entity/value-object quality review; no mode is the default business domain analysis (the default workflow below)./domain-analysis --mode=reviewis the former/domain-entities-review: that slash command no longer exists, and the mode works called directly with no workflow. Read the mode file in full before anything else (see Mode Dispatch).
Review modes: For review/audit work, standalone defaults to
--review-only(--report-onlyalias);--fix-loopenables review → validate → authorized fix → fresh re-review, default cap 3.--fix-loop --loop-owner=callerreturns a read-only pass to the caller that owns fixes/re-review. Create triage, review, validation and re-review todo tasks first; apply the carriedreview-policycontract for LOW deferral and user-approved bounded extensions. Non-review modes and terminal findings validation keep their own dispatch.
Goal: Produce a user-confirmed DDD model and ERD from business evidence so implementation preserves domain invariants and boundaries.
Summary:
--mode=review [changes | scan [<module>]] [--report-only] loads the quality-review contract instead.Workflow: Execute Steps 0–9 below for analysis; use Mode Dispatch for review.
Key Rules:
file:line evidence and confidence (>80% to act, otherwise verify). Compare 3+ existing reference entities before adding one; reuse only when identity, lifecycle and transaction scope fit.tmp/reports/; add a final quality-review task. Reference updates require approval.Detect the mode from the invocation arguments before any other work; do not load a mode file the invocation did not select.
| Mode | Purpose | Read in full FIRST |
|---|---|---|
| (none) | Default business domain analysis — this file | — |
--mode=review [changes | scan [<module>]] [--report-only] | DDD design-quality review of domain entities and value objects: checklist A–P, health score, validated-finding fix loop (--report-only: read-only leaf, no fix). Formerly /domain-entities-review | references/mode-review.md |
references/mode-review.md in full FIRST when --mode=review is selected, standalone or in a workflow. It replaces default analysis and owns Phases 0–5, changes (default), scan [<module>] and --report-only.Entity quality: Read references/entity-quality.md when Step 3 or review mode creates/changes entities, VOs, aggregates or their write/load/event paths. It owns the shared decisions and proof gates; planning and implementation use the same criteria.
Read only the applicable section of references/ddd-reference.md before its step: Strategic Design → Steps 2/4; Entity vs Value Object, Entity Design, Aggregate Design, Repository Pattern → Step 3; Domain Events → Step 5; ERD Design → Step 6; Anti-Patterns → Steps 3/7. Do not load unrelated sections or the review workflow during ordinary planning/implementation.
Resolve roots from docs/project-config.json: plans (docsRoots.plans.path, default plans), team artifacts (docsRoots.teamArtifacts.path, default team-artifacts), and references (docsRoots.projectReference.path, default docs/project-reference). Use these roots throughout.
Find the active */plan.md by modification time. Read its scope/goals/decisions, all sibling research/*.md, and domain-entities-reference.md if present. Set {plan-dir} for outputs. If no plan exists, create one using the session naming convention. Step 9 must update it.
Read the active plan, business evaluation (where /business-evaluation writes it: docs/knowledge/strategy/business/, or the path the caller supplies), refined task and discovery notes from the resolved roots. Extract nouns (candidate entities), verbs (events), roles (permissions/views) and processes (business workflows).
Group related entities by DDD principles; apply the context-boundary signals in references/ddd-reference.md (Strategic Design).
For each context record name, purpose, Core/Supporting/Generic classification, primary responsibility, team ownership and ubiquitous language.
Use the reference's boundary signals; verify that a context can be understood/worked on independently.
Ask the user whether the grouping makes sense. Offer Agree (Recommended), Merge, Split and Add missing context.
Per bounded context: classify each concept using the Entity vs VO matrix in references/ddd-reference.md, then apply its aggregate boundary rules.
Record applicable roots, entity identity or value semantics, lifecycle, owned children, invariants and consistency boundaries. Read references/entity-quality.md for construction/load, concurrency, events and proof decisions; use the project's paradigm and justified boundaries.
| Entity | Classification | Identity | Key Fields | Lifecycle States | Invariants |
|---|---|---|---|---|---|
| {Name} | Aggregate Root / Entity / Value Object | {identity or value semantics} | {fields} | {states or N/A} | {business rules} |
Choose VOs and aggregate boundaries by meaning, atomic invariants and bounded load/contention. Apply the shared quality criteria; field/entity counts and database shape do not determine the model.
Record intra-context relationships as From | To | Type | Cardinality | Ownership/consistency | Description. Derive aggregate ownership from business invariants and lifecycle; PK/FK shape describes persistence, not the consistency boundary.
Record integrations as Upstream | Downstream | Pattern | Integration point | Sync mechanism. Apply Strategic Design's context-map table: ACL for hostile/external models, Customer-Supplier when downstream negotiates, Open Host Service for many consumers, Conformist without influence.
Identify meaningful domain facts and their consumers where events are warranted; use past-tense business names and the project's naming convention. Record N/A when no event is needed.
| Event | Source Context | Target Context(s) | Payload needed by contract | Trigger |
|---|---|---|---|---|
OrderPlaced | Sales | Order, Fulfillment | cartId, productId, placedDate | Checkout completed |
Distinguish internal domain events from integration contracts. Apply references/entity-quality.md for payload stability, commit/delivery semantics and evolution; choose metadata from actual consumer and recovery needs.
Produce Mermaid ER diagram. Apply the ERD-to-Aggregate mapping + anti-patterns from references/ddd-reference.md.
Use Mermaid comments %% Context: ... to group entities, Crow's Foot cardinality, key business fields and actual identity types. Mark external references without implying a local FK. Distinguish conceptual relationships from storage associations.
Verify ownership, cardinality, optionality and compatibility against domain evidence; do not derive aggregate boundaries from table size or FK shape. Apply the reference's ERD-to-aggregate guidance.
Decision log: inside a workflow, read the run's
## Decisionsfirst (/start-workflow→ Step Execution Protocol, Decision log): ask only what it leaves open or new evidence reopened, cite reused answers instead of asking again, and append every new answer.
MANDATORY present domain model and ask 5-8 questions via ask user question tool. With fewer genuine open decisions, ask those and say so; never pad, and never re-ask an answer the run's decision log holds.
Cover context boundaries, aggregate roots, entity/VO classification, relationship type/cardinality, missing concepts and event recipients/payloads. For boundaries offer Correct (Recommended), Need changes or Explain more.
Pick 2-3 deep dives according to complexity: separate aggregate versus eventual consistency; VO versus identity/lifecycle; process transitions; edge-case invariants; concurrent writes; or implicit expert concepts. Keep the interview within 5-8 questions by combining related topics.
After confirmation, persist final decisions and set status: confirmed.
Compare against domain-entities-reference.md in the resolved reference root: new entities, modified fields/relationships/context assignment, and deprecated entities. Present the changes; offer Approve all (Recommended), Review each change or Skip update.
If the reference is missing, ask whether to create it (Yes recommended / No skip). Only after approval, update/create it in its existing format, adding entities under their contexts and revising affected fields/relationships.
Read {plan-dir}/plan.md, append/update ## Domain Model section:
## Domain Model
- **Bounded Contexts:** {N} — {list names with context map patterns between them}
- **Total Entities:** {N} ({N} aggregates, {N} child entities, {N} value objects)
- **Domain Events:** {N} cross-context events
- **Key Aggregates:** {list with invariant summaries}
- **Key Relationships:** {summary of critical relationships}
- **ERD:** See `phase-01-domain-model.md`
- **Full Analysis:** See `research/domain-analysis.md`
{plan-dir}/research/domain-analysis.md # Full domain analysis report
{plan-dir}/phase-01-domain-model.md # Confirmed domain model with ERD
{plan-dir}/plan.md # Updated with domain model summary
docs/project-reference/domain-entities-reference.md # Updated/created with new/modified entities; docsRoots.projectReference.path in docs/project-config.json overrides this root
Report structure:
Report must be ≤250 lines. Use tables over prose.
Inside a workflow: when this skill runs as a step of an active workflow, skip the prompts in this section and return the result — the workflow's next step decides what runs (
/start-workflow→ Step Execution Protocol, Workflow-step mode).
MANDATORY IMPORTANT MUST ATTENTION — NO EXCEPTIONS after completing this skill, use ask user question tool to present these options:
After the existing ## Next Steps prompt above resolves, present a second, independent ask user question tool call (do NOT merge into the first):
/why-review, /plan --mode=validate (run these first if you haven't).MUST ATTENTION Decide supported review choices and recommendations, record the rationale, and finish without routine user questions. Keep round-limit extension, indispensable facts and actual action authority; preserve source coverage, validation, tests, read-only boundaries and budgets. Review decisions do not accept open risks or make a failed gate pass.
<!-- /SYNC:review-decision-autonomy:reminder --> <!-- SYNC:output-quality-principles:reminder -->IMPORTANT MUST ATTENTION lead with useful guidance and readable priorities; preserve action-changing conditions/numbers and required structures. When writing, updating or auditing Markdown skill/doc content, verify top, heading-linked contents over 200 lines (stricter owner thresholds remain); refresh after edits and report gaps in read-only audits. Remove report bulk; judge semantic value rather than word counts.
<!-- /SYNC:output-quality-principles:reminder -->IMPORTANT MUST ATTENTION Goal: Produce a user-confirmed DDD model and ERD from business evidence so implementation preserves domain invariants and boundaries.
MUST ATTENTION Follow 0 plan/reference → 1 business context → 2 contexts → 3 entities/aggregates → 4 relationships → 5 events → 6 ERD → 7 user validation → 8 approved reference changes → 9 plan update; offer Next Steps, then council in a separate prompt. Review mode follows its own reference.
| Evasion | Required action |
|---|---|
| “Boundaries are obvious” | Run user validation. |
| “Already know the model” | Show artifact/reference evidence. |
Protocol guides — Apply each protocol only when its read-when condition holds. If a protocol's text is not in your context, read its file below before you act on it.
output-quality-principles — Readable guidance and verified contents for long skill/doc files; writing, updating or auditing a skill or reference document, or another Markdown artifact over 200 lines → .claude/skills/shared/protocols/output-quality-principles.mdreview-decision-autonomy — Choose supported review decisions and ask before extending the round budget; running any review or audit skill or mode → .claude/skills/shared/protocols/review-decision-autonomy.mdreview-policy — Review-only or a three-round fix loop with explicit extension and fresh post-fix evidence; deciding round eligibility, blocking findings or review state → .claude/skills/shared/protocols/review-policy.mdMUST ATTENTION Triage all targets, plan and create review/validation/fix/fresh re-review tasks first. Review-only reports without edits; fix-loop freshly reviews every repair under one fixing owner. Default cap three rounds: disclose deferred LOWs, ask and wait before a bounded extension for MEDIUM+ or failed required checks. Preserve scope, coverage and actual operation authority.
<!-- /SYNC:review-policy:reminder -->아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.
로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.
아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.
[Documentation] Use when generating, smart-merging or refactoring the root AI context (CLAUDE.md, AGENTS.md) and its Claude/Codex projections. Config file only: project-config.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
[Code Quality] Use when a workflow step or the user asks for AI code or plan review: LLM calls, prompts, agents, RAG, evals and guardrails. --mode={code|plan}; --report-only is read-only.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
[Architecture] Use when a workflow step or the user asks for architecture design, compliance review, scalability grading or whole-project audit via --mode={design|review|scalability|full}.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
[Content] Use when a workflow step or the user asks for product/feature ideation with ranked opportunities and validation tests. --mode={roadmap|scope}.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
[Content] Use when a workflow step or the user asks for business viability: Business Model Canvas, financials, risks and go-to-market recommendation.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
[Code Quality] Use when a workflow step or the user asks for a focused code-change review: staged, unstaged, branch diff or simple pull request. --fix-loop fixes and re-reviews. Complex pull request: workflow-review-changes; rationale: why-review.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.