Skip to content

Commit 5c16a80

Browse files
author
DavidQ
committed
Level 09.02 — normalize asset ownership by moving owner-specific platform assets under owning game/sample/tool assets
1 parent 6cf27f9 commit 5c16a80

24 files changed

Lines changed: 251 additions & 230 deletions

docs/dev/CODEX_COMMANDS.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,5 @@
22
REASONING: high
33

44
COMMAND GOAL:
5-
Create BUILD_PR_LEVEL_09_01_FLOW_RULES_VS_FLOW_CONTENT_SPLIT as a repo-wide docs-first implementation
6-
bundle that separates behavioral flow rules from player-facing flow content across all games.
7-
8-
CONSTRAINTS:
9-
- one PR purpose only
10-
- preserve behavior exactly
11-
- no engine changes
12-
- no launcher changes
13-
- no config migration in this PR
14-
- only split existing flow-related rules/content
5+
Create BUILD_PR_LEVEL_09_02_ASSET_OWNERSHIP_NORMALIZATION as a docs-first, repo-structured bundle
6+
that corrects owner-specific asset placement across games, samples, and tools.

docs/dev/COMMIT_COMMENT.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
build(games): split flow behavior rules vs flow content across game rules surfaces
1+
build(assets): normalize owner-specific platform asset placement under owner assets roots
Lines changed: 30 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,34 @@
1-
BUILD_PR_LEVEL_09_01_FLOW_RULES_VS_FLOW_CONTENT_SPLIT
1+
BUILD_PR_LEVEL_09_02_ASSET_OWNERSHIP_NORMALIZATION
22

3-
What changed
4-
- Added rules split modules per game: rules/flowRules.js and rules/flowContent.js.
5-
- Converted rules/gameFlowRules.js into a compatibility shim re-exporting flowRules + flowContent.
6-
- Updated flow/ and game/ import consumers to read behavior constants from flowRules and player-facing text from flowContent.
3+
Moved owner-specific asset payloads
4+
games/Asteroids/platform/assets/palettes/asteroids-hud.palette.json => games/Asteroids/assets/platform/palettes/asteroids-hud.palette.json
5+
games/Asteroids/platform/assets/parallax/asteroids-overlay.parallax.json => games/Asteroids/assets/platform/parallax/asteroids-overlay.parallax.json
6+
games/Asteroids/platform/assets/parallax/asteroids-title.parallax.json => games/Asteroids/assets/platform/parallax/asteroids-title.parallax.json
7+
games/Asteroids/platform/assets/sprites/asteroids-demo.sprite.json => games/Asteroids/assets/platform/sprites/asteroids-demo.sprite.json
8+
games/Asteroids/platform/assets/tilemaps/asteroids-stage.tilemap.json => games/Asteroids/assets/platform/tilemaps/asteroids-stage.tilemap.json
9+
games/Asteroids/platform/assets/tilesets/asteroids-ui.tileset.json => games/Asteroids/assets/platform/tilesets/asteroids-ui.tileset.json
10+
games/Asteroids/platform/assets/vectors/asteroids-asteroid-large.vector.json => games/Asteroids/assets/platform/vectors/asteroids-asteroid-large.vector.json
11+
games/Asteroids/platform/assets/vectors/asteroids-asteroid-medium.vector.json => games/Asteroids/assets/platform/vectors/asteroids-asteroid-medium.vector.json
12+
games/Asteroids/platform/assets/vectors/asteroids-asteroid-small.vector.json => games/Asteroids/assets/platform/vectors/asteroids-asteroid-small.vector.json
13+
games/Asteroids/platform/assets/vectors/asteroids-ship.vector.json => games/Asteroids/assets/platform/vectors/asteroids-ship.vector.json
14+
games/Asteroids/platform/assets/vectors/asteroids-title.vector.json => games/Asteroids/assets/platform/vectors/asteroids-title.vector.json
715

