Skip to content

Commit 34be8f1

Browse files
author
DavidQ
committed
BUILD_PR_LEVEL_10_1B_TOOL_SECTION_METADATA_AND_PALETTE_TOOL_SINGLETON
- Moved singleton palette into Palette Browser tool section - Removed root-level palette ownership - Added required metadata to tool sections - Kept Primitive Skin Editor focused on skins only PR Details: - Corrects tool ownership model - No palette JSON files - No validators - No start_of_day changes BUILD_PR_LEVEL_10_2_WORKSPACE_MANAGER_OPEN_TEST_AND_SHARED_BOUNDARY_AUDIT - Added games/index Workspace Manager open-action validation - Verified gameId + mount=game query contract - Audited tools/shared/asteroidsPlatformDemo.js boundary ownership PR Details: - Supports manifest/tool alignment work - No start_of_day changes - No validators
1 parent d39180c commit 34be8f1

24 files changed

Lines changed: 1284 additions & 698 deletions
Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11
# Expected Codex Return / Delta Template
22

3-
## Expected Changed Files
4-
- `games/*/game.manifest.json`
5-
- `docs/dev/reports/level_10_1a_palette_singleton_correction_report.md`
3+
## Expected Changed/Added Files
4+
- `tests/runtime/GamesIndexWorkspaceManagerOpen.test.mjs` or equivalent
5+
- `tests/run-tests.mjs` only if needed to include the new test in the correct suite
6+
- `package.json` only if a focused npm script is needed
7+
- `docs/dev/reports/level_10_2_workspace_manager_open_test_report.md`
8+
- `docs/dev/reports/level_10_2_asteroids_platform_demo_boundary_audit.md`
69
- `docs/dev/roadmaps/MASTER_ROADMAP_ENGINE.md` if status update needed
710

811
## Expected Validation Summary
9-
- `games_scanned=<count>`
10-
- `games_with_root_palette=<count>`
11-
- `tool_owned_palettes_remaining=0`
12-
- `root_palettes_collections_remaining=0`
13-
- `palette_json_files_created=0`
14-
- `duplicate_palette_swatches_removed=<count>`
15-
- `symbol_conflicts_fixed=<count>`
16-
- `opaque_alpha_ff_remaining=0`
17-
- `validators_added=0`
12+
- `games_index_test_added=true`
13+
- `games_discovered=<count>`
14+
- `workspace_manager_actions_checked=<count>`
15+
- `actions_with_gameId=<count>`
16+
- `actions_with_mount_game=<count>`
17+
- `actions_using_legacy_game_query=0`
18+
- `workspace_manager_diagnostic_failures=0`
19+
- `asteroids_platform_demo_boundary_audited=true`
1820
- `start_of_day_changes=0`
1921

2022
## Expected Delta ZIP
2123
Codex must create:
2224

