Skip to content

Commit 09422f7

Browse files
committed
OWNER 010 document canonical project folders
1 parent 40de767 commit 09422f7

8 files changed

Lines changed: 421 additions & 54284 deletions

dev/build/ProjectInstructions/TEAM_START_COMMANDS.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ Read `dev/build/ProjectInstructions/addendums/team_backlog_sod_eod_standard.md`
1515
Branch Lifecycle (Canonical):
1616
- Follow `dev/build/ProjectInstructions/addendums/project_instructions_single_source_eod_lock.md` for START / WORK / END lifecycle, branch gates, mandatory hard stops, and EOD main lock.
1717

18+
## Team Migration Note
19+
20+
Team Alfa, Team Bravo, Team Charlie, and historical Team Gamma lanes must update from current `main` before starting work and use the canonical folders documented in `dev/build/ProjectInstructions/addendums/canonical_repository_structure.md`.
21+
22+
Do not create or reuse legacy folders such as `docs_build/`, `tmp/`, `projects/`, `scripts/`, `tests/`, `archive/`, `project-instructions/`, `dev/docs_build/`, `dev/project-instructions/`, `dev/workspace/artifacts/`, or `dev/build/dev/`.
23+
24+
If a proposed file does not clearly belong in a canonical folder, HARD STOP and report the proposed path.
25+
1826
## Start Team Alfa
1927

2028
Ready-to-copy command:

dev/build/ProjectInstructions/addendums/canonical_repository_structure.md

Lines changed: 66 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,61 @@ 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/
9+
Valid top-level folders:
1310
- account/
1411
- admin/
15-
- legal/
1612
- assets/
13+
- community/
14+
- company/
15+
- deploy/
16+
- dev/
17+
- docs/
18+
- games/
19+
- learn/
20+
- legal/
21+
- marketplace/
22+
- memberships/
23+
- owner/
24+
- src/
25+
- toolbox/
26+
27+
Root product and repo sections:
28+
- account/, admin/, community/, company/, learn/, legal/, marketplace/, memberships/, and owner/ are production website sections.
29+
- assets/ contains production website and tool assets.
30+
- docs/ is production Docs & Help content.
31+
- games/ is public game discovery.
32+
- toolbox/ is the Creator toolbox/workspace.
33+
- deploy/ contains deployment configuration.
34+
- dev/ contains the development workspace.
35+
- src/ contains deployable application/runtime/API source.
1736

1837
Deployable application source:
1938
- src/web/{feature-name}/
2039
- src/api-runtime/{feature-name}/
2140
- src/runtime/{feature-name}/
2241

23-
Development workspace:
42+
Valid dev workspace folders:
43+
- dev/archive/
2444
- dev/build/
45+
- dev/config/
2546
- dev/reports/
26-
- dev/tests/
2747
- dev/scripts/
28-
- dev/config/
29-
- dev/deploy/
30-
- dev/archive/
48+
- dev/templates/
49+
- dev/tests/
50+
- dev/tools/
3151
- dev/workspace/
3252

53+
Dev workspace ownership:
54+
- dev/archive/ owns historical reference material only.
55+
- dev/build/ owns active Project Instructions, architecture, database DDL/DML/seed docs, standards, backlog, PR planning, and governance.
56+
- dev/config/ owns development-only runner and tooling configuration.
57+
- dev/reports/ owns active and historical generated reports.
58+
- dev/scripts/ owns development-only scripts and runners.
59+
- dev/templates/ owns reusable development templates.
60+
- dev/tests/ owns non-deployable test suites.
61+
- dev/tools/ owns development-only tooling.
62+
- dev/workspace/ owns generated output: tmp, zips, logs, generated files, and test-results.
63+
3364
Tools:
3465
- toolbox/{tool-name}/index.html
3566

@@ -56,13 +87,38 @@ These legacy transition buckets may remain until explicit migration PRs move the
5687

5788
## Rules
5889

