|
1 | | -# Codex Commands — PR_11_197B |
| 1 | +MODEL: gpt-5.3-codex |
| 2 | +REASONING: medium |
2 | 3 |
|
3 | | -Model: GPT-5.4-codex |
4 | | -Reasoning: high |
| 4 | +# PR_11_198 — Tilemap Studio V2 Completion + Validation |
5 | 5 |
|
6 | 6 | ## Execute |
7 | | - |
8 | | -Use this PR as a Codex implementation task. Do not ask questions. Make the smallest scoped valid change. |
9 | | - |
10 | | -### Required Task |
11 | | -Complete Asset Browser V2 as the testable implementation target and bundle it with V2 validation hardening. |
12 | | - |
13 | | -### Scope Lock |
14 | | -Only edit files required for: |
15 | | -- `tools/asset-browser-v2/index.html` |
16 | | -- `tools/asset-browser-v2/index.js` |
17 | | -- narrowly scoped V2 validation/test files if needed |
18 | | -- docs/dev/reports evidence |
19 | | -- docs/dev/roadmaps/MASTER_ROADMAP_ENGINE.md status-only marker change if execution-backed |
20 | | - |
21 | | -Do not edit schemas, samples, games, Workspace Manager v1, platformShell, or `tools/shared/*`. |
22 | | - |
23 | | -### Implementation Rules |
24 | | -- Re-engineer the tool. Do not copy/paste legacy Asset Browser code. |
25 | | -- `index.html` owns static shell, CSS links, header mount, layout, and DOM nodes. |
26 | | -- `index.js` owns behavior only. |
27 | | -- Use `data-tool-id="asset-browser-v2"`. |
28 | | -- Header mount must be `<div id="shared-theme-header"></div>`. |
29 | | -- Use existing `src/engine/theme` and existing accordion styling where applicable. |
30 | | -- Use two menu areas only if needed: `menuTool` and `menuWorkspace`. |
31 | | -- Read session data only, using the established V2 hostContextId/session pattern. |
32 | | -- Do not fetch, guess, synthesize, default, or fallback data. |
33 | | -- Empty state and invalid state must be explicit and actionable. |
34 | | -- No helper classes. Single class only. |
35 | | -- No alias/pass-through variables. |
36 | | -- No abstraction layers. |
37 | | - |
38 | | -### Banned Patterns |
39 | | -Reject your own diff if it includes: |
40 | | -- `document.body.innerHTML` for page construction |
41 | | -- `document.head.insertAdjacentHTML` for CSS/style injection |
42 | | -- dynamic header script injection from JS |
43 | | -- `platformShell` |
44 | | -- `assetUsageIntegration` |
45 | | -- `tools/shared/` |
46 | | -- Workspace Manager v1 wiring |
47 | | -- fallback/default/sample data |
48 | | -- copied legacy code blocks |
49 | | - |
50 | | -### Validation Commands |
| 7 | +Implement the smallest valid testable change for Tilemap Studio V2. |
| 8 | + |
| 9 | +## Hard Boundaries |
| 10 | +- Codex writes implementation code. |
| 11 | +- Do not change schemas. |
| 12 | +- Do not change samples. |
| 13 | +- Do not change games. |
| 14 | +- Do not touch Workspace Manager v1. |
| 15 | +- Do not patch legacy tools. |
| 16 | +- Do not use platformShell. |
| 17 | +- Do not use tools/shared except the explicitly required theme/header mount path already used by the repo theme system. |
| 18 | +- Do not copy old tool code. Re-engineer the V2 tool. |
| 19 | + |
| 20 | +## Required Files To Inspect/Edit |
| 21 | +- tools/tilemap-studio-v2/index.html |
| 22 | +- tools/tilemap-studio-v2/index.js |
| 23 | + |
| 24 | +If either file does not exist, create only the missing file required for this tool. |
| 25 | + |
| 26 | +## Implementation Rules |
| 27 | +1. `tools/tilemap-studio-v2/index.html` must own the static shell: |
| 28 | + - include theme CSS |
| 29 | + - include `<div id="shared-theme-header"></div>` |
| 30 | + - include static page shell/root container |
| 31 | + - include static menuTool section |
| 32 | + - include static menuWorkspace section |
| 33 | + - include `../../src/engine/theme/mount-shared-header.js` |
| 34 | + - include `./index.js` |
| 35 | + |
| 36 | +2. `tools/tilemap-studio-v2/index.js` must be behavior-only: |
| 37 | + - single class |
| 38 | + - no helper classes |
| 39 | + - no alias/pass-through variables |
| 40 | + - no full-page `innerHTML` construction |
| 41 | + - no CSS injection |
| 42 | + - no dynamic header injection |
| 43 | + - read session only |
| 44 | + - update existing DOM nodes only |
| 45 | + - handle missing, invalid, and valid session states |
| 46 | + |
| 47 | +3. Enforce naming: |
| 48 | + - visible name: `Tilemap Studio V2` |
| 49 | + - `document.title`: `Tilemap Studio V2` |
| 50 | + - `data-tool-id`: `tilemap-studio-v2` |
| 51 | + |
| 52 | +4. Session rules: |
| 53 | + - no fallback data |
| 54 | + - no defaults |
| 55 | + - no fetch |
| 56 | + - no guessed payloads |
| 57 | + - no hidden samples |
| 58 | + |
| 59 | +## Validation Commands |
51 | 60 | Run targeted validation only: |
52 | 61 |
|
53 | | -1. Syntax checks for changed JS files. |
54 | | -2. Static checks for V2 shell compliance: |
55 | | - - Asset Browser V2 `index.html` includes `shared-theme-header`. |
56 | | - - Asset Browser V2 `index.js` does not include `document.body.innerHTML`. |
57 | | - - Asset Browser V2 `index.js` does not include `document.head.insertAdjacentHTML`. |
58 | | - - Asset Browser V2 references `asset-browser-v2`. |
59 | | -3. Manual/UAT or lightweight browser validation evidence for: |
60 | | - - direct open empty state |
61 | | - - invalid session state |
62 | | - - valid session state render |
63 | | - - shared header visible |
| 62 | +```powershell |
| 63 | +node --check tools/tilemap-studio-v2/index.js |
| 64 | +``` |
64 | 65 |
|
65 | | -Do not run full samples smoke unless a broad shared sample loader/framework file is changed. If skipped, document why. |
| 66 | +Manual validation: |
| 67 | +- Open `tools/tilemap-studio-v2/index.html`. |
| 68 | +- Confirm shared header renders in `#shared-theme-header`. |
| 69 | +- Confirm missing session shows clear actionable state. |
| 70 | +- Confirm valid session renders tilemap content. |
| 71 | +- Confirm browser console has no errors. |
66 | 72 |
|
67 | | -### Evidence |
68 | | -Write results to: |
| 73 | +## Evidence Report |
| 74 | +Create or update: |
69 | 75 |
|
70 | | -`docs/dev/reports/PR_11_197B_v2_asset_browser_validation.md` |
| 76 | +```text |
| 77 | +docs/dev/reports/PR_11_198_report.md |
| 78 | +``` |
71 | 79 |
|
72 | | -Include: |
| 80 | +Report must include: |
73 | 81 | - files changed |
74 | 82 | - validation commands run |
75 | 83 | - pass/fail results |
76 | | -- full samples smoke skipped/running decision and reason |
77 | | -- screenshots/log snippets if available |
| 84 | +- manual test notes |
| 85 | +- statement that full samples smoke was skipped and why |
78 | 86 |
|
79 | | -### Final Artifact |
80 | | -Create final ZIP at: |
| 87 | +## Local ZIP Output |
| 88 | +After validation, Codex must create: |
81 | 89 |
|
82 | | -`tmp/PR_11_197B.zip` |
| 90 | +```text |
| 91 | +<project folder>/tmp/PR_11_198.zip |
| 92 | +``` |
83 | 93 |
|
84 | | -The ZIP must preserve repo-relative structure and include implementation changes and evidence. |
| 94 | +The ZIP must preserve repo-relative structure and include the final changed files plus docs/dev evidence. |
0 commit comments