Skip to content

Commit 9e9f39b

Browse files
committed
OWNER 010 consolidate folder placement SSoT
1 parent 09422f7 commit 9e9f39b

10 files changed

Lines changed: 291 additions & 376 deletions

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

dev/build/ProjectInstructions/README.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ READ THIS FIRST
4747

4848
Addendum index:
4949
- Documentation Ownership: dev/build/ProjectInstructions/addendums/documentation_ownership.md
50-
- Repository Directory Standard: dev/build/ProjectInstructions/addendums/repository_directory_standard.md
50+
- Canonical Repository Structure: dev/build/ProjectInstructions/addendums/canonical_repository_structure.md
51+
- Repository Directory Standard (superseded pointer): dev/build/ProjectInstructions/addendums/repository_directory_standard.md
5152
- Team Backlog, SOD, And EOD Standard: dev/build/ProjectInstructions/addendums/team_backlog_sod_eod_standard.md
5253
- Single Source and EOD Main Lock: dev/build/ProjectInstructions/addendums/project_instructions_single_source_eod_lock.md
53-
- Canonical Repository Structure: dev/build/ProjectInstructions/addendums/canonical_repository_structure.md
5454
- Test Structure Standardization: dev/build/ProjectInstructions/addendums/test_structure_standardization.md
5555
- Legacy Migration Policy: dev/build/ProjectInstructions/addendums/legacy_migration_policy.md
5656
- Assistant Execution Modes: dev/build/ProjectInstructions/addendums/assistant_execution_modes.md

dev/build/ProjectInstructions/TEAM_START_COMMANDS.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@ Branch Lifecycle (Canonical):
1717

1818
## Team Migration Note
1919

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`.
20+
Team Alfa, Team Bravo, Team Charlie, and historical Team Gamma lanes must update from current `main` before starting work and use the folder-placement SSoT:
2121

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/`.
22+
`dev/build/ProjectInstructions/addendums/canonical_repository_structure.md`
23+
24+
Do not create or reuse invalid legacy folders. Use the SSoT invalid legacy path list.
2325

2426
If a proposed file does not clearly belong in a canonical folder, HARD STOP and report the proposed path.
2527

dev/build/ProjectInstructions/addendums/canonical_repository_structure.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ Deployable application source:
3939
- src/api-runtime/{feature-name}/
4040
- src/runtime/{feature-name}/
4141

42+
Final src layer ownership:
43+
- src/web/ owns browser-facing deployable application modules used by public pages, account/admin surfaces, and Creator tools.
44+
- src/api-runtime/ owns deployable API/runtime service modules that back the shared Browser -> API -> Postgres/R2 contract.
45+
- src/runtime/ owns deployable game, tool, engine, and shared runtime capabilities.
46+
- 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.
47+
- Do not add new top-level src/ layer names outside src/web/, src/api-runtime/, or src/runtime/ without OWNER approval.
48+
- Do not use team names in runtime source filenames.
49+
4250
Valid dev workspace folders:
4351
- dev/archive/
4452
- dev/build/
@@ -105,6 +113,26 @@ These legacy transition buckets may remain until explicit migration PRs move the
105113
- Required reports belong under flat `dev/reports/`.
106114
- Required ZIPs belong under `dev/workspace/zips/`; generated temporary artifacts belong under `dev/workspace/tmp/`.
107115

116+
## Creator Data Boundary
117+
118+
- Creator data must not write to repository folders.
119+
- Creator metadata must go through the API to Postgres.
120+
- Creator assets must go through the API to Cloudflare R2.
121+
- Repo folders may contain fixtures, templates, governance, and development artifacts only when they are not Creator-owned production data.
122+
123+
## Environment And Runtime Rules
124+
125+
- Postgres is the only active runtime database.
126+
- The same application code path must run across LOCAL, DEV, IST, UAT, and PROD.
127+
- Environment differences must come from `.env` values or environment-managed secrets.
128+
- Runtime source filenames must not use team names.
129+
130+
## PR Chain Boundary
131+
132+
The development workspace restructure must proceed through sequential scoped PRs. A PR may only move or update the paths named in its purpose.
133+
134+
Final path-governance PRs may document target paths and legacy exceptions, but they must not move deployable application code unless explicitly scoped.
135+
108136
## Invalid Legacy Paths
109137

