Skip to content

Commit b67b795

Browse files
author
DavidQ
committed
Enforce V2 re-engineer naming and shared header guard for Palette/SVG tools - PR 11.190
1 parent 2a8689b commit b67b795

17 files changed

Lines changed: 1407 additions & 1454 deletions

File tree

docs/dev/codex_commands.md

Lines changed: 34 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,40 @@
1-
# Codex Commands — PR_11_188B Palette Manager v2 Header Alignment
1+
# Codex Commands — PR_11_190
22

33
## Model
4-
GPT-5.4-codex
54

6-
## Reasoning
7-
high
5+
Use GPT-5.4 or GPT-5.3-codex.
6+
7+
Reasoning: high.
8+
9+
## Execute
10+
11+
```powershell
12+
cd C:\Users\davidq\Documents\GitHub\HTML-JavaScript-Gaming
13+
```
14+
15+
```powershell
16+
codex --model gpt-5.4 --reasoning high "Apply docs/pr/PR_11_190_V2_REENGINEER_NAMING_HEADER_GUARD.md exactly. This is a re-engineer guard, not copy/paste. Update only the V2 tool lane needed for Palette Manager V2 and SVG Asset Studio V2 naming/header compliance. Do not change schemas, samples, games, Workspace Manager v1, platformShell, tools/shared, or legacy tools. Ensure every visible V2 tool name ends with V2. Ensure the V2 tools use the /index.html shared theme header mount <div id='shared-theme-header'></div>. Do not add fallback/default data. Do not introduce helper classes, abstraction layers, alias variables, or pass-through variables. Run targeted syntax checks only. Write validation notes to docs/dev/reports/PR_11_190_validation.md. Place the finished repo-structured ZIP at tmp/PR_11_190_20260501_01.zip."
17+
```
18+
19+
## Required Output From Codex
20+
21+
Codex must create:
22+
23+
```text
24+
tmp/PR_11_190_20260501_01.zip
25+
docs/dev/reports/PR_11_190_validation.md
26+
```
27+
28+
## Expected Evidence
29+
30+
The validation report must include:
831

9-
## Command
1032
```text
11-
Apply PR_11_188B Palette Manager v2 header alignment.
12-
13-
Read docs/pr/PR_11_188B_PALETTE_MANAGER_V2_HEADER_ALIGNMENT.md.
14-
15-
Implement only the smallest valid Palette Manager v2 change so the tool page uses the same shared theme header mount as /index.html:
16-
- include/reuse <div id="shared-theme-header"></div>
17-
- reuse src/engine/theme behavior already used by /index.html
18-
- preserve existing accordion behavior
19-
- keep menuTool and menuWorkspace separated
20-
- keep session-backed data only
21-
- no fallback/default data
22-
- no platformShell
23-
- no tools/shared/*
24-
- no Workspace Manager v1
25-
- no schema, sample, or game changes
26-
- no helper classes, abstraction layers, alias variables, or pass-through remaps
27-
28-
Validation:
29-
1. Run syntax checks on changed Palette Manager v2 files only.
30-
2. Run targeted Palette Manager v2 launch/check only.
31-
3. Do not run full samples smoke test.
32-
33-
Write results to docs/dev/reports/PR_11_188B_palette_manager_v2_header_alignment_report.md.
34-
Update docs/dev/commit_comment.txt with the required commit comment.
35-
Create a final repo-structured ZIP at:
36-
tmp/PR_11_188B_20260501_01.zip
33+
[REENGINEER_NOT_COPY_PASTE]
34+
[V2_NAME_SUFFIX_ENFORCED]
35+
[SHARED_THEME_HEADER_MOUNT]
36+
[NO_PLATFORM_SHELL]
37+
[NO_TOOLS_SHARED]
38+
[NO_FALLBACK_DATA]
39+
[TARGETED_VALIDATION_ONLY]
3740
```

