Skip to content

Commit b8297c7

Browse files
committed
Audit root leftovers and src transition
1 parent 8b598f3 commit b8297c7

12 files changed

Lines changed: 269 additions & 290 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.014
120+
- Project Instructions Version: 2026.06.28.015
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.014
3+
Current Project Instructions Version: 2026.06.28.015
44

55
Last Updated: 2026-06-28
66

@@ -22,6 +22,7 @@ Last Updated: 2026-06-28
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.
2424
- Moved the tracked browser-served favicon under `www/`, added remaining root/src audit governance, and documented root `.env` placement policy.
25+
- Added root leftover audit and `src/` transition plan for the final repository layout cleanup stage.
2526
- Codex must read this version file and the latest repository copy of `PROJECT_INSTRUCTIONS.md` before performing work.
2627
- Codex must discard previously remembered Project Instructions and treat the repository copy as authoritative.
2728
- 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.014"
4+
project_state_version: "2026.06.28.015"
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.014"
14-
repository_structure_version: "2026.06.28.014"
15-
canonical_layout_version: "2026.06.28.014"
13+
project_instructions_version: "2026.06.28.015"
14+
repository_structure_version: "2026.06.28.015"
15+
canonical_layout_version: "2026.06.28.015"
1616
active_teams:
1717
- "Owner"
1818
- "Alfa"
1919
- "Bravo"
2020
- "Charlie"
2121
- "Delta"
2222
- "Golf"
23-
latest_owner_pr: "PR_26180_OWNER_014-remaining-legacy-layout-cleanup"
24-
latest_structure_pr: "PR_26180_OWNER_014-remaining-legacy-layout-cleanup"
23+
latest_owner_pr: "PR_26180_OWNER_015-root-empty-folder-and-src-transition-audit"
24+
latest_structure_pr: "PR_26180_OWNER_015-root-empty-folder-and-src-transition-audit"
2525
valid_top_level_folders:
2626
- "api/"
2727
- "deploy/"

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: 90%
43-
- Active PR: PR_26180_OWNER_014-remaining-legacy-layout-cleanup
42+
- Percent Complete: 95%
43+
- Active PR: PR_26180_OWNER_015-root-empty-folder-and-src-transition-audit
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/repository_layout_architecture_plan.md

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

3939
`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.
4040

41+
`PR_26180_OWNER_015-root-empty-folder-and-src-transition-audit` audits named root leftovers and records the `src/` transition plan without moving application source or changing product behavior.
42+
4143
## Proposed Future Layout
4244

4345
```text
@@ -173,7 +175,13 @@ Rules:
173175
- Document `.env` placement policy for local and deployed environments.
174176
- Preserve product behavior and public routes.
175177

