prd-to-ddd-design

Convert natural language requirements (PRD) into AI-friendly DDD domain design documents in Markdown. Use when the user provides a PRD, requirement doc, or business description and wants a DDD domain model, entity/aggregate design, ER diagram, domain logic placement, or sequence/flow diagrams. Produces structured output that AI agents can directly use for implementation.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "prd-to-ddd-design" with this command: npx skills add qitongfire/prd-to-ddd-design

PRD to DDD Domain Design

Convert PRD / natural language requirements into a structured DDD design document.

When to Use

  • User provides a PRD, requirement document, or business description
  • User asks: "把需求转成DDD设计" / "领域建模" / "domain modeling from requirement"
  • Before implementation — this is the first step in the AI development workflow

Relationship to Other Skills

  • design-to-plan: After this skill produces the design doc → split into implementation plans
  • ddd-domain-model / ddd-cross-layer: Implementation patterns → use after design is finalized

Resources

FileRoleWhen to Read
This file (SKILL.md)Map — workflow, phases, output rulesAlways (auto-loaded)
phase-guide.mdHow-to — analysis heuristics, design criteria, identification rulesWhen executing each phase
ddd-design-template.mdTemplate — output section structure with table formatsWhen writing the design doc

Workflow

PRD / Natural Language
        │
        ▼
  Phase 0 → 1 → 2 → 3 → 4 → 4.5 → 5 → 5.5 → 6
        │
        ▼
  Output: docs/design/<feature>-ddd-design.md

Phase Summary

PhaseNameWhat to ProduceKey Input
0Event StormingActor → Command → Aggregate → Event → Policy flowPRD text
1Domain DiscoveryUbiquitous language glossary, domain events, business rulesPRD nouns/verbs
2Strategic DesignBounded contexts, context mappingPhase 0-1 results
3Tactical DesignEntities, VOs, aggregates, relationshipsPhase 1-2 results
4ER ModelingMermaid ER diagram (PK/FK only)Phase 3 entities
4.5Database SchemaTable mapping, columns, indexes, constraintsPhase 3-4 entities
5Logic PlacementEntity/VO logic, Gateway/Repo interfaces, Domain ServicesPhase 3 + PRD rules
5.5Cross-Layer ContractsREST API, Client DTOs, AppService API, Infra adaptersPhase 5 results
6Behavior ModelingState machines, sequence diagrams, flowcharts, event flowsPhase 0 + 5

For detailed instructions on each phase (extraction rules, identification heuristics, design criteria), read phase-guide.md.


Execution Steps

  1. Read the PRD document provided by user
  2. Read phase-guide.md for analysis heuristics
  3. Execute phases 0-6 sequentially, using ddd-design-template.md as the output structure
  4. Run the Quality Checklist below before finalizing
  5. Save to docs/design/<feature-name>-ddd-design.md

Output Rules

  • Pure Markdown with Mermaid diagrams
  • Chinese for business descriptions, English for technical terms (class names, method signatures)
  • Align naming and layer placement with ddd-architecture rule
  • Align domain purity with ddd-domain-layer rule
  • Every entity must have behaviors (no anemic model)
  • Every aggregate must list invariants
  • Every domain logic item must have placement rationale
  • Database schema must map all entities/VOs to tables with complete columns
  • Cross-layer contracts must be defined with input/output types

Quality Checklist

Before finalizing the document, verify:

Event Storming & Discovery (Phase 0-1)

  • All Actors, Commands, Specs, Events, Policies identified
  • Command → Aggregate → Event mapping is complete
  • All business nouns mapped to entities or value objects
  • All business rules captured with rule IDs
  • Ubiquitous language glossary includes Package column

Tactical Design (Phase 2-3)

  • Aggregates are small with clear boundaries
  • No cross-aggregate direct object references (use ID)
  • Entity behaviors are rich (no anemic model)
  • State machines documented for stateful entities
  • Naming follows project DDD conventions

Data & Logic (Phase 4-5)

  • ER diagram only shows PK/FK, consistent with entity/VO tables
  • Entity → Table mapping covers all entities and value objects
  • Table Detail includes all columns with type, nullable, default
  • Indexes defined for FK columns, frequent queries, unique keys
  • Domain logic placement has clear rationale for every item
  • Domain Service design decisions documented with alternatives

Cross-Layer & Behavior (Phase 5.5-6)

  • REST API endpoints listed with URL, HTTP method, request/response types
  • Client DTOs (Request/Response) key fields defined
  • AppService methods listed with Command input and DTO output
  • Infrastructure adapter-to-gateway mapping is complete
  • Sequence diagrams cover all core use cases
  • Flowcharts cover complex branching rules (2+ paths)

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

gitlab-mr-reviewer

当需要审核 GitLab 合并请求、检查 MR diff 风险、发布 GitLab 审查评论、执行 approve/request changes,或发送 MR 审查通知时使用。

Registry SourceRecently Updated
1490whrime
General

Voice Transcriber Toolkit

Voice-to-Text Transcription Toolkit - 语音识别转文字,支持Whisper/Vosk引擎,批量处理,字幕导出 | Speech recognition & transcription with Whisper/Vosk engines, batch processing, su...

Registry SourceRecently Updated
General

Gigo Lobster Taster

🦞 GIGO · gigo-lobster-taster: 正式试吃模式:跑完整评测,默认上传云端、生成个人结果页并进入排行榜。 Triggers: 试吃我的龙虾 / 品鉴我的龙虾 / lobster taste / lobster taster.

Registry SourceRecently Updated
General

Gigo Lobster Local

🦞 GIGO · gigo-lobster-local: 本地模式:跑完整评测,但不上云、不注册个人结果页,证书二维码回到官网首页。 Triggers: 本地试吃龙虾 / 离线试吃龙虾 / local lobster taste / offline lobster taste.

Registry SourceRecently Updated