Skip to content

Commit 4b23d62

Browse files
author
DavidQ
committed
Normalize scene vs scenes into one engine boundary
BUILD_PR_LEVEL_01_SCENE_SCENES_BOUNDARY_NORMALIZATION
1 parent 58f6c4d commit 4b23d62

245 files changed

Lines changed: 830 additions & 829 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/architecture/engine-scene-transitions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ The transition layer exists to own scene handoff effects so that individual scen
88

99
## Added files
1010

11-
- `src/engine/scenes/SceneTransition.js`
12-
- `src/engine/scenes/TransitionScene.js`
13-
- `src/engine/scenes/index.js`
11+
- `src/engine/scene/SceneTransition.js`
12+
- `src/engine/scene/TransitionScene.js`
13+
- `src/engine/scene/index.js`
1414

1515
## Responsibilities
1616

docs/dev/CODEX_COMMANDS.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,27 @@ MODEL: GPT-5.4
22
REASONING: high
33

44
COMMAND:
5-
Create `BUILD_PR_LEVEL_01_RENDERER_RENDERING_BOUNDARY_NORMALIZATION`.
5+
Create `BUILD_PR_LEVEL_01_SCENE_SCENES_BOUNDARY_NORMALIZATION`.
66

7-
Implement one clear rendering boundary decision:
7+
Implement one clear scene boundary decision:
88

9-
1. Do NOT keep both `renderer` and `rendering` as competing top-level engine concepts.
10-
2. Prefer `src/engine/rendering/` as the single domain boundary.
11-
3. Treat renderer as an implementation/class/module inside rendering, not as a separate parallel boundary.
9+
1. Do NOT keep both `scene` and `scenes` as competing top-level engine concepts when they overlap.
10+
2. Prefer `src/engine/scene/` as the single engine domain boundary.
11+
3. Treat plural "scenes" as content collections/instances owned by games or samples where appropriate, not as a competing engine boundary.
1212
4. Normalize imports/exports to that one truth.
13-
5. Keep the structure simple:
14-
- do NOT over-split into `vector/`, `sprite/`, `layer/` unless the repo already has enough stable clustered content to justify it
15-
- prefer a flatter rendering boundary first
16-
6. Update roadmap/status only if needed and only by status markers or additive truth-safe structure clarification.
17-
7. Validate:
13+
5. Keep ownership clear:
14+
- engine owns reusable scene runtime logic only
15+
- game/sample-specific scene content stays in its owning layer unless truly reusable
16+
6. Keep the changes surgical.
17+
7. Update roadmap/status only if needed and only by status markers or additive truth-safe structure clarification.
18+
8. Validate:
1819
- imports remain green
19-
- no duplicate renderer/rendering top-level ambiguity remains
20-
- any subfolders added are truthfully justified, not speculative
20+
- no duplicate scene/scenes top-level ambiguity remains
21+
- engine scene ownership is clearer
22+
- section 1 residue is reduced or closed truthfully
2123

2224
Final packaging step is REQUIRED:
23-
`<project folder>/tmp/BUILD_PR_LEVEL_01_RENDERER_RENDERING_BOUNDARY_NORMALIZATION.zip`
25+
`<project folder>/tmp/BUILD_PR_LEVEL_01_SCENE_SCENES_BOUNDARY_NORMALIZATION.zip`
2426

2527
Hard rules:
2628
- implementation by Codex

