AGENT SKILL

book--implementing-domain-driven-design--nano

Implementing DDD (Vaughn Vernon) — Minimal rules — essential one-liners only. Use when asked to apply Implementing DDD principles or review code against Implementing DDD standards.

License 许可
MIT
最近更新
2026-11-14
Stars
★ 13
Forks
2

01 前言 Front Matter

name
book--implementing-domain-driven-design--nano
origin
github.com/ciembor/agent-rules-books (MIT)
license
MIT
version
1.0.0
description
Implementing DDD (Vaughn Vernon) — Minimal rules — essential one-liners only. Use when asked to apply Implementing DDD principles or review code against Implementing DDD standards.
compatibility
yana-ai >= 0.14.0

03 SKILL.md 正文

OBEY Implementing Domain-Driven Design by Vaughn Vernon

When to use

Use when tight context still needs DDD guardrails for context leakage, fake tactical patterns, Aggregate sprawl, and cross-context model coupling.

Primary bias to correct

Local context, language, and invariants outrank reuse pressure, ORM convenience, object graph traversal, and framework or client shape.

Decision rules

  • Name the Bounded Context and local Ubiquitous Language before interpreting models, services, repositories, events, APIs, persistence, or integrations.
  • Translate across contexts and foreign systems; never share local Aggregates, Entities, enums, or domain objects as integration contracts.
  • Treat Aggregates as small immediate consistency boundaries with one root, hidden mutable internals, identity references to other Aggregates, and eventual consistency outside one boundary by default.
  • Use Entities for identity and lifecycle, Value Objects for immutable validated descriptive values, and Domain Services only when no model object naturally owns the operation.
  • Keep Repositories focused on Aggregate Roots and Application Services focused on use-case coordination rather than domain decisions.
  • Publish Domain Events only as meaningful completed past-tense facts; use Event Sourcing only when event history is the right persistence model.
  • Use DTOs, projections, use-case queries, adapters, and explicit scope identifiers instead of exposing or reshaping domain internals for clients.

Trigger rules

  • When a term is ambiguous, generic, or reused across contexts, split or qualify it by Bounded Context before coding.
  • When one transaction or object graph wants multiple Aggregate roots, demand immediate-invariant proof; otherwise coordinate by identity, events, policies, processes, or Application Services.
  • When foreign models, database shape, framework objects, transport payloads, UI needs, or another context's model leak into domain code, translate at the boundary.
  • When DDD vocabulary appears around CRUD services, generic repositories, mutable graphs, or anemic models, require the real invariant and behavior or simplify the design.
  • When reviewing DDD code, verify context, language, Aggregate boundary, translation, Repository shape, events-as-facts, and Application Service thinness before approving.

Final checklist

  • Clear Bounded Context and local language?
  • Explicit translation instead of shared model types?
  • Aggregate boundary backed by immediate invariants?
  • Identity references across Aggregates?
  • Repositories Aggregate-root focused?
  • Application Services coordinating, not deciding?
  • Client, persistence, and foreign concerns kept outside the domain model?

04 同仓库更多 Skills

Horonomos-laps
Horonomos-laps/Yana-AI

openai--sentry--sentry

Use when the user asks to inspect Sentry issues or events, summarize recent production errors, or pull basic Sentry health data via the Sentry API; perform read-only queries with the bundled script and require `SENTRY_AUTH_TOKEN`.

★ 13
Horonomos-laps
Horonomos-laps/Yana-AI

ito-basket-compare

Compare Itô prediction-market baskets against a user's knowledge base, portfolio notes, financial context, watchlist, or research thesis. Use for read-only basket comparison and gap analysis without investment advice or live trading.

★ 13
Horonomos-laps
Horonomos-laps/Yana-AI

implementing-network-traffic-baselining

Build network traffic baselines from NetFlow/IPFIX data using Python pandas for statistical analysis, z-score anomaly detection, and hourly/daily traffic pattern profiling

★ 13
Horonomos-laps
Horonomos-laps/Yana-AI

detecting-evasion-techniques-in-endpoint-logs

Detects defense evasion techniques used by adversaries in endpoint logs including log tampering, timestomping, process injection, and security tool disabling. Use when investigating suspicious endpoint behavior, building detection rules for evasion tactics, or conducting threat hunting for stealthy adversary activity. Activates for requests involving evasion detection, defense evasion analysis, log tampering detection, or MITRE ATT&CK TA0005.

★ 13
Horonomos-laps
Horonomos-laps/Yana-AI

implementing-microsegmentation-with-guardicore

Implementing microsegmentation using Akamai Guardicore Segmentation to map application dependencies, create granular network policies, visualize east-west traffic flows, and enforce least-privilege communication between workloads across data centers and cloud.

★ 13
Horonomos-laps
Horonomos-laps/Yana-AI

ramdisk-tmpfs-patterns

暂无简介

★ 13