176-
11. `PR_26180_OWNER_015-final-layout-validation`
178+
11. `PR_26180_OWNER_015-root-empty-folder-and-src-transition-audit`
179+
- Audit root leftovers after the `www/`, `api/`, and `dev/` migration.
180+
- Classify local-only legacy folder shells, ignored/generated leftovers, and tracked `src/` transition content.
181+
- Produce the `src/` transition plan for the follow-up final validation stage.
182+
- Preserve product behavior.
183+
184+
12. `PR_26180_OWNER_016-final-layout-validation`
177185
- Validate final repository layout.
178186
- Confirm `www/` owns the browser-served app, `api/` owns the server app, and `dev/` owns the developer workspace.
179187
- Confirm runtime does not depend on `dev/`, browser code does not import `api/`, and legacy references are removed or documented.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# PR_26180_OWNER_015 Branch Validation
2+
3+
| Check | Result | Evidence |
4+
|---|---:|---|
5+
| Current branch | PASS | `PR_26180_OWNER_015-root-empty-folder-and-src-transition-audit` |
6+
| Expected stacked base | PASS | Created from `PR_26180_OWNER_014-remaining-legacy-layout-cleanup` |
7+
| Base branch for PR | PASS | `PR_26180_OWNER_014-remaining-legacy-layout-cleanup` |
8+
| Project Instructions loaded | PASS | Repository Project Instructions version `2026.06.28.015` |
9+
| Branching policy loaded | PASS | `PROJECT_BRANCHING_POLICY.md` version `2026.06.28.002` |
10+
| Scope | PASS | Root leftover audit, `src/` transition plan, governance reports only |
11+
| 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_015 Manual Validation Notes
2+
3+
- No named local-only root folder was deleted in this PR.
4+
- `assets/DemoGame-26168-001.gfsp` is ignored local data and remains untouched.
5+
- Empty local directory shells under `games/`, `learn/`, `tmp/`, and `toolbox/` are not tracked and do not affect the PR diff.
6+
- `src/` is intentionally retained pending explicit source-layer migration PRs.
7+
- Codex output ZIP is generated under `dev/workspace/zips/`, not root `tmp/`.
8+
- Public favicon ownership remains `www/favicon.svg`.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# PR_26180_OWNER_015 Root Empty Folder and src Transition Audit
2+
3+
## Executive Summary
4+
5+
PR_26180_OWNER_015 completes a no-runtime-change audit of named root leftovers after the `www/`, `api/`, and `dev/` migration. No tracked placeholder folders were removed because Git has no tracked content in the named root leftovers except `src/`.
6+
7+
`src/` remains active and tracked. It should not move in this PR because it contains deployable engine/runtime/shared modules and browser API clients still referenced by `www/`, `api/`, `dev/tests/`, and `dev/tools/`.
8+
9+
## Root Folder Audit
10+
11+
| Folder | Exists Locally | Tracked Content | Local/Generated Status | Decision |
12+
|---|---:|---:|---|---|
13+
| `assets/` | Yes | 0 tracked files | Contains ignored local `assets/DemoGame-26168-001.gfsp`; remaining entries are local directory shells. | Do not delete in PR. User/local cleanup only unless Owner explicitly approves moving/removing the ignored file. |
14+
| `games/` | Yes | 0 tracked files | Empty local directory shell. | Do not delete in PR because it is untracked/local-only; safe local cleanup may remove it outside a commit. |
15+
| `learn/` | Yes | 0 tracked files | Empty local directory shell. | Do not delete in PR because it is untracked/local-only; safe local cleanup may remove it outside a commit. |
16+
| `src/` | Yes | 596 tracked files | Active transition namespace. | Keep. Requires explicit follow-up migration PRs. |
17+
| `test-results/` | No | 0 tracked files | Absent. | No action. |
18+
| `tmp/` | Yes | 0 tracked files | Empty local directory shell. | Do not use for Codex output; canonical ZIPs remain under `dev/workspace/zips/`. |
19+
| `toolbox/` | Yes | 0 tracked files | Empty local directory shell. | Do not delete in PR because it is untracked/local-only; safe local cleanup may remove it outside a commit. |
20+
21+
## Required Confirmations
22+
23+
- `.env` remains root/local-only and ignored by `.gitignore`.
24+
- `.env.example` remains tracked as the repository template.
25+
- `www/favicon.svg` remains the browser-served favicon.
26+
- No runtime behavior changes were made.
27+
- No product feature changes were made.
28+
29+
## src Transition Plan
30+
31+
| Current Area | Tracked Files | Why It Remains | Destination | Proposed Follow-Up |
32+
|---|---:|---|---|---|
33+
| `src/advanced/` | 10 | Advanced state and promotion logic remains actively tested/referenced. | `src/runtime/advanced/` or another Owner-approved runtime bucket. | Runtime transition PR for advanced state modules. |
34+
| `src/api/` | 20 | Browser API clients and browser admin/client helpers remain used by `www/` and tests. Browser clients must stay outside top-level `api/`. | `src/web/api-clients/` or `src/runtime/api-clients/`, depending on final source-layer naming. | Browser API client source-layer migration PR. |
35+
| `src/dev-runtime/admin/` | 4 | Legacy Admin Notes browser-viewer compatibility path is documented in Project Instructions. | `www/admin/` if browser-served, or retire after replacement. | Scoped Admin Notes compatibility retirement PR. |
36+
| `src/engine/` | 327 | Core game/runtime engine remains heavily referenced by tests and dev tooling. | `src/runtime/engine/`. | Engine source-layer migration PR. |
37+
| `src/shared/` | 233 | Shared contracts, utilities, random/hash/noise/geometry/color/text/time helpers, and toolbox pipeline logic remain actively referenced. | Split by usage: `src/runtime/shared/`, `src/web/shared/`, and/or `src/api-runtime/shared/`. | Shared source-layer classification and migration PR. |
38+
| `src/tools/` | 2 | Tool helper modules remain referenced by current tooling/tests. | `src/web/tools/` or `src/runtime/tools/` after ownership review. | Tool helper source-layer migration PR. |
39+
40+
## Follow-Up Recommendation
41+
42+
Do not move `src/` wholesale. Create focused source-layer migration PRs after the layout stack is merged:
43+
44+
1. Browser API clients and browser helper modules.
45+
2. Engine/runtime modules.
46+
3. Shared contracts/utilities classification.
47+
4. Legacy Admin Notes compatibility retirement.
48+
5. Tool helper modules.
49+
50+
## Scope Boundary
51+
52+
This PR is audit/governance/reporting only. It does not move `src/`, delete local-only root folders, change runtime behavior, change product features, or alter API/database behavior.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# PR_26180_OWNER_015 Requirement Checklist
2+
3+
| Requirement | Result | Notes |
4+
|---|---:|---|
5+
| Base on `PR_26180_OWNER_014-remaining-legacy-layout-cleanup` | PASS | Branch created from PR014. |
6+
| Inspect `assets/` | PASS | 0 tracked files; local ignored `DemoGame-26168-001.gfsp` remains untouched. |
7+
| Inspect `games/` | PASS | 0 tracked files; empty local-only directory shell. |
8+
| Inspect `learn/` | PASS | 0 tracked files; empty local-only directory shell. |
9+
| Inspect `src/` | PASS | 596 tracked files; active transition namespace retained. |
10+
| Inspect `test-results/` | PASS | Folder absent; 0 tracked files. |
11+
| Inspect `tmp/` | PASS | 0 tracked files; empty local-only directory shell; not used for Codex output. |
12+
| Inspect `toolbox/` | PASS | 0 tracked files; empty local-only directory shell. |
13+
| Remove empty tracked placeholder folders only if safe | PASS | No tracked placeholder folders found in the named root leftovers. |
14+
| Do not delete untracked local-only folders unless explicitly safe and documented | PASS | No untracked local-only folders were deleted. |
15+
| Do not move `src/` in this PR unless clearly misplaced and low-risk | PASS | `src/` was not moved. |
16+
| Produce a clear `src/` transition plan | PASS | Included in PR report. |
17+
| Confirm `.env` remains root/local-only | PASS | `.env` is ignored; `.env.example` is tracked. |
18+
| Confirm `www/favicon.svg` remains browser-served favicon | PASS | `www/favicon.svg` is tracked. |
19+
| No runtime behavior changes | PASS | Reports/governance only. |
20+
| No product feature changes | PASS | Reports/governance only. |
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# PR_26180_OWNER_015 Validation Report
2+
3+
| Validation | Result | Notes |
4+
|---|---:|---|
5+
| Root folder audit | PASS | Named folders classified by local existence, tracked content, ignored/generated status, and follow-up need. |
6+
| `.env` policy confirmation | PASS | `.env` is ignored by `.gitignore`; `.env.example` is tracked. |
7+
| `www/favicon.svg` confirmation | PASS | `www/favicon.svg` is tracked. |
8+
| Targeted root legacy path scan | PASS | No tracked `assets/`, `games/`, `learn/`, `test-results/`, `tmp/`, or `toolbox/` files remain. |
9+
| `node --test dev/tests/dev-runtime/TeamAwareBootstrap.test.mjs` | PASS | Bootstrap command surface remains valid. |
10+
| `git diff --check` | PASS | Whitespace check passed. |
11+
| `npm run validate:canonical-structure` | PASS | Blocking violations: 0. |
12+
13+
## Notes
14+
15+
The bootstrap test was run as a targeted safety check even though this PR does not touch startup/runtime files.

0 commit comments

Comments
 (0)