90+
- Root is production website and standard repository configuration only.
91+
- src/ is deployable application/runtime/API code.
92+
- dev/ is development workspace only.
93+
- deploy/ is deployment configuration.
94+
- docs/ is production Docs & Help content.
5995
- Theme first.
6096
- Tool CSS second.
6197
- Shared functionality belongs in assets/js/shared/.
6298
- No new scattered JS folders.
6399
- No new scattered CSS folders.
100+
- Do not create new folders unless they fit the documented canonical structure.
101+
- If a requested or generated path does not clearly fit the canonical structure, Codex must HARD STOP and report the proposed path.
64102
- New development follows the canonical structure.
65103
- New deployable `src/` work follows `src/web/`, `src/api-runtime/`, or `src/runtime/`.
66104
- New non-deployable work belongs under `dev/`.
67105
- Required reports belong under flat `dev/reports/`.
68106
- Required ZIPs belong under `dev/workspace/zips/`; generated temporary artifacts belong under `dev/workspace/tmp/`.
107+
108+
## Invalid Legacy Paths
109+
110+
These paths are not active repository ownership locations:
111+
112+
- docs_build/
113+
- tmp/
114+
- projects/
115+
- scripts/
116+
- tests/
117+
- archive/
118+
- project-instructions/
119+
- dev/docs_build/
120+
- dev/project-instructions/
121+
- dev/workspace/artifacts/
122+
- dev/build/dev/
123+
124+
References to invalid legacy paths are allowed only as historical/reference notes, explicit migration notes, ignore rules, or audit evidence. Active commands, active templates, Project Instructions, validation scripts, and new Codex output must use the canonical folders above.

dev/build/ProjectInstructions/addendums/repository_directory_standard.md

