Skip to content

Commit 1ba544a

Browse files
author
DavidQ
committed
PR 8.4: Palette schema swatches + symbol
- Replaced entries with swatches - Added single-character symbol constraint - Normalized hex field
1 parent 51165b6 commit 1ba544a

33 files changed

Lines changed: 349 additions & 255 deletions

docs/dev/codex_commands.md

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,14 @@ MODEL: GPT-5.3-codex
22
REASONING: medium
33

44
TASK:
5-
Implement PR 8.3 as a docs-guided, schema-compliant palette generation cleanup.
6-
7-
REPO REALITY:
8-
- There are no samples/**/config.json files.
9-
- There are no samples/**/*.palette.json files in the current layout.
10-
- Do not assume either exists.
11-
- Generate palette documents from colors actually used by each sample.
12-
13-
STEPS:
14-
1. Read docs/pr/PR_8.3_SAMPLE_COLOR_PALETTE_GENERATION.md.
15-
2. Read docs/pr/sample_palette_generation_rules.md.
16-
3. Use workspace.manifest as the source of truth for sample/tool ownership.
17-
4. Scan sample folders for explicit color values in existing sample JSON and local sample asset metadata.
18-
5. Generate schema-compliant palette documents from discovered colors.
19-
6. Add $schema references to generated palette documents.
20-
7. Validate generated palette documents against tools/schemas/palette.schema.json.
21-
8. Remove or update any stale docs that refer to nonexistent samples/**/config.json or samples/**/*.palette.json.
22-
9. Do not add validation utility modules.
23-
10. Do not modify runtime behavior.
24-
11. Do not modify start_of_day.
25-
26-
ACCEPTANCE:
27-
- Generated palettes reflect actual colors used by samples.
28-
- No invented colors.
29-
- No stale config.json / palette.json assumptions.
30-
- No validation utilities added.
31-
- No runtime files modified.
32-
- No start_of_day files modified.
5+
- Update palette.schema.json:
6+
- entries → swatches
7+
- enforce single-character symbol
8+
- enforce hex format
9+
- Migrate existing/generated palettes:
10+
- entries → swatches
11+
- s001 → single char symbols
12+
- Ensure uniqueness of symbol per palette
13+
- Preserve ordering
14+
- Do NOT add validators
15+
- Do NOT modify runtime

docs/dev/commit_comment.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
PR 8.3: Generate sample palettes from actual sample colors
1+
PR 8.4: Palette schema swatches + symbol
22

3-
- Documented repo-realistic sample palette generation
4-
- Removed assumptions about nonexistent sample config/palette files
5-
- Added schema-compliant generated palette rules
6-
- Preserved schema-driven validation boundaries
3+
- Replaced entries with swatches
4+
- Added single-character symbol constraint
5+
- Normalized hex field
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# PR 8.4 — Palette Schema: swatches + symbol
2+
3+
## Purpose
4+
Align palette schema with actual usage:
5+
- Replace `entries``swatches`
6+
- Add single-character `symbol`
7+
- Normalize `hex` naming
8+
9+
## Changes
10+
11+
### Schema Updates
12+
`tools/schemas/palette.schema.json`
13+
14+
- Rename:
15+
- `entries``swatches`
16+
- Swatch shape:
17+
```json
18+
{
19+
"symbol": "!",
20+
"hex": "#FFFFFF",
21+
"name": "white"
22+
}
23+
```
24+
25+
### Rules
26+
- `symbol` MUST be single character
27+
- Unique per palette
28+
- Deterministic ordering preserved
29+
- `hex` uppercase
30+
- No multi-char symbols (remove s001 style)
31+
32+
### Generation Updates
33+
- Replace generated ids:
34+
- OLD: s001
35+
- NEW: single ASCII symbols set
36+
37+
### Recommended Symbol Set Order
38+
```
39+
! @ # $ % ^ & * ( ) - + = ~ ? / < >
40+
A B C D E F G H I J K L M N O P
41+
```
42+
43+
## Non-Goals
44+
- No runtime logic
45+
- No validators
46+
- No sample behavior changes
47+
48+
## Acceptance
49+
- All palettes use `swatches`
50+
- All swatches use single-character `symbol`
51+
- Schema enforces constraints

games/Asteroids/assets/palettes/asteroids-classic.palette.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{
2+
"$schema": "../../../../tools/schemas/palette.schema.json",
23
"schema": "html-js-gaming.palette",
34
"version": 1,
45
"name": "Asteroids Classic Palette",
56
"source": "custom",
6-
"entries": [
7+
"swatches": [
78
{
89
"symbol": "!",
910
"hex": "#020617",

games/SolarSystem/assets/palettes/solar-system-classic.palette.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{
2+
"$schema": "../../../../tools/schemas/palette.schema.json",
23
"schema": "html-js-gaming.palette",
34
"version": 1,
45
"name": "Solar System Classic Palette",
56
"source": "custom",
6-
"entries": [
7+
"swatches": [
78
{
89
"symbol": "!",
910
"hex": "#030712",

games/SpaceDuel/assets/palettes/space-duel-classic.palette.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{
2+
"$schema": "../../../../tools/schemas/palette.schema.json",
23
"schema": "html-js-gaming.palette",
34
"version": 1,
45
"name": "Space Duel Classic Palette",
56
"source": "custom",
6-
"entries": [
7+
"swatches": [
78
{
89
"symbol": "!",
910
"hex": "#020617",

games/SpaceInvaders/assets/palettes/space-invaders-classic.palette.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{
2+
"$schema": "../../../../tools/schemas/palette.schema.json",
23
"schema": "html-js-gaming.palette",
34
"version": 1,
45
"name": "Space Invaders Classic Palette",
56
"source": "custom",
6-
"entries": [
7+
"swatches": [
78
{
89
"symbol": "!",
910
"hex": "#000000",

games/bouncing-ball/assets/palettes/bouncing-ball-classic.palette.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{
2+
"$schema": "../../../../tools/schemas/palette.schema.json",
23
"schema": "html-js-gaming.palette",
34
"version": 1,
45
"name": "Bouncing Ball Classic Palette",
56
"source": "custom",
6-
"entries": [
7+
"swatches": [
78
{
89
"symbol": "!",
910
"hex": "#05070A",

games/breakout/assets/palettes/breakout-classic.palette.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{
2+
"$schema": "../../../../tools/schemas/palette.schema.json",
23
"schema": "html-js-gaming.palette",
34
"version": 1,
45
"name": "Breakout Classic Palette",
56
"source": "custom",
6-
"entries": [
7+
"swatches": [
78
{
89
"symbol": "!",
910
"hex": "#000000",

games/pong/assets/palettes/pong-classic.palette.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
{
2+
"$schema": "../../../../tools/schemas/palette.schema.json",
23
"schema": "html-js-gaming.palette",
34
"version": 1,
45
"name": "Pong Classic Palette",
56
"source": "custom",
6-
"entries": [
7+
"swatches": [
78
{
89
"symbol": "!",
910
"hex": "#05070A",

0 commit comments

Comments
 (0)