Skip to content

Commit 8b598f3

Browse files
committed
Clean remaining legacy layout roots
1 parent fef340d commit 8b598f3

20 files changed

Lines changed: 453 additions & 1432 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.013
120+
- Project Instructions Version: 2026.06.28.014
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.013
3+
Current Project Instructions Version: 2026.06.28.014
44

55
Last Updated: 2026-06-28
66

@@ -21,6 +21,7 @@ Last Updated: 2026-06-28
2121
- Finalized moved test and validation path assumptions for the `www/`, `api/`, and `dev/local-runtime/` layout.
2222
- Updated CI, package scripts, and developer utilities for the `www/`, `api/`, and `dev/` layout.
2323
- Removed active references to obsolete legacy layout paths after the `www/`, `api/`, and `dev/` migration steps.
24+
- Moved the tracked browser-served favicon under `www/`, added remaining root/src audit governance, and documented root `.env` placement policy.
2425
- Codex must read this version file and the latest repository copy of `PROJECT_INSTRUCTIONS.md` before performing work.
2526
- Codex must discard previously remembered Project Instructions and treat the repository copy as authoritative.
2627
- 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: 6 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.013"
4+
project_state_version: "2026.06.28.014"
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.013"
14-
repository_structure_version: "2026.06.28.013"
15-
canonical_layout_version: "2026.06.28.013"
13+
project_instructions_version: "2026.06.28.014"
14+
repository_structure_version: "2026.06.28.014"
15+
canonical_layout_version: "2026.06.28.014"
1616
active_teams:
1717
- "Owner"
1818
- "Alfa"
1919
- "Bravo"
2020
- "Charlie"
2121
- "Delta"
2222
- "Golf"
23-
latest_owner_pr: "PR_26180_OWNER_013-remove-legacy-layout"
24-
latest_structure_pr: "PR_26180_OWNER_013-remove-legacy-layout"
23+
latest_owner_pr: "PR_26180_OWNER_014-remaining-legacy-layout-cleanup"
24+
latest_structure_pr: "PR_26180_OWNER_014-remaining-legacy-layout-cleanup"
2525
valid_top_level_folders:
2626
- "api/"
2727
- "deploy/"

dev/build/ProjectInstructions/addendums/environment_configuration_standards.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,18 @@ Runtime startup still reads `.env` values only. The official flow is for each en
5656

5757
`.env.prd` is legacy technical debt only. Do not introduce new references to `.env.prd` except when documenting migration or historical compatibility.
5858

59+
## Runtime Placement Policy
60+
61+
Local `.env` may exist at repository root for developer startup only.
62+
63+
Root `.env` is user/environment-owned, ignored, and never deployed as part of `www/` or `api/`.
64+
65+
Production uses deployment environment variables and environment-managed secrets instead of committed `.env` files.
66+
67+
`www/` must never contain secrets or environment-owned `.env` files.
68+
69+
`api/` reads environment values from `process.env` and the deployment environment.
70+
5971
## Environment Identity
6072

6173
Allowed `GAMEFOUNDRY_ENVIRONMENT` values:

dev/build/ProjectInstructions/backlog/BACKLOG_MASTER.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ The backlog is the authoritative source for determining the next logical PRs.
3939
- Team: Owner
4040
- Product Area: Repository Architecture Simplification
4141
- Status: Active
42-
- Percent Complete: 80%
43-
- Active PR: PR_26180_OWNER_013-remove-legacy-layout
42+
- Percent Complete: 90%
43+
- Active PR: PR_26180_OWNER_014-remaining-legacy-layout-cleanup
4444
- Next Milestone: Final layout validation and completion report
4545
- Source / Reference: `dev/build/ProjectInstructions/repository/repository_layout_architecture_plan.md`; `dev/build/ProjectInstructions/repository/www_migration_map.md`
4646

dev/build/ProjectInstructions/repository/canonical_repository_structure.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,15 @@ These legacy transition buckets may remain until explicit migration PRs move the
121121
- Environment differences must come from `.env` values or environment-managed secrets.
122122
- Runtime source filenames must not use team names.
123123

124+
## Environment File Placement
125+
126+
- Local `.env` may exist at repository root for developer startup only.
127+
- Root `.env` is user/environment-owned, ignored, and never deployed as part of `www/` or `api/`.
128+
- Production uses deployment environment variables and environment-managed secrets instead of committed `.env` files.
129+
- `www/` must never contain secrets or environment-owned `.env` files.
130+
- `api/` reads environment values from `process.env` and the deployment environment.
131+
- Only `.env.example` is tracked as a repository template.
132+
124133
## PR Chain Boundary
125134

126135
The development workspace restructure must proceed through sequential scoped PRs. A PR may only move or update the paths named in its purpose.

dev/build/ProjectInstructions/repository/repository_layout_architecture_plan.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ No browser, API, server, test, script, or runtime files move in the scaffold or
3636

3737
`PR_26180_OWNER_013-remove-legacy-layout` removes active stale references to obsolete legacy paths after the tracked `www/`, `api/`, and `dev/` migration steps.
3838

39+
`PR_26180_OWNER_014-remaining-legacy-layout-cleanup` audits remaining tracked root and `src/` layout items, moves the browser-served favicon into `www/`, and records root `.env` placement policy before final validation.
40+
3941
## Proposed Future Layout
4042

