Skip to content

Commit 87a415b

Browse files
author
DavidQ
committed
Finalize tool design docs with explicit published outputs and control-to-JSON mapping - PR_26124_024-final-polish-design-docs
1 parent 3f07c48 commit 87a415b

29 files changed

Lines changed: 6233 additions & 2523 deletions

File tree

Lines changed: 65 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,96 @@
11
# 3D Asset Viewer Reengineering Design
22

3-
Task: PR_26124_023-finalize-tool-design-docs
3+
Task: PR_26124_024
44
Classification: rebuildable tool
55
Core priority: core-12
66
Source folder: `tools/3D Asset Viewer`
77
Publish target: `tools.3d-asset-viewer`
88

99
## Tool Purpose
10-
Read-only 3D asset inspection. 3D Asset Viewer owns `asset3d` validation, inspection report generation, export, and publish to `tools.3d-asset-viewer` when a report payload is required.
10+
3D Asset Viewer owns 3D asset inspection payload import, validation, report export, and publish to `tools.3d-asset-viewer`.
1111

12-
## Exact Folder/Files Inspected
12+
## Folder/Files Inspected
1313
- `tools/3D Asset Viewer/how_to_use.html`
1414
- `tools/3D Asset Viewer/index.html`
1515
- `tools/3D Asset Viewer/main.js`
1616
- `tools/3D Asset Viewer/README.md`
1717

18-
## Exact Current Controls Found
19-
- `tools/3D Asset Viewer/index.html`: `button[button]#inspect3dAssetButton` - Inspect Asset
20-
- `tools/3D Asset Viewer/index.html`: `textarea#asset3dInput` - asset3dInput
21-
- `tools/3D Asset Viewer/main.js`: `inspect3dAssetButton` via inspectButton
22-
- `tools/3D Asset Viewer/main.js`: `asset3dStatus` via statusText
23-
- `tools/3D Asset Viewer/main.js`: `asset3dInput` via input
24-
- `tools/3D Asset Viewer/main.js`: `asset3dOutput` via output
18+
## Controls: Control -> Action -> JSON Effect
19+
| Control | Action | JSON effect |
20+
|---|---|---|
21+
| `tools/3D Asset Viewer/index.html`: `button[button]#inspect3dAssetButton` - Inspect Asset | Triggers the current 3D asset viewer payload UI action for `Inspect Asset`. | May update draft 3D asset viewer payload data; tools.3d-asset-viewer publish must wait for validation. |
22+
| `tools/3D Asset Viewer/index.html`: `textarea#asset3dInput` - asset3dInput | Edits the current 3D asset viewer payload through `asset3dInput`. | Updates draft 3D asset viewer payload data and requires validation before tools.3d-asset-viewer publish. |
2523

26-
## Current Panels And Surfaces Found
27-
- `tools/3D Asset Viewer/index.html`: `.debug-tool-shell`
24+
## Panels And Surfaces Found
25+
- `tools/3D Asset Viewer/how_to_use.html`: `.tools-platform-surface`
2826
- `tools/3D Asset Viewer/index.html`: `.app-shell`
29-
- `tools/3D Asset Viewer/index.html`: `.panel`
30-
- `tools/3D Asset Viewer/index.html`: `.debug-tool-panel`
3127
- `tools/3D Asset Viewer/index.html`: `.debug-tool-grid`
28+
- `tools/3D Asset Viewer/index.html`: `.debug-tool-panel`
29+
- `tools/3D Asset Viewer/index.html`: `.debug-tool-shell`
30+
- `tools/3D Asset Viewer/index.html`: `.panel`
3231

33-
## Exact Current Functions And Classes
34-
- `tools/3D Asset Viewer/main.js`: function boot3dAssetViewer; function buildPresetLoadedStatus; function computeBounds; function inspectAssetPayload; function normalizeAssetPayload; function normalizeSamplePresetPath; function sanitizeNumber; function setStatus; function tryLoadPresetFromQuery; method getApi; method registerToolBootContract
32+
## Current Component/Class/Function Inventory
33+
- `tools/3D Asset Viewer/main.js`: boot3dAssetViewer; buildPresetLoadedStatus; computeBounds; getApi; inspectAssetPayload; normalizeAssetPayload; normalizeSamplePresetPath; registerToolBootContract; sanitizeNumber; setStatus; tryLoadPresetFromQuery
3534

