Add DDD Layer Placement Guide to Contributing Documentation #100
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The project lacked clear guidelines on DDD layer placement, leading to architectural violations like the config module being placed in domain when it belonged in application (#75). Contributors needed explicit rules to distinguish between domain entities, DTOs, and infrastructure concerns.
Changes
Documentation Added
docs/contributing/ddd-layer-placement.md- Comprehensive guide with:adapters/+infrastructure/), and PresentationCritical nuance on serde usage - Distinguishes acceptable from problematic patterns:
Documentation Updated
docs/contributing/README.md- Expanded quick reference table with all contributing guides, DDD placement listed first.github/copilot-instructions.md- Added layer placement as Essential Rule Roadmap #1Examples Approach
The guide uses generic, illustrative code patterns rather than specific codebase examples. This makes the documentation more maintainable (no updates needed when actual code changes) while still effectively demonstrating the architectural principles and common patterns like command handlers, repository implementations, and external tool adapters.
Resolves
Closes #79
Related to #75 (the violation that exposed this gap)
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.