4143
```text
@@ -165,7 +167,13 @@ Rules:
165167
- Remove or retire obsolete legacy paths after all references are updated.
166168
- Hard stop if any runtime, test, or CI reference still points to old locations.
167169

168-
10. `PR_26180_OWNER_014-final-layout-validation`
170+
10. `PR_26180_OWNER_014-remaining-legacy-layout-cleanup`
171+
- Audit remaining tracked root and `src/` layout items after the `www/`, `api/`, and `dev/` migrations.
172+
- Move browser-served root assets that now belong under `www/`.
173+
- Document `.env` placement policy for local and deployed environments.
174+
- Preserve product behavior and public routes.
175+
176+
11. `PR_26180_OWNER_015-final-layout-validation`
169177
- Validate final repository layout.
170178
- Confirm `www/` owns the browser-served app, `api/` owns the server app, and `dev/` owns the developer workspace.
171179
- Confirm runtime does not depend on `dev/`, browser code does not import `api/`, and legacy references are removed or documented.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# PR_26180_OWNER_014 Branch Validation
2+
3+
| Check | Result | Evidence |
4+
|---|---:|---|
5+
| Current branch | PASS | `PR_26180_OWNER_014-remaining-legacy-layout-cleanup` |
6+
| Expected stacked base | PASS | Created from `PR_26180_OWNER_013-remove-legacy-layout` |
7+
| Project Instructions loaded | PASS | Repository Project Instructions version `2026.06.28.014` |
8+
| Branching policy loaded | PASS | `PROJECT_BRANCHING_POLICY.md` version `2026.06.28.002` |
9+
| Scope | PASS | Remaining layout cleanup, favicon move, environment policy documentation, tests/references only |
10+
| Runtime/API/database implementation changes | PASS | None |
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# PR_26180_OWNER_014 Manual Validation Notes
2+
3+
- Public favicon URL remains `/favicon.svg`.
4+
- Static route compatibility now verifies that `/favicon.svg` resolves to the browser-served `www/favicon.svg` file.
5+
- No `.env` files were moved into `www/` or `api/`.
6+
- `src/` remains in place because current application, API client, shared runtime, dev tooling, and tests still reference it.
7+
- Root ignored/generated artifacts were not staged.
8+
- Playwright coverage output generated by the local run was not included as a PR change.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# PR_26180_OWNER_014 Remaining Legacy Layout Cleanup Report
2+
3+
## Executive Summary
4+
5+
PR_26180_OWNER_014 audits the remaining tracked repository layout after the `www/`, `api/`, and `dev/` migration stack. The only tracked browser-served root file found in scope was `favicon.svg`, which is now under `www/favicon.svg` while public references remain `/favicon.svg`.
6+
7+
The PR also documents environment file placement policy: local `.env` files remain user/environment-owned at the repository root and are never deployed; production uses deployment-managed environment variables/secrets; `www/` must not contain secrets; `api/` reads environment values from `process.env` and the deployment environment.
8+
9+
## Scope Decision
10+
11+
- Browser-served favicon moved from repository root to `www/`.
12+
- Public favicon URL `/favicon.svg` preserved.
13+
- `src/` retained as an active transition namespace because tracked browser, API, dev tooling, and tests still import from it.
14+
- No `.env` files moved into `www/` or `api/`.
15+
- No runtime/API/UI/database behavior changed.
16+
17+
## Root Audit
18+
19+
Tracked root entries are limited to standard repository metadata/config plus `api/`, `dev/`, `src/`, and `www/`. Ignored local folders/files such as local `.env*`, generated workspace outputs, and dependency folders are not part of this PR and were not staged.
20+
21+
Additional standard root files retained as repository configuration/history:
22+
23+
- `.codex/`
24+
- `.gitattributes`
25+
- `.githooks/`
26+
- `.gitignore`
27+
- `AGENTS.md`
28+
- `LICENSE`
29+
30+
## src/ Audit
31+
32+
`src/` is not empty and remains referenced by current `www/`, `api/`, `dev/tests/`, and `dev/tools/` surfaces. Current Project Instructions document `src/advanced`, `src/api`, `src/engine`, `src/shared`, `src/tools`, and `src/dev-runtime/admin` as legacy transition buckets pending explicit follow-up migration. This PR does not move or delete `src/`.
33+
34+
## File Evidence
35+
36+
- `www/favicon.svg`: browser-served favicon location after the move.
37+
- `dev/tests/dev-runtime/StaticWebRootCompatibility.test.mjs`: verifies `/favicon.svg` resolves to `www/favicon.svg`.
38+
- `dev/scripts/PS/deploy/WebsiteRepoDeploymentCommon.ps1`: deployment include list now references `www/favicon.svg`.
39+
- `dev/build/ProjectInstructions/repository/canonical_repository_structure.md`: documents root `.env`, `www/`, and `api/` environment ownership.
40+
- `dev/build/ProjectInstructions/addendums/environment_configuration_standards.md`: adds the runtime placement policy for environment values.
41+
42+
## Remaining Technical Debt
43+
44+
The PowerShell deployment helper still contains broader legacy include defaults such as root `index.html`, `games`, `samples`, `src`, and `tools`. This PR updates only the tracked favicon path because changing the broader deploy staging semantics would be a separate deployment-layout PR.
45+
46+
## Owner Recommendation
47+
48+
Keep this PR focused as the remaining legacy layout cleanup pass. Follow with the final layout validation PR after stacked dependencies land.

0 commit comments

Comments
 (0)