|
| 1 | +# BUILD_PR_11_17_SCHEMA_SET_NORMALIZATION_AND_WORKSPACE_REF_ENFORCEMENT |
| 2 | + |
| 3 | +## Required Codex Work |
| 4 | + |
| 5 | +### 1. Use uploaded schema set as source material |
| 6 | +Review the complete schema set from the repo equivalent of: |
| 7 | +- `tools/schemas/*.schema.json` |
| 8 | +- `tools/schemas/tools/*.schema.json` |
| 9 | + |
| 10 | +The uploaded candidate set contained: |
| 11 | +- `workspace.schema.json` |
| 12 | +- `workspace.manifest.schema.json` |
| 13 | +- `palette.schema.json` |
| 14 | +- `sample.tool-payload.schema.json` |
| 15 | +- `tool.manifest.schema.json` |
| 16 | +- tool schemas for asset-browser, sprite-editor, vector-map-editor, vector-asset-studio, tile-map-editor, parallax-editor, palette-browser, state-inspector, replay-visualizer, performance-profiler, physics-sandbox, asset-pipeline-tool, tile-model-converter, 3d-json-payload-normalizer, 3d-asset-viewer, 3d-camera-path-editor, skin-editor |
| 17 | + |
| 18 | +### 2. Correct workspace.manifest schema |
| 19 | +Update: |
| 20 | +`tools/schemas/workspace.manifest.schema.json` |
| 21 | + |
| 22 | +Required model: |
| 23 | +```json |
| 24 | +{ |
| 25 | + "type": "object", |
| 26 | + "required": ["tools"], |
| 27 | + "additionalProperties": false, |
| 28 | + "properties": { |
| 29 | + "tools": { |
| 30 | + "type": "object", |
| 31 | + "required": ["palette"], |
| 32 | + "additionalProperties": false, |
| 33 | + "properties": { |
| 34 | + "palette": { "$ref": "..." }, |
| 35 | + "asset-browser": { "$ref": "tools/asset-browser.schema.json" } |
| 36 | + } |
| 37 | + } |
| 38 | + } |
| 39 | +} |
| 40 | +``` |
| 41 | + |
| 42 | +Rules: |
| 43 | +- remove top-level `palettes` |
| 44 | +- palette is singular at `tools.palette` |
| 45 | +- list all supported Workspace tool keys |
| 46 | +- use `$ref` to each tool schema |
| 47 | +- no duplicate hand-written schema bodies when a tool schema exists |
| 48 | +- no aliases; use actual registry ids only |
| 49 | + |
| 50 | +### 3. Palette schema handling |
| 51 | +If Palette has a canonical schema: |
| 52 | +- `$ref` that schema at `tools.palette` |
| 53 | + |
| 54 | +If only `palette-browser.schema.json` exists: |
| 55 | +- distinguish the palette tool payload from the palette browser tool payload |
| 56 | +- create/update a canonical palette tool schema only if needed |
| 57 | +- keep it singular |
| 58 | + |
| 59 | +### 4. Validate tool ids against registry |
| 60 | +Use the actual tool registry as the authoritative list of supported tool ids. |
| 61 | +Do not use display names as schema keys. |
| 62 | +Do not invent aliases such as both `tilemap-studio` and `tile-map-editor`. |
| 63 | + |
| 64 | +### 5. Validate every schema |
| 65 | +Add or run validation that checks: |
| 66 | +- all schema files parse |
| 67 | +- `$ref` targets resolve |
| 68 | +- Workspace manifest rejects unknown tool keys |
| 69 | +- Workspace manifest rejects invalid tool payloads |
| 70 | +- Workspace manifest accepts valid 1902 payload |
| 71 | + |
| 72 | +### 6. Rebuild only sample 1902 if needed |
| 73 | +Update: |
| 74 | +`samples/phase-19/1902/sample.1902.workspace-all-tools.json` |
| 75 | + |
| 76 | +Rules: |
| 77 | +- conform to corrected schemas |
| 78 | +- all tool payloads under `tools` |
| 79 | +- palette only at `tools.palette` |
| 80 | +- no `sample.1902.palette.json` |
| 81 | +- no copied unrelated game/sample payloads |
| 82 | +- no duplicate `config` / `payload` branches |
| 83 | +- no fallback/default/hidden data |
| 84 | + |
| 85 | +### 7. Validation report |
| 86 | +Create: |
| 87 | +`docs/dev/reports/PR_11_17_SCHEMA_SET_NORMALIZATION_AND_WORKSPACE_REF_ENFORCEMENT_report.md` |
| 88 | + |
| 89 | +Report must include: |
| 90 | +- schema files changed |
| 91 | +- tool keys listed in workspace manifest |
| 92 | +- `$ref` target for each tool key |
| 93 | +- missing schemas and how they were handled |
| 94 | +- sample 1902 validation result |
| 95 | +- unknown-key rejection test result |
| 96 | +- invalid-payload rejection test result |
| 97 | +- Workspace UI validation result showing tools available beyond Palette |
| 98 | +- confirmation only sample 1902 changed |
| 99 | +- confirmation no start_of_day changes |
| 100 | + |
| 101 | +## Constraints |
| 102 | +- One PR purpose only. |
| 103 | +- Schema SSoT correction + 1902 conformance only. |
| 104 | +- Do not modify other samples. |
| 105 | +- Do not broaden Workspace behavior beyond schema conformance. |
0 commit comments