Skip to content

Commit c1290bc

Browse files
committed
Move browser shared schemas to www
1 parent b513b9a commit c1290bc

38 files changed

Lines changed: 188 additions & 20 deletions

dev/build/ProjectInstructions/PROJECT_INSTRUCTIONS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Rules:
117117

118118
## Current Version/Date
119119

120-
- Project Instructions Version: 2026.06.28.018
120+
- Project Instructions Version: 2026.06.28.019
121121
- Date: 2026-06-28
122122
- Owner: OWNER
123123

dev/build/ProjectInstructions/PROJECT_INSTRUCTIONS_VERSION.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Project Instructions Version
22

3-
Current Project Instructions Version: 2026.06.28.018
3+
Current Project Instructions Version: 2026.06.28.019
44

55
Last Updated: 2026-06-28
66

@@ -26,6 +26,7 @@ Last Updated: 2026-06-28
2626
- Removed safe empty local root directory shells and documented blocked local-only `assets/` cleanup.
2727
- Removed the local demo `.gfsp` artifact and recorded a file-by-file `src/` destination audit for future scoped migrations.
2828
- Moved PR017-audited browser/www-owned legacy `src/` files into `www/src/` while preserving public `/src/...` browser route compatibility under the `www` web root.
29+
- Moved PR019a-audited active browser/runtime shared contracts and tool schemas into `www/src/shared/` while preserving public `/src/shared/...` browser route compatibility.
2930
- Codex must read this version file and the latest repository copy of `PROJECT_INSTRUCTIONS.md` before performing work.
3031
- Codex must discard previously remembered Project Instructions and treat the repository copy as authoritative.
3132
- Codex must validate canonical report and ZIP paths, branching model, and legacy path avoidance before work proceeds.

dev/build/ProjectInstructions/PROJECT_STATE.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Project State
22

