Skip to content

Commit 51256bf

Browse files
author
DavidQ
committed
Clarify and enforce separation of tool IDs and asset kinds - PR 11.107
1 parent 9b9d440 commit 51256bf

4 files changed

Lines changed: 140 additions & 17 deletions

File tree

docs/dev/codex_commands.md

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,16 @@
33
Model: GPT-5.3-codex
44
Reasoning: low
55

6-
1. Update resolveAcceptedAssetKindsForTool:
7-
- remove aliases
8-
- use canonical mapping only
6+
1. Scan repo:
7+
- ensure no asset kind equals a tool id
8+
- ensure no tool id used as asset kind
99

10-
2. Replace all asset kinds in repo:
11-
- normalize to canonical names
10+
2. Validate mapping:
11+
resolveAcceptedAssetKindsForTool is:
12+
toolId -> asset kinds ONLY
1213

13-
3. Remove:
14-
- "*"
15-
- duplicate kinds per tool
16-
- alias values
14+
3. Fix violations:
15+
- replace incorrect asset kinds with canonical types
1716

18-
4. Validate:
19-
- tools match schema
20-
- samples use canonical kinds
21-
- no unknown kinds exist
22-
23-
5. Report:
24-
docs/dev/reports/asset_kind_canonicalization_11_106.txt
17+
4. Report:
18+
docs/dev/reports/tool_vs_asset_kind_11_107.txt

docs/dev/commit_comment.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Enforce single canonical asset kind per concept and remove alias mappings - PR 11.106
1+
Clarify and enforce separation of tool IDs and asset kinds - PR 11.107
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
BUILD_PR_LEVEL_11_107_TOOL_VS_ASSET_KIND_GUARD
2+
Date: 2026-04-30
3+
4+
Scope
5+
- Scan repo for tool-id/asset-kind crossover violations.
6+
- Validate resolveAcceptedAssetKindsForTool remains toolId -> asset kinds only.
7+
- Fix violations if present.
8+
9+
Files Changed
10+
- docs/dev/reports/tool_vs_asset_kind_11_107.txt
11+
12+
1) Repo scan: no asset kind equals a tool id
13+
- Tool IDs extracted from tools/toolRegistry.js: 18
14+
- Broad JSON scan (excluding docs/non-JSONC noise):
15+
- kind fields scanned: 177
16+
- violations (kind == tool id): 0
17+
18+
2) Asset-facing manifest/catalog scan
19+
- Scanned files:
20+
- games/**/game.manifest.json (asset-browser.assets)
21+
- games/**/workspace.asset-catalog.json
22+
- samples/**/workspace*.json
23+
- workspace.manifest.json
24+
- Unique asset-facing kind values observed:
25+
audio, collision, data, font, image, other, palette, parallax, polygon, polyline, runtime-shape, skin, sprite, svg, tile, tilemap, vector
26+
- tool-id used as asset kind violations: 0
27+
28+
3) resolveAcceptedAssetKindsForTool validation
29+
- File: tools/shared/platformShell.js
30+
- Mapping is toolId -> asset kinds only:
31+
- skin-editor -> [skin]
32+
- sprite-editor -> [sprite]
33+
- tile-map-editor -> [tilemap]
34+
- parallax-editor -> [parallax]
35+
- svg-asset-studio -> [vector]
36+
- vector-map-editor -> [vector-map]
37+
- 3d-asset-viewer -> [model]
38+
- 3d-camera-path-editor -> [camera-path]
39+
- asset-browser -> [asset]
40+
- asset-pipeline -> []
41+
- tile-model-converter -> [tilemap, vector, model]
42+
- Duplicate kind entries: 0
43+
- Mapping values equal to a tool id: 0
44+
45+
4) Violations fixed
46+
- None required.
47+
- No incorrect asset-kind values matched a tool id, so no canonical replacement patch was needed for this PR.
48+
49+
Validation Commands (targeted)
50+
- Python scan: tool ids vs all JSON kind fields -> 0 violations
51+
- Python scan: asset-facing manifests/catalogs -> 0 tool-id-as-kind violations
52+
53+
Result
54+
- Constraint satisfied: no asset kind equals a tool id and no tool id is used as an asset kind.
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# BUILD_PR_LEVEL_11_107_TOOL_VS_ASSET_KIND_CLARIFICATION
2+
3+
## Purpose
4+
Clarify and enforce separation between:
5+
- Tool IDs
6+
- Asset Kinds
7+
8+
## Key Rule
9+
10+
Tool ≠ Asset Kind
11+
12+
They are DIFFERENT layers.
13+
14+
## Definitions
15+
16+
### Tool ID (FULL NAME)
17+
Used for:
18+
- UI
19+
- routing
20+
- registry
21+
- manifest.tools
22+
23+
Examples:
24+
- sprite-editor
25+
- vector-map-editor
26+
- asset-browser
27+
28+
### Asset Kind (DATA TYPE)
29+
Used for:
30+
- asset classification
31+
- filtering
32+
- validation
33+
34+
Examples:
35+
- sprite
36+
- vector-map
37+
- model
38+
- tilemap
39+
40+
## Correct Relationship
41+
42+
Tool -> accepts Asset Kind(s)
43+
44+
Example:
45+
46+
sprite-editor -> ["sprite"]
47+
vector-map-editor -> ["vector-map"]
48+
49+
## What NOT to do
50+
51+
❌ DO NOT use tool names as asset kinds:
52+
["sprite-editor"]
53+
54+
❌ DO NOT mix layers:
55+
toolId === assetKind
56+
57+
## Current Function (CORRECT)
58+
59+
The function is correct structurally:
60+
61+
toolId (full name) → asset kinds (data types)
62+
63+
## Required Enforcement
64+
65+
- Tool IDs remain full canonical names
66+
- Asset kinds remain canonical data types
67+
- No overlap
68+
- No aliasing
69+
- No duplication
70+
71+
## Acceptance
72+
73+
- Tool IDs are never used as asset kinds
74+
- Asset kinds are never tool IDs
75+
- Mapping is clean and 1-directional

0 commit comments

Comments
 (0)