110138
These paths are not active repository ownership locations:
Lines changed: 3 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -1,122 +1,7 @@
11
# Repository Directory Standard
22

3-
Status: Approved
4-
Owner: OWNER
3+
Status: Superseded
54

6-
## Purpose
5+
SSoT: `dev/build/ProjectInstructions/addendums/canonical_repository_structure.md`
76

8-
Define the target repository directory ownership model for the post-restructure repository.
9-
10-
This document is governance only. It does not move runtime, UI, API, tests, or production files by itself.
11-
12-
## Directory Ownership
13-
14-
- Repository root contains production/public product sections and standard repository configuration only.
15-
- `src/` contains deployable application code.
16-
- `dev/` contains non-deployable build, test, bootstrap, governance, report, and local workspace items.
17-
- `deploy/` contains deployment configuration.
18-
- `docs/` remains at root because it is production Docs & Help.
19-
- `games/` remains at root because it is public game discovery.
20-
- `toolbox/` remains at root because it is the Creator toolbox/workspace.
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/
41-
42-
## Final Src Layer Standard
43-
44-
The final `src/` ownership model is:
45-
46-
- `src/web/` for browser-facing deployable application modules used by public pages, account/admin surfaces, and Creator tools.
47-
- `src/api-runtime/` for deployable API/runtime service modules that back the shared Browser -> API -> Postgres/R2 contract.
48-
- `src/runtime/` for deployable game, tool, engine, and shared runtime capabilities.
49-
50-
Transition rule:
51-
52-
- 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.
53-
- Do not add new top-level `src/` layer names outside `src/web/`, `src/api-runtime/`, or `src/runtime/` without OWNER approval.
54-
- Do not use team names in runtime source filenames.
55-
56-
## Development Workspace Paths
57-
58-
- `dev/archive/` owns historical development reference material that is not active governance.
59-
- `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.
62-
- `dev/reports/` owns generated reports using flat filenames.
63-
- `dev/scripts/` owns development-only scripts and runners.
64-
- `dev/templates/` owns reusable development templates.
65-
- `dev/tests/` owns non-deployable test suites.
66-
- `dev/tools/` owns development-only tooling.
67-
- `dev/workspace/` owns generated non-report artifacts and ignored local temporary workspace output.
68-
- `dev/workspace/` generated output includes tmp, zips, logs, generated files, and test-results.
69-
- `dev/build/ProjectInstructions/` is the only active Project Instructions source.
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.
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/`.
72-
73-
## Legacy Reference Exceptions
74-
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:
90-
91-
- historical/reference content under `dev/archive/` or `dev/build/pr/reference/`
92-
- explicit legacy exception notes in active governance
93-
- ignore rules that keep obsolete local scratch from entering commits
94-
- migration reports documenting the old path and its replacement
95-
96-
Active commands, templates, and Project Instructions must use the final `dev/`, `dev/reports/`, and `dev/workspace/` paths.
97-
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-
104-
## Creator Data Boundary
105-
106-
- Creator data must not write to repository folders.
107-
- Creator metadata must go through the API to Postgres.
108-
- Creator assets must go through the API to Cloudflare R2.
109-
- Repo folders may contain fixtures, templates, governance, and development artifacts only when they are not Creator-owned production data.
110-
111-
## Environment And Runtime Rules
112-
113-
- Postgres is the only active runtime database.
114-
- The same application code path must run across LOCAL, DEV, IST, UAT, and PROD.
115-
- Environment differences must come from `.env` values or environment-managed secrets.
116-
- Runtime source filenames must not use team names.
117-
118-
## PR Chain Boundary
119-
120-
The development workspace restructure must proceed through sequential scoped PRs. A PR may only move or update the paths named in its purpose.
121-
122-
Final path-governance PRs may document target paths and legacy exceptions, but they must not move deployable application code unless explicitly scoped.
7+
Do not duplicate folder rules here.

0 commit comments

Comments
 (0)