|
| 1 | +# BUILD_PR_11_20_WORKSPACE_LOADER_SCHEMA_V2_TOOLS_PAYLOAD_SUPPORT |
| 2 | + |
| 3 | +## Required Codex Work |
| 4 | + |
| 5 | +### 1. Inspect current Workspace loader path |
| 6 | +Find where Workspace loads manifests and determines available tools. |
| 7 | + |
| 8 | +Expected areas: |
| 9 | +- tools/workspace* |
| 10 | +- tools/shared/platformShell* |
| 11 | +- tools/toolRegistry.js |
| 12 | +- any schema validation utilities |
| 13 | +- sample 1902 launch page only if required |
| 14 | + |
| 15 | +### 2. Update loader to new manifest contract |
| 16 | +Workspace must consume the corrected shape: |
| 17 | + |
| 18 | +```json |
| 19 | +{ |
| 20 | + "$schema": ".../workspace.manifest.schema.json", |
| 21 | + "documentKind": "workspace-manifest", |
| 22 | + "schema": "html-js-gaming.project", |
| 23 | + "version": 1, |
| 24 | + "id": "sample-1902-workspace-all-tools", |
| 25 | + "name": "Sample 1902 Workspace All Tools", |
| 26 | + "tools": { |
| 27 | + "asset-browser": { "tool": "asset-browser", "version": "1", "payload": {} }, |
| 28 | + "sprite-editor": { "tool": "sprite-editor", "version": "1", "payload": {} }, |
| 29 | + "palette": { "tool": "palette-browser", "version": "1", "payload": {} } |
| 30 | + } |
| 31 | +} |
| 32 | +``` |
| 33 | + |
| 34 | +### 3. Build available tools from manifest.tools |
| 35 | +Available tools must come from: |
| 36 | +`Object.keys(manifest.tools)` |
| 37 | + |
| 38 | +Then: |
| 39 | +- validate key exists in Workspace-supported registry list |
| 40 | +- validate payload `tool` matches the registered tool id or the documented special-case mapping for singular palette |
| 41 | +- reject/report unknown keys |
| 42 | +- do not silently drop valid tools |
| 43 | + |
| 44 | +### 4. Palette mapping rule |
| 45 | +Resolve the naming ambiguity explicitly: |
| 46 | +- If schema uses `tools.palette` as the singular palette payload, map it to the Palette Browser tool UI. |
| 47 | +- Do not treat Palette as the only workspace tool. |
| 48 | +- Do not require a top-level `palettes` collection. |
| 49 | +- Do not require a separate `sample.1902.palette.json`. |
| 50 | + |
| 51 | +### 5. Remove old assumptions |
| 52 | +Remove or bypass old loader behavior that expects: |
| 53 | +- `palettes` |
| 54 | +- `games[].tools` |
| 55 | +- `activeWorkspaceTools` |
| 56 | +- top-level `config` |
| 57 | +- top-level `payload` |
| 58 | +- broad sample tool-payload schema wrappers |
| 59 | + |
| 60 | +unless still needed for legacy files and clearly documented as compatibility, not as the 1902 path. |
| 61 | + |
| 62 | +### 6. Validation report |
| 63 | +Create: |
| 64 | +docs/dev/reports/PR_11_20_WORKSPACE_LOADER_SCHEMA_V2_TOOLS_PAYLOAD_SUPPORT_report.md |
| 65 | + |
| 66 | +Report must include: |
| 67 | +- files changed |
| 68 | +- old loader assumption found |
| 69 | +- new loader path |
| 70 | +- all manifest tool keys discovered for sample 1902 |
| 71 | +- tool keys accepted |
| 72 | +- tool keys rejected with reason |
| 73 | +- proof Workspace shows more than Palette |
| 74 | +- validation command/results |
| 75 | +- confirmation no other samples changed |
| 76 | +- confirmation no start_of_day changes |
| 77 | + |
| 78 | +## Constraints |
| 79 | +- One PR purpose only. |
| 80 | +- No schema loosening. |
| 81 | +- No fallback/default/hidden data. |
| 82 | +- No unrelated UI polish. |
| 83 | +- No edits to standalone sample behavior. |
0 commit comments