|
| 1 | +# BUILD_PR_ASSET_USAGE_INTEGRATION |
| 2 | + |
| 3 | +## Goal |
| 4 | +Wire the shared asset and palette systems into all active first-class tools without changing the tool-only launcher surface, without reviving legacy sprite tooling, and without introducing tool-private asset duplication as the default path. |
| 5 | + |
| 6 | +## Scope |
| 7 | +Integrated tools: |
| 8 | +- `Vector Map Editor` |
| 9 | +- `Vector Asset Studio` |
| 10 | +- `Tilemap Studio` |
| 11 | +- `Parallax Scene Studio` |
| 12 | +- `Sprite Editor` |
| 13 | +- `Asset Browser / Import Hub` |
| 14 | +- `Palette Browser / Manager` |
| 15 | + |
| 16 | +Out of scope: |
| 17 | +- `SpriteEditor_old_keep` |
| 18 | +- sample restoration on `tools/index.html` |
| 19 | +- showcase/game content |
| 20 | +- unrelated structural refactors |
| 21 | + |
| 22 | +## Files Added |
| 23 | +- `tools/shared/assetUsageIntegration.js` |
| 24 | +- `docs/specs/asset_usage_contract.md` |
| 25 | + |
| 26 | +## Files Updated |
| 27 | +- `tools/shared/platformShell.js` |
| 28 | +- `tools/shared/platformShell.css` |
| 29 | +- `tools/Asset Browser/index.html` |
| 30 | +- `tools/Asset Browser/main.js` |
| 31 | +- `tools/Palette Browser/index.html` |
| 32 | +- `tools/Palette Browser/main.js` |
| 33 | +- `scripts/validate-active-tools-surface.mjs` |
| 34 | +- `docs/dev/COMMIT_COMMENT.txt` |
| 35 | +- `docs/dev/reports/change_summary.txt` |
| 36 | +- `docs/dev/reports/validation_checklist.txt` |
| 37 | + |
| 38 | +## Implementation Summary |
| 39 | + |
| 40 | +### Shared Shell Integration |
| 41 | +- Added a shared asset-usage integration module under `tools/shared/`. |
| 42 | +- The shared platform shell now renders normalized launch actions for every active tool page: |
| 43 | + - `Browse Assets` |
| 44 | + - `Import Assets` |
| 45 | + - `Browse Palettes` |
| 46 | + - `Manage Palettes` |
| 47 | +- The shared shell also shows the current shared asset and shared palette handoff summaries. |
| 48 | + |
| 49 | +### Shared Handoff Contracts |
| 50 | +- Added a documented contract in `docs/specs/asset_usage_contract.md`. |
| 51 | +- Normalized shared storage keys: |
| 52 | + - `toolboxaid.shared.assetHandoff` |
| 53 | + - `toolboxaid.shared.paletteHandoff` |
| 54 | +- Tools consume shared references by contract instead of creating private default copies. |
| 55 | + |
| 56 | +### Asset Browser / Import Hub |
| 57 | +- Added launch-context handling through query params. |
| 58 | +- Added a `Use In Active Tool` action that publishes a normalized shared asset handoff. |
| 59 | +- Preserved non-destructive import planning behavior. |
| 60 | + |
| 61 | +### Palette Browser / Manager |
| 62 | +- Added launch-context handling through query params. |
| 63 | +- Updated palette handoff publishing to use the normalized shared contract. |
| 64 | +- Preserved built-in palette browsing and local editable palette workflows. |
| 65 | + |
| 66 | +## Surface and Visibility Rules |
| 67 | +- `Sprite Editor` remains first-class and visible. |
| 68 | +- `SpriteEditor_old_keep` remains preserved and hidden from active surfacing. |
| 69 | +- `tools/index.html` remains tool-only. |
| 70 | +- No samples were reintroduced to the tools launcher. |
| 71 | + |
| 72 | +## Validation |
| 73 | +- `node --check tools/shared/assetUsageIntegration.js` |
| 74 | +- `node --check tools/shared/platformShell.js` |
| 75 | +- `node --check tools/Asset Browser/main.js` |
| 76 | +- `node --check tools/Palette Browser/main.js` |
| 77 | +- `node scripts/validate-tool-registry.mjs` |
| 78 | +- `node scripts/validate-active-tools-surface.mjs` |
| 79 | + |
| 80 | +## Acceptance Summary |
| 81 | +- Every active first-class tool page now exposes the same shared asset/palette launch actions through the engine-themed shell. |
| 82 | +- Asset and palette handoffs are normalized and documented. |
| 83 | +- Surfacing remains registry-safe and legacy-safe. |
0 commit comments