Files
2026-05-27 23:29:53 +01:00

2.3 KiB

Tasks — game-server-engine-core (Wave B-1)

0. Pre-flight (non-negotiable)

  • 0.1 git status clean in worktree, git worktree list accounted for.
  • 0.2 Worktree at .claude/worktrees/agent-acdee3cac67aeeafb — isolated branch.
  • 0.3 Manifest count matches package set (unchanged — no new packages added).

1. Spec authoring

  • 1.1 Upstream files read: GameEngine.ts, GameLoop.ts, PluginManager.ts.
  • 1.2 Read existing packages/gaming/games/game-server/src/ foundations.
  • 1.3 Read openspec/AGENTS.md §13 and §14.
  • 1.4 Drafted proposal.md from template.
  • 1.5 Filled ## Source mapping table.
  • 1.6 Drafted specs/game-server/spec.md from template.
  • 1.7 Every requirement carries **Verified by:**.

2. Implementation

  • 2.1 Extend GAME_SERVER_CODES registry with engine + loop + plugin codes.
  • 2.2 Implement src/engine/game-loop/game-loop.ts with Clock+TimersLike injection, modes, pause/resume.
  • 2.3 Implement src/engine/plugin-manager/plugin-manager.ts with install/uninstall/enable/disable + topo sort.
  • 2.4 Implement src/engine/game-engine/game-engine.ts orchestrator wiring DIContainer + GameLoop + PluginManager.
  • 2.5 Add subpath exports for the three feature dirs to package.json.

3. Tests

  • 3.1 game-loop.test.ts — covers every scenario in the spec (21 tests).
  • 3.2 plugin-manager.test.ts — covers every scenario in the spec (12 tests).
  • 3.3 game-engine.test.ts — covers every scenario in the spec (15 tests).
  • 3.4 Every it(...) carries { timeout: 5000 }.

4. Documentation

  • 4.1 Sibling .md for every implementation .ts (≥200 words, basic + advanced + API + impl notes).
  • 4.2 README updated — ## Modules lists the new .md files.

5. Pre-archive verification

  • 5.1 bunx turbo lint typecheck test --filter=@suaveplan/game-server — green (82 tests).
  • 5.2 bunx turbo test:coverage --filter=@suaveplan/game-server — 100/100/100/100 across full package.
  • 5.3 No banned patterns (TODO/FIXME/biome-ignore/runner imports).

6. Archive (orchestrator-owned)

  • 6.1 Orchestrator folds specs/game-server/spec.md into openspec/specs/game-server/spec.md post-merge.
  • 6.2 Orchestrator moves change folder to openspec/archive/<yyyy-mm-dd>-game-server-engine-core/.