ddd

Apply these patterns when implementing domain logic in TypeScript/Deno.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "ddd" with this command: npx skills add systeminit/swamp/systeminit-swamp-ddd

Domain Driven Design

Apply these patterns when implementing domain logic in TypeScript/Deno.

Building Block Selection

Choose the appropriate type based on these criteria:

Type Identity Mutability When to Use

Value Object None (equality by value) Immutable Measurements, descriptions, identifiers, money, dates, addresses

Entity Has unique ID Mutable Things with lifecycle, tracked over time, referenced by ID

Aggregate Root entity + children Root controls mutations Consistency boundary, transactional unit, enforce invariants

Domain Service None Stateless Operations spanning multiple aggregates, external integrations

Repository None Stateless Persistence abstraction for aggregates only

Quick Decision Flow

Does it have a unique identity that matters? ├─ No → Value Object └─ Yes → Does it enforce invariants over child objects? ├─ Yes → Aggregate Root └─ No → Entity (likely part of an aggregate)

TypeScript Patterns

See references/patterns.md for implementation examples.

Ubiquitous Language

Update the project's ubiquitous language glossary when:

  • New domain concept introduced (add term + definition)

  • Meaning clarified through discussion (refine definition)

  • Naming conflicts discovered (resolve and document)

  • Bounded context boundary identified (note context for term)

Location: Document terms in code via types/interfaces. Add non-obvious terms to project documentation.

Naming Rules

  • Use domain expert terminology, not technical jargon

  • Prefer nouns for entities/value objects: Order , Money , Address

  • Prefer verbs for domain services: PricingService , ShippingCalculator

  • Name aggregates by their root: Order (not OrderAggregate )

Anti-Patterns to Avoid

  • Anemic domain model: Entities with only getters/setters, logic in services

  • God aggregate: Too many entities under one root (split by invariant boundary)

  • Repository per entity: Only aggregate roots get repositories

  • Leaking persistence: Domain objects should not know about storage

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.

Coding

ddd

No summary provided by upstream source.

Repository SourceNeeds Review
General

ddd

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

openclaw-version-monitor

监控 OpenClaw GitHub 版本更新,获取最新版本发布说明,翻译成中文, 并推送到 Telegram 和 Feishu。用于:(1) 定时检查版本更新 (2) 推送版本更新通知 (3) 生成中文版发布说明

Archived SourceRecently Updated