oop-ddd-ai-coding-constraintslisted
Install: claude install-skill Yuki001/game-dev-skills
# OOP + DDD Constraints for Game Development
Build C# and TypeScript game systems around encapsulated domain models and verifiable gameplay behavior.
## 1. General OOP/DDD Patterns
### Architecture Boundaries
Use the following responsibility split by default:
| Layer | Responsibilities | Must not own |
| --- | --- | --- |
| Interface | Input adapters, UI/presentation, engine callbacks, controllers, and server endpoints; translate input into use cases | Gameplay rules or direct persistence |
| Application | Gameplay use cases, commands, handlers, session/transaction boundaries, DTOs, and cross-object orchestration | Core gameplay rules |
| Domain | Combat, inventory, progression, quest, economy, and player-state models; Entities, Aggregates, Value Objects, Domain Services/Events, and ports | Raw engine APIs, native engine handles, network, database, or infrastructure details |
| Infrastructure | Engine adapters, save/persistence implementations, networking, platform SDKs, asset/resource access, physics/pathfinding adapters, clocks, random sources, and ID implementations | Gameplay rules |
Preserve this dependency direction:
```text
Interface -> Application -> Domain
Infrastructure -> Domain/Application ports
Domain -> no framework or infrastructure dependency
```
Do not:
- Let UI, input, an engine callback, or a Controller access a Repository directly or bypass Application to orchestrate a use case;
- Let Domain expose or directly operate raw engine components/nodes,