-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Add DDD Layer Placement Guide to Contributing Documentation
📋 Issue Information
- Type: Documentation Enhancement
- Priority: High
- Related Issue: Move config module from domain to create command handler #75 - Move config module to correct DDD layer
- Parent Epic: None (standalone improvement)
🎯 Problem Statement
The project lacks clear guidelines on which code belongs in which DDD layer (Domain, Application, Infrastructure, Presentation). This has led to violations like the config module (#75) being placed in the domain layer when it clearly belongs in the application layer.
Without explicit documentation, contributors (including AI assistants) may:
- Place DTOs in the domain layer
- Mix infrastructure concerns (file I/O, HTTP) with domain logic
- Create unclear boundaries between layers
- Make code harder to maintain and test
💡 Proposed Solution
Create a comprehensive guide docs/contributing/ddd-layer-placement.md that clearly documents each layer's purpose, rules, red flags, examples, and includes a decision flowchart.
📝 Implementation Plan
See detailed specification: docs/issues/add-ddd-layer-placement-guide.md
✅ Acceptance Criteria
Note for Contributors: These criteria define what the PR reviewer will check. Use this as your pre-review checklist before submitting the PR to minimize back-and-forth iterations.
- Document created at
docs/contributing/ddd-layer-placement.md - All four layers documented with clear rules and examples
- Nuanced guidance on serde usage included (entities vs DTOs)
- Decision flowchart included for quick reference
- Real code examples from the codebase
- Linked from
docs/contributing/README.md - Referenced in
.github/copilot-instructions.md - All linters pass (markdownlint, cspell)
- Document follows project markdown conventions
🏷️ Labels
documentation, enhancement, DDD, contributing-guide