3635
## Target Controls
3736
Keep:
38-
- Inspect Asset
39-
- asset input textarea
40-
- inspection output panel
37+
- asset selection controls
38+
- viewer/camera controls
39+
- inspection/report export controls
4140

4241
Remove or rename:
43-
- editing controls from the viewer path
42+
- viewer-only camera state from published asset JSON unless schema-owned
4443

4544
Add:
46-
- Load 3D Asset JSON
47-
- Export inspection report
48-
- Publish `tools.3d-asset-viewer` report
45+
- Validate 3D Asset Payload
46+
- Publish `tools.3d-asset-viewer`
47+
- inspection diagnostics
4948

50-
## JSON Contract Owned By This Tool
51-
Owned JSON is the 3d-asset-viewer payload. Required field is `asset3d`; no other top-level fields are allowed. Inspection output is read-only and derived from the loaded 3D asset payload.
49+
## JSON Schema/Input Contract Currently Expected
50+
Tool receives validated payload and owns behavior for 3D asset viewer payload. Current contract baseline: `tools/schemas/tools/3d-asset-viewer.schema.json` (3d-asset-viewer Payload).
51+
Required keys: `asset3d`.
52+
Optional keys: none identified for this contract.
5253

53-
## Publish Output
54-
Publish only to `tools.3d-asset-viewer`. The published value must match the tool-owned contract above and must be produced by this folder's validation/export path.
54+
Tool-owned JSON responsibilities:
55+
- import/load: parse incoming 3D asset viewer payload and reject it before mutation when invalid
56+
- validate: apply the current 3D asset viewer payload contract before export, copy, or publish
57+
- edit/process: mutate only 3D asset viewer payload fields owned by 3D Asset Viewer
58+
- export/save: serialize the validated 3D asset viewer payload as the tools.3d-asset-viewer output shape
59+
- publish: write only the validated tools.3d-asset-viewer value produced by 3D Asset Viewer
60+
- copy/create payload: create copied payload text from the validated 3D asset viewer payload, not from unvalidated draft UI state
5561

56-
## Invalid JSON Behavior
62+
## Valid JSON Behavior
63+
- accepts the schema-defined 3D asset viewer payload
64+
- uses viewer controls for inspection without mutating unrelated JSON
65+
- publishes only validated asset inspection output
66+
67+
## Invalid JSON Rejection Behavior
5768
- malformed JSON
58-
- missing `asset3d`
59-
- asset data the inspector cannot summarize
69+
- payload shape outside `3d-asset-viewer.schema.json`
70+
- invalid asset reference or inspection setting
6071
- unsupported top-level fields
6172

62-
## Manual Test Plan
63-
- Paste a valid `asset3d` payload and inspect it.
64-
- Confirm bounds/diagnostics output is deterministic.
65-
- Try malformed JSON and JSON without `asset3d`; report export and publish must stay blocked.
73+
## Published Output
74+
Published Output:
75+
```jsonc
76+
tools.3d-asset-viewer = {
77+
"asset3d": "jsonValue"
78+
}
79+
```
80+
81+
## Playwright Expectations
82+
- load `tools/3D Asset Viewer/index.html` without console errors
83+
- exercise viewer controls against a valid payload
84+
- reject invalid 3D asset viewer JSON
85+
86+
## Manual Test Expectations
87+
- Open `tools/3D Asset Viewer/index.html` and confirm the viewer/inspection controls render.
88+
- Load a valid 3D asset payload, inspect it, validate, export, and publish.
89+
- Try malformed JSON and an invalid asset reference; each must block publish.
90+
91+
## Known Gaps
92+
- Viewer state and published payload should be clearly separated.
93+
- Validation diagnostics should identify the failing asset field.
94+
95+
## Rebuild Order Priority
96+
core-12: rebuild in the core tool lane after earlier priorities are stable.
Lines changed: 66 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,97 @@
11
# 3D Camera Path Editor Reengineering Design
22

