Skip to content

Commit d39180c

Browse files
author
DavidQ
committed
BUILD_PR_LEVEL_10_1A_PALETTE_STANDALONE_SINGLETON_CORRECTION
- Moved game palettes out of Primitive Skin Editor - Enforced one root palette per game/workspace - Removed tool-owned palette duplication PR Details: - Palette is standalone shared data - Tools consume the shared root palette - No palette JSON files created - No validators - No start_of_day changes
1 parent be2eda2 commit d39180c

21 files changed

Lines changed: 875 additions & 740 deletions

docs/dev/reports/expected_delta_template.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,22 @@
22

33
## Expected Changed Files
44
- `games/*/game.manifest.json`
5-
- `docs/dev/reports/level_10_1_game_palette_completeness_report.md`
5+
- `docs/dev/reports/level_10_1a_palette_singleton_correction_report.md`
66
- `docs/dev/roadmaps/MASTER_ROADMAP_ENGINE.md` if status update needed
77

88
## Expected Validation Summary
99
- `games_scanned=<count>`
10-
- `games_with_palette_before=<count>`
11-
- `games_with_palette_after=<count>`
12-
- `palettes_created=<count>`
13-
- `palettes_normalized=<count>`
14-
- `new_palette_json_files=0`
15-
- `swatch_symbol_issues=0`
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>`
1616
- `opaque_alpha_ff_remaining=0`
17+
- `validators_added=0`
1718
- `start_of_day_changes=0`
1819

1920
## Expected Delta ZIP
2021
Codex must create:
2122

22-
`tmp/BUILD_PR_LEVEL_10_1_GAME_PALETTE_COMPLETENESS_AND_TOOL_INPUT_ALIGNMENT_delta.zip`
23+
`tmp/BUILD_PR_LEVEL_10_1A_PALETTE_STANDALONE_SINGLETON_CORRECTION_delta.zip`

docs/dev/reports/launch_smoke_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Launch Smoke Report
22

3-
Generated: 2026-04-27T00:34:13.165Z
3+
Generated: 2026-04-27T00:42:17.125Z
44

55
Filters: games=true, samples=false, tools=false, sampleRange=all
66

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Level 10.1A Palette Standalone Singleton Correction Report
2+
3+
## BUILD
4+
- `BUILD_PR_LEVEL_10_1A_PALETTE_STANDALONE_SINGLETON_CORRECTION`
5+
6+
## Scope Applied
7+
- Scanned all `games/*/game.manifest.json`.
8+
- Migrated tool-owned palette collections into a single root `palette` per manifest.
9+
- Removed tool-owned `palette`/`palettes` keys (including `primitive-skin-editor` and `palette-browser` if present).
10+
- Normalized swatches:
11+
- uppercase `#RRGGBB`
12+
- removed opaque alpha suffixes
13+
- single-character symbols
14+
- deduped by hex
15+
- Updated manifest-path consumer references that targeted old tool-owned palette locations.
16+
17+
## Per-Game Migration Results
18+
| Game | Palette Found Under Primitive Skin Editor | Palettes Moved | Palettes Merged | Final Swatch Count | Duplicate Swatches Removed | Symbol Conflicts Fixed |
19+
| --- | --- | --- | --- | --- | --- | --- |
20+
| `_template` | yes | 1 | no | 2 | 0 | 0 |
21+
| `AITargetDummy` | yes | 1 | no | 10 | 0 | 0 |
22+
| `Asteroids` | yes | 3 | yes | 11 | 6 | 0 |
23+
| `Bouncing-ball` | yes | 1 | no | 3 | 0 | 0 |
24+
| `Breakout` | yes | 1 | no | 10 | 0 | 0 |
25+
| `GravityWell` | yes | 1 | no | 10 | 0 | 0 |
26+
| `Pacman` | yes | 1 | no | 10 | 0 | 0 |
27+
| `Pong` | yes | 1 | no | 10 | 0 | 0 |
28+
| `SolarSystem` | yes | 1 | no | 10 | 0 | 0 |
29+
| `SpaceDuel` | yes | 1 | no | 10 | 0 | 0 |
30+
| `SpaceInvaders` | yes | 1 | no | 10 | 0 | 0 |
31+
| `vector-arcade-sample` | yes | 1 | no | 9 | 0 | 0 |
32+
33+
## Structural Validation
34+
- `root palette singleton`: passed for all game manifests.
35+
- `no root palettes collection`: passed.
36+
- `no tools.*.palettes`: passed.
37+
- `primitive-skin-editor has no palette ownership`: passed.
38+
- `palette-browser has no duplicate palette ownership`: passed.
39+
- swatch validation (`single-char symbol`, `uppercase #RRGGBB`): passed.
40+
41+
## Runtime/Launch Validation
42+
- Executed: `npm run test:launch-smoke:games`
43+
- Result:
44+
- `filters: games=true samples=false tools=false`
45+
- `PASS=12 FAIL=0 TOTAL=12`
46+
47+
## Read-Path Adjustment
48+
- Updated legacy hard reference paths in:
49+
- `tools/shared/asteroidsPlatformDemo.js`
50+
- Old path:
51+
- `games/Asteroids/game.manifest.json#tools.primitive-skin-editor.palettes...`
52+
- New path:
53+
- `games/Asteroids/game.manifest.json#palette`
54+
55+
## No New Palette JSON Files
56+
- No new files were created under `games/**/assets/palettes/*.json`.
57+
58+
## start_of_day
59+
- No `start_of_day` files were modified.

docs/dev/roadmaps/MASTER_ROADMAP_ENGINE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -897,3 +897,4 @@
897897

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).
900+
- [x] Palette standalone singleton correction is complete (`game.manifest.json` root `palette`, no tool-owned `palettes`).

docs/operations/dev/codex_commands.md

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

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

77
STEPS:
8-
1. Read docs/pr/PLAN_PR_LEVEL_10_1_GAME_PALETTE_COMPLETENESS_AND_TOOL_INPUT_ALIGNMENT.md.
9-
2. Read docs/pr/BUILD_PR_LEVEL_10_1_GAME_PALETTE_COMPLETENESS_AND_TOOL_INPUT_ALIGNMENT.md.
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.
1010
3. Scan all `games/*/game.manifest.json`.
11-
4. For each game:
12-
- determine whether manifest-owned palette data exists
13-
- normalize existing palettes
14-
- create missing palette data inside game.manifest.json when needed
15-
5. Extract palette colors from source when possible:
16-
- code constants
17-
- canvas styles
18-
- CSS
19-
- existing manifest colors
20-
- HUD/skin sections
21-
6. Do not create separate palette JSON files.
22-
7. Place palette data under the owning tool section, preferably `primitive-skin-editor.palettes`.
23-
8. Normalize swatches:
24-
- single-character `symbol`
25-
- uppercase `#RRGGBB`
26-
- remove opaque `FF` suffix
27-
9. Document tool input alignment:
28-
- tools consume `gameManifest.tools[toolId]`
29-
- no file-path JSON input for game-owned data
30-
10. Write docs/dev/reports/level_10_1_game_palette_completeness_report.md.
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.
3126
11. Update docs/dev/roadmaps/MASTER_ROADMAP_ENGINE.md status only if needed:
3227
- [ ] -> [.]
3328
- [.] -> [x]
3429
- no prose rewrite/delete
3530
12. Do not add validators.
3631
13. Do not modify start_of_day.
3732
14. Create Codex delta ZIP:
38-
tmp/BUILD_PR_LEVEL_10_1_GAME_PALETTE_COMPLETENESS_AND_TOOL_INPUT_ALIGNMENT_delta.zip
33+
tmp/BUILD_PR_LEVEL_10_1A_PALETTE_STANDALONE_SINGLETON_CORRECTION_delta.zip
3934

