Skip to content

Commit 26a9a70

Browse files
author
DavidQ
committed
Normalize Workspace schemas to reference tool schemas and validate sample 1902 - PR 11.17
1 parent f0ba84f commit 26a9a70

7 files changed

Lines changed: 276 additions & 35 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# CODEX COMMANDS
2+
3+
model: gpt-5.3-codex
4+
reasoning: high
5+
6+
Apply PR_11_17_SCHEMA_SET_NORMALIZATION_AND_WORKSPACE_REF_ENFORCEMENT.
7+
8+
Use the schema set as the contract source and correct it.
9+
10+
Required:
11+
- Normalize `tools/schemas/workspace.manifest.schema.json`.
12+
- Remove top-level `palettes`.
13+
- Make `tools.palette` singular and required.
14+
- List all supported Workspace tool ids explicitly under `tools.properties`.
15+
- Set `tools.additionalProperties` to false.
16+
- Use `$ref` to each tool's canonical schema instead of duplicating schema bodies.
17+
- Use actual registry ids only; no aliases or display names as keys.
18+
- Ensure all `$ref` targets resolve.
19+
- Validate schema syntax and references.
20+
- Validate sample 1902 against corrected schemas.
21+
- Rebuild only `samples/phase-19/1902/sample.1902.workspace-all-tools.json` if needed.
22+
- Remove/avoid `sample.1902.palette.json`.
23+
- Ensure Workspace shows all valid tools, not only Palette.
24+
- Do not modify other samples.
25+
- Do not add fallback/default/hidden data.
26+
- Do not modify start_of_day folders.
27+
- Add validation report at docs/dev/reports/PR_11_17_SCHEMA_SET_NORMALIZATION_AND_WORKSPACE_REF_ENFORCEMENT_report.md.
28+
- Return ZIP artifact at tmp/PR_11_17_SCHEMA_SET_NORMALIZATION_AND_WORKSPACE_REF_ENFORCEMENT_delta.zip.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Normalize Workspace schemas to reference tool schemas and validate sample 1902 - PR 11.17
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# REPORT_PR_11_17_SCHEMA_SET_NORMALIZATION_AND_WORKSPACE_REF_ENFORCEMENT
2+
3+
## Summary
4+
This PR instructs Codex to correct the full schema set and make Workspace validation follow tool schemas as SSoT.
5+
6+
## Key Requirements
7+
- Palette is singular at `tools.palette`.
8+
- Tool payload schemas are imported with `$ref`.
9+
- Unknown tool keys fail validation.
10+
- Sample 1902 is rebuilt only as needed to validate correctly.
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
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.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# PLAN_PR_11_17_SCHEMA_SET_NORMALIZATION_AND_WORKSPACE_REF_ENFORCEMENT
2+
3+
## Purpose
4+
Normalize the full schema set and make Workspace validation follow the tool schemas as SSoT.
5+
6+
## Input
7+
User supplied `schemas.zip` as the candidate complete schema set.
8+
9+
## Problem
10+
The current schema set has drift:
11+
- `workspace.manifest.schema.json` still requires top-level `palettes`
12+
- palette should be singular and tool-owned at `tools.palette`
13+
- Workspace manifest does not `$ref` tool schemas
14+
- `tools.additionalProperties` is too loose
15+
- Workspace accepts invalid/unknown tool payloads
16+
- sample 1902 can pass with copied garbage payloads instead of schema-valid Workspace data
17+
18+
## Scope
19+
- Correct schemas under `tools/schemas/`
20+
- Use each tool schema as the payload SSoT via `$ref`
21+
- Tighten Workspace manifest validation
22+
- Rebuild/validate only sample 1902 against corrected schemas
23+
- Do not modify other samples
24+
- Do not modify start_of_day folders
25+
26+
## Acceptance
27+
- Full schema set is syntactically valid JSON Schema draft 2020-12
28+
- Workspace manifest uses `tools` as the only top-level data bucket
29+
- `tools.palette` is required, singular, and schema-valid
30+
- Every supported tool key is explicitly listed under `tools.properties`
31+
- Every supported tool payload uses `$ref` to its tool schema where available
32+
- `tools.additionalProperties` is false
33+
- Sample 1902 validates against corrected Workspace schema
34+
- Workspace shows all valid tools, not only Palette
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "tools/schemas/tools/palette.schema.json",
4+
"title": "Workspace Palette Payload",
5+
"type": "object",
6+
"required": [
7+
"id",
8+
"name",
9+
"swatches"
10+
],
11+
"additionalProperties": true,
12+
"properties": {
13+
"id": {
14+
"type": "string",
15+
"minLength": 1
16+
},
17+
"name": {
18+
"type": "string",
19+
"minLength": 1
20+
},
21+
"swatches": {
22+
"type": "array",
23+
"items": {
24+
"type": "object",
25+
"required": [
26+
"hex"
27+
],
28+
"additionalProperties": true,
29+
"properties": {
30+
"symbol": {
31+
"type": "string"
32+
},
33+
"hex": {
34+
"type": "string",
35+
"minLength": 4
36+
},
37+
"name": {
38+
"type": "string"
39+
}
40+
}
41+
}
42+
}
43+
}
44+
}

tools/schemas/workspace.manifest.schema.json

Lines changed: 54 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -9,43 +9,62 @@
99
"tools": {
1010
"type": "object",
1111
"required": ["palette"],
12-
"additionalProperties": true,
13-
"description": "Workspace-owned tool asset data. Palette is singular and canonical at tools.palette.",
12+
"additionalProperties": false,
13+
"description": "Workspace-owned tool asset data keyed by canonical registry ids plus required singular palette payload.",
1414
"properties": {
1515
"palette": {
16-
"type": "object",
17-
"required": ["id", "name", "swatches"],
18-
"additionalProperties": true,
19-
"properties": {
20-
"id": {
21-
"type": "string",
22-
"minLength": 1
23-
},
24-
"name": {
25-
"type": "string",
26-
"minLength": 1
27-
},
28-
"swatches": {
29-
"type": "array",
30-
"items": {
31-
"type": "object",
32-
"required": ["hex"],
33-
"additionalProperties": true,
34-
"properties": {
35-
"symbol": {
36-
"type": "string"
37-
},
38-
"hex": {
39-
"type": "string",
40-
"minLength": 4
41-
},
42-
"name": {
43-
"type": "string"
44-
}
45-
}
46-
}
47-
}
48-
}
16+
"$ref": "./tools/palette.schema.json"
17+
},
18+
"vector-map-editor": {
19+
"$ref": "./tools/vector-map-editor.schema.json"
20+
},
21+
"vector-asset-studio": {
22+
"$ref": "./tools/vector-asset-studio.schema.json"
23+
},
24+
"tile-map-editor": {
25+
"$ref": "./tools/tile-map-editor.schema.json"
26+
},
27+
"parallax-editor": {
28+
"$ref": "./tools/parallax-editor.schema.json"
29+
},
30+
"sprite-editor": {
31+
"$ref": "./tools/sprite-editor.schema.json"
32+
},
33+
"skin-editor": {
34+
"$ref": "./tools/skin-editor.schema.json"
35+
},
36+
"asset-browser": {
37+
"$ref": "./tools/asset-browser.schema.json"
38+
},
39+
"palette-browser": {
40+
"$ref": "./tools/palette-browser.schema.json"
41+
},
42+
"state-inspector": {
43+
"$ref": "./tools/state-inspector.schema.json"
44+
},
45+
"replay-visualizer": {
46+
"$ref": "./tools/replay-visualizer.schema.json"
47+
},
48+
"performance-profiler": {
49+
"$ref": "./tools/performance-profiler.schema.json"
50+
},
51+
"physics-sandbox": {
52+
"$ref": "./tools/physics-sandbox.schema.json"
53+
},
54+
"asset-pipeline-tool": {
55+
"$ref": "./tools/asset-pipeline-tool.schema.json"
56+
},
57+
"tile-model-converter": {
58+
"$ref": "./tools/tile-model-converter.schema.json"
59+
},
60+
"3d-json-payload-normalizer": {
61+
"$ref": "./tools/3d-json-payload-normalizer.schema.json"
62+
},
63+
"3d-asset-viewer": {
64+
"$ref": "./tools/3d-asset-viewer.schema.json"
65+
},
66+
"3d-camera-path-editor": {
67+
"$ref": "./tools/3d-camera-path-editor.schema.json"
4968
}
5069
}
5170
}

0 commit comments

Comments
 (0)