Skip to content

Commit 31bb8f9

Browse files
committed
Create repository layout scaffold
1 parent 906a097 commit 31bb8f9

16 files changed

Lines changed: 424 additions & 440 deletions

api/.gitkeep

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

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.004
120+
- Project Instructions Version: 2026.06.28.005
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.004
3+
Current Project Instructions Version: 2026.06.28.005
44

55
Last Updated: 2026-06-28
66

@@ -12,6 +12,7 @@ Last Updated: 2026-06-28
1212
- Startup validation now verifies the branching policy document was loaded instead of duplicating policy text.
1313
- Added backlog startup assignment policy requiring `BACKLOG_MASTER.md` and Tool Votes/Admin Owner priority signal review during team startup.
1414
- Added proposed repository layout architecture plan for future `www/`, `api/`, and `dev/` separation.
15+
- Added repository layout scaffold governance for `www/`, `api/`, and `dev/local-runtime/`.
1516
- Codex must read this version file and the latest repository copy of `PROJECT_INSTRUCTIONS.md` before performing work.
1617
- Codex must discard previously remembered Project Instructions and treat the repository copy as authoritative.
1718
- 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: 9 additions & 6 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.PR_26179_OWNER_010"
4+
project_state_version: "2026.06.28.005"
55
last_updated: "2026-06-28"
66
current_main_commit: "40de767476d70cadfd1292c916844c2f31b6f185"
77
repository_status:
@@ -10,21 +10,22 @@ 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.PR_26179_OWNER_010"
14-
repository_structure_version: "2026-06-28.PR_26179_OWNER_010"
15-
canonical_layout_version: "2026-06-28.PR_26179_OWNER_010"
13+
project_instructions_version: "2026.06.28.005"
14+
repository_structure_version: "2026.06.28.005"
15+
canonical_layout_version: "2026.06.28.005"
1616
active_teams:
1717
- "Owner"
1818
- "Alfa"
1919
- "Bravo"
2020
- "Charlie"
2121
- "Delta"
2222
- "Golf"
23-
latest_owner_pr: "PR_26179_OWNER_010-canonical-project-folder-instructions"
24-
latest_structure_pr: "PR_26179_OWNER_010-canonical-project-folder-instructions"
23+
latest_owner_pr: "PR_26180_OWNER_005-repository-layout-scaffold"
24+
latest_structure_pr: "PR_26180_OWNER_005-repository-layout-scaffold"
2525
valid_top_level_folders:
2626
- "account/"
2727
- "admin/"
28+
- "api/"
2829
- "assets/"
2930
- "community/"
3031
- "company/"
@@ -39,10 +40,12 @@ valid_top_level_folders:
3940
- "owner/"
4041
- "src/"
4142
- "toolbox/"
43+
- "www/"
4244
valid_dev_folders:
4345
- "dev/archive/"
4446
- "dev/build/"
4547
- "dev/config/"
48+
- "dev/local-runtime/"
4649
- "dev/reports/"
4750
- "dev/scripts/"
4851
- "dev/templates/"

dev/build/ProjectInstructions/backlog/BACKLOG_MASTER.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ The backlog is the authoritative source for determining the next logical PRs.
3838

3939
- Team: Owner
4040
- Product Area: Repository Architecture Simplification
41-
- Status: Planned
42-
- Percent Complete: 0%
43-
- Active PR: PR_26180_OWNER_004-repository-layout-architecture-plan
44-
- Next Milestone: Architecture plan
41+
- Status: Active
42+
- Percent Complete: 10%
43+
- Active PR: PR_26180_OWNER_005-repository-layout-scaffold
44+
- Next Milestone: Move browser-served application to `www/`
4545
- Source / Reference: `dev/build/ProjectInstructions/repository/repository_layout_architecture_plan.md`
4646

4747
## Game Journey MVP

dev/build/ProjectInstructions/repository/canonical_repository_structure.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Establish the canonical repository structure for future development and reduce t
99
Valid top-level folders:
1010
- account/
1111
- admin/
12+
- api/
1213
- assets/
1314
- community/
1415
- company/
@@ -23,16 +24,19 @@ Valid top-level folders:
2324
- owner/
2425
- src/
2526
- toolbox/
27+
- www/
2628