23-
`tmp/BUILD_PR_LEVEL_10_1A_PALETTE_STANDALONE_SINGLETON_CORRECTION_delta.zip`
25+
`tmp/BUILD_PR_LEVEL_10_2_WORKSPACE_MANAGER_OPEN_TEST_AND_SHARED_BOUNDARY_AUDIT_delta.zip`
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Level 10.1B Tool Section Metadata And Palette Tool Singleton Report
2+
3+
## BUILD
4+
- `BUILD_PR_LEVEL_10_1B_TOOL_SECTION_METADATA_AND_PALETTE_TOOL_SINGLETON`
5+
6+
## Scope Completed
7+
- Scanned all `games/*/game.manifest.json`.
8+
- Moved singleton palette ownership to `tools["palette-browser"].palette`.
9+
- Removed root `palette` and root `palettes`.
10+
- Removed all `tools.*.palettes` collections and non-`palette-browser` `tools.*.palette` duplicates.
11+
- Added required metadata to every existing tool section:
12+
- `schema`
13+
- `version`
14+
- `name`
15+
- `source`
16+
- Ensured `primitive-skin-editor` exists with metadata and `skins: []`.
17+
- Ensured `palette-browser` exists with metadata and singleton `palette`.
18+
19+
## Read-Path Adjustment
20+
- Updated old Asteroids manifest fragment references in:
21+
- `tools/shared/asteroidsPlatformDemo.js`
22+
- Old reference:
23+
- `games/Asteroids/game.manifest.json#palette`
24+
- New reference:
25+
- `games/Asteroids/game.manifest.json#tools.palette-browser.palette`
26+
27+
## Structural Validation
28+
- Validation result: `issues=0` for all launchable game manifests.
29+
- Checks performed:
30+
- No root `palette`.
31+
- No root `palettes`.
32+
- Exactly one `tools["palette-browser"].palette` per game manifest.
33+
- No remaining `tools.*.palettes`.
34+
- No non-`palette-browser` `tools.*.palette`.
35+
- `primitive-skin-editor` has metadata and `skins` only.
36+
- All tool sections include metadata (`schema/version/name/source`).
37+
- Palette swatches normalized:
38+
- uppercase `#RRGGBB`
39+
- no opaque `FF`
40+
- single-character symbols
41+
42+
## Runtime Validation
43+
- Executed: `npm run test:launch-smoke:games`
44+
- Result:
45+
- `filters: games=true samples=false tools=false`
46+
- `PASS=12 FAIL=0 TOTAL=12`
47+
48+
## Game Summary
49+
| Game | Palette Location | Primitive Skin Editor | Tool Metadata Coverage |
50+
| --- | --- | --- | --- |
51+
| `_template` | `tools.palette-browser.palette` | metadata + `skins: []` | complete |
52+
| `AITargetDummy` | `tools.palette-browser.palette` | metadata + `skins: []` | complete |
53+
| `Asteroids` | `tools.palette-browser.palette` | metadata + `skins: []` | complete |
54+
| `Bouncing-ball` | `tools.palette-browser.palette` | metadata + `skins: []` | complete |
55+
| `Breakout` | `tools.palette-browser.palette` | metadata + `skins: []` | complete |
56+
| `GravityWell` | `tools.palette-browser.palette` | metadata + `skins: []` | complete |
57+
| `Pacman` | `tools.palette-browser.palette` | metadata + `skins: []` | complete |
58+
| `Pong` | `tools.palette-browser.palette` | metadata + `skins: []` | complete |
59+
| `SolarSystem` | `tools.palette-browser.palette` | metadata + `skins: []` | complete |
60+
| `SpaceDuel` | `tools.palette-browser.palette` | metadata + `skins: []` | complete |
61+
| `SpaceInvaders` | `tools.palette-browser.palette` | metadata + `skins: []` | complete |
62+
| `vector-arcade-sample` | `tools.palette-browser.palette` | metadata + `skins: []` | complete |
63+
64+
## Guardrails
65+
- No new palette JSON files were created.
66+
- No validators were added.
67+
- No `start_of_day` files were modified.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Level 10.2 Asteroids Platform Demo Boundary Audit
2+
3+
## To Be Completed By Codex
4+
- Identify all imports of `tools/shared/asteroidsPlatformDemo.js`.
5+
- Identify imports used by that file.
6+
- Determine whether it is tool-generic, game-specific, sample-specific, or engine-generic.
7+
- Recommend final owning folder.
8+
- State whether move is safe now or should be a follow-up PR.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Level 10.2 Workspace Manager Open Test Report
2+
3+
## To Be Completed By Codex
4+
- List games discovered from `games/index.html`.
5+
- List Workspace Manager actions found.
6+
- Confirm `gameId` query usage.
7+
- Confirm `mount=game`.
8+
- Confirm no `?game=` legacy query usage.
9+
- Confirm no Workspace Manager diagnostic appears.

docs/dev/roadmaps/MASTER_ROADMAP_ENGINE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -898,3 +898,4 @@
898898
- [x] Game palette completeness is normalized with manifest-owned palette data under `game.manifest.json` tool sections.
899899
- [x] Tool input alignment contract is documented as `toolInput = gameManifest.tools[toolId]` (no game-owned file-path JSON input).
900900
- [x] Palette standalone singleton correction is complete (`game.manifest.json` root `palette`, no tool-owned `palettes`).
901+
- [x] Palette tool singleton + tool section metadata correction is complete (`tools["palette-browser"].palette` + metadata on all tool sections).

docs/operations/dev/codex_commands.md

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,39 @@ MODEL: GPT-5.3-codex
22
REASONING: high
33

44
TASK:
5-
Apply BUILD_PR_LEVEL_10_1A_PALETTE_STANDALONE_SINGLETON_CORRECTION.
5+
Apply BUILD_PR_LEVEL_10_2_WORKSPACE_MANAGER_OPEN_TEST_AND_SHARED_BOUNDARY_AUDIT.
66