4035
ACCEPTANCE:
41-
- all games with colors have manifest-owned palette data
42-
- no new palette JSON files
36+
- exactly one root `palette` per game manifest
37+
- no tool-owned palettes remain
4338
- delta ZIP exists
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
BUILD_PR_LEVEL_10_1_GAME_PALETTE_COMPLETENESS_AND_TOOL_INPUT_ALIGNMENT
1+
BUILD_PR_LEVEL_10_1A_PALETTE_STANDALONE_SINGLETON_CORRECTION
22

3-
- Added missing manifest-owned game palettes
4-
- Normalized palette swatches for tool alignment
5-
- Documented tools consuming manifest slices as inputs
3+
- Moved game palettes out of Primitive Skin Editor
4+
- Enforced one root palette per game/workspace
5+
- Removed tool-owned palette duplication
66

77
PR Details:
8-
- Starts Phase 10 tool alignment
8+
- Palette is standalone shared data
9+
- Tools consume the shared root palette
910
- No palette JSON files created
1011
- No validators
1112
- No start_of_day changes
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
# BUILD_PR_LEVEL_10_1A_PALETTE_STANDALONE_SINGLETON_CORRECTION
2+
3+
## Objective
4+
Fix the palette model.
5+
6+
## Wrong Current Shape
7+
8+
```json
9+
{
10+
"tools": {
11+
"primitive-skin-editor": {
12+
"palettes": {
13+
"palette.gravitywell.classic": {
14+
"schema": "html-js-gaming.palette",
15+
"swatches": []
16+
}
17+
}
18+
}
19+
}
20+
}
21+
```
22+
23+
## Correct Shape
24+
25+
```json
26+
{
27+
"palette": {
28+
"schema": "html-js-gaming.palette",
29+
"version": 1,
30+
"name": "Gravity Well Palette",
31+
"source": "manifest-and-runtime-color-scan",
32+
"swatches": []
33+
},
34+
"tools": {
35+
"primitive-skin-editor": {
36+
"skins": []
37+
}
38+
}
39+
}
40+
```
41+
42+
## Rules
43+
44+
### Palette
45+
- Root-level `palette`.
46+
- Exactly one per game/workspace.
47+
- Actual JSON data, not a reference.
48+
- No `palettes` collection.
49+
- No tool-owned palette copies.
50+
51+
### Primitive Skin Editor
52+
Primitive Skin Editor owns:
53+
- skins
54+
- HUD skins
55+
- primitive style groups
56+
- skin mappings
57+
58+
Primitive Skin Editor does NOT own:
59+
- palette singleton
60+
- palette browser data
61+
62+
### Palette Browser
63+
Palette Browser may open/read/edit the root `palette`, but does not own a duplicate copy.
64+
65+
### Other Tools
66+
Sprite Editor, Vector Asset Studio, Tile Map Editor, Parallax Editor, etc. consume the same root `palette`.
67+
68+
## Required Migration
69+
For every `games/*/game.manifest.json`:
70+
71+
1. Find:
72+
```json
73+
tools["primitive-skin-editor"].palettes
74+
```
75+
76+
2. If exactly one palette exists:
77+
- move it to root `palette`
78+
- remove `tools["primitive-skin-editor"].palettes`
79+
80+
3. If multiple palettes exist:
81+
- merge into one root `palette`
82+
- dedupe swatches by `hex`
83+
- preserve unique swatch symbols
84+
- if duplicate symbol conflict exists, reassign deterministic single-character symbols
85+
- record merge in report
86+
87+
4. Normalize:
88+
- `#RRGGBBFF` -> `#RRGGBB`
89+
- uppercase hex
90+
- single-character symbol
91+
92+
5. Ensure no:
93+
- root `palettes`
94+
- tool-owned `palettes`
95+
- duplicate palette objects
96+
97+
## Required Report
98+
Create:
99+
100+
```text
101+
docs/dev/reports/level_10_1a_palette_singleton_correction_report.md
102+
```
103+
104+
Report per game:
105+
- palette found under primitive-skin-editor
106+
- palettes moved
107+
- palettes merged
108+
- final swatch count
109+
- duplicate swatches removed
110+
- symbol conflicts fixed
111+
112+
## Roadmap Movement
113+
Update roadmap status only:
114+
- Phase 10 palette singleton correction `[ ] -> [.]` or `[.] -> [x]`
115+
116+
## Acceptance
117+
- Each game manifest has exactly one root `palette`.
118+
- No `tools.*.palettes` remain.
119+
- No root `palettes` collections remain.
120+
- Primitive Skin Editor has no palette ownership.
121+
- Palette Browser has no duplicate palette ownership.
122+
- No new palette JSON files.
123+
- No validators.
124+
- No `start_of_day` changes.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# PLAN_PR_LEVEL_10_1A_PALETTE_STANDALONE_SINGLETON_CORRECTION
2+
3+
## Purpose
4+
Correct palette ownership after Level 10.1.
5+
6+
## Corrections
7+
1. Palette is a standalone tool/data concept.
8+
2. Palette must not live under `primitive-skin-editor`.
9+
3. Only one palette is allowed per game/workspace.
10+
4. The manifest field should be root-level `palette`.
11+
5. Tools consume the single shared palette; they do not own their own palettes.
12+
13+
## Scope
14+
- Move any `tools["primitive-skin-editor"].palettes` data to root `palette`.
15+
- Merge duplicate palettes into one.
16+
- Ensure one palette per game manifest.
17+
- Update tool input alignment documentation.
18+
- No separate palette JSON files.
19+
20+
## Non-Goals
21+
- No runtime rewrite beyond manifest read-path fix if required.
22+
- No validators.
23+
- No `start_of_day` changes.

0 commit comments

Comments
 (0)