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,64 @@
## 0. Pre-flight (non-negotiable)
- [ ] 0.1 Confirm clean working tree (`git status` reports nothing) and no in-flight worktrees with uncommitted work (`git worktree list` then `git status` in each)
- [ ] 0.2 If any worktrees exist under `.claude/worktrees/`, account for each one: still-active agent, work-pending-merge, or stale-and-prune. Stale worktrees MUST be removed (`git worktree remove`) before opening a new one — code that has been lost twice on main is the failure mode this guards against.
- [ ] 0.3 Confirm the package set in `MANIFEST.md` matches `find packages -maxdepth 3 -name package.json` count. Drift here means a prior change archived without regenerating the manifest.
## 1. gaming-universe — Game Clock Wrapper
- [ ] 1.1 Scaffold `@suaveplan/gaming-universe` package in `packages/universal/gaming/gaming-universe` with `package.json`, `tsconfig.json`, `vitest.config.ts` (100/100/100/100 thresholds)
- [ ] 1.2 Implement `GamingUniverseOptions` and `GamingUniverse` class
- [ ] 1.3 Integrate `@suaveplan/timing` `AsyncScheduler` for tick driving
- [ ] 1.4 Implement `setTimeScale`, `setGameTime`, `pause`, `resume`, `isPaused`, `getGameTime`
- [ ] 1.5 Implement `getScene` delegating to `UniverseClient` at current game time
- [ ] 1.6 Implement event emission via `@suaveplan/events` for `hourChanged`, `dayChanged`, `seasonChanged`, `sunriseStarted`, `sunsetStarted`, `moonriseStarted`, `moonsetStarted`, `eclipseStarted`
- [ ] 1.7 Implement `dispose` stopping scheduler and cancelling in-flight queries (idempotent)
- [ ] 1.8 Expose readonly `universe` property
- [ ] 1.9 Add Zod schemas for all public option types
- [ ] 1.10 Add OTel spans on all public entrypoints
- [ ] 1.11 Add `AbortSignal` on `getScene`
- [ ] 1.12 Write tests achieving 100% coverage
- [ ] 1.13 Write sibling `.md` docs for every implementation file
- [ ] 1.14 Write `README.md` with install, quick-start, and module links
- [ ] 1.15 Configure explicit named barrel exports for all subpaths (no `export *`)
- [ ] 1.16 Run `bunx turbo lint typecheck test build --filter=@suaveplan/gaming-universe` and fix all errors
- [ ] 1.17 Run `bunx turbo test:coverage --filter=@suaveplan/gaming-universe` and verify 100%
## 2. gaming-environment-lighting — Physical Lighting
- [ ] 2.1 Scaffold `@suaveplan/gaming-environment-lighting` package in `packages/universal/gaming/gaming-environment-lighting`
- [ ] 2.2 Implement Rayleigh/Mie scattering sky colour computation from `sunAltitude` and `AtmosphereConfig`
- [ ] 2.3 Implement twilight star visibility thresholds (civil/nautical/astronomical/full dark)
- [ ] 2.4 Implement vacuum collapse (no atmosphere → always full dark)
- [ ] 2.5 Implement multi-satellite moonlight sum (`moonLight ∝ phaseIllumination × angularDiameter² × albedo`)
- [ ] 2.6 Implement `EnvironmentModifiers`: `totalAmbientLight`, `stealthBonus`, `visibilityRangeMetres`, `npcSleepProbability`
- [ ] 2.7 Export plain ECS component interfaces: `DayNightClock`, `LightState`, `DayNightAffected`
- [ ] 2.8 Implement `RenderPayload` generation per tick
- [ ] 2.9 Pass `PlanetTextureManifest` identifiers through verbatim
- [ ] 2.10 Handle optional `WeatherState` pass-through without breaking
- [ ] 2.11 Add Zod schemas for all public option types
- [ ] 2.12 Add OTel spans on all public entrypoints
- [ ] 2.13 Write tests achieving 100% coverage
- [ ] 2.14 Write sibling `.md` docs for every implementation file
- [ ] 2.15 Write `README.md` with install, quick-start, and module links
- [ ] 2.16 Configure explicit named barrel exports for all subpaths (no `export *`)
- [ ] 2.17 Run `bunx turbo lint typecheck test build --filter=@suaveplan/gaming-environment-lighting` and fix all errors
- [ ] 2.18 Run `bunx turbo test:coverage --filter=@suaveplan/gaming-environment-lighting` and verify 100%
## 3. Cross-cutting and Archive
- [ ] 3.1 Update `STATUS.md`: mark `gaming-universe` and `gaming-environment-lighting` as completed
- [ ] 3.2 Update `SUMMARY.md` with per-package paragraphs
- [ ] 3.3 Update `MANIFEST.md` via `bun scripts/folder-reorg/generate-manifest.ts`
- [ ] 3.4 Update `MISSING.yml` via `bun scripts/generate-missing.ts`
- [ ] 3.5 Run `bunx markdownlint-cli2 --fix` on all touched root docs
- [ ] 3.6 Run `bunx turbo lint typecheck test` across the full gaming-universe filter set
- [ ] 3.7 Verify zero banned patterns in all new package `src/` directories
- [ ] 3.8 Verify zero `export *` in feature barrels
- [ ] 3.9 Verify zero direct `vitest`/`bun:test` imports in non-exempt packages
- [ ] 3.10 Verify every `.ts` has a sibling `.md`
- [ ] 3.11 Verify every package has a `README.md`
- [ ] 3.12 Verify no bare version strings in any new `package.json`
- [ ] 3.13 Archive change: move `openspec/changes/enterprise-gaming-universe` to `openspec/archive/2026-04-25-enterprise-gaming-universe`