ddd-validate
Originally fromruvnet/ruflo
Installation
SKILL.md
Validate domain boundary integrity across all bounded contexts.
Steps
-
Discover contexts: Scan
src/*/domain/to find all bounded contexts. -
Check cross-boundary violations:
- For each context, scan all
.tsfiles for import statements - Flag any import that reaches into another context's
domain/directory directly - Allowed: importing from another context's public
index.ts(application layer) - Violation: importing from
src/<other-context>/domain/entities/...directly
# Find cross-boundary imports for ctx in $(find src -maxdepth 2 -name "domain" -type d | sed 's|src/||;s|/domain||'); do grep -rn "from ['\"].*src/" "src/$ctx/" --include="*.ts" | grep -v "src/$ctx/" || true done - For each context, scan all