3.0 KiB
3.0 KiB
Tasks — Wave A: @suaveplan/game-server core foundation
0. Pre-flight (non-negotiable)
- 0.1 Confirm clean working tree (
git statusreports nothing) and no in-flight worktrees with uncommitted work - 0.2 Account for every
.claude/worktrees/agent-*— operating insideagent-a3cb7ed021fa6e13afor this change - 0.3
MANIFEST.mdmatchesfind packages -maxdepth 3 -name package.jsoncount — verified unchanged (no new packages added; this is an in-package extension)
1. Spec authoring
- 1.1 Read
../suaveplan/packages/universal/game-server/src/core/upstream sources - 1.2 Read existing
openspec/changes/enterprise-game-server-core/proposal.mdto align with prior scope decisions - 1.3 Read
openspec/AGENTS.mdSections 13 and 14 - 1.4 Draft
proposal.md - 1.5 Source mapping documented in the Parity Checklist
- 1.6 Draft
specs/game-server/spec.md - 1.7 Every
### Requirement:carries a**Verified by:**line
2. Implementation
- 2.1
src/core/types/core.types.ts—ConnectionStatus,PlayerConnection,SessionNode,SessionData,StateChangeEvent,GameEvents - 2.2
src/core/interfaces/i-game-logic/— interface +runIGameLogicConformance - 2.3
src/core/interfaces/i-player-manager/— interface +runIPlayerManagerConformance - 2.4
src/core/interfaces/i-session-manager/— interface +runISessionManagerConformance - 2.5
src/core/interfaces/i-state-manager/— interface +runIStateManagerConformance - 2.6
src/core/events/game-events/—GAME_EVENT_KEYS+isGameEventKey - 2.7
src/core/events/game-event-emitter/—GameEventEmitterwith all helpers - 2.8
src/core/abstract-game-logic/—AbstractGameLogicwith Clock + IdGenerator + OTel - 2.9 Extend
src/errors/game-server-error.ts— 6 new codes - 2.10 Extend root
src/index.tsandpackage.jsonexports
3. Tests
- 3.1 Unit tests for every implementation file (one
.test.tsper.ts) - 3.2 Conformance harness tests against compliant + non-compliant reference impls
- 3.3 Every
it(...)carries{ timeout: 5000 } - 3.4 OTel assertion via
flushTestMetrics()from the existing polyfill
4. Documentation
- 4.1 Sibling
.mdfor every implementation.ts - 4.2 Existing
README.mdcovers the package (Wave A surface auto-discoverable via re-exports; no README rewrite required for the core extension)
5. Pre-archive verification (the 5-gate triple)
- 5.1
bun run check— Biome 0 errors across the package - 5.2
bunx turbo lint typecheck test --filter=@suaveplan/game-server— green - 5.3
bunx turbo test:coverage --filter=@suaveplan/game-server— 100/100/100/100 - 5.4 Banned-pattern scan returns empty
- 5.5
bunx turbo build --filter=@suaveplan/game-server— green
6. Archive (NOT performed in this worktree)
- 6.1 Fold delta into
openspec/specs/game-server/spec.md(orchestrator step) - 6.2 Move folder to
openspec/archive/<yyyy-mm-dd>-game-server-core/(orchestrator step)