# V4 Diagram Atlas

This atlas is the visual orientation layer for V4's five-cell tactical-action
universe. It explains cell hosting, action flow, durable play records, session
state, plugin composition, ownership, content production, and release evidence.
Focused pages and current implementation/test/build evidence remain
authoritative.

## Multi-cell runtime landscape

```mermaid
flowchart TB
  Player[Player input and platform] --> Host[V4 game host]
  Host --> Cell[Activated ruleset cell]
  Cell --> FPS[Tactical FPS]
  Cell --> Stealth[Stealth and real-time tactics]
  Cell --> ARPG[Action RPG]
  Cell --> RTS[Real-time strategy]
  Cell --> Arcade[2D run-and-gun]
  FPS --> Shared[Shared GAS input animation AI and presentation]
  Stealth --> Shared
  ARPG --> Shared
  RTS --> Shared
  Arcade --> Shared
  Shared --> World[World streaming procgen modes and content]
  Shared --> Online[Authority persistence progression and live service]
  World --> Evidence[(Saves replays telemetry assets and audits)]
  Online --> Evidence
  Evidence --> Release[Build platform security compliance and operations]
```

The host and shared layer supply contracts, not identical behavior. Each cell
owns its rules, camera, input semantics, AI specialization, content, and
performance envelope inside the shared platform boundaries.

## Player action sequence

```mermaid
sequenceDiagram
  actor Player
  participant Input as Input mapping
  participant Cell as Active cell policy
  participant GAS as Shared ability runtime
  participant Authority as Server or deterministic authority
  participant World as AI and world systems
  participant Present as Animation camera audio and VFX
  Player->>Input: Device action
  Input->>Cell: Cell-specific semantic command
  Cell->>GAS: Ability request with target context
  GAS->>Authority: Validate state cost timing and ownership
  alt refused
    Authority-->>Present: Rejection or recovery feedback
  else admitted
    Authority->>World: Apply governed gameplay effect
    World-->>Authority: Resulting authoritative state
    Authority-->>GAS: Confirmed outcome
    GAS-->>Present: Replicated cue and presentation data
    Present-->>Player: Cell-specific feedback
  end
```

Input mapping, cell semantics, shared ability machinery, authority, world
effect, and presentation are different responsibilities. Predictive feedback
cannot become the source of truth for a multiplayer or persisted effect.

## Durable cell and session records

```mermaid
erDiagram
  ACCOUNT ||--o{ PROFILE : owns
  PROFILE ||--o{ SAVE_SLOT : maintains
  CELL_DEFINITION ||--o{ CELL_VERSION : versions
  CELL_VERSION ||--o{ SESSION : configures
  MODE_DEFINITION ||--o{ SESSION : selects
  SESSION ||--|{ PARTICIPANT : includes
  PROFILE ||--o{ PARTICIPANT : controls
  SESSION ||--o{ REPLAY : records
  SAVE_SLOT ||--o{ WORLD_REVISION : versions
  WORLD_REVISION ||--o{ PROGRESSION_EVENT : contains
  CELL_VERSION ||--o{ CONTENT_BUNDLE : requires
  CONTENT_BUNDLE ||--o{ ASSET_PROVENANCE : records
  SESSION ||--o{ AUDIT_EVENT : produces
```

Cell, mode, content, profile, session, replay, and world-save versions stay
explicit so cross-cell activation, migration, rollback, and incident review do
not depend on an ambiguous global version.

## Cell session lifecycle

