← ClaudeAtlas

oop-ddd-ai-coding-constraintslisted

Enforce OOP and DDD engineering constraints for C# and TypeScript game development. Use when implementing, refactoring, reviewing, or verifying gameplay systems, domain-controlled engine-view wrappers, domain models, aggregates, application services, repositories, public APIs, or Context-based shared dependencies. Preserve encapsulation, avoid test-only production hooks, unit-test only engine-agnostic leaf logic, and verify integrated behavior by running the real engine.
Yuki001/game-dev-skills · ★ 40 · AI & Automation · score 74
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,