ddd-when-to-wrap-primitives

Installation
SKILL.md

When To Wrap Primitives

Wrap primitives when the wrapper changes correctness, not when it only signals virtue.

Wrap When

  • The value has a domain name and invariant.

  • Two values of the same primitive type can be confused.

  • Validation is repeated or easy to forget.

  • Behavior naturally belongs with the value.

  • Invalid states cause meaningful business risk.

Do Not Wrap Yet When

  • The value has no behavior or invariant.
Installs
15
Repository
j5ik2o/ai-tools
GitHub Stars
27
First Seen
May 3, 2026
ddd-when-to-wrap-primitives — j5ik2o/ai-tools