WebSocket Message Schemas (WS-002):
- Add Pydantic models for all client/server WebSocket messages
- Implement discriminated unions for message type parsing
- Include JoinGame, Action, Resign, Heartbeat client messages
- Include GameState, ActionResult, Error, TurnStart server messages
Connection Manager (WS-003):
- Add Redis-backed WebSocket connection tracking
- Implement user-to-sid mapping with TTL management
- Support game room association and opponent lookup
- Add heartbeat tracking for connection health
Socket.IO Authentication (WS-004):
- Add JWT-based authentication middleware
- Support token extraction from multiple formats
- Implement session setup with ConnectionManager integration
- Add require_auth helper for event handlers
Socket.IO Server Setup (WS-001):
- Configure AsyncServer with ASGI mode
- Register /game namespace with event handlers
- Integrate with FastAPI via ASGIApp wrapper
- Configure CORS from application settings
Game Service (GS-001):
- Add stateless GameService for game lifecycle orchestration
- Create engine per-operation using rules from GameState
- Implement action-based RNG seeding for deterministic replay
- Add rng_seed field to GameState for replay support
Architecture verified:
- Core module independence (no forbidden imports)
- Config from request pattern (rules in GameState)
- Dependency injection (constructor deps, method config)
- All 1090 tests passing
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Technical architecture overview covering frontend (Vue+Phaser), backend (FastAPI), database schema, real-time communication, game engine design, and offline fork considerations.
GAME_RULES.md
Game rules document defining campaign structure, base ruleset, energy system, deck building, win conditions, turn structure, card types, and status conditions.
Legacy Documentation
Historical documents from completed development phases, preserved for reference.
File
Description
legacy/SYSTEM_REVIEW.md
Comprehensive code review of the core game engine (Jan 2026). Identified 15 issues across models, effects, and engine - all resolved. 826 tests passing.
legacy/PROJECT_PLAN_ENERGY_EVOLUTION.md
Implementation plan for energy/tool attachment refactor and evolution stack system. Changed attached_energy/attached_tools from list[str] to list[CardInstance]. Completed Jan 2026.