1---2name: 17-game-system-architecture-specification3description: Use when designing game client, authoritative state, engine integration, content, saves, multiplayer backend, platform adapters, telemetry, security, build, and live-operations architecture from an approved game SRS.4---5# Game System Architecture Specification6<!-- dual-compat-start -->7## Use When8- An approved game SRS needs architecture and ADRs.9## Do Not Use When10- Detailed classes are the task; use the game technical implementation specification.11- Do not hide authority or save ownership inside engine components.12## Required Inputs13| Artefact | Source or provider | Required? | Behaviour when missing |14|---|---|---|---|15| `GREQ-*`, engine/platform decision, topology, budgets and risks | Requirements, architecture and production | Yes | Stop and return unresolved decisions. |16| Plugins, platform services, data and threat constraints | Specialist owners | Conditional | Mark integration provisional. |17## Workflow181. Draw contexts for client, services, platform, content/build, telemetry and operators.192. Define state, command/event flow, determinism, saves/migrations and time/randomness ownership.203. Establish engine-neutral domain boundaries and Unity, Godot, Unreal or Apple adapters.214. Specify content streaming, asset import, graphics/audio/UI/camera budgets, accessibility/localisation settings and fallbacks, consuming approved visual contracts from `design-system-skills`.225. Design online topology, replication budget, sessions, persistence and compatibility where applicable.236. Design trust, data/economy/ad integrity, separate SDK privacy boundaries, child-safe disabled defaults, build provenance, observability and rollback/kill switches.247. Define shared-platform seams as optional capabilities with per-game adoption, identity, performance and simplicity criteria; do not force every package into every game.258. Stop on a missing owner, budget, privacy/rights boundary or failure path; recover with ADR options.26## Outputs27| Artefact | Consumer | Acceptance condition |28|---|---|---|29| Game architecture and ADRs | Implementers, QA, security and operations | State, interfaces, failures, budgets and traces are reviewable. |30## Evidence Produced31| Evidence | Reviewer | Acceptance condition |32|---|---|---|33| `GARCH-*` trace and failure model | Architecture board | Each element maps to requirement, ADR, test and signal. |34## Capability and permission boundaries35Read and search are allowed. Provisioning, purchasing or production change requires explicit authority.36## Degraded mode37Produce the narrowest qualified context, mark unavailable checks `not assessed`, and name the experiment needed.38## Decision Rules39| Choice or condition | Action | Failure or risk avoided |40|---|---|---|41| Logic can avoid engine objects | Isolate testable domain code. | Engine coupling. |42| Action originates on client | Validate authoritative state. | Cheating. |43| Schema changes | Version, migrate and test rollback. | Lost state. |44## Quality Standards45- Express state and failure behaviour; verify version-sensitive facts officially.46## Anti-Patterns47- Giant scene. Fix: bounded lifetimes.48- Component as architecture. Fix: domain/adapters.49- Reliable messages everywhere. Fix: semantic budgets.50- Config without kill switch. Fix: validation and expiry.51- Service as hard dependency. Fix: degraded behaviour.52- Ads/analytics treated as one consent boundary. Fix: model each SDK, purpose, data flow, deletion and disable path separately.53## References54- [Game architecture viewpoints](references/game-architecture-viewpoints.md)55- [Game AI and narrative architecture contract](references/game-ai-narrative-architecture-contract.md)56<!-- dual-compat-end -->