docs/dev/COMMIT_COMMENT.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Normalize renderer vs rendering into one engine boundary
2-
BUILD_PR_LEVEL_01_RENDERER_RENDERING_BOUNDARY_NORMALIZATION
1+
Normalize scene vs scenes into one engine boundary
2+
BUILD_PR_LEVEL_01_SCENE_SCENES_BOUNDARY_NORMALIZATION
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
- Added PR to collapse renderer/rendering ambiguity into one engine boundary
2-
- Recommends keeping rendering as the folder/domain and renderer as an implementation inside it
3-
- Avoids premature vector/sprite/layer over-structuring unless justified by real content
1+
- Added PR to collapse scene/scenes ambiguity into one engine boundary
2+
- Recommends keeping scene as the engine domain and moving content-owned scenes to their owning layer
3+
- Keeps section-1 normalization surgical and truth-based
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
- only one top-level rendering boundary remains
2-
- renderer no longer competes with rendering as a parallel concept
1+
- only one top-level engine scene boundary remains
2+
- scene no longer competes with scenes as a parallel engine concept
33
- imports/exports normalized and valid
4-
- no speculative subfolder explosion introduced
4+
- game/sample scene content ownership is clearer
55
- roadmap/status handling remains truth-safe
66
- output ZIP created at:
7-
<project folder>/tmp/BUILD_PR_LEVEL_01_RENDERER_RENDERING_BOUNDARY_NORMALIZATION.zip
7+
<project folder>/tmp/BUILD_PR_LEVEL_01_SCENE_SCENES_BOUNDARY_NORMALIZATION.zip
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# BUILD_PR_LEVEL_01_SCENE_SCENES_BOUNDARY_NORMALIZATION
2+
3+
## Purpose
4+
Normalize engine scene runtime to one boundary: `src/engine/scene`.
5+
6+
## Applied Delta
7+
8+
### 1) Single top-level engine scene boundary enforced
9+
- Removed competing boundary directory:
10+
- `src/engine/scenes/` (deleted)
11+
- Kept singular engine runtime boundary:
12+
- `src/engine/scene/`
13+
14+
### 2) Engine scene runtime ownership clarified
15+
- Replaced prior `scene` proxy wrappers with real runtime implementation files in `src/engine/scene/`:
16+
- `Scene.js`
17+
- `SceneManager.js`
18+
- `SceneTransition.js`
19+
- `SceneTransitionController.js`
20+
- `TransitionScene.js`
21+
- `AttractModeController.js`
22+
- `index.js`
23+
- Engine continues to own reusable scene runtime logic only.
24+
- Game/sample scene content remains in game/sample-owned paths.
25+
26+
### 3) Import/export normalization to one truth
27+
- Normalized all active runtime/test/sample imports from `src/engine/scenes/...` to `src/engine/scene/...` across:
28+
- `games/*/game/*Scene.js`
29+
- `samples/phase-*/**/*Scene*.js` and related sample mains
30+
- `tests/scenes/*.test.mjs`
31+
- `tests/core/EngineSceneLifecycle.test.mjs`
32+
- `tests/final/PlatformUxSystems.test.mjs`
33+
- Updated documentation path references where touched:
34+
- `docs/architecture/engine-scene-transitions.md`
35+
- `docs/samples/sample-template.md`
36+
- Updated sample metadata references:
37+
- `samples/metadata/samples.shared.boundaries.report.json`
38+
- `samples/metadata/samples.index.metadata.json`
39+
40+
## Roadmap Handling
41+
- No roadmap status-marker change was required.
42+
- No roadmap prose text was rewritten.
43+
44+
## Validation
45+
- `node --check` across all changed JS/MJS files (`236` files checked, `0` parse failures).
46+
- Focused scene validation tests:
47+
- `node tests/scenes/SceneManager.test.mjs`
48+
- `node tests/scenes/TransitionScene.test.mjs`
49+
- `node tests/scenes/AttractModeController.test.mjs`
50+
- `node tests/core/EngineSceneLifecycle.test.mjs`
51+
- `node tests/final/PlatformUxSystems.test.mjs`
52+
- Boundary checks:
53+
- no remaining `src/engine/scenes` imports in `src`, `games`, `samples`, `tests`, `tools`, `docs/architecture`, `docs/samples`
54+
- `src/engine` contains `scene` and no `scenes`
55+
56+
## Packaging
57+
`<project folder>/tmp/BUILD_PR_LEVEL_01_SCENE_SCENES_BOUNDARY_NORMALIZATION.zip`
58+
59+
## Scope guard
60+
- surgical implementation only
61+
- no unrelated repo changes

docs/samples/sample-template.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ Late samples may instead use shared sample-owned helpers from `samples/_shared/`
1616
## main.js Rules
1717
- bootstrap only
1818
- import `Engine` from `src/engine/core/Engine.js` when booting directly
19-
- prefer public engine barrels such as `src/engine/input/index.js`, `src/engine/theme/index.js`, and `src/engine/scenes/index.js`
19+
- prefer public engine barrels such as `src/engine/input/index.js`, `src/engine/theme/index.js`, and `src/engine/scene/index.js`
2020
- set the scene and start the engine
2121

2222
## Scene Rules
23-
- extend `Scene` from `src/engine/scenes/index.js`
23+
- extend `Scene` from `src/engine/scene/index.js`
2424
- own sample-specific state, update, and render logic
2525
- do not own engine construction or document-wide wiring
2626

games/AITargetDummy/game/AITargetDummyScene.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ David Quesenberry
44
03/25/2026
55
AITargetDummyScene.js
66
*/
7-
import { Scene } from '/src/engine/scenes/index.js';
7+
import { Scene } from '/src/engine/scene/index.js';
88
import AITargetDummyDebugOverlay from './AITargetDummyDebugOverlay.js';
99
import AITargetDummyInputController from './AITargetDummyInputController.js';
1010
import AITargetDummyWorld from './AITargetDummyWorld.js';

games/Asteroids/game/AsteroidsGameScene.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ David Quesenberry
44
03/22/2026
55
AsteroidsGameScene.js
66
*/
7-
import { AttractModeController, Scene } from '/src/engine/scenes/index.js';
7+
import { AttractModeController, Scene } from '/src/engine/scene/index.js';
88
import { ParticleSystem } from '/src/engine/fx/index.js';
99
import AsteroidsSession from './AsteroidsSession.js';
1010
import AsteroidsWorld from './AsteroidsWorld.js';

games/Gravity/game/GravityScene.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ David Quesenberry
44
03/24/2026
55
GravityScene.js
66
*/
7-
import { Scene } from '/src/engine/scenes/index.js';
7+
import { Scene } from '/src/engine/scene/index.js';
88
import GravityAudio from './GravityAudio.js';
99
import GravityInputController from './GravityInputController.js';
1010
import GravityWorld from './GravityWorld.js';

0 commit comments

Comments
 (0)