DDD Domain Model Extractor
Extract the model from behavior and invariants, not from table names alone.
Workflow
Confirm the target files, domain overview, and areas of concern.
Explore commands, state changes, validation, persistence operations, and tests.
Identify domain concepts, lifecycle states, invariants, and transactional boundaries.
Propose aggregates, entities, value objects, and domain services.
Produce pseudocode and a migration path that preserves behavior.
References
Read references/analysis-heuristics.md before analyzing large codebases. Use references/output-template.md for the final report shape.
Detailed Reference
For non-trivial implementation, review, or refactoring work, read references/details.md before giving final guidance. It contains the detailed rules, examples, smells, and migration notes that do not belong in the short invocation body.
Output
Return candidate models with evidence from code, not just names. Include uncertain decisions and what evidence would settle them.