|
1 | | -# Codex Commands — PR_11_196 |
| 1 | +# Codex Commands — PR_11_197B |
2 | 2 |
|
3 | 3 | Model: GPT-5.4-codex |
4 | 4 | Reasoning: high |
5 | 5 |
|
6 | | -## Command |
7 | | - |
8 | | -```text |
9 | | -You are implementing PR_11_196 — V2 Runtime Validation + Cleanup Pass. |
10 | | -
|
11 | | -Follow docs/pr/PR_11_196_V2_RUNTIME_VALIDATION_CLEANUP.md exactly. |
12 | | -
|
13 | | -Important: |
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 | | -``` |
| 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 |
| 51 | +Run targeted validation only: |
| 52 | + |
| 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 |
| 64 | + |
| 65 | +Do not run full samples smoke unless a broad shared sample loader/framework file is changed. If skipped, document why. |
| 66 | + |
| 67 | +### Evidence |
| 68 | +Write results to: |
| 69 | + |
| 70 | +`docs/dev/reports/PR_11_197B_v2_asset_browser_validation.md` |
| 71 | + |
| 72 | +Include: |
| 73 | +- files changed |
| 74 | +- validation commands run |
| 75 | +- pass/fail results |
| 76 | +- full samples smoke skipped/running decision and reason |
| 77 | +- screenshots/log snippets if available |
| 78 | + |
| 79 | +### Final Artifact |
| 80 | +Create final ZIP at: |
| 81 | + |
| 82 | +`tmp/PR_11_197B.zip` |
| 83 | + |
| 84 | +The ZIP must preserve repo-relative structure and include implementation changes and evidence. |
0 commit comments