77
STEPS:
8-
1. Read docs/pr/PLAN_PR_LEVEL_10_1A_PALETTE_STANDALONE_SINGLETON_CORRECTION.md.
9-
2. Read docs/pr/BUILD_PR_LEVEL_10_1A_PALETTE_STANDALONE_SINGLETON_CORRECTION.md.
10-
3. Scan all `games/*/game.manifest.json`.
11-
4. For each manifest:
12-
- find any `tools.*.palettes`
13-
- move/merge palette data into root `palette`
14-
- remove tool-owned `palettes`
15-
- ensure only one root `palette` exists
16-
5. Normalize swatches:
17-
- uppercase hex
18-
- remove opaque `FF`
19-
- single-character symbols
20-
- dedupe by hex where safe
21-
6. Ensure Primitive Skin Editor owns skins only, not palette.
22-
7. Ensure Palette Browser does not own a duplicate palette object.
23-
8. Update any game/tool manifest readers only if required to read root `palette`.
24-
9. Do not create palette JSON files.
25-
10. Write docs/dev/reports/level_10_1a_palette_singleton_correction_report.md.
26-
11. Update docs/dev/roadmaps/MASTER_ROADMAP_ENGINE.md status only if needed:
27-
- [ ] -> [.]
28-
- [.] -> [x]
29-
- no prose rewrite/delete
30-
12. Do not add validators.
31-
13. Do not modify start_of_day.
32-
14. Create Codex delta ZIP:
33-
tmp/BUILD_PR_LEVEL_10_1A_PALETTE_STANDALONE_SINGLETON_CORRECTION_delta.zip
8+
1. Read docs/pr/PLAN_PR_LEVEL_10_2_WORKSPACE_MANAGER_OPEN_TEST_AND_SHARED_BOUNDARY_AUDIT.md.
9+
2. Read docs/pr/BUILD_PR_LEVEL_10_2_WORKSPACE_MANAGER_OPEN_TEST_AND_SHARED_BOUNDARY_AUDIT.md.
10+
3. Add a focused runtime/browser test for `games/index.html`:
11+
- discover all games/cards/actions
12+
- validate "Open with Workspace Manager" uses `gameId=<id>&mount=game`
13+
- reject legacy `?game=`
14+
- ensure Workspace Manager diagnostic does not appear when clicked/opened
15+
4. Ensure the new test does not run samples or tools.
16+
5. Add a focused npm script only if useful, such as:
17+
- `test:workspace-manager:games`
18+
6. Audit `tools/shared/asteroidsPlatformDemo.js`:
19+
- imports
20+
- consumers
21+
- domain ownership
22+
- move recommendation
23+
7. Move `tools/shared/asteroidsPlatformDemo.js` only if safe and obvious; otherwise report follow-up.
24+
8. Write reports:
25+
- docs/dev/reports/level_10_2_workspace_manager_open_test_report.md
26+
- docs/dev/reports/level_10_2_asteroids_platform_demo_boundary_audit.md
27+
9. Update docs/dev/roadmaps/MASTER_ROADMAP_ENGINE.md status only if needed:
28+
- [ ] -> [.]
29+
- [.] -> [x]
30+
- no prose rewrite/delete
31+
10. Do not modify start_of_day.
32+
11. Do not add validators.
33+
12. Create Codex delta ZIP:
34+
tmp/BUILD_PR_LEVEL_10_2_WORKSPACE_MANAGER_OPEN_TEST_AND_SHARED_BOUNDARY_AUDIT_delta.zip
3435

3536
ACCEPTANCE:
36-
- exactly one root `palette` per game manifest
37-
- no tool-owned palettes remain
37+
- games index Workspace Manager action test exists
38+
- all game actions use gameId + mount=game
39+
- boundary audit exists
3840
- delta ZIP exists
Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
BUILD_PR_LEVEL_10_1A_PALETTE_STANDALONE_SINGLETON_CORRECTION
1+
BUILD_PR_LEVEL_10_2_WORKSPACE_MANAGER_OPEN_TEST_AND_SHARED_BOUNDARY_AUDIT
22