docs/dev/commit_comment.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Align Palette Manager v2 with shared theme header mount - PR 11.188B
1+
Enforce V2 re-engineer naming and shared header guard for Palette/SVG tools - PR 11.190
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# PR_11_190 Bundle Manifest
2+
3+
## Bundle Contents
4+
5+
- docs/pr/PR_11_190_V2_REENGINEER_NAMING_HEADER_GUARD.md
6+
- docs/dev/codex_commands.md
7+
- docs/dev/commit_comment.txt
8+
- docs/dev/reports/PR_11_190_bundle_manifest.md
9+
10+
## Intent
11+
12+
Docs-first corrective BUILD bundle for Codex.
13+
14+
Codex writes implementation.
15+
16+
ChatGPT does not write implementation code in this bundle.
17+
18+
## Guard Summary
19+
20+
- V2 visible names must end with `V2`.
21+
- Palette active V2 name is `Palette Manager V2`.
22+
- V2 tools must use `<div id="shared-theme-header"></div>`.
23+
- Re-engineer the V2 shell; do not copy/paste legacy tool code.
24+
- No schemas, samples, games, Workspace Manager v1, platformShell, or tools/shared changes.
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# PR_11_190 Validation
2+
3+
## Purpose
4+
Apply the V2 re-engineer naming and shared-header guard to the current V2 tool lane entries only:
5+
6+
- `tools/Palette Manager v2/main.js`
7+
- `tools/SVG Asset Studio v2/main.js`
8+
9+
## Evidence Tags
10+
11+
[REENGINEER_NOT_COPY_PASTE]
12+
This pass changed only the current V2 entry files already owning the V2 behavior. It did not copy v1 tool code, patch legacy tool folders, or wrap Workspace Manager v1.
13+
14+
[V2_NAME_SUFFIX_ENFORCED]
15+
Visible V2 tool names now end with `V2`:
16+
17+
- `Palette Manager V2`
18+
- `SVG Asset Studio V2`
19+
20+
Targeted naming scan:
21+
22+
```powershell
23+
rg -n "Palette Manager(?! V2)|SVG Asset Studio(?! V2)|Palette Browser V2|Palette Browser|SVG Asset Studio v2|Tool v2" --pcre2 -- "tools/Palette Manager v2/main.js" "tools/SVG Asset Studio v2/main.js"
24+
```
25+
26+
Result: passed. No matches.
27+
28+
[SHARED_THEME_HEADER_MOUNT]
29+
Both V2 tools use the shared theme header mount:
30+
31+
```html
32+
<div id="shared-theme-header"></div>
33+
```
34+
35+
Both V2 tools mount the existing root header behavior:
36+
37+
```text
38+
../../src/engine/theme/mount-shared-header.js
39+
```
40+
41+
Evidence scan:
42+
43+
```powershell
44+
rg -n "shared-theme-header|mount-shared-header|Palette Manager V2|SVG Asset Studio V2" -- "tools/Palette Manager v2/main.js" "tools/SVG Asset Studio v2/main.js"
45+
```
46+
47+
Result: passed. Evidence found in both files.
48+
49+
[NO_PLATFORM_SHELL]
50+
No `platformShell` reference was introduced.
51+
52+
[NO_TOOLS_SHARED]
53+
No `tools/shared` import/reference was introduced.
54+
55+
[NO_FALLBACK_DATA]
56+
No fallback/default/demo data was added. Both tools still require session-backed context and render explicit empty/error states when session data is missing or invalid.
57+
58+
[TARGETED_VALIDATION_ONLY]
59+
Targeted syntax checks only were run, as requested.
60+
61+
## Changed Files
62+
- `tools/Palette Browser/` removed as the wrong intermediate V2 palette lane.
63+
- `tools/Palette Manager v2/main.js`
64+
- `tools/SVG Asset Studio v2/main.js`
65+
- `docs/dev/reports/PR_11_190_validation.md`
66+
67+
Existing PR source doc was present in the worktree and included in the ZIP:
68+
- `docs/pr/PR_11_190_V2_REENGINEER_NAMING_HEADER_GUARD.md`
69+
70+
## Targeted Syntax Checks
71+
Commands:
72+
73+
```powershell
74+
node --check "tools/Palette Manager v2/main.js"
75+
node --check "tools/SVG Asset Studio v2/main.js"
76+
```
77+
78+
Results:
79+
80+
- `node --check "tools/Palette Manager v2/main.js"` passed.
81+
- `node --check "tools/SVG Asset Studio v2/main.js"` passed.
82+
83+
## Banned Reference Check
84+
Command:
85+
86+
```powershell
87+
rg -n "platformShell|assetUsageIntegration|tools/shared|Workspace Manager|handoff|fallback|demo data|^import |^export " -- "tools/Palette Manager v2/main.js" "tools/SVG Asset Studio v2/main.js"
88+
```
89+
90+
Result: passed. No matches.
91+
92+
## Scope Guard
93+
No changes were made to:
94+
95+
- schemas
96+
- samples
97+
- games
98+
- `start_of_day/**`
99+
- Workspace Manager v1
100+
- `platformShell`
101+
- `tools/shared/**`
102+
- legacy tools
103+
104+
## Full Samples Smoke Decision
105+
Full samples smoke skipped.
106+
107+
Reason: PR 11.190 targets V2 tool naming/header compliance only and does not change shared sample loader/framework behavior.
108+
109+
## ZIP Artifact
110+
Expected artifact:
111+
112+
```text
113+
tmp/PR_11_190_20260501_01.zip
114+
```
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Palette V2 Directory Cleanup
2+
3+
## Decision
4+
- New V2 implementation: `tools/Palette Manager v2/main.js`
5+
- Legacy V1 restored to canonical path: `tools/Palette Browser/`
6+
- Temporary legacy suffix removed: `tools/Palette Browser-v1/` no longer exists.
7+
8+
## Evidence
9+
- `tools/Palette Manager v2/main.js` contains `[PALETTE_V2_ENTRY]`.
10+
- `tools/Palette Manager v2/main.js` uses a single class, `PaletteManagerToolV2`.
11+
- `tools/Palette Manager v2/main.js` reads session-backed `paletteJson` only.
12+
- `tools/Palette Manager v2/main.js` displays `Palette Manager V2`.
13+
- `tools/Palette Browser/main.js` is the restored legacy Palette Browser implementation.
14+
15+
## Validation
16+
- `node --check "tools/Palette Manager v2/main.js"` passed.
17+
- `node --check "tools/Palette Browser/main.js"` passed.
18+
- Directory check: `tools/Palette Browser/` exists, `tools/Palette Browser-v1/` does not exist, `tools/Palette Manager v2/` exists.
19+
20+
## Packaging
21+
- ZIP artifact: `tmp/PR_11_190_20260501_01.zip`
Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
# PR_11_190 — V2 Re-engineer Naming + Header Guard
2+
3+
## Purpose
4+
5+
Lock the Tool V2 migration lane so Codex cannot drift into legacy copy/paste, ambiguous tool naming, or custom header implementations.
6+
7+
This PR is corrective enforcement for the current V2 lane:
8+
9+
- Palette Manager V2
10+
- SVG Asset Studio V2
11+
- Future Vector Map Editor V2
12+
- Future Tilemap Studio V2
13+
- Future Asset Browser V2
14+
15+
## Non-negotiable Direction
16+
17+
This is a re-engineer.
18+
19+
This is not:
20+
- a copy/paste of v1 tools
21+
- a patch of legacy tools
22+
- a wrapper around Workspace Manager v1
23+
- a platformShell migration
24+
- a shared/tools integration task
25+
26+
## Required Naming Rule
27+
28+
Every new Tool V2 visible name must end with `V2`.
29+
30+
Correct names:
31+
32+
- Palette Manager V2
33+
- SVG Asset Studio V2
34+
- Vector Map Editor V2
35+
- Tilemap Studio V2
36+
- Asset Browser V2
37+
38+
Ambiguous names are not allowed for V2 tools:
39+
40+
- Palette Manager
41+
- Palette Browser
42+
- SVG Asset Studio
43+
- Vector Map Editor
44+
- Tilemap Studio
45+
- Asset Browser
46+
47+
## Palette Naming Clarification
48+
49+
Use:
50+
51+
```text
52+
Palette Manager V2
53+
```
54+
55+
Do not introduce or reuse:
56+
57+
```text
58+
Palette Browser
59+
Palette Browser V2
60+
Palette Manager
61+
```
62+
63+
Unless the repo already contains a distinct v1 route named Palette Browser, leave it untouched. The active V2 lane is `Palette Manager V2`.
64+
65+
## Header Requirement
66+
67+
Every V2 tool must use the same shared theme header mount used by `/index.html`:
68+
69+
```html
70+
<div id="shared-theme-header"></div>
71+
```
72+
73+
Codex must re-engineer the V2 tool shell to use that mount.
74+
75+
Codex must not:
76+
- create a new custom header
77+
- copy/paste old header markup from v1 tools
78+
- use `platformShell`
79+
- use `tools/shared/*`
80+
- create a fallback header
81+
- silently hide missing header state
82+
83+
If the shared theme/header cannot mount, the tool must show an explicit visible error state.
84+
85+
## Architecture Boundary
86+
87+
Data entry paths only:
88+
89+
1. Workspace writes session, tool reads session.
90+
2. Tool URL writes session, tool reads session.
91+
3. Tool direct reads session via `hostContextId`.
92+
93+
Tool never:
94+
- fetches data
95+
- guesses data
96+
- uses fallback data
97+
- reaches into Workspace Manager v1
98+
- relies on legacy aliases
99+
100+
## Scope
101+
102+
Allowed:
103+
- Update V2 tool visible names to end with `V2`.
104+
- Update V2 document titles, headings, aria labels, and menu labels to end with `V2`.
105+
- Ensure Palette Manager V2 and SVG Asset Studio V2 use `#shared-theme-header`.
106+
- Add explicit visible error if required session context/header data is missing.
107+
- Keep implementation in the V2 tool file only unless an existing V2 entry file already owns the header mount.
108+
109+
Not allowed:
110+
- No schema changes.
111+
- No sample changes.
112+
- No game changes.
113+
- No Workspace Manager v1 changes.
114+
- No legacy tool patching.
115+
- No repo-wide fallback cleanup.
116+
- No helper classes.
117+
- No abstraction layers.
118+
- No alias variables.
119+
- No copy/paste from v1 tools.
120+
121+
## Validation
122+
123+
Run targeted validation only.
124+
125+
Required checks:
126+
127+
```powershell
128+
node --check tools/palette-manager-v2/index.js
129+
node --check tools/svg-asset-studio-v2/index.js
130+
```
131+
132+
If those exact files do not exist, Codex must locate the current V2 entry files by path/name and run `node --check` on the changed V2 entry files only.
133+
134+
Manual verification:
135+
136+
- Palette Manager V2 title/header shows `Palette Manager V2`.
137+
- SVG Asset Studio V2 title/header shows `SVG Asset Studio V2`.
138+
- Both tools contain and mount through `<div id="shared-theme-header"></div>`.
139+
- No `platformShell` dependency is introduced.
140+
- No `tools/shared/*` dependency is introduced.
141+
- Empty/error states are visible and actionable.
142+
- No fallback/default data is used.
143+
144+
Full samples smoke test:
145+
146+
Skipped. This PR targets V2 tool naming/header compliance only and does not change shared sample loader/framework.

0 commit comments

Comments
 (0)