```mermaid
stateDiagram-v2
  [*] --> Selecting
  Selecting --> Activating: cell mode and content compatible
  Selecting --> Refused: entitlement platform or compatibility failure
  Activating --> Loading: plugins and authoritative data ready
  Activating --> Failed: plugin asset or migration failure
  Loading --> Active: world and participants synchronized
  Active --> Paused: mode permits governed pause
  Paused --> Active
  Active --> Transitioning: map phase or cell change
  Transitioning --> Active: compatible target loaded
  Transitioning --> Recovering: interrupted transition
  Recovering --> Active: restore succeeds
  Recovering --> RolledBack: prior snapshot restored
  Active --> Completed: terminal mode state
  Completed --> Saving: results and world revision commit
  Saving --> Ended: durable receipts confirmed
  Refused --> [*]
  Failed --> [*]
  RolledBack --> [*]
  Ended --> [*]
```

Activation, loading, active play, transition, recovery, save, and result
settlement are separately observable. Cell change cannot silently reinterpret an
incompatible save or content bundle.

## Plugin and contract composition

```mermaid
classDiagram
  class V4GameHost {
    activateCell()
    activateMode()
    pinVersions()
  }
  class SharedGameplay {
    abilityContract
    inputContract
    animationContract
  }
  class CellPlugin {
    ruleset
    cameraPolicy
    aiExtensions
  }
  class WorldServices {
    streaming
    persistence
    procgen
  }
  class OnlineServices {
    authority
    matchmaking
    progression
  }
  V4GameHost --> CellPlugin : activates
  CellPlugin --> SharedGameplay : specializes
  V4GameHost --> WorldServices : composes
  V4GameHost --> OnlineServices : composes
  SharedGameplay --> WorldServices : affects
  OnlineServices --> CellPlugin : enforces version
```

The host controls composition and versions; the shared layer exposes extension
contracts; the cell supplies behavior; world and online services remain shared
authorities rather than cell-private shortcuts.

## Cell and platform estate

```mermaid
mindmap
  root((V4 estate))
    Cells
      Tactical planning and breach
      Stealth schedules and command
      Action RPG abilities and bosses
      RTS economy armies and determinism
      Arcade run-and-gun stages
    Shared gameplay
      GAS animation and input
      Perception crowds and AI director
      World streaming and procgen
      Presentation UI and accessibility
    Product systems
      Campaign co-op PvP and horde
      Training replay and signature modes
      Creator content community and vault
      Online esports progression and live service
    Platform
      Build data telemetry and performance
      Security compliance and trust
      Hardware peripherals and XR
      Certification operations and launch
```

Use this map to select the owning feature and architecture pages before making a
cross-cell claim. Shared capabilities still require per-cell acceptance and
performance evidence.

## Content production journey

```mermaid
journey
  title From V4 cell content to supported build
  section Define
    Choose cell mode player promise and authority: 5: Design
    Author data assets provenance and compatibility: 5: Content, Engineering
  section Integrate
    Implement shared contract and cell specialization: 4: Engineering
    Wire world presentation online and telemetry: 5: Engineering
  section Verify
    Test target cell and cross-cell regressions: 5: QA
    Validate performance accessibility security and cook: 5: QA, Release
  section Release
    Stage platform cohort and prove rollback: 5: Release, SRE
    Update docs decisions evidence and support: 5: Owners
```

A content preview or cell-only test is insufficient; the supported path includes
host activation, shared services, platform packaging, and recovery.

## Evidence order

```mermaid
timeline
  title V4 release evidence
  Contract : Cell promise and specialization boundary
           : Shared schemas plugin and compatibility policy
  Runtime : Host activation gameplay world and authority
          : Presentation persistence services and telemetry
  Verification : Per-cell and cross-cell automated journeys
               : Accessibility performance security and content evidence
  Candidate : Cook certification operations migration and rollback
            : Staged cohort and observability
  Supported : Named cells modes platforms content versions and regions
            : Current regression incident and recovery evidence
```

This timeline orders proof; it does not claim all cells mature together.

## How to use this atlas

Start with the landscape and estate, trace a player action and cell session,
review data and composition with the ER/class diagrams, and use the production
journey/evidence order at release review. Continue to the
[V4 guide](./README.md), [feature index](../features/README.md), and
[architecture index](../architecture/README.md).