2729
Root product and repo sections:
2830
- account/, admin/, community/, company/, learn/, legal/, marketplace/, memberships/, and owner/ are production website sections.
2931
- assets/ contains production website and tool assets.
32+
- api/ is the target Node/API/server application surface for the repository layout simplification workstream.
3033
- docs/ is production Docs & Help content.
3134
- games/ is public game discovery.
3235
- toolbox/ is the Creator toolbox/workspace.
3336
- deploy/ contains deployment configuration.
3437
- dev/ contains the development workspace.
3538
- src/ contains deployable application/runtime/API source.
39+
- www/ is the target browser-served application surface for the repository layout simplification workstream.
3640

3741
Deployable application source:
3842
- src/web/{feature-name}/
@@ -51,6 +55,7 @@ Valid dev workspace folders:
5155
- dev/archive/
5256
- dev/build/
5357
- dev/config/
58+
- dev/local-runtime/
5459
- dev/reports/
5560
- dev/scripts/
5661
- dev/templates/
@@ -62,6 +67,7 @@ Dev workspace ownership:
6267
- dev/archive/ owns historical reference material only.
6368
- dev/build/ owns active Project Instructions, architecture, database DDL/DML/seed docs, standards, backlog, PR planning, and governance.
6469
- dev/config/ owns development-only runner and tooling configuration.
70+
- dev/local-runtime/ owns developer-only local runtime bootstrap, team port resolution, local diagnostics, and browser launch orchestration after the migration step that moves those files.
6571
- dev/reports/ owns authoritative Codex reports for the repository. Reports committed to `main` are the official record.
6672
- dev/scripts/ owns development-only scripts and runners.
6773
- dev/templates/ owns reusable development templates.
@@ -96,6 +102,8 @@ These legacy transition buckets may remain until explicit migration PRs move the
96102
## Rules
97103

98104
- Root is production website and standard repository configuration only.
105+
- www/ is the browser-served application target surface for migration.
106+
- api/ is the Node/API/server application target surface for migration.
99107
- src/ is deployable application/runtime/API code.
100108
- dev/ is development workspace only.
101109
- deploy/ is deployment configuration.

dev/build/ProjectInstructions/repository/repository_layout_architecture_plan.md

Lines changed: 44 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Repository Layout Architecture Plan
22

3-
Status: Proposed
3+
Status: Active Scaffold
44
Owner: Owner
55
Scope: Documentation/governance only
66

@@ -10,6 +10,16 @@ Document the proposed repository architecture simplification before any file mov
1010

1111
This plan does not authorize moving files, changing runtime behavior, changing package commands, or mixing feature work into layout migration PRs.
1212

13+
## Current Migration Status
14+
15+
`PR_26180_OWNER_005-repository-layout-scaffold` creates the empty canonical destination shells:
16+
17+
- `www/`
18+
- `api/`
19+
- `dev/local-runtime/`
20+
21+
No browser, API, server, test, script, or runtime files move in the scaffold PR.
22+
1323
## Proposed Future Layout
1424

