|
| 1 | +# BUILD_PR_LEVEL_10_1_GAME_PALETTE_COMPLETENESS_AND_TOOL_INPUT_ALIGNMENT |
| 2 | + |
| 3 | +## Objective |
| 4 | +Ensure every game has the palette data needed for tool alignment. |
| 5 | + |
| 6 | +## Rule |
| 7 | +Palettes for games must be manifest-owned data. |
| 8 | + |
| 9 | +Do NOT create: |
| 10 | + |
| 11 | +```text |
| 12 | +games/<game>/assets/palettes/*.json |
| 13 | +``` |
| 14 | + |
| 15 | +Instead, add actual palette data to: |
| 16 | + |
| 17 | +```text |
| 18 | +games/<game>/game.manifest.json |
| 19 | +``` |
| 20 | + |
| 21 | +under the correct tool section. |
| 22 | + |
| 23 | +## Owning Tool |
| 24 | +Game palettes should be owned by the appropriate tool section. |
| 25 | + |
| 26 | +Preferred: |
| 27 | + |
| 28 | +```json |
| 29 | +"tools": { |
| 30 | + "primitive-skin-editor": { |
| 31 | + "palettes": { |
| 32 | + "palette.<game>.classic": { |
| 33 | + "schema": "html-js-gaming.palette", |
| 34 | + "version": 1, |
| 35 | + "name": "<Game> Classic Palette", |
| 36 | + "swatches": [] |
| 37 | + } |
| 38 | + } |
| 39 | + } |
| 40 | +} |
| 41 | +``` |
| 42 | + |
| 43 | +If a game uses palette browsing/editing explicitly, also ensure the palette is compatible with Palette Browser input, but do not duplicate data under Palette Browser. |
| 44 | + |
| 45 | +## Palette Creation Rules |
| 46 | + |
| 47 | +For each game: |
| 48 | +1. Inspect `game.manifest.json`. |
| 49 | +2. If palette data exists, normalize it. |
| 50 | +3. If missing, extract from: |
| 51 | + - hardcoded game colors |
| 52 | + - canvas drawing styles |
| 53 | + - CSS variables/classes |
| 54 | + - old palette files already inlined or removed |
| 55 | + - skin/HUD color constants |
| 56 | +4. Generate stable swatches: |
| 57 | + - `symbol` single character |
| 58 | + - `hex` uppercase `#RRGGBB` |
| 59 | + - no opaque `#RRGGBBFF` |
| 60 | +5. Do not invent arbitrary colors unless no source exists. |
| 61 | +6. If no color source exists, create a minimal explicit fallback palette and document it. |
| 62 | + |
| 63 | +## Tool Input Alignment Rule |
| 64 | +Tools should receive manifest slices: |
| 65 | + |
| 66 | +```text |
| 67 | +toolInput = gameManifest.tools[toolId] |
| 68 | +``` |
| 69 | + |
| 70 | +Not: |
| 71 | +- file paths to JSON |
| 72 | +- sample dropdown data |
| 73 | +- separate asset catalog JSON |
| 74 | +- workspace asset catalog JSON |
| 75 | + |
| 76 | +## Required Audit Report |
| 77 | +Create: |
| 78 | + |
| 79 | +```text |
| 80 | +docs/dev/reports/level_10_1_game_palette_completeness_report.md |
| 81 | +``` |
| 82 | + |
| 83 | +Per game include: |
| 84 | +- game id |
| 85 | +- palette existed before |
| 86 | +- palette created/normalized |
| 87 | +- source of colors |
| 88 | +- swatch count |
| 89 | +- missing/assumed colors |
| 90 | +- tool section used |
| 91 | +- remaining palette issues |
| 92 | + |
| 93 | +## Roadmap Movement |
| 94 | +Update `docs/dev/roadmaps/MASTER_ROADMAP_ENGINE.md` status only: |
| 95 | +- add/advance Phase 10 palette completeness item |
| 96 | +- add/advance tool input alignment item |
| 97 | +- use only `[ ] -> [.]` and `[.] -> [x]` |
| 98 | + |
| 99 | +## Acceptance |
| 100 | +- Every game that uses colors has manifest-owned palette data. |
| 101 | +- No new palette JSON files are created. |
| 102 | +- Palette data lives under owning tool sections. |
| 103 | +- Swatches use single-character symbols. |
| 104 | +- Opaque alpha `FF` suffixes are removed. |
| 105 | +- Tools have a documented manifest-slice input contract. |
| 106 | +- No validators added. |
| 107 | +- No `start_of_day` changes. |
0 commit comments