Skip to content

Commit d1a658b

Browse files
author
DavidQ
committed
Validate and clean up V2 runtime shell separation after HTML-first re-engineer batch - PR 11.196
1 parent 16c648d commit d1a658b

5 files changed

Lines changed: 212 additions & 25 deletions

docs/dev/codex_commands.md

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,40 @@
1-
# Codex Commands — PR_11_195
1+
# Codex Commands — PR_11_196
22

33
Model: GPT-5.4-codex
44
Reasoning: high
55

66
## Command
7-
Run one Codex pass for PR_11_195.
87

9-
## Codex Prompt
10-
You are implementing PR_11_195 in the HTML-JavaScript-Gaming repo.
8+
```text
9+
You are implementing PR_11_196 — V2 Runtime Validation + Cleanup Pass.
1110
12-
Follow `docs/pr/PR_11_195_REMAINING_V2_HTML_SESSION_BATCH.md` exactly.
11+
Follow docs/pr/PR_11_196_V2_RUNTIME_VALIDATION_CLEANUP.md exactly.
1312
1413
Important:
15-
- This is a re-engineer, not a copy/paste migration.
16-
- ChatGPT did not write implementation code. You must write the implementation.
17-
- Convert the next remaining V2 tools that still violate HTML-first/session-only architecture.
18-
- Use a larger safe batch than the prior one-tool PRs, but do not expand outside V2 tool entries.
19-
- Do not change schemas, samples, games, Workspace Manager v1, or shared tool systems.
20-
- Do not use `platformShell`, `assetUsageIntegration`, `tools/shared/*`, aliases, fallback/default data, helper classes, or abstraction layers.
21-
- Keep `index.html` static and testable.
22-
- Keep `index.js` behavior-only.
23-
- Ensure every touched V2 tool uses `<div id="shared-theme-header"></div>` and user-facing names ending in `V2`.
24-
- Produce targeted validation evidence in `docs/dev/reports/PR_11_195_validation.md`.
25-
- Create final repo-structured ZIP at `tmp/PR_11_195.zip`.
26-
27-
## Required Targeted Checks
28-
Run:
29-
- `node --check` for each changed `.js` file.
30-
- grep/report checks for banned JS shell injection and banned legacy coupling terms.
31-
- HTML checks for `shared-theme-header`, `mount-shared-header.js`, and `./index.js` in changed V2 `index.html` files.
32-
33-
Do not run the full samples smoke test unless shared sample loader/framework code is modified. If skipped, document why.
14+
- ChatGPT did not write implementation code in this bundle.
15+
- You write the implementation fixes.
16+
- Keep the PR testable.
17+
- Do not modify schemas, samples, games, Workspace Manager v1, platformShell, or tools/shared/*.
18+
- Do not copy/paste legacy tool code.
19+
- Re-engineer only the V2 runtime structure.
20+
21+
Target tools:
22+
- Palette Manager V2
23+
- SVG Asset Studio V2
24+
- Vector Map Editor V2
25+
- Tilemap Studio V2
26+
- Asset Browser V2
27+
28+
Required implementation behavior:
29+
- HTML owns static layout, CSS links, shared header mount, and module script tags.
30+
- JS owns session read, validation, DOM population, rendering, and empty/error states only.
31+
- No fallback data.
32+
- No default sample data.
33+
- No v1 coupling.
34+
35+
After implementation:
36+
1. Run targeted syntax checks for changed JS files.
37+
2. Run text checks that verify target HTML and JS compliance.
38+
3. Write report to docs/dev/reports/pr_11_196_v2_runtime_validation_cleanup_report.md.
39+
4. Create final ZIP at tmp/PR_11_196.zip with repo-relative structure.
40+
```

docs/dev/commit_comment.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Convert remaining V2 tools to HTML-first session-only architecture - PR 11.195
1+
Validate and clean up V2 runtime shell separation after HTML-first re-engineer batch - PR 11.196
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# PR_11_196 Reports
2+
3+
Execution evidence was written to:
4+
5+
```text
6+
docs/dev/reports/pr_11_196_v2_runtime_validation_cleanup_report.md
7+
```
8+
9+
Final ZIP artifact:
10+
11+
```text
12+
tmp/PR_11_196.zip
13+
```
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# PR_11_196 V2 Runtime Validation + Cleanup Report
2+
3+
## Purpose
4+
Validate and clean up the completed V2 re-engineer lane after PR_11_195. The target V2 tools were audited for HTML-first shell ownership, behavior-only runtime modules, session-only data loading, explicit empty/error states, and no legacy/shared coupling.
5+
6+
## Target Tools
7+
- `tools/palette-manager-v2/` - Palette Manager V2
8+
- `tools/svg-asset-studio-v2/` - SVG Asset Studio V2
9+
- `tools/vector-map-editor-v2/` - Vector Map Editor V2
10+
- `tools/tilemap-studio-v2/` - Tilemap Studio V2
11+
- `tools/asset-browser-v2/` - Asset Browser V2
12+
13+
## Files Changed
14+
- `docs/dev/reports/pr_11_196_v2_runtime_validation_cleanup_report.md`
15+
- `docs/dev/reports/README_PR_11_196.md`
16+
17+
Existing PR source doc was present in the worktree and included in the ZIP:
18+
- `docs/pr/PR_11_196_V2_RUNTIME_VALIDATION_CLEANUP.md`
19+
20+
## Implementation Result
21+
No target V2 implementation file required changes during this pass. The five target tools already satisfied the PR_11_196 runtime structure requirements at execution time. Codex verified the implementation instead of introducing unnecessary churn.
22+
23+
## Pass/Fail Per Target Tool
24+
| Tool | HTML shell | Shared header | V2 tool id | JS behavior-only | Syntax | Result |
25+
| --- | --- | --- | --- | --- | --- | --- |
26+
| Palette Manager V2 | pass | pass | pass | pass | pass | pass |
27+
| SVG Asset Studio V2 | pass | pass | pass | pass | pass | pass |
28+
| Vector Map Editor V2 | pass | pass | pass | pass | pass | pass |
29+
| Tilemap Studio V2 | pass | pass | pass | pass | pass | pass |
30+
| Asset Browser V2 | pass | pass | pass | pass | pass | pass |
31+
32+
## Checks Run
33+
Syntax checks:
34+
35+
```powershell
36+
node --check tools/palette-manager-v2/index.js
37+
node --check tools/svg-asset-studio-v2/index.js
38+
node --check tools/vector-map-editor-v2/index.js
39+
node --check tools/tilemap-studio-v2/index.js
40+
node --check tools/asset-browser-v2/index.js
41+
```
42+
43+
Results:
44+
- `node --check tools/palette-manager-v2/index.js` passed.
45+
- `node --check tools/svg-asset-studio-v2/index.js` passed.
46+
- `node --check tools/vector-map-editor-v2/index.js` passed.
47+
- `node --check tools/tilemap-studio-v2/index.js` passed.
48+
- `node --check tools/asset-browser-v2/index.js` passed.
49+
50+
HTML and JS compliance checks verified each target V2 tool has:
51+
- document title ending in `V2`
52+
- `id="shared-theme-header"`
53+
- `../../src/engine/theme/main.css`
54+
- `../../src/engine/ui/hubCommon.css`
55+
- body `data-tool-id` ending in `-v2`
56+
- `../../src/engine/theme/mount-shared-header.js` loaded from HTML
57+
- `./index.js` loaded from HTML
58+
- static `page-shell` in HTML
59+
- exactly one class in `index.js`
60+
61+
Forbidden JS pattern check verified no target V2 `index.js` contains:
62+
- `document.body.innerHTML`
63+
- `document.head.insertAdjacentHTML`
64+
- dynamic script creation/append patterns
65+
- `platformShell`
66+
- `assetUsageIntegration`
67+
- `tools/shared`
68+
- `../shared`
69+
- fallback/default/demo data markers
70+
71+
Result: `PR_11_196 target HTML/JS compliance checks passed`.
72+
73+
## Banned Path Confirmation
74+
Scoped status check confirmed no changes under:
75+
- schemas
76+
- samples
77+
- games
78+
- `start_of_day/**`
79+
- Workspace Manager v1
80+
- `tools/shared/**`
81+
- `platformShell`
82+
- `assetUsageIntegration`
83+
84+
No schema, sample, game, Workspace Manager v1, platformShell, or tools/shared files were changed.
85+
86+
## Full Samples Smoke Decision
87+
Full samples smoke test skipped.
88+
89+
Reason: PR_11_196 did not modify shared sample loader/framework code. This pass is limited to targeted V2 runtime validation and report packaging.
90+
91+
## ZIP Artifact
92+
93+
```text
94+
tmp/PR_11_196.zip
95+
```
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# PR_11_196 — V2 Runtime Validation + Cleanup Pass
2+
3+
## Purpose
4+
Validate and clean up the completed V2 re-engineer lane after PR_11_195.
5+
6+
This PR is a Codex-driven stabilization pass. ChatGPT does not write implementation code.
7+
8+
## Scope
9+
Codex must inspect and correct V2 tool runtime structure only.
10+
11+
Target V2 tools:
12+
- Palette Manager V2
13+
- SVG Asset Studio V2
14+
- Vector Map Editor V2
15+
- Tilemap Studio V2
16+
- Asset Browser V2
17+
18+
## Required outcomes
19+
- Each V2 tool has a thin `tools/<tool>-v2/index.html` shell.
20+
- Each V2 tool uses `<div id="shared-theme-header"></div>`.
21+
- Each V2 tool loads the shared theme/header through HTML, not JS injection.
22+
- Each V2 tool keeps runtime behavior in `index.js`.
23+
- `index.js` does not build the full page shell with `document.body.innerHTML`.
24+
- `index.js` does not inject large CSS blocks through `document.head.insertAdjacentHTML`.
25+
- `index.js` does not dynamically append the shared header script.
26+
- V2 tool IDs use explicit `*-v2` identifiers.
27+
- V2 tools read session-backed data only.
28+
- V2 tools show explicit empty/error states.
29+
- No fallback data.
30+
- No legacy v1 coupling.
31+
32+
## Hard exclusions
33+
- No schema changes.
34+
- No sample changes.
35+
- No game changes.
36+
- No Workspace Manager v1 work.
37+
- No `platformShell` use.
38+
- No `tools/shared/*` use.
39+
- No repo-wide refactor.
40+
- No helper classes.
41+
- No abstraction layers.
42+
- No alias variables.
43+
44+
## Validation required
45+
Codex must run targeted validation only.
46+
47+
Required checks:
48+
- Syntax check changed V2 JS files.
49+
- Verify each target V2 HTML file contains `id="shared-theme-header"`.
50+
- Verify each target V2 HTML file loads shared theme CSS.
51+
- Verify each target V2 body/tool id uses `-v2`.
52+
- Verify target V2 JS does not contain full-page body replacement.
53+
- Verify target V2 JS does not contain dynamic CSS/header injection patterns.
54+
55+
Full samples smoke test must be skipped unless Codex changes shared sample loader/framework. Record skip reason in the report.
56+
57+
## Evidence
58+
Codex must write findings to:
59+
60+
`docs/dev/reports/pr_11_196_v2_runtime_validation_cleanup_report.md`
61+
62+
The report must include:
63+
- files changed
64+
- checks run
65+
- pass/fail result per target tool
66+
- full samples smoke test skipped/run decision and reason
67+
- confirmation that no schema/sample/game/workspace-v1 files changed
68+
69+
## Acceptance
70+
- All target V2 tools pass the validation above.
71+
- Any changes are limited to target V2 tool files and required docs/reports.
72+
- Codex produces final ZIP at `<project folder>/tmp/PR_11_196.zip`.

0 commit comments

Comments
 (0)