Craft Support

Crafting Support namespace code. Reusable, domain-agnostic.

attac-t 734442a 2 files · 2.8 KB Updated

File contents

Skill: Craft Support

"Support is the toolbox. It doesn't know the house you're building."

The Standard

  1. No Domain Imports: grep "use Domain" support/ must be empty.
  2. Contracts First: Define interfaces for Domain to implement.
  3. Traits for Behavior: Has*, Interacts*, Can* naming.
  4. Base Classes: Abstract foundations for Domain to extend.

The Anti-Patterns

❌ Don't ✅ Do Why
Import Domain Define Contract Dependency inversion
Business rules Generic utilities Domain-agnostic
Concrete implementations Abstract base Extensibility
Hardcoded values Configuration Flexibility

When to Use

See decide-namespacing for Support vs Domain decision.

Real-World Examples

See examples.md.

attac-t/the-foundry/tree/main/plugins/laravel-ddd/skills/craft-support commit 734442abb4

Frequently asked questions

npx skillmds@latest add attac-t/craft-support