3-
Task: PR_26124_023-finalize-tool-design-docs
3+
Task: PR_26124_024
44
Classification: rebuildable tool
55
Core priority: core-13
66
Source folder: `tools/3D Camera Path Editor`
77
Publish target: `tools.3d-camera-path-editor`
88

99
## Tool Purpose
10-
3D camera path authoring. 3D Camera Path Editor owns `cameraPath`, waypoint editing, path normalization, export, and publish to `tools.3d-camera-path-editor`.
10+
3D Camera Path Editor owns camera path import, validation, waypoint editing, export, and publish to `tools.3d-camera-path-editor`.
1111

12-
## Exact Folder/Files Inspected
12+
## Folder/Files Inspected
1313
- `tools/3D Camera Path Editor/how_to_use.html`
1414
- `tools/3D Camera Path Editor/index.html`
1515
- `tools/3D Camera Path Editor/main.js`
1616
- `tools/3D Camera Path Editor/README.md`
1717

18-
## Exact Current Controls Found
19-
- `tools/3D Camera Path Editor/index.html`: `button[button]#addCameraPointButton` - Add Waypoint
20-
- `tools/3D Camera Path Editor/index.html`: `button[button]#normalizeCameraPathButton` - Normalize Path
21-
- `tools/3D Camera Path Editor/index.html`: `textarea#cameraPathInput` - cameraPathInput
22-
- `tools/3D Camera Path Editor/main.js`: `addCameraPointButton` via addButton
23-
- `tools/3D Camera Path Editor/main.js`: `normalizeCameraPathButton` via normalizeButton
24-
- `tools/3D Camera Path Editor/main.js`: `cameraPathStatus` via statusText
25-
- `tools/3D Camera Path Editor/main.js`: `cameraPathInput` via input
26-
- `tools/3D Camera Path Editor/main.js`: `cameraPathOutput` via output
27-
28-
## Current Panels And Surfaces Found
29-
- `tools/3D Camera Path Editor/index.html`: `.debug-tool-shell`
18+
## Controls: Control -> Action -> JSON Effect
19+
| Control | Action | JSON effect |
20+
|---|---|---|
21+
| `tools/3D Camera Path Editor/index.html`: `button[button]#addCameraPointButton` - Add Waypoint | Adds a new camera waypoint or path setting. | Appends schema-owned data to the draft 3D camera path payload; publish waits for validation. |
22+
| `tools/3D Camera Path Editor/index.html`: `button[button]#normalizeCameraPathButton` - Normalize Path | Processes the current 3D camera path payload. | Updates tool-owned derived data/report fields that must validate before tools.3d-camera-path-editor publish. |
23+
| `tools/3D Camera Path Editor/index.html`: `textarea#cameraPathInput` - cameraPathInput | Edits the active camera waypoint or path setting field. | Updates the draft 3D camera path payload field represented by `cameraPathInput` before validation. |
24+
25+
## Panels And Surfaces Found
26+
- `tools/3D Camera Path Editor/how_to_use.html`: `.tools-platform-surface`
3027
- `tools/3D Camera Path Editor/index.html`: `.app-shell`
31-
- `tools/3D Camera Path Editor/index.html`: `.panel`
32-
- `tools/3D Camera Path Editor/index.html`: `.debug-tool-panel`
3328
- `tools/3D Camera Path Editor/index.html`: `.debug-tool-grid`
29+
- `tools/3D Camera Path Editor/index.html`: `.debug-tool-panel`
30+
- `tools/3D Camera Path Editor/index.html`: `.debug-tool-shell`
31+
- `tools/3D Camera Path Editor/index.html`: `.panel`
3432

35-
## Exact Current Functions And Classes
36-
- `tools/3D Camera Path Editor/main.js`: function addWaypoint; function boot3dCameraPathEditor; function buildPresetLoadedStatus; function normalizeCameraPath; function normalizeCameraPathPayload; function normalizeSamplePresetPath; function parseInputPayload; function sanitizeNumber; function setStatus; function tryLoadPresetFromQuery; method getApi; method registerToolBootContract
33+
## Current Component/Class/Function Inventory
34+
- `tools/3D Camera Path Editor/main.js`: addWaypoint; boot3dCameraPathEditor; buildPresetLoadedStatus; getApi; normalizeCameraPath; normalizeCameraPathPayload; normalizeSamplePresetPath; parseInputPayload; registerToolBootContract; sanitizeNumber; setStatus; tryLoadPresetFromQuery
3735