8-
Classification applied
9-
- behavior/timing/mode/contract/booleans/selectors => flowRules.js
10-
- visible flow text/prompts/headings/labels => flowContent.js
16+
Updated references in active surfaces
17+
- tools/Asset Browser/main.js
18+
- tools/shared/asteroidsPlatformDemo.js
19+
- tools/shared/vectorAssetSystem.js
20+
- tools/templates/starter-project-template/README.md
21+
- tools/templates/starter-project-template/config/starter.project.json
22+
- tests/tools/VectorAssetSystem.test.mjs
23+
- docs/specs/asset_usage_contract.md
1124

12-
Behavior preservation
13-
- No engine files changed.
14-
- No launcher/bootstrap changes.
15-
- No config migration included.
16-
- Split is extraction-only; constants remain same values.
25+
Classification result
26+
- Game-owned moved: Asteroids platform asset payloads
27+
- Sample-owned moved: none found
28+
- Tool-owned moved: none found
29+
- Truly shared assets requiring retention outside owner roots: none found in scanned owner scopes
1730

18-
Games affected: 19
19-
- AITargetDummy
20-
- Asteroids
21-
- Bouncing-ball
22-
- Breakout
23-
- Gravity
24-
- GravityWell
25-
- MultiBallChaos
26-
- Orbit
27-
- PacmanFullAI
28-
- PacmanLite
29-
- PaddleIntercept
30-
- Pong
31-
- ProjectileLab
32-
- Puckman
33-
- SolarSystem
34-
- SpaceDuel
35-
- SpaceInvaders
36-
- Thruster
37-
- vector-arcade-sample
31+
Out-of-scope preserved
32+
- no platform/runtime code moved
33+
- no engine abstractions moved
34+
- no shared infrastructure code moved

docs/dev/reports/file_tree.txt

Lines changed: 21 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -1,121 +1,23 @@
1-
Flow Rules vs Content Split Tree
1+
Asset Ownership Normalization - File Tree (Changed)
22

