← ClaudeAtlas

tactical-dddlisted

Design, refactor, analyze, and review code by applying the principles and patterns of tactical domain-driven design. Triggers on: domain modeling, aggregate design, 'entity', 'value object', 'repository', 'bounded context', 'domain event', 'domain service', code touching domain/ directories, rich domain model discussions.
NoesisVision/nasde-toolkit · ★ 10 · AI & Automation · score 82
Install: claude install-skill NoesisVision/nasde-toolkit
<!-- Source: ntcoding/claude-skillz --> <!-- Snapshot: 2026-03-20 --> # Tactical DDD Design, refactor, analyze, and review code by applying the principles and patterns of tactical domain-driven design. ## Principles 1. **Isolate domain logic** 2. **Use rich domain language** 3. **Orchestrate with use cases** 4. **Avoid anemic domain model** 5. **Separate generic concepts** 6. **Make the implicit explicit... like your life depends on it** 7. **Design aggregates around invariants** 8. **Extract immutable value objects liberally** 9. **Repositories are for loading and saving full aggregates** --- ## 1. Isolate domain logic **What:** Domain logic is not mixed with technical code like HTTP and database transactions. **Why:** Easier to understand the most important part of the code, easier to validate with domain experts, easier to test and evolve, easier to plan and implement new features. **Test:** Could a domain expert read the code? Can the code be unit tested without mocks or spinning up databases? ```typescript // ❌ WRONG - domain polluted with infrastructure class Delivery { async dispatch() { this.logger.info('Dispatching delivery', { id: this.id }) // Infrastructure! await this.db.beginTransaction() // Infrastructure! if (this.status !== 'ready') throw new Error('Not ready') this.status = 'dispatched' await this.db.save(this) // Infrastructure! await this.db.commit()