1525
```text
@@ -94,38 +104,47 @@ Rules:
94104
- Each migration PR must update references, validation, reports, and ZIP artifacts for only its scoped move.
95105
- Each migration PR must include rollback notes or clear validation evidence.
96106

97-
## Proposed Stacked PR Sequence
107+
## Active Stacked PR Sequence
98108

99-
1. `www/` shell and governance
100-
- Create the destination shell and document browser-served ownership.
101-
- Do not move product pages yet.
109+
1. `PR_26180_OWNER_005-repository-layout-scaffold`
110+
- Create `www/`, `api/`, and `dev/local-runtime/` shells.
111+
- Update architecture docs and backlog status only.
102112

103-
2. `api/` shell and governance
104-
- Create the destination shell and document API/server ownership.
105-
- Do not move API/runtime implementation yet.
113+
2. `PR_26180_OWNER_006-move-www-application`
114+
- Move browser-served application files into `www/`.
115+
- Include root HTML pages, `assets/`, `toolbox/`, `account/`, `legal/`, `learn/`, `play/`, and other browser-served static routes.
116+
- Update internal static references only as needed.
117+
- Do not move API/server files.
106118

107-
3. Browser-served public section moves
108-
- Move root browser-served product sections into `www/` in small groups.
109-
- Preserve routes through compatibility redirects or server/static configuration as needed.
119+
3. `PR_26180_OWNER_007-move-api-application`
120+
- Move server/API application files into `api/`.
121+
- Include Local API server runtime files, API routes, services, database, storage, auth, publishing, and admin server code.
122+
- Do not move developer-only startup orchestration.
123+
- Browser code must not import from `api/`.
110124

111-
4. Browser asset moves
112-
- Move browser assets into `www/` ownership.
113-
- Preserve asset URLs or update references in the same PR.
125+
4. `PR_26180_OWNER_008-move-dev-local-runtime`
126+
- Move developer-only local runtime into `dev/local-runtime/`.
127+
- Include team-aware bootstrap, port config, local startup orchestration, local diagnostics, and browser launch support.
128+
- Update `package.json` commands to point to the new local-runtime paths.
114129

115-
5. API/server moves
116-
- Move Node/API/server entry points and service code into `api/`.
117-
- Preserve API contract shape and route behavior.
130+
5. `PR_26180_OWNER_009-move-tests-and-validation`
131+
- Ensure all tests and validation suites live under `dev/tests/` or the current canonical dev test structure.
132+
- Update test paths after the `www/`, `api/`, and `dev/` migrations.
133+
- Do not change behavior.
118134

119-
6. Runtime/shared source boundary cleanup
120-
- Move deployable browser/runtime/API modules into `www/` or `api/` ownership as appropriate.
121-
- Keep shared runtime dependency direction explicit.
135+
6. `PR_26180_OWNER_010-update-ci-and-scripts`
136+
- Update CI, package scripts, validation scripts, and developer utilities for the new layout.
137+
- Preserve `npm run dev:bootstrap`, `npm run dev:api`, `npm run dev:web`, and `npm run dev:local-api`.
122138

123-
7. Developer bootstrap and validation updates
124-
- Update local developer bootstrap and validation paths after deployable surfaces are moved.
125-
- Keep `dev/` developer-only.
139+
7. `PR_26180_OWNER_011-remove-legacy-layout`
140+
- Remove or retire obsolete legacy paths after all references are updated.
141+
- Hard stop if any runtime, test, or CI reference still points to old locations.
126142

127-
8. Legacy path cleanup
128-
- Remove or archive obsolete empty folders and compatibility shims only after validation proves they are unused.
143+
8. `PR_26180_OWNER_012-final-layout-validation`
144+
- Validate final repository layout.
145+
- Confirm `www/` owns the browser-served app, `api/` owns the server app, and `dev/` owns the developer workspace.
146+
- Confirm runtime does not depend on `dev/`, browser code does not import `api/`, and legacy references are removed or documented.
147+
- Mark Repository Architecture Simplification complete in `BACKLOG_MASTER.md`.
129148

130149
## Hard Rules
131150

@@ -148,4 +167,3 @@ npm run validate:canonical-structure
148167
```
149168

150169
Additional targeted validation must match the moved surface.
151-

dev/local-runtime/.gitkeep

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# PR_26180_OWNER_005-repository-layout-scaffold Branch Validation
2+
3+
| Check | Result | Notes |
4+
| --- | --- | --- |
5+
| Startup validation completed | PASS | Project Instructions v2026.06.28.004 loaded before branch creation; PR updates version to v2026.06.28.005. |
6+
| Current branch | PASS | `PR_26180_OWNER_005-repository-layout-scaffold` |
7+
| Expected stacked base | PASS | Created from `PR_26180_OWNER_004-repository-layout-architecture-plan`. |
8+
| Worktree clean before edits | PASS | Branch started with no modified files. |
9+
| PR model | PASS | Owner stacked PR under Repository Architecture Simplification. |
10+
| Previous dependency documented | PASS | `PR_26180_OWNER_004-repository-layout-architecture-plan` |
11+
| Next dependency documented | PASS | `PR_26180_OWNER_006-move-www-application` |
12+
| Runtime/API/UI/database scope | PASS | No implementation files changed. |
13+
14+
Starting HEAD: `906a0970acd4e3f896cde02a0cc1a593c3122cd9`
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# PR_26180_OWNER_005-repository-layout-scaffold Manual Validation Notes
2+
3+
- Confirmed new scaffold directories are tracked only by `.gitkeep` files.
4+
- Confirmed no browser pages, assets, API/server code, scripts, tests, or package commands moved in this PR.
5+
- Confirmed the active stacked PR sequence is documented in the repository layout architecture plan.
6+
- Confirmed BACKLOG_MASTER.md now identifies PR005 as the active Repository Architecture Simplification milestone.
7+
- No Product Owner UI validation is required for this scaffold/governance-only step.

0 commit comments

Comments
 (0)