33
```yaml
4-
project_state_version: "2026.06.28.018"
4+
project_state_version: "2026.06.28.019"
55
last_updated: "2026-06-28"
66
current_main_commit: "40de767476d70cadfd1292c916844c2f31b6f185"
77
repository_status:
@@ -10,18 +10,18 @@ repository_status:
1010
runtime_database: "Postgres"
1111
creator_metadata: "API to Postgres"
1212
creator_assets: "API to R2"
13-
project_instructions_version: "2026.06.28.018"
14-
repository_structure_version: "2026.06.28.018"
15-
canonical_layout_version: "2026.06.28.018"
13+
project_instructions_version: "2026.06.28.019"
14+
repository_structure_version: "2026.06.28.019"
15+
canonical_layout_version: "2026.06.28.019"
1616
active_teams:
1717
- "Owner"
1818
- "Alfa"
1919
- "Bravo"
2020
- "Charlie"
2121
- "Delta"
2222
- "Golf"
23-
latest_owner_pr: "PR_26180_OWNER_018-move-src-browser-to-www"
24-
latest_structure_pr: "PR_26180_OWNER_018-move-src-browser-to-www"
23+
latest_owner_pr: "PR_26180_OWNER_019b-move-browser-shared-schemas-to-www"
24+
latest_structure_pr: "PR_26180_OWNER_019b-move-browser-shared-schemas-to-www"
2525
valid_top_level_folders:
2626
- "api/"
2727
- "deploy/"
@@ -40,7 +40,7 @@ valid_dev_folders:
4040
- "dev/tools/"
4141
- "dev/workspace/"
4242
known_technical_debt:
43-
- "API/server-owned contracts, schemas, and project data store modules remain under src/shared/ until PR_26180_OWNER_019 moves them to api/."
43+
- "Remaining API/server-owned contracts, validation-only schemas, and project data store modules remain under src/shared/ until scoped follow-up PRs move them to api/ or dev/."
4444
- "Developer/source reference files remain under src/ until PR_26180_OWNER_020 moves them to dev/."
4545
- "src/dev-runtime/admin/.gitkeep remains as a placeholder until PR_26180_OWNER_021 retires the empty root src folder."
4646
- "repository_directory_standard.md and codex_project_instructions_startup.md are superseded pointers retained for compatibility."

dev/build/ProjectInstructions/backlog/BACKLOG_MASTER.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ The backlog is the authoritative source for determining the next logical PRs.
4040
- Product Area: Repository Architecture Simplification
4141
- Status: Active
4242
- Percent Complete: 99%
43-
- Active PR: PR_26180_OWNER_018-move-src-browser-to-www
44-
- Next Milestone: Move API/server-owned source to api/
43+
- Active PR: PR_26180_OWNER_019b-move-browser-shared-schemas-to-www
44+
- Next Milestone: Move remaining API/server-owned source to api/
4545
- Source / Reference: `dev/build/ProjectInstructions/repository/repository_layout_architecture_plan.md`; `dev/build/ProjectInstructions/repository/www_migration_map.md`
4646

4747
## Game Journey MVP

dev/build/ProjectInstructions/repository/canonical_repository_structure.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@ Deployable application source:
2828

2929
Final source ownership after the repository layout simplification:
3030
- `www/src/` owns browser-facing deployable application modules used by public pages, account/admin surfaces, Creator tools, game runtime, shared browser utilities, and browser API clients.
31+
- `www/src/shared/contracts/` and `www/src/shared/schemas/tools/` own browser/runtime-consumed contracts and tool schemas that must remain available through the public `/src/shared/...` route shape.
3132
- `api/` owns deployable API/runtime service modules that back the shared Browser -> API -> Postgres/R2 contract.
3233
- `dev/` owns developer-only source, scripts, tests, reports, local runtime orchestration, and reference material.
33-
- Existing root `src/shared/contracts/`, `src/shared/schemas/`, `src/shared/projectDataStore/`, and source-reference files are legacy transition buckets until explicit migration PRs move them.
34+
- Remaining root `src/shared/contracts/`, `src/shared/schemas/`, `src/shared/projectDataStore/`, and source-reference files are legacy transition buckets until explicit migration PRs move them.
3435
- Browser API clients remain outside `api/`; browser-served code must use API/service contracts instead of importing top-level `api/` files directly.
3536
- `www/src/dev-runtime/admin/` preserves the public `/src/dev-runtime/admin/...` Admin Notes browser-viewer compatibility route under the `www` web root.
3637
- Do not add new root `src/` layer names or new root `src/` work without OWNER approval.
@@ -82,6 +83,8 @@ Legacy transition buckets:
8283
- www/src/api/
8384
- www/src/engine/
8485
- www/src/shared/
86+
- www/src/shared/contracts/
87+
- www/src/shared/schemas/
8588
- www/src/tools/
8689
- www/src/dev-runtime/admin/
8790
- src/shared/contracts/
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# PR_26180_OWNER_019b-move-browser-shared-schemas-to-www Branch Validation
2+
3+
| Check | Status | Evidence |
4+
| --- | --- | --- |
5+
| Current branch | PASS | `PR_26180_OWNER_019b-move-browser-shared-schemas-to-www` |
6+
| Expected stacked base | PASS | Branch created from `PR_26180_OWNER_019a-contracts-schemas-obsolescence-audit`. |
7+
| Worktree at start | PASS | Clean before branch creation. |
8+
| Worktree after implementation | PASS | Contains only scoped PR changes and generated reports. |
9+
| Branch model | PASS | Owner stacked PR based on prior direct dependency. |
10+
| Protected developer workspace | PASS | No protected dev workspace paths moved. |
11+
12+
## Current Status Snapshot
13+
14+
```text
15+
M dev/build/ProjectInstructions/PROJECT_INSTRUCTIONS.md
16+
M dev/build/ProjectInstructions/PROJECT_INSTRUCTIONS_VERSION.md
17+
M dev/build/ProjectInstructions/PROJECT_STATE.md
18+
M dev/build/ProjectInstructions/backlog/BACKLOG_MASTER.md
19+
M dev/build/ProjectInstructions/repository/canonical_repository_structure.md
20+
M dev/reports/codex_changed_files.txt
21+
M dev/reports/codex_review.diff
22+
M dev/scripts/validate-json-contracts.mjs
23+
M dev/tests/tools/ObjectVectorStudioV2DeleteCleanup.test.mjs
24+
M dev/tests/tools/ToolManifestBoundary.test.mjs
25+
R src/shared/contracts/replayContracts.js -> www/src/shared/contracts/replayContracts.js
26+
R src/shared/schemas/tools/3d-asset-viewer.schema.json -> www/src/shared/schemas/tools/3d-asset-viewer.schema.json
27+
R src/shared/schemas/tools/3d-camera-path-editor.schema.json -> www/src/shared/schemas/tools/3d-camera-path-editor.schema.json
28+
R src/shared/schemas/tools/3d-json-payload.schema.json -> www/src/shared/schemas/tools/3d-json-payload.schema.json
29+
R src/shared/schemas/tools/asset-manager-v2.schema.json -> www/src/shared/schemas/tools/asset-manager-v2.schema.json
30+
R src/shared/schemas/tools/asset-pipeline.schema.json -> www/src/shared/schemas/tools/asset-pipeline.schema.json
31+
R src/shared/schemas/tools/audio-sfx-playground-v2.schema.json -> www/src/shared/schemas/tools/audio-sfx-playground-v2.schema.json
32+
R src/shared/schemas/tools/collision-inspector-v2.schema.json -> www/src/shared/schemas/tools/collision-inspector-v2.schema.json
33+
R src/shared/schemas/tools/input-mapping-v2.schema.json -> www/src/shared/schemas/tools/input-mapping-v2.schema.json
34+
R src/shared/schemas/tools/midi-studio-v2.schema.json -> www/src/shared/schemas/tools/midi-studio-v2.schema.json
35+
R src/shared/schemas/tools/object-vector-studio-v2.schema.json -> www/src/shared/schemas/tools/object-vector-studio-v2.schema.json
36+
R src/shared/schemas/tools/palette-browser.schema.json -> www/src/shared/schemas/tools/palette-browser.schema.json
37+
R src/shared/schemas/tools/palette-manager-v2.schema.json -> www/src/shared/schemas/tools/palette-manager-v2.schema.json
38+
R src/shared/schemas/tools/parallax-editor.schema.json -> www/src/shared/schemas/tools/parallax-editor.schema.json
39+
R src/shared/schemas/tools/performance-profiler.schema.json -> www/src/shared/schemas/tools/performance-profiler.schema.json
40+
R src/shared/schemas/tools/physics-sandbox.schema.json -> www/src/shared/schemas/tools/physics-sandbox.schema.json
41+
R src/shared/schemas/tools/replay-visualizer.schema.json -> www/src/shared/schemas/tools/replay-visualizer.schema.json
42+
R src/shared/schemas/tools/sprite-editor.schema.json -> www/src/shared/schemas/tools/sprite-editor.schema.json
43+
R src/shared/schemas/tools/state-inspector.schema.json -> www/src/shared/schemas/tools/state-inspector.schema.json
44+
R src/shared/schemas/tools/svg-asset-studio.schema.json -> www/src/shared/schemas/tools/svg-asset-studio.schema.json
45+
R src/shared/schemas/tools/text2speech-V2.schema.json -> www/src/shared/schemas/tools/text2speech-V2.schema.json
46+
R src/shared/schemas/tools/tile-map-editor.schema.json -> www/src/shared/schemas/tools/tile-map-editor.schema.json
47+
R src/shared/schemas/tools/vector-map-editor.schema.json -> www/src/shared/schemas/tools/vector-map-editor.schema.json
48+
```
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# PR_26180_OWNER_019b-move-browser-shared-schemas-to-www Manual Validation Notes
2+
3+
- Confirmed moved files match PR019a audit `Active browser/runtime dependency` rows.
4+
- Confirmed representative public schema URLs still resolve through the `www` web root:
5+
- `/src/shared/schemas/tools/object-vector-studio-v2.schema.json`
6+
- `/src/shared/schemas/tools/text2speech-V2.schema.json`
7+
- `/src/shared/schemas/tools/palette-browser.schema.json`
8+
- `/src/shared/contracts/replayContracts.js`
9+
- Confirmed no API/server files were moved.
10+
- Confirmed no protected developer workspace files were moved.
11+
- Confirmed no product/UI/database implementation files changed.
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# PR_26180_OWNER_019b-move-browser-shared-schemas-to-www Report
2+
3+
## Executive Summary
4+
5+
Moved the PR019a-audited active browser/runtime shared contract and tool schema files from root `src/shared/` into `www/src/shared/`.
6+
7+
This preserves public browser route compatibility because the local/static web root serves `www/`, so URLs such as `/src/shared/schemas/tools/palette-browser.schema.json` still resolve to `www/src/shared/schemas/tools/palette-browser.schema.json`.
8+
9+
No API/server-owned files, validation-only files, protected developer workspace files, UI pages, database files, or product behavior were moved.
10+
11+
## Stack Context
12+
13+
- Workstream: Repository Architecture Simplification
14+
- Previous dependency: `PR_26180_OWNER_019a-contracts-schemas-obsolescence-audit`
15+
- Base branch: `PR_26180_OWNER_019a-contracts-schemas-obsolescence-audit`
16+
- Source branch: `PR_26180_OWNER_019b-move-browser-shared-schemas-to-www`
17+
- Intended next dependency: remaining server/API and dev-owned `src/` retirement PRs
18+
19+
## Source Of Truth
20+
21+
Used `dev/reports/PR_26180_OWNER_019a-contracts-schemas-obsolescence-audit_audit.csv`.
22+
23+
Only rows classified as `Active browser/runtime dependency` with recommendation `move to www/` were moved.
24+
25+
## Moved Files
26+
27+
- src/shared/contracts/replayContracts.js -> www/src/shared/contracts/replayContracts.js
28+
- src/shared/schemas/tools/3d-asset-viewer.schema.json -> www/src/shared/schemas/tools/3d-asset-viewer.schema.json
29+
- src/shared/schemas/tools/3d-camera-path-editor.schema.json -> www/src/shared/schemas/tools/3d-camera-path-editor.schema.json
30+
- src/shared/schemas/tools/3d-json-payload.schema.json -> www/src/shared/schemas/tools/3d-json-payload.schema.json
31+
- src/shared/schemas/tools/asset-manager-v2.schema.json -> www/src/shared/schemas/tools/asset-manager-v2.schema.json
32+
- src/shared/schemas/tools/asset-pipeline.schema.json -> www/src/shared/schemas/tools/asset-pipeline.schema.json
33+
- src/shared/schemas/tools/audio-sfx-playground-v2.schema.json -> www/src/shared/schemas/tools/audio-sfx-playground-v2.schema.json
34+
- src/shared/schemas/tools/collision-inspector-v2.schema.json -> www/src/shared/schemas/tools/collision-inspector-v2.schema.json
35+
- src/shared/schemas/tools/input-mapping-v2.schema.json -> www/src/shared/schemas/tools/input-mapping-v2.schema.json
36+
- src/shared/schemas/tools/midi-studio-v2.schema.json -> www/src/shared/schemas/tools/midi-studio-v2.schema.json
37+
- src/shared/schemas/tools/object-vector-studio-v2.schema.json -> www/src/shared/schemas/tools/object-vector-studio-v2.schema.json
38+
- src/shared/schemas/tools/palette-browser.schema.json -> www/src/shared/schemas/tools/palette-browser.schema.json
39+
- src/shared/schemas/tools/palette-manager-v2.schema.json -> www/src/shared/schemas/tools/palette-manager-v2.schema.json
40+
- src/shared/schemas/tools/parallax-editor.schema.json -> www/src/shared/schemas/tools/parallax-editor.schema.json
41+
- src/shared/schemas/tools/performance-profiler.schema.json -> www/src/shared/schemas/tools/performance-profiler.schema.json
42+
- src/shared/schemas/tools/physics-sandbox.schema.json -> www/src/shared/schemas/tools/physics-sandbox.schema.json
43+
- src/shared/schemas/tools/replay-visualizer.schema.json -> www/src/shared/schemas/tools/replay-visualizer.schema.json
44+
- src/shared/schemas/tools/sprite-editor.schema.json -> www/src/shared/schemas/tools/sprite-editor.schema.json
45+
- src/shared/schemas/tools/state-inspector.schema.json -> www/src/shared/schemas/tools/state-inspector.schema.json
46+
- src/shared/schemas/tools/svg-asset-studio.schema.json -> www/src/shared/schemas/tools/svg-asset-studio.schema.json
47+
- src/shared/schemas/tools/text2speech-V2.schema.json -> www/src/shared/schemas/tools/text2speech-V2.schema.json
48+
- src/shared/schemas/tools/tile-map-editor.schema.json -> www/src/shared/schemas/tools/tile-map-editor.schema.json
49+
- src/shared/schemas/tools/vector-map-editor.schema.json -> www/src/shared/schemas/tools/vector-map-editor.schema.json
50+
51+
## Path Updates
52+
53+
- Updated active tool/schema tests to read browser tool schemas from `www/src/shared/schemas/tools/`.
54+
- Updated `dev/scripts/validate-json-contracts.mjs` so tool schema validation indexes `www/src/shared/schemas/tools/` while still indexing remaining root `src/shared/schemas/` files.
55+
- Updated Project Instructions version/state/canonical structure/backlog to record the browser schema/contract ownership split.
56+
57+
## Compatibility Decision
58+
59+
Schema `$id` values and browser string identifiers remain in the public `src/shared/schemas/tools/...` form. This is intentional because the public browser URL shape remains `/src/shared/...` under the `www` web root.
60+
61+
## Scope Guard
62+
63+
- Runtime behavior changed: No
64+
- Product/UI pages changed: No
65+
- API/server files moved: No
66+
- Database files changed: No
67+
- Protected developer workspace moved: No
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# PR_26180_OWNER_019b-move-browser-shared-schemas-to-www Requirement Checklist
2+
3+
| Requirement | Status | Evidence |
4+
| --- | --- | --- |
5+
| Use PR019a audit as source of truth | PASS | Moved only `Active browser/runtime dependency` rows from PR019a audit CSV. |
6+
| Move active browser/runtime contracts and schemas to `www/src/shared/` | PASS | 23 audited files moved to `www/src/shared/`. |
7+
| Preserve dynamic browser schema loading | PASS | `/src/shared/schemas/tools/<tool>.schema.json` route shape resolves from `www/src/shared/schemas/tools/`. |
8+
| Preserve public `/src/shared/...` URLs | PASS | Static route resolver check passed for representative schema and replay contract URLs. |
9+
| Update browser/runtime imports only where required | PASS | Existing browser relative imports continued to resolve; no browser/API behavior changes required. |
10+
| Do not move validation-only files | PASS | Remaining root validation-only schemas/contracts were not moved. |
11+
| Do not move API/server files | PASS | No `api/` files moved. |
12+
| Do not delete schemas/contracts unless audit proves unused | PASS | No schema/contract deletion performed. |
13+
| Do not change product behavior | PASS | Route compatibility and focused Playwright route smoke passed. |
14+
| Do not move protected developer workspace files | PASS | No protected `dev/workspace/generated`, `zips`, or `tmp` files moved. |
15+
| Required reports under `dev/reports/` | PASS | Reports generated. |
16+
| Required ZIP under `dev/workspace/zips/` | PASS | ZIP generated separately after report creation. |
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# PR_26180_OWNER_019b-move-browser-shared-schemas-to-www Validation Report
2+
3+
| Validation | Status | Notes |
4+
| --- | --- | --- |
5+
| Startup validation | PASS | Loaded Project Instructions v2026.06.28.018 before work; PR updates version to v2026.06.28.019. |
6+
| Branch validation | PASS | Started from `PR_26180_OWNER_019a-contracts-schemas-obsolescence-audit`; created stacked branch `PR_26180_OWNER_019b-move-browser-shared-schemas-to-www`. |
7+
| `node --check dev/scripts/validate-json-contracts.mjs` | PASS | Syntax check passed. |
8+
| `node --check dev/tests/tools/ToolManifestBoundary.test.mjs` | PASS | Syntax check passed. |
9+
| `node --check dev/tests/tools/ObjectVectorStudioV2DeleteCleanup.test.mjs` | PASS | Syntax check passed. |
10+
| Targeted node tests | PASS | `ToolManifestBoundary` and `StaticWebRootCompatibility` passed. |
11+
| Static schema URL checks | PASS | Representative `/src/shared/schemas/tools/...` and `/src/shared/contracts/replayContracts.js` routes resolve from `www/`. |
12+
| Browser import/reference scan | PASS | No browser code imports top-level `api/`; stale active root filesystem schema references were updated. Public schema IDs remain intentionally unchanged. |
13+
| Focused Playwright route smoke | PASS | `dev/tests/playwright/tools/StaticWebRootCompatibility.spec.mjs`: 2/2 passed. |
14+
| `npm run validate:canonical-structure` | PASS | Canonical repository structure guardrail passed. |
15+
| `git diff --check` | PASS | Passed; Git reported line-ending normalization warnings only. |
16+
17+
## Notes
18+
19+
`dev/tests/tools/ObjectVectorStudioV2DeleteCleanup.test.mjs` is not part of the active node test runner and still depends on a removed legacy Object Vector tool module path from before this PR. This PR updated only its schema file path for the moved browser schema; it did not expand into legacy test resurrection.

0 commit comments

Comments
 (0)