3836
## Target Controls
3937
Keep:
40-
- Add Waypoint
41-
- Normalize Path
42-
- camera path input textarea
43-
- normalized output panel
38+
- waypoint controls
39+
- path preview/playback controls
40+
- import/export controls
4441

4542
Remove or rename:
46-
- none identified in the current folder
43+
- preview playback state from published path JSON unless schema-owned
4744

4845
Add:
49-
- Load Camera Path JSON
50-
- delete/reorder waypoint controls
51-
- Export Camera Path JSON
46+
- Validate Camera Path
5247
- Publish `tools.3d-camera-path-editor`
48+
- waypoint/path diagnostics
49+
50+
## JSON Schema/Input Contract Currently Expected
51+
Tool receives validated payload and owns behavior for 3D camera path payload. Current contract baseline: `tools/schemas/tools/3d-camera-path-editor.schema.json` (3d-camera-path-editor Payload).
52+
Required keys: `cameraPath`.
53+
Optional keys: none identified for this contract.
5354

54-
## JSON Contract Owned By This Tool
55-
Owned JSON is the 3d-camera-path-editor payload. Required field is `cameraPath`; no other top-level fields are allowed. Camera path data owns waypoint order, positions, timing, and normalized path output.
55+
Tool-owned JSON responsibilities:
56+
- import/load: parse incoming 3D camera path payload and reject it before mutation when invalid
57+
- validate: apply the current 3D camera path payload contract before export, copy, or publish
58+
- edit/process: mutate only 3D camera path payload fields owned by 3D Camera Path Editor
59+
- export/save: serialize the validated 3D camera path payload as the tools.3d-camera-path-editor output shape
60+
- publish: write only the validated tools.3d-camera-path-editor value produced by 3D Camera Path Editor
61+
- copy/create payload: create copied payload text from the validated 3D camera path payload, not from unvalidated draft UI state
5662

57-
## Publish Output
58-
Publish only to `tools.3d-camera-path-editor`. The published value must match the tool-owned contract above and must be produced by this folder's validation/export path.
63+
## Valid JSON Behavior
64+
- accepts the schema-defined camera path payload
65+
- keeps waypoint edits inside the tool-owned path payload
66+
- publishes only validated camera path JSON
5967

60-
## Invalid JSON Behavior
68+
## Invalid JSON Rejection Behavior
6169
- malformed JSON
62-
- missing `cameraPath`
63-
- empty or invalid waypoint data
64-
- nonnumeric camera position/timing values
70+
- payload shape outside `3d-camera-path-editor.schema.json`
71+
- invalid waypoint/path fields
6572
- unsupported top-level fields
6673

67-
## Manual Test Plan
68-
- Load or paste a valid camera path.
69-
- Add a waypoint, normalize the path, and export.
70-
- Try malformed JSON, empty waypoint arrays, and nonnumeric positions; publish must stay blocked.
74+
## Published Output
75+
Published Output:
76+
```jsonc
77+
tools.3d-camera-path-editor = {
78+
"cameraPath": "jsonValue"
79+
}
80+
```
81+
82+
## Playwright Expectations
83+
- load `tools/3D Camera Path Editor/index.html` without console errors
84+
- edit/play a valid path and confirm output JSON updates
85+
- reject invalid camera path JSON
86+
87+
## Manual Test Expectations
88+
- Open `tools/3D Camera Path Editor/index.html` and confirm waypoint/path controls render.
89+
- Add or edit a waypoint, validate, export, and re-import.
90+
- Try malformed JSON and an invalid waypoint; each must block publish.
91+
92+
## Known Gaps
93+
- Waypoint validation should identify the failing point.
94+
- Publish should be gated by path validation.
95+
96+
## Rebuild Order Priority
97+
core-13: rebuild in the core tool lane after earlier priorities are stable.

0 commit comments

Comments
 (0)