Lines changed: 50 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,30 @@ This document is governance only. It does not move runtime, UI, API, tests, or p
1414
- 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.
17+
- `deploy/` contains deployment configuration.
1718
- `docs/` remains at root because it is production Docs & Help.
1819
- `games/` remains at root because it is public game discovery.
1920
- `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+
- Other public product roots such as `account/`, `admin/`, `assets/`, `community/`, `company/`, `learn/`, `legal/`, `marketplace/`, `memberships/`, and `owner/` remain root-level product sections when present.
22+
23+
Valid top-level folders are:
24+
25+
- account/
26+
- admin/
27+
- assets/
28+
- community/
29+
- company/
30+
- deploy/
31+
- dev/
32+
- docs/
33+
- games/
34+
- learn/
35+
- legal/
36+
- marketplace/
37+
- memberships/
38+
- owner/
39+
- src/
40+
- toolbox/
2141

2242
## Final Src Layer Standard
2343

@@ -35,21 +55,38 @@ Transition rule:
3555

3656
## Development Workspace Paths
3757

58+
- `dev/archive/` owns historical development reference material that is not active governance.
3859
- `dev/build/` owns active development governance, Project Instructions, and PR workflow material.
60+
- `dev/build/` also owns architecture, database DDL/DML/seed docs, standards, backlog, PR planning, and governance.
61+
- `dev/config/` owns development-only runner and tooling configuration.
3962
- `dev/reports/` owns generated reports using flat filenames.
40-
- `dev/tests/` owns non-deployable test suites.
4163
- `dev/scripts/` owns development-only scripts and runners.
42-
- `dev/config/` owns development-only runner and tooling configuration.
43-
- `dev/deploy/` owns development-only deployment assets and local deployment configuration.
64+
- `dev/templates/` owns reusable development templates.
65+
- `dev/tests/` owns non-deployable test suites.
66+
- `dev/tools/` owns development-only tooling.
4467
- `dev/workspace/` owns generated non-report artifacts and ignored local temporary workspace output.
45-
- `dev/archive/` owns historical development reference material that is not active governance.
68+
- `dev/workspace/` generated output includes tmp, zips, logs, generated files, and test-results.
4669
- `dev/build/ProjectInstructions/` is the only active Project Instructions source.
47-
- Root `docs_build/`, root `tests/`, root `archive/`, root `tmp/`, and root `project-instructions/` are not active workspace locations after the restructure.
70+
- Root `docs_build/`, root `tests/`, root `archive/`, root `tmp/`, root `projects/`, root `scripts/`, and root `project-instructions/` are not active workspace locations after the restructure.
4871
- Root `tmp/` may remain ignored as legacy local scratch only; required Codex ZIPs belong under `dev/workspace/zips/`, and generated temporary artifacts belong under `dev/workspace/tmp/`.
4972

5073
## Legacy Reference Exceptions
5174

52-
Path references to old root `docs_build/`, `tests/`, `archive/`, or `tmp/` locations are allowed only when they are:
75+
Invalid legacy paths:
76+
77+
- docs_build/
78+
- tmp/
79+
- projects/
80+
- scripts/
81+
- tests/
82+
- archive/
83+
- project-instructions/
84+
- dev/docs_build/
85+
- dev/project-instructions/
86+
- dev/workspace/artifacts/
87+
- dev/build/dev/
88+
89+
Path references to invalid legacy locations are allowed only when they are:
5390

5491
- historical/reference content under `dev/archive/` or `dev/build/pr/reference/`
5592
- explicit legacy exception notes in active governance
@@ -58,6 +95,12 @@ Path references to old root `docs_build/`, `tests/`, `archive/`, or `tmp/` locat
5895

5996
Active commands, templates, and Project Instructions must use the final `dev/`, `dev/reports/`, and `dev/workspace/` paths.
6097

98+
## Codex Folder Creation Rule
99+
100+
Codex must not create new folders unless they fit the documented canonical structure.
101+
102+
If a requested or generated path does not clearly fit the canonical structure, Codex must HARD STOP and report the proposed path before writing files.
103+
61104
## Creator Data Boundary
62105

63106
- Creator data must not write to repository folders.
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# PR_26179_OWNER_010-canonical-project-folder-instructions
2+
3+
Updated: 2026-06-28T01:03:53Z
4+
Team: OWNER
5+
Branch: PR_26179_OWNER_010-canonical-project-folder-instructions
6+
Scope: Documentation/governance only. No files moved. No runtime behavior or production page changes.
7+
8+
## Summary
9+
- Updated canonical repository structure governance under dev/build/ProjectInstructions/.
10+
- Added the valid top-level folder list and valid dev workspace folder list.
11+
- Documented ownership rules for root, src/, dev/, deploy/, docs/, dev/build/, and dev/workspace/.
12+
- Added invalid legacy path list and Codex HARD STOP rule for unclear new folders.
13+
- Added team migration note for Team Alfa, Team Bravo, Team Charlie, and historical Team Gamma lanes.
14+
15+
## Changed Files
16+
```
17+
M dev/build/ProjectInstructions/TEAM_START_COMMANDS.md
18+
M dev/build/ProjectInstructions/addendums/canonical_repository_structure.md
19+
M dev/build/ProjectInstructions/addendums/repository_directory_standard.md
20+
```
21+
22+
## Intentional Old Path Mentions
23+
The grep lane intentionally finds legacy paths in active Project Instructions where the content marks those paths invalid, deprecated, historical, generated-output locations, or non-active reference material. These are intentional documentation mentions, not active placement instructions.
24+
25+
```
26+
dev/build/ProjectInstructions\TEAM_START_COMMANDS.md:22:Do not create or reuse legacy folders such as `docs_build/`, `tmp/`, `projects/`, `scripts/`, `tests/`, `archive/`, `project-instructions/`, `dev/docs_build/`, `dev/project-instructions/`, `dev/workspace/artifacts/`, or `dev/build/dev/`.
27+
dev/build/ProjectInstructions\README.txt:7:Preserve historical Project Instructions material as deprecated reference only. Do not treat root-level copies in `dev/build/dev/`, `dev/archive/`, or archived snapshots as active instruction sources. When a conflict appears, `dev/build/ProjectInstructions/` wins unless OWNER explicitly approves a newer governance change.
28+
dev/build/ProjectInstructions\PROJECT_INSTRUCTIONS.md:42:- Retained reference material belongs under the repository root `dev/archive/` tree, not under `dev/build/dev/`.
29+
dev/build/ProjectInstructions\addendums\canonical_repository_structure.md:106:- Required ZIPs belong under `dev/workspace/zips/`; generated temporary artifacts belong under `dev/workspace/tmp/`.
30+
dev/build/ProjectInstructions\addendums\canonical_repository_structure.md:112:- docs_build/
31+
dev/build/ProjectInstructions\addendums\canonical_repository_structure.md:113:- tmp/
32+
dev/build/ProjectInstructions\addendums\canonical_repository_structure.md:114:- projects/
33+
dev/build/ProjectInstructions\addendums\canonical_repository_structure.md:115:- scripts/
34+
dev/build/ProjectInstructions\addendums\canonical_repository_structure.md:116:- tests/
35+
dev/build/ProjectInstructions\addendums\canonical_repository_structure.md:117:- archive/
36+
dev/build/ProjectInstructions\addendums\canonical_repository_structure.md:118:- project-instructions/
37+
dev/build/ProjectInstructions\addendums\canonical_repository_structure.md:119:- dev/docs_build/
38+
dev/build/ProjectInstructions\addendums\canonical_repository_structure.md:120:- dev/project-instructions/
39+
dev/build/ProjectInstructions\addendums\canonical_repository_structure.md:121:- dev/workspace/artifacts/
40+
dev/build/ProjectInstructions\addendums\canonical_repository_structure.md:122:- dev/build/dev/
41+
dev/build/ProjectInstructions\addendums\documentation_ownership.md:52:- `dev/workspace/tmp/` contains temporary generated files.
42+
dev/build/ProjectInstructions\addendums\environment_governance_model.md:90:- Local project assets: `/local/projects/`
43+
dev/build/ProjectInstructions\addendums\environment_governance_model.md:91:- DEV project assets: `/dev/projects/`
44+
dev/build/ProjectInstructions\addendums\environment_governance_model.md:92:- IST project assets: `/ist/projects/`
45+
dev/build/ProjectInstructions\addendums\environment_governance_model.md:93:- UAT project assets: `/uat/projects/`
46+
dev/build/ProjectInstructions\addendums\environment_governance_model.md:94:- PROD project assets: `/prod/projects/`
47+
dev/build/ProjectInstructions\addendums\koti_layout_contract.md:9:- `dev/workspace/tmp/uat_exports/king_of_the_iceberg_layout_snapshot.json`
48+
dev/build/ProjectInstructions\addendums\koti_layout_contract.md:10:- `dev/workspace/tmp/uat_tool_layout_workflow_results.json`
49+
dev/build/ProjectInstructions\addendums\project_instructions_single_source_eod_lock.md:11:- root-level copies in `dev/build/dev/`
50+
dev/build/ProjectInstructions\standards\PROJECT_CONTRACT.md:28:- Fixture file: `dev/tests/fixtures/projects/project-scenarios.json`
51+
dev/build/ProjectInstructions\addendums\repository_directory_standard.md:70:- Root `docs_build/`, root `tests/`, root `archive/`, root `tmp/`, root `projects/`, root `scripts/`, and root `project-instructions/` are not active workspace locations after the restructure.
52+
dev/build/ProjectInstructions\addendums\repository_directory_standard.md:71:- Root `tmp/` may remain ignored as legacy local scratch only; required Codex ZIPs belong under `dev/workspace/zips/`, and generated temporary artifacts belong under `dev/workspace/tmp/`.
53+
dev/build/ProjectInstructions\addendums\repository_directory_standard.md:77:- docs_build/
54+
dev/build/ProjectInstructions\addendums\repository_directory_standard.md:78:- tmp/
55+
dev/build/ProjectInstructions\addendums\repository_directory_standard.md:79:- projects/
56+
dev/build/ProjectInstructions\addendums\repository_directory_standard.md:80:- scripts/
57+
dev/build/ProjectInstructions\addendums\repository_directory_standard.md:81:- tests/
58+
dev/build/ProjectInstructions\addendums\repository_directory_standard.md:82:- archive/
59+
dev/build/ProjectInstructions\addendums\repository_directory_standard.md:83:- project-instructions/
60+
dev/build/ProjectInstructions\addendums\repository_directory_standard.md:84:- dev/docs_build/
61+
dev/build/ProjectInstructions\addendums\repository_directory_standard.md:85:- dev/project-instructions/
62+
dev/build/ProjectInstructions\addendums\repository_directory_standard.md:86:- dev/workspace/artifacts/
63+
dev/build/ProjectInstructions\addendums\repository_directory_standard.md:87:- dev/build/dev/
64+
```
65+
66+
## Validation
67+
- npm run validate:canonical-structure: PASS
68+
- git diff --check: PASS
69+
- node ./dev/scripts/run-platform-validation-suite.mjs: PASS, 8/8 scenarios
70+
- Project Instructions invalid-path grep: PASS, intentional historical/invalid-path mentions documented above
71+
72+
## Blockers
73+
None.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# PR_26179_OWNER_010-canonical-project-folder-instructions Requirement Checklist
2+
3+
- [x] Documentation/governance only.
4+
- [x] No files moved.
5+
- [x] No runtime behavior changed.
6+
- [x] No production pages changed.
7+
- [x] Canonical repository structure documented under dev/build/ProjectInstructions/.
8+
- [x] Valid top-level folders documented.
9+
- [x] Valid dev folders documented.
10+
- [x] Root/src/dev/deploy/docs/dev-build/dev-workspace ownership documented.
11+
- [x] Invalid legacy paths explicitly marked.
12+
- [x] Codex folder-creation HARD STOP rule added.
13+
- [x] Existing Project Instructions old-path references reviewed and intentional mentions documented.
14+
- [x] Team migration note added for Alfa, Bravo, Charlie, and historical Gamma lanes.
15+
- [x] Required validation passed.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# PR_26179_OWNER_010-canonical-project-folder-instructions Validation Report
2+
3+
Updated: 2026-06-28T01:03:53Z
4+
5+
- npm run validate:canonical-structure: PASS
6+
- git diff --check: PASS
7+
- node ./dev/scripts/run-platform-validation-suite.mjs: PASS, 8/8 scenarios
8+
- grep Project Instructions for old invalid paths: PASS, intentional mentions documented in PR report
9+
- Runtime/product files changed: NO
10+
- Production pages changed: NO

0 commit comments

Comments
 (0)