Domain Analysis
Role: worker. This command produces a domain-health report — it is analytical,
not prescriptive; it does not redesign code or write implementation.
Overview
Assess the domain health of an existing multi-component system. Produce a structured report covering bounded context boundaries, context map relationships, domain event flows, value stream throughput, and a friction report identifying where the architecture inhibits continuous delivery.
This skill is analytical, not prescriptive. It describes what is, not what should be built. For greenfield design, use skills/domain-driven-design/SKILL.md. For code-level violations (anemic model, missing DTOs, wrong layer), use agents/domain-review.md.
Scope
Before starting, determine scope from the user's request:
- Single repo: analyze folder structure, package boundaries, shared models
- Multi-repo / microservices: analyze service boundaries, shared libraries, event contracts, API dependencies
Evidence requirement
Every finding must be grounded in something you actually read. When reporting a God Object, a missing ACL, a coupling trap, or a friction item, cite the specific file:line or file where the evidence was observed. Do not assert that a pattern exists based on naming conventions alone — open the file and confirm it.
Classify each finding by confidence:
- observed — directly visible in a file you read (an import statement, a shared type, a method call)
- inferred — visible at folder or module level without reading implementation (directory name, package dependency in package.json)
- suspected — requires runtime knowledge or cannot be confirmed from static analysis alone
Graph-assisted evidence gathering. Prefer CodeGraph/Repowise over raw Grep
for tracing imports, call relationships, and cross-context dependencies — they're
cheaper and more accurate than re-deriving the call graph from text search. See