3-
games/AITargetDummy/rules/flowRules.js
4-
games/AITargetDummy/rules/flowContent.js
5-
games/AITargetDummy/rules/gameFlowRules.js
6-
games/Asteroids/rules/flowRules.js
7-
games/Asteroids/rules/flowContent.js
8-
games/Asteroids/rules/gameFlowRules.js
9-
games/Bouncing-ball/rules/flowRules.js
10-
games/Bouncing-ball/rules/flowContent.js
11-
games/Bouncing-ball/rules/gameFlowRules.js
12-
games/Breakout/rules/flowRules.js
13-
games/Breakout/rules/flowContent.js
14-
games/Breakout/rules/gameFlowRules.js
15-
games/Gravity/rules/flowRules.js
16-
games/Gravity/rules/flowContent.js
17-
games/Gravity/rules/gameFlowRules.js
18-
games/GravityWell/rules/flowRules.js
19-
games/GravityWell/rules/flowContent.js
20-
games/GravityWell/rules/gameFlowRules.js
21-
games/MultiBallChaos/rules/flowRules.js
22-
games/MultiBallChaos/rules/flowContent.js
23-
games/MultiBallChaos/rules/gameFlowRules.js
24-
games/Orbit/rules/flowRules.js
25-
games/Orbit/rules/flowContent.js
26-
games/Orbit/rules/gameFlowRules.js
27-
games/PacmanFullAI/rules/flowRules.js
28-
games/PacmanFullAI/rules/flowContent.js
29-
games/PacmanFullAI/rules/gameFlowRules.js
30-
games/PacmanLite/rules/flowRules.js
31-
games/PacmanLite/rules/flowContent.js
32-
games/PacmanLite/rules/gameFlowRules.js
33-
games/PaddleIntercept/rules/flowRules.js
34-
games/PaddleIntercept/rules/flowContent.js
35-
games/PaddleIntercept/rules/gameFlowRules.js
36-
games/Pong/rules/flowRules.js
37-
games/Pong/rules/flowContent.js
38-
games/Pong/rules/gameFlowRules.js
39-
games/ProjectileLab/rules/flowRules.js
40-
games/ProjectileLab/rules/flowContent.js
41-
games/ProjectileLab/rules/gameFlowRules.js
42-
games/Puckman/rules/flowRules.js
43-
games/Puckman/rules/flowContent.js
44-
games/Puckman/rules/gameFlowRules.js
45-
games/SolarSystem/rules/flowRules.js
46-
games/SolarSystem/rules/flowContent.js
47-
games/SolarSystem/rules/gameFlowRules.js
48-
games/SpaceDuel/rules/flowRules.js
49-
games/SpaceDuel/rules/flowContent.js
50-
games/SpaceDuel/rules/gameFlowRules.js
51-
games/SpaceInvaders/rules/flowRules.js
52-
games/SpaceInvaders/rules/flowContent.js
53-
games/SpaceInvaders/rules/gameFlowRules.js
54-
games/Thruster/rules/flowRules.js
55-
games/Thruster/rules/flowContent.js
56-
games/Thruster/rules/gameFlowRules.js
57-
games/vector-arcade-sample/rules/flowRules.js
58-
games/vector-arcade-sample/rules/flowContent.js
59-
games/vector-arcade-sample/rules/gameFlowRules.js
3+
games/Asteroids/assets/platform/
4+
palettes/asteroids-hud.palette.json
5+
parallax/asteroids-overlay.parallax.json
6+
parallax/asteroids-title.parallax.json
7+
sprites/asteroids-demo.sprite.json
8+
tilemaps/asteroids-stage.tilemap.json
9+
tilesets/asteroids-ui.tileset.json
10+
vectors/asteroids-asteroid-large.vector.json
11+
vectors/asteroids-asteroid-medium.vector.json
12+
vectors/asteroids-asteroid-small.vector.json
13+
vectors/asteroids-ship.vector.json
14+
vectors/asteroids-title.vector.json
6015