3-
- Moved game palettes out of Primitive Skin Editor
4-
- Enforced one root palette per game/workspace
5-
- Removed tool-owned palette duplication
3+
- Added games/index Workspace Manager open-action validation
4+
- Verified gameId + mount=game query contract
5+
- Audited tools/shared/asteroidsPlatformDemo.js boundary ownership
66

77
PR Details:
8-
- Palette is standalone shared data
9-
- Tools consume the shared root palette
10-
- No palette JSON files created
11-
- No validators
8+
- Supports manifest/tool alignment work
129
- No start_of_day changes
10+
- No validators
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# BUILD_PR_LEVEL_10_1B_TOOL_SECTION_METADATA_AND_PALETTE_TOOL_SINGLETON
2+
3+
## Problem
4+
The previous correction moved palette to root:
5+
6+
```json
7+
"palette": {
8+
"schema": "html-js-gaming.palette",
9+
"version": 1,
10+
"name": "_template Palette",
11+
"source": "manifest-and-runtime-color-scan",
12+
"swatches": []
13+
}
14+
```
15+
16+
That is wrong because palette is a first-class tool/domain.
17+
18+
Also, Primitive Skin Editor sections were missing standard metadata:
19+
20+
```json
21+
"primitive-skin-editor": {
22+
"skins": []
23+
}
24+
```
25+
26+
## Correct Shape
27+
28+
```json
29+
{
30+
"tools": {
31+
"palette-browser": {
32+
"schema": "html-js-gaming.tool.palette-browser",
33+
"version": 1,
34+
"name": "Palette Browser",
35+
"source": "manifest",
36+
"palette": {
37+
"schema": "html-js-gaming.palette",
38+
"version": 1,
39+
"name": "Game Palette",
40+
"source": "manifest-and-runtime-color-scan",
41+
"swatches": []
42+
}
43+
},
44+
45+
"primitive-skin-editor": {
46+
"schema": "html-js-gaming.tool.primitive-skin-editor",
47+
"version": 1,
48+
"name": "Primitive Skin Editor",
49+
"source": "manifest",
50+
"skins": []
51+
}
52+
}
53+
}
54+
```
55+
56+
## Rules
57+
58+
### Palette
59+
- Palette lives under `tools["palette-browser"].palette`.
60+
- Exactly one palette per game/workspace.
61+
- No root `palette`.
62+
- No root `palettes`.
63+
- No `tools.*.palettes` collection.
64+
- No duplicate palettes under other tools.
65+
66+
### Primitive Skin Editor
67+
Primitive Skin Editor owns:
68+
- skins
69+
- HUD skins
70+
- primitive style groups
71+
- mappings to palette symbols
72+
73+
Primitive Skin Editor does NOT own:
74+
- palette swatches
75+
- palette definitions
76+
- palette collections
77+
78+
### Tool Section Metadata
79+
Every first-class tool section under `tools` must have:
80+
81+
```json
82+
{
83+
"schema": "html-js-gaming.tool.<tool-id>",
84+
"version": 1,
85+
"name": "<Display Name>",
86+
"source": "manifest"
87+
}
88+
```
89+
90+
Tool-specific data is added beside those fields.
91+
92+
## Required Migration
93+
For every `games/*/game.manifest.json`:
94+
95+
1. If root `palette` exists:
96+
- move it to `tools["palette-browser"].palette`
97+
- remove root `palette`
98+
99+
2. If `tools["primitive-skin-editor"].palettes` exists:
100+
- move/merge into `tools["palette-browser"].palette`
101+
- remove `tools["primitive-skin-editor"].palettes`
102+
103+
3. Ensure `tools["primitive-skin-editor"]` has:
104+
- schema
105+
- version
106+
- name
107+
- source
108+
109+
4. Ensure `tools["palette-browser"]` has:
110+
- schema
111+
- version
112+
- name
113+
- source
114+
- palette
115+
116+
5. Normalize palette:
117+
- one palette only
118+
- swatches use single-character symbols
119+
- hex uppercase
120+
- no opaque alpha `FF`
121+
122+
## Acceptance
123+
- No root `palette`.
124+
- No root `palettes`.
125+
- Exactly one `tools["palette-browser"].palette` per game.
126+
- Primitive Skin Editor has metadata and no palette ownership.
127+
- Every existing tool section has schema/version/name/source.
128+
- No new palette JSON files.
129+
- No validators.
130+
- No `start_of_day` changes.

0 commit comments

Comments
 (0)