Skip to content

Commit 821d54c

Browse files
committed
Finalize path governance standards
1 parent f3c2e7a commit 821d54c

12 files changed

Lines changed: 381 additions & 19261 deletions

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,10 @@ This repo is designed as a learning system, not just a code dump.
9090

9191
## 🏗️ Architecture Overview
9292

93-
- Engine Layer → [src/engine/](src/engine/)
94-
- Advanced Systems → [src/advanced/](src/advanced/)
93+
- Web layer target → `src/web/`
94+
- API runtime target → `src/api-runtime/`
95+
- Runtime layer target → `src/runtime/`
96+
- Existing `src/engine/`, `src/advanced/`, `src/shared/`, `src/tools/`, `src/api/`, and `src/dev-runtime/` folders are legacy transition buckets until dedicated migration PRs move them.
9597
- Tools, samples, and games consume public contracts only
9698

9799
---
@@ -122,8 +124,8 @@ PLAN_PR → BUILD_PR → APPLY_PR
122124

123125
## ⚠️ Runtime Boundary Rules
124126

125-
- Engine code lives in [src/engine/](src/engine/)
126-
- Advanced systems live in [src/advanced/](src/advanced/)
127+
- New deployable source belongs under `src/web/`, `src/api-runtime/`, or `src/runtime/`.
128+
- Existing legacy `src/*` buckets remain transition-only until scoped migration PRs move them.
127129
- Tools, samples, and games must use public contracts only
128130
- Engine boundaries should not be bypassed
129131

dev/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ This folder is the destination shell for non-deployable development workspace ma
1616
- `dev/docs_build/` owns active development governance and PR workflow material.
1717
- `dev/reports/` owns generated reports.
1818
- `dev/workspace/artifacts/` owns generated non-report artifacts and local temporary workspace output.
19+
- `dev/tests/` owns non-deployable tests.
20+
- `dev/scripts/` owns development-only scripts and runners.
21+
- `dev/config/` owns development-only runner and tooling configuration.
1922
- `dev/archive/` owns historical development reference material.
2023
- `dev/project-instructions/` is deprecated reference only; active Project Instructions live under `dev/docs_build/dev/ProjectInstructions/`.
2124

dev/docs_build/dev/ProjectInstructions/PROJECT_INSTRUCTIONS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ When active guidance overlaps, use these canonical owner documents:
6666

6767
- Workflow and Product Owner testable completion: `dev/docs_build/dev/ProjectInstructions/addendums/pr_workflow.md`
6868
- START / WORK / END lifecycle, branch gates, mandatory hard stops, and EOD main lock: `dev/docs_build/dev/ProjectInstructions/addendums/project_instructions_single_source_eod_lock.md`
69-
- Repository directory ownership and restructure boundaries: `dev/docs_build/dev/ProjectInstructions/addendums/repository_directory_standard.md`
69+
- Repository directory ownership, final root standard, final `src/` layer standard, final `dev/` workspace standard, and restructure boundaries: `dev/docs_build/dev/ProjectInstructions/addendums/repository_directory_standard.md`
7070
- Page-level Playwright organization and completion coverage: `dev/docs_build/dev/ProjectInstructions/addendums/test_structure_standardization.md`
7171
- API/environment model and `Browser -> API -> Database` rule: `dev/docs_build/dev/ProjectInstructions/addendums/environment_governance_model.md`
7272
- Environment variable, URL, R2 prefix, and feature flag configuration: `dev/docs_build/dev/ProjectInstructions/addendums/environment_configuration_standards.md`

dev/docs_build/dev/ProjectInstructions/addendums/canonical_repository_structure.md

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,29 @@ Establish the canonical repository structure for future development and reduce t
66

77
## Canonical Structure
88

9+
Root product sections:
10+
- docs/
11+
- games/
12+
- toolbox/
13+
- account/
14+
- admin/
15+
- legal/
16+
- assets/
17+
18+
Deployable application source:
19+
- src/web/{feature-name}/
20+
- src/api-runtime/{feature-name}/
21+
- src/runtime/{feature-name}/
22+
23+
Development workspace:
24+
- dev/docs_build/
25+
- dev/reports/
26+
- dev/tests/
27+
- dev/scripts/
28+
- dev/config/
29+
- dev/archive/
30+
- dev/workspace/artifacts/
31+
932
Tools:
1033
- toolbox/{tool-name}/index.html
1134

@@ -20,14 +43,15 @@ Themes:
2043
Shared JavaScript:
2144
- assets/js/shared/
2245

23-
Engine:
24-
- src/engine/{feature-name}/
25-
26-
API:
27-
- api/{feature-name}/
46+
Legacy transition buckets:
47+
- src/advanced/
48+
- src/api/
49+
- src/dev-runtime/
50+
- src/engine/
51+
- src/shared/
52+
- src/tools/
2853

29-
Serverside:
30-
- serverside/{feature-name}/
54+
These legacy transition buckets may remain until explicit migration PRs move them into `src/web/`, `src/api-runtime/`, or `src/runtime/`.
3155

3256
## Rules
3357

@@ -37,3 +61,7 @@ Serverside:
3761
- No new scattered JS folders.
3862
- No new scattered CSS folders.
3963
- New development follows the canonical structure.
64+
- New deployable `src/` work follows `src/web/`, `src/api-runtime/`, or `src/runtime/`.
65+
- New non-deployable work belongs under `dev/`.
66+
- Required reports belong under flat `dev/reports/`.
67+
- Required ZIPs and generated temporary artifacts belong under `dev/workspace/artifacts/tmp/`.

dev/docs_build/dev/ProjectInstructions/addendums/repository_directory_standard.md

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,57 @@ Owner: OWNER
55

66
## Purpose
77

8-
Define the target repository directory ownership model before the development workspace restructure chain begins.
8+
Define the target repository directory ownership model for the post-restructure repository.
99

1010
This document is governance only. It does not move runtime, UI, API, tests, or production files by itself.
1111

1212
## Directory Ownership
1313

14-
- Repository root contains production/public product sections and standard repository configuration.
14+
- Repository root contains production/public product sections and standard repository configuration only.
1515
- `src/` contains deployable application code.
1616
- `dev/` contains non-deployable build, test, bootstrap, governance, report, and local workspace items.
1717
- `docs/` remains at root because it is production Docs & Help.
1818
- `games/` remains at root because it is public game discovery.
1919
- `toolbox/` remains at root because it is the Creator toolbox/workspace.
20+
- Other public product roots such as `account/`, `admin/`, `legal/`, and `assets/` remain root-level product sections when present.
21+
22+
## Final Src Layer Standard
23+
24+
The final `src/` ownership model is:
25+
26+
- `src/web/` for browser-facing deployable application modules used by public pages, account/admin surfaces, and Creator tools.
27+
- `src/api-runtime/` for deployable API/runtime service modules that back the shared Browser -> API -> Postgres/R2 contract.
28+
- `src/runtime/` for deployable game, tool, engine, and shared runtime capabilities.
29+
30+
Transition rule:
31+
32+
- Existing top-level `src/advanced/`, `src/api/`, `src/dev-runtime/`, `src/engine/`, `src/shared/`, and `src/tools/` directories are legacy transition buckets until explicit migration PRs move them.
33+
- Do not add new top-level `src/` layer names outside `src/web/`, `src/api-runtime/`, or `src/runtime/` without OWNER approval.
34+
- Do not use team names in runtime source filenames.
2035

2136
## Development Workspace Paths
2237

23-
- `dev/docs_build/` owns active development governance, Project Instructions, PR workflow material, validation reports, and generated documentation-workspace artifacts.
38+
- `dev/docs_build/` owns active development governance, Project Instructions, and PR workflow material.
39+
- `dev/reports/` owns generated reports using flat filenames.
40+
- `dev/tests/` owns non-deployable test suites.
41+
- `dev/scripts/` owns development-only scripts and runners.
42+
- `dev/config/` owns development-only runner and tooling configuration.
43+
- `dev/workspace/artifacts/` owns generated non-report artifacts and ignored local temporary workspace output.
2444
- `dev/archive/` owns historical development reference material that is not active governance.
2545
- `dev/project-instructions/` is deprecated reference only when retained; it must point to `dev/docs_build/dev/ProjectInstructions/`.
26-
- Root `docs_build/`, root `archive/`, and root `project-instructions/` are not active workspace locations after the governance workspace move.
46+
- Root `docs_build/`, root `tests/`, root `archive/`, root `tmp/`, and root `project-instructions/` are not active workspace locations after the restructure.
47+
- Root `tmp/` may remain ignored as legacy local scratch only; required Codex ZIPs and generated temporary artifacts belong under `dev/workspace/artifacts/tmp/`.
48+
49+
## Legacy Reference Exceptions
50+
51+
Path references to old root `docs_build/`, `tests/`, `archive/`, or `tmp/` locations are allowed only when they are:
52+
53+
- historical/reference content under `dev/archive/` or `dev/docs_build/dev/PR/reference/`
54+
- explicit legacy exception notes in active governance
55+
- ignore rules that keep obsolete local scratch from entering commits
56+
- migration reports documenting the old path and its replacement
57+
58+
Active commands, templates, and Project Instructions must use the final `dev/`, `dev/reports/`, and `dev/workspace/artifacts/` paths.
2759

2860
## Creator Data Boundary
2961

@@ -42,3 +74,5 @@ This document is governance only. It does not move runtime, UI, API, tests, or p
4274
## PR Chain Boundary
4375

4476
The development workspace restructure must proceed through sequential scoped PRs. A PR may only move or update the paths named in its purpose.
77+
78+
Final path-governance PRs may document target paths and legacy exceptions, but they must not move deployable application code unless explicitly scoped.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# PR_26179_OWNER_008-update-path-governance-final
2+
3+
Generated: 2026-06-27T19:38:31.874Z
4+
Branch: PR_26179_OWNER_008-update-path-governance-final
5+
Base stack head before PR_008: f3c2e7a02
6+
ZIP: dev/workspace/artifacts/tmp/PR_26179_OWNER_008-update-path-governance-final_delta.zip
7+
8+
## Purpose
9+
10+
Finalize path governance after the dev workspace restructure chain and document the final root, src, and dev workspace standards.
11+
12+
## Changes
13+
14+
- Updated repository directory governance with final root ownership and legacy path exceptions.
15+
- Added the final `src/web/`, `src/api-runtime/`, and `src/runtime/` layer standard.
16+
- Updated canonical repository structure governance to point new work at final paths.
17+
- Updated README architecture wording to describe target src layers without moving current source directories.
18+
19+
## Validation Summary
20+
21+
| Status | Item | Notes |
22+
| --- | --- | --- |
23+
| PASS | Current branch is PR_26179_OWNER_008-update-path-governance-final | confirmed |
24+
| PASS | Documentation/governance-only scope | no protected runtime/product/API/database/test/script/config diffs |
25+
| PASS | Final root directory standard documented | repository_directory_standard.md names product root, src, dev, docs, games, toolbox, and public product roots |
26+
| PASS | Final src layer standard documented | src/web, src/api-runtime, and src/runtime documented with legacy transition buckets |
27+
| PASS | Final dev workspace standard documented | dev/docs_build, dev/reports, dev/tests, dev/scripts, dev/config, dev/archive, and dev/workspace/artifacts documented |
28+
| PASS | Old report root references absent from active target search | (no matches) |
29+
| PASS | Old <project folder>/tmp ZIP reference absent from active target search | (no matches) |
30+
| PASS | Final src path grep | 15 matching lines |
31+
| PASS | npm run validate:canonical-structure | passed |
32+
| PASS | git diff --check | passed |
33+
| PASS | Playwright impacted | not impacted; no runtime/test/browser behavior changed |
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# PR_26179_OWNER_008-update-path-governance-final Branch Validation
2+
3+
| Status | Item | Notes |
4+
| --- | --- | --- |
5+
| PASS | Current branch is PR_26179_OWNER_008-update-path-governance-final | confirmed |
6+
| PASS | Documentation/governance-only scope | no protected runtime/product/API/database/test/script/config diffs |
7+
8+
Result: PASS
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# PR_26179_OWNER_008-update-path-governance-final Manual Validation Notes
2+
3+
- Confirmed branch: PR_26179_OWNER_008-update-path-governance-final
4+
- Confirmed no product/runtime/API/database/test/script/config files changed in this PR.
5+
- Confirmed final target src layers are documented only; no source folders were moved.
6+
- Confirmed old report root search returned no active matches.
7+
- Playwright was not run beyond impact assessment because this PR is documentation/governance-only.
8+
- Repo-structured ZIP path: `dev/workspace/artifacts/tmp/PR_26179_OWNER_008-update-path-governance-final_delta.zip`
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# PR_26179_OWNER_008-update-path-governance-final Requirement Checklist
2+
3+
| Status | Item | Notes |
4+
| --- | --- | --- |
5+
| PASS | Finalize all Project Instructions and governance references to the new paths | Active governance references final dev/report/artifact paths and documents legacy exceptions. |
6+
| PASS | Document final root directory standard | repository_directory_standard.md and README updated. |
7+
| PASS | Document final src/ layer standard | src/web, src/api-runtime, src/runtime documented. Existing top-level src buckets are legacy transition only. |
8+
| PASS | Document final dev/ workspace standard | dev ownership for docs_build, reports, tests, scripts, config, archive, workspace/artifacts documented. |
9+
| PASS | Confirm no old docs_build/, tests/, archive/, or tmp/ path references remain unless documented as legacy exceptions | Old root paths are documented as legacy exceptions; active output/report refs use new paths. |
10+
| PASS | No runtime/product/API/database changes | Protected diff check returned no files. |
11+
12+
Result: PASS
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# PR_26179_OWNER_008-update-path-governance-final Validation Lane
2+
3+
| Status | Item | Notes |
4+
| --- | --- | --- |
5+
| PASS | npm run validate:canonical-structure | passed |
6+
| PASS | git diff --check | passed |
7+
| PASS | Playwright impacted | not impacted; no runtime/test/browser behavior changed |
8+
9+
Scoped validation result: PASS

0 commit comments

Comments
 (0)