61-
Updated import consumers:
62-
games\AITargetDummy\flow\attract.js
63-
games\AITargetDummy\flow\highscore.js
64-
games\AITargetDummy\flow\intro.js
65-
games\Asteroids\flow\attract.js
66-
games\Asteroids\flow\highscore.js
67-
games\Asteroids\flow\intro.js
68-
games\Asteroids\game\AsteroidsGameScene.js
69-
games\Bouncing-ball\flow\attract.js
70-
games\Bouncing-ball\flow\highscore.js
71-
games\Bouncing-ball\flow\intro.js
72-
games\Breakout\flow\attract.js
73-
games\Breakout\flow\highscore.js
74-
games\Breakout\flow\intro.js
75-
games\Gravity\flow\attract.js
76-
games\Gravity\flow\highscore.js
77-
games\Gravity\flow\intro.js
78-
games\GravityWell\flow\attract.js
79-
games\GravityWell\flow\highscore.js
80-
games\GravityWell\flow\intro.js
81-
games\MultiBallChaos\flow\attract.js
82-
games\MultiBallChaos\flow\highscore.js
83-
games\MultiBallChaos\flow\intro.js
84-
games\Orbit\flow\attract.js
85-
games\Orbit\flow\highscore.js
86-
games\Orbit\flow\intro.js
87-
games\PacmanFullAI\flow\attract.js
88-
games\PacmanFullAI\flow\highscore.js
89-
games\PacmanFullAI\flow\intro.js
90-
games\PacmanLite\flow\attract.js
91-
games\PacmanLite\flow\highscore.js
92-
games\PacmanLite\flow\intro.js
93-
games\PaddleIntercept\flow\attract.js
94-
games\PaddleIntercept\flow\highscore.js
95-
games\PaddleIntercept\flow\intro.js
96-
games\Pong\flow\attract.js
97-
games\Pong\flow\highscore.js
98-
games\Pong\flow\intro.js
99-
games\ProjectileLab\flow\attract.js
100-
games\ProjectileLab\flow\highscore.js
101-
games\ProjectileLab\flow\intro.js
102-
games\Puckman\flow\attract.js
103-
games\Puckman\flow\highscore.js
104-
games\Puckman\flow\intro.js
105-
games\Puckman\game\PuckmanGameScene.js
106-
games\Puckman\game\PuckmanRuntime.js
107-
games\SolarSystem\flow\attract.js
108-
games\SolarSystem\flow\highscore.js
109-
games\SolarSystem\flow\intro.js
110-
games\SpaceDuel\flow\attract.js
111-
games\SpaceDuel\flow\highscore.js
112-
games\SpaceDuel\flow\intro.js
113-
games\SpaceInvaders\flow\attract.js
114-
games\SpaceInvaders\flow\highscore.js
115-
games\SpaceInvaders\flow\intro.js
116-
games\Thruster\flow\attract.js
117-
games\Thruster\flow\highscore.js
118-
games\Thruster\flow\intro.js
119-
games\vector-arcade-sample\flow\attract.js
120-
games\vector-arcade-sample\flow\highscore.js
121-
games\vector-arcade-sample\flow\intro.js
16+
Reference updates
17+
- tools/Asset Browser/main.js
18+
- tools/shared/asteroidsPlatformDemo.js
19+
- tools/shared/vectorAssetSystem.js
20+
- tools/templates/starter-project-template/README.md
21+
- tools/templates/starter-project-template/config/starter.project.json
22+
- tests/tools/VectorAssetSystem.test.mjs
23+
- docs/specs/asset_usage_contract.md
Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,43 @@
1-
BUILD_PR_LEVEL_09_01_FLOW_RULES_VS_FLOW_CONTENT_SPLIT - Validation Checklist
1+
BUILD_PR_LEVEL_09_02_ASSET_OWNERSHIP_NORMALIZATION - Validation Checklist
22

3-
Scope and constraints
3+
Scope
44
- [x] one PR purpose only
5-
- [x] no engine changes
6-
- [x] no launcher changes
7-
- [x] no config migration
8-
- [x] preserve behavior via constant extraction only
5+
- [x] no engine modifications
6+
- [x] no launcher/bootstrap changes
7+
- [x] no config migration as a separate lane
8+
- [x] no start_of_day modifications
99

10-
Required pattern
11-
- [x] games/<GameName>/rules/flowRules.js present for all affected games
12-
- [x] games/<GameName>/rules/flowContent.js present for all affected games
13-
- [x] flow/ and game/ import consumers updated to split modules
10+
Required work
11+
1. scan repo for owner-specific assets outside owner assets/
12+
- [x] scanned games/, samples/, tools/ for */platform/assets payloads
13+
14+
2. classify by owner
15+
- [x] game-owned: Asteroids payloads found
16+
- [x] sample-owned: none found
17+
- [x] tool-owned: none found
18+
- [x] truly shared: none found in scanned owner scopes
19+
20+
3. move only asset payloads
21+
- [x] 11 asset payload files moved from games/Asteroids/platform/assets/* to games/Asteroids/assets/platform/*
22+
23+
4. update references
24+
- [x] updated active path references to games/Asteroids/assets/platform/
25+
26+
5. remove old asset locations when safe
27+
- [x] moved payload files out of old location
28+
- [x] no owner payload files remain under games/Asteroids/platform/assets
29+
30+
6. preserve exact assets / avoid code moves
31+
- [x] payload files preserved (move only)
32+
- [x] no runtime/platform code moved
1433

1534
Command evidence
16-
- node --check on all rules split files + all import consumers: PASS (117 files)
17-
- node tests/runtime/LaunchSmokeAllEntries.test.mjs: PASS
35+
- rg scan for old active paths (tools/tests/docs/specs): no stale games/Asteroids/platform/assets refs remain
36+
- node --check tools/Asset Browser/main.js : PASS
37+
- node --check tools/shared/asteroidsPlatformDemo.js : PASS
38+
- node --check tools/shared/vectorAssetSystem.js : PASS
39+
- node tests/runtime/LaunchSmokeAllEntries.test.mjs : PASS
40+
- tests/tools/VectorAssetSystem.test.mjs : blocked by existing baseline env/module resolution issue (C:/src/engine/assets/AssetRegistry.js)
1841

1942
Result
20-
- PASS
43+
- PASS (with noted baseline test-environment blocker unrelated to this move)
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# BUILD_PR — LEVEL 09.02 ASSET OWNERSHIP NORMALIZATION
2+
3+
## Purpose
4+
Normalize asset ownership so asset folders live under the owning scope instead of under broad shared
5+
buckets that hide ownership.
6+
7+
## Architectural decision
8+
If `platform` contains art/audio/data assets for a specific game, sample, or tool, then it should
9+
move under that owner as:
10+
11+
- `games/<GameName>/assets/platform/`
12+
- `samples/<SampleName>/assets/platform/`
13+
- `tools/<ToolName>/assets/platform/`
14+
15+
## Important distinction
16+
This rule applies only to **assets**.
17+
18+
Do **not** move:
19+
- engine/runtime platform code
20+
- browser/platform abstraction code
21+
- shared non-asset infrastructure
22+
23+
Only move folders/files that are truly asset payloads:
24+
- images
25+
- sprites
26+
- tile sets
27+
- audio
28+
- json/data payloads used as content
29+
- SVG/background/parallax payloads
30+
31+
## Why this is the right rule
32+
`platform/assets` hides ownership.
33+
If the asset belongs to one game/sample/tool, it should live with that owner.
34+
This improves:
35+
- clarity
36+
- portability
37+
- deletion safety
38+
- packaging
39+
- future per-owner publishing
40+
41+
## Scope
42+
Docs-first repo-wide ownership correction specification for:
43+
- games
44+
- samples
45+
- tools
46+
47+
## Ownership rules
48+
### Game-owned
49+
Move to:
50+
- `games/<GameName>/assets/...`
51+
52+
### Sample-owned
53+
Move to:
54+
- `samples/<SampleName>/assets/...`
55+
56+
### Tool-owned
57+
Move to:
58+
- `tools/<ToolName>/assets/...`
59+
60+
### Truly shared assets
61+
Keep shared only if they are genuinely reused across multiple owners and are not owner-specific.
62+
These must be documented explicitly as shared assets, not treated as default storage.
63+
64+
## Migration rule
65+
When moving assets:
66+
1. preserve exact payloads
67+
2. update references/import paths
68+
3. do not duplicate unless temporary transition requires it
69+
4. remove old location after references are verified
70+
5. do not move runtime/platform code in this PR
71+
72+
## Required scan
73+
Codex must scan for:
74+
- `platform/assets`
75+
- `*/platform/assets`
76+
- any owner-specific assets stored outside owner `assets/`
77+
78+
## Deliverables
79+
This PR should produce a docs-first implementation plan and Codex execution instructions for a
80+
repo-wide ownership correction pass.
81+
82+
## Acceptance criteria
83+
1. no owner-specific asset remains under broad `platform/assets`
84+
2. game assets live under `games/<GameName>/assets/`
85+
3. sample assets live under `samples/<SampleName>/assets/`
86+
4. tool assets live under `tools/<ToolName>/assets/`
87+
5. path references are updated
88+
6. no runtime/platform code moved
89+
7. genuinely shared assets, if any, are called out explicitly
90+
91+
## Out of scope
92+
- engine refactors
93+
- runtime platform abstraction changes
94+
- asset content redesign
95+
- compression/optimization work

0 commit comments

Comments
 (0)