Skip to content

Commit c097203

Browse files
author
DavidQ
committed
PR 8.7: Workspace schema aligned to id/type structure
- Removed sampleId from schema - Added id + type requirements - Enforced strict entity shape
1 parent 76c0945 commit c097203

4 files changed

Lines changed: 103 additions & 16 deletions

File tree

docs/dev/codex_commands.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ MODEL: GPT-5.3-codex
22
REASONING: medium
33

44
TASK:
5-
- Replace sampleId → id in workspace.manifest.json
6-
- Add type field:
7-
- existing entries → type: "sample"
8-
- Ensure uniqueness of id
5+
- Update workspace.schema.json:
6+
- Replace sampleId usage with id
7+
- Add type field requirement
8+
- Ensure entity array structure matches manifest
9+
- Ensure no additionalProperties allowed
910
- Do NOT modify runtime
1011
- Do NOT add validators
1112
- Do NOT modify start_of_day

docs/dev/commit_comment.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
PR 8.6: Manifest entity generalization
1+
PR 8.7: Workspace schema aligned to id/type structure
22

3-
- Replaced sampleId with id
4-
- Added type field
5-
- Enabled support for games and future entities
3+
- Removed sampleId from schema
4+
- Added id + type requirements
5+
- Enforced strict entity shape
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# PR 8.7 — Workspace Schema Update (id + type)
2+
3+
## Purpose
4+
Align workspace.schema.json with new manifest structure using:
5+
- id
6+
- type
7+
8+
## Changes
9+
10+
### workspace.schema.json
11+
12+
#### Replace
13+
- sampleId
14+
15+
#### With
16+
- id (string, required)
17+
- type (string, required)
18+
19+
### Entry Shape
20+
```json
21+
{
22+
"id": "0305",
23+
"type": "sample",
24+
"tool": "vector-map-editor",
25+
"palette": "samples/phase-03/0305/sample.palette.json"
26+
}
27+
```
28+
29+
### Rules
30+
- id must be unique
31+
- type required
32+
- tool required
33+
- palette optional
34+
- no additionalProperties
35+
36+
## Non-Goals
37+
- no runtime logic
38+
- no validators
39+
40+
## Acceptance
41+
- schema matches manifest structure
42+
- no references to sampleId remain
Lines changed: 52 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,61 @@
11
{
22
"$schema": "https://json-schema.org/draft/2020-12/schema",
3-
"$id": "workspace.schema.json",
3+
"$id": "tools/schemas/workspace.schema.json",
44
"type": "object",
5-
"required": ["version", "tools", "palettes"],
5+
"required": ["documentKind", "schema", "version", "samples"],
6+
"additionalProperties": false,
67
"properties": {
7-
"version": { "type": "string" },
8-
"tools": {
9-
"type": "array",
10-
"items": { "type": "string" }
8+
"documentKind": {
9+
"type": "string",
10+
"const": "workspace-manifest"
11+
},
12+
"schema": {
13+
"type": "string",
14+
"minLength": 1
15+
},
16+
"version": {
17+
"type": "integer",
18+
"minimum": 1
1119
},
12-
"palettes": {
20+
"samples": {
1321
"type": "array",
14-
"items": { "$ref": "palette.schema.json" }
22+
"uniqueItems": true,
23+
"items": {
24+
"type": "object",
25+
"required": ["id", "type", "tool"],
26+
"additionalProperties": false,
27+
"properties": {
28+
"id": {
29+
"type": "string",
30+
"minLength": 1
31+
},
32+
"type": {
33+
"type": "string",
34+
"minLength": 1
35+
},
36+
"phase": {
37+
"type": "string",
38+
"minLength": 1
39+
},
40+
"tool": {
41+
"type": "string",
42+
"minLength": 1
43+
},
44+
"tools": {
45+
"type": "array",
46+
"uniqueItems": true,
47+
"items": {
48+
"type": "string",
49+
"minLength": 1
50+
}
51+
},
52+
"palette": {
53+
"type": "string",
54+
"minLength": 1
55+
}
56+
},
57+
"description": "id must be unique across samples."
58+
}
1559
}
1660
}
1761
}

0 commit comments

Comments
 (0)