Initial Commit

This commit is contained in:
2026-05-27 23:29:53 +01:00
commit fbc70f96e6
10000 changed files with 1102152 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
# Tasks — game-server-engine-core (Wave B-1)
## 0. Pre-flight (non-negotiable)
- [x] 0.1 `git status` clean in worktree, `git worktree list` accounted for.
- [x] 0.2 Worktree at `.claude/worktrees/agent-acdee3cac67aeeafb` — isolated branch.
- [x] 0.3 Manifest count matches package set (unchanged — no new packages added).
## 1. Spec authoring
- [x] 1.1 Upstream files read: `GameEngine.ts`, `GameLoop.ts`, `PluginManager.ts`.
- [x] 1.2 Read existing `packages/gaming/games/game-server/src/` foundations.
- [x] 1.3 Read `openspec/AGENTS.md` §13 and §14.
- [x] 1.4 Drafted `proposal.md` from template.
- [x] 1.5 Filled `## Source mapping` table.
- [x] 1.6 Drafted `specs/game-server/spec.md` from template.
- [x] 1.7 Every requirement carries `**Verified by:**`.
## 2. Implementation
- [x] 2.1 Extend `GAME_SERVER_CODES` registry with engine + loop + plugin codes.
- [x] 2.2 Implement `src/engine/game-loop/game-loop.ts` with Clock+TimersLike injection, modes, pause/resume.
- [x] 2.3 Implement `src/engine/plugin-manager/plugin-manager.ts` with install/uninstall/enable/disable + topo sort.
- [x] 2.4 Implement `src/engine/game-engine/game-engine.ts` orchestrator wiring DIContainer + GameLoop + PluginManager.
- [x] 2.5 Add subpath exports for the three feature dirs to `package.json`.
## 3. Tests
- [x] 3.1 `game-loop.test.ts` — covers every scenario in the spec (21 tests).
- [x] 3.2 `plugin-manager.test.ts` — covers every scenario in the spec (12 tests).
- [x] 3.3 `game-engine.test.ts` — covers every scenario in the spec (15 tests).
- [x] 3.4 Every `it(...)` carries `{ timeout: 5000 }`.
## 4. Documentation
- [x] 4.1 Sibling `.md` for every implementation `.ts` (≥200 words, basic + advanced + API + impl notes).
- [x] 4.2 README updated — `## Modules` lists the new `.md` files.
## 5. Pre-archive verification
- [x] 5.1 `bunx turbo lint typecheck test --filter=@suaveplan/game-server` — green (82 tests).
- [x] 5.2 `bunx turbo test:coverage --filter=@suaveplan/game-server` — 100/100/100/100 across full package.
- [x] 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/`.