From 906a0970acd4e3f896cde02a0cc1a593c3122cd9 Mon Sep 17 00:00:00 2001 From: Alfa Team Date: Sun, 28 Jun 2026 16:37:58 -0400 Subject: [PATCH] Document repository layout architecture plan --- .../PROJECT_INSTRUCTIONS.md | 3 +- .../PROJECT_INSTRUCTIONS_VERSION.md | 3 +- .../backlog/BACKLOG_MASTER.md | 12 + .../repository_layout_architecture_plan.md | 151 +++ ...out-architecture-plan_branch-validation.md | 13 + ...chitecture-plan_manual-validation-notes.md | 11 + ...ository-layout-architecture-plan_report.md | 53 + ...architecture-plan_requirement-checklist.md | 19 + ...out-architecture-plan_validation-report.md | 23 + dev/reports/codex_changed_files.txt | 48 +- dev/reports/codex_review.diff | 1085 ++++++----------- 11 files changed, 702 insertions(+), 719 deletions(-) create mode 100644 dev/build/ProjectInstructions/repository/repository_layout_architecture_plan.md create mode 100644 dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_branch-validation.md create mode 100644 dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_manual-validation-notes.md create mode 100644 dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_report.md create mode 100644 dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_requirement-checklist.md create mode 100644 dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_validation-report.md diff --git a/dev/build/ProjectInstructions/PROJECT_INSTRUCTIONS.md b/dev/build/ProjectInstructions/PROJECT_INSTRUCTIONS.md index 8ca721dc7..aeda69a61 100644 --- a/dev/build/ProjectInstructions/PROJECT_INSTRUCTIONS.md +++ b/dev/build/ProjectInstructions/PROJECT_INSTRUCTIONS.md @@ -117,7 +117,7 @@ Rules: ## Current Version/Date -- Project Instructions Version: 2026.06.28.003 +- Project Instructions Version: 2026.06.28.004 - Date: 2026-06-28 - Owner: OWNER @@ -195,6 +195,7 @@ That file owns Start of Day, PLAN_PR, BUILD_PR, APPLY_PR, and invalid command be - Project branching policy: `dev/build/ProjectInstructions/PROJECT_BRANCHING_POLICY.md` - Project state: `dev/build/ProjectInstructions/PROJECT_STATE.md` - Repository folder placement SSoT: `dev/build/ProjectInstructions/repository/canonical_repository_structure.md` +- Proposed repository layout architecture plan: `dev/build/ProjectInstructions/repository/repository_layout_architecture_plan.md` - Codex workflow commands: `dev/build/ProjectInstructions/standards/CODEX_WORKFLOW_COMMANDS.md` - Codex Start-of-Day bootstrap: `dev/build/ProjectInstructions/bootstrap/codex_start_of_day_bootstrap.md` - Branch lifecycle: `dev/build/ProjectInstructions/addendums/project_instructions_single_source_eod_lock.md` diff --git a/dev/build/ProjectInstructions/PROJECT_INSTRUCTIONS_VERSION.md b/dev/build/ProjectInstructions/PROJECT_INSTRUCTIONS_VERSION.md index 56ae2b21e..d489f2af4 100644 --- a/dev/build/ProjectInstructions/PROJECT_INSTRUCTIONS_VERSION.md +++ b/dev/build/ProjectInstructions/PROJECT_INSTRUCTIONS_VERSION.md @@ -1,6 +1,6 @@ # Project Instructions Version -Current Project Instructions Version: 2026.06.28.003 +Current Project Instructions Version: 2026.06.28.004 Last Updated: 2026-06-28 @@ -11,6 +11,7 @@ Last Updated: 2026-06-28 - Added dedicated branching policy document. - Startup validation now verifies the branching policy document was loaded instead of duplicating policy text. - Added backlog startup assignment policy requiring `BACKLOG_MASTER.md` and Tool Votes/Admin Owner priority signal review during team startup. +- Added proposed repository layout architecture plan for future `www/`, `api/`, and `dev/` separation. - Codex must read this version file and the latest repository copy of `PROJECT_INSTRUCTIONS.md` before performing work. - Codex must discard previously remembered Project Instructions and treat the repository copy as authoritative. - Codex must validate canonical report and ZIP paths, branching model, and legacy path avoidance before work proceeds. diff --git a/dev/build/ProjectInstructions/backlog/BACKLOG_MASTER.md b/dev/build/ProjectInstructions/backlog/BACKLOG_MASTER.md index 3c47c2a1b..ee8160a46 100644 --- a/dev/build/ProjectInstructions/backlog/BACKLOG_MASTER.md +++ b/dev/build/ProjectInstructions/backlog/BACKLOG_MASTER.md @@ -32,6 +32,18 @@ Completion percentages are updated at SOD, after every accepted PR, and at EOD. The backlog is the authoritative source for determining the next logical PRs. +## Owner Assignments + +### Repository Architecture Simplification + +- Team: Owner +- Product Area: Repository Architecture Simplification +- Status: Planned +- Percent Complete: 0% +- Active PR: PR_26180_OWNER_004-repository-layout-architecture-plan +- Next Milestone: Architecture plan +- Source / Reference: `dev/build/ProjectInstructions/repository/repository_layout_architecture_plan.md` + ## Game Journey MVP ### Idea diff --git a/dev/build/ProjectInstructions/repository/repository_layout_architecture_plan.md b/dev/build/ProjectInstructions/repository/repository_layout_architecture_plan.md new file mode 100644 index 000000000..f2ec47fee --- /dev/null +++ b/dev/build/ProjectInstructions/repository/repository_layout_architecture_plan.md @@ -0,0 +1,151 @@ +# Repository Layout Architecture Plan + +Status: Proposed +Owner: Owner +Scope: Documentation/governance only + +## Purpose + +Document the proposed repository architecture simplification before any file moves occur. + +This plan does not authorize moving files, changing runtime behavior, changing package commands, or mixing feature work into layout migration PRs. + +## Proposed Future Layout + +```text +www/ +api/ +dev/ +``` + +### www/ + +`www/` is the browser-served application. + +It will own deployable browser pages, browser assets, and static application entry points currently spread across root product folders, `assets/`, `docs/`, `games/`, `toolbox/`, and browser-facing runtime surfaces. + +`www/` must not own authoritative product data. + +### api/ + +`api/` is the Node/API/server application. + +It will own server entry points, API routing, API services, environment adapters, database access, storage access, server-side setup, and deployable API/runtime support code. + +`api/` owns the Browser -> API -> Postgres/R2 boundary. + +### dev/ + +`dev/` is the developer-only workspace. + +It owns Project Instructions, governance, architecture docs, reports, tests, scripts, templates, local developer bootstrap, generated output, zips, logs, and historical archive material. + +Production runtime, browser application code, and API deployment code must never depend on `dev/`. + +## Deployment Model + +The proposed target deployment model has two deployable application surfaces: + +- `www/` deploys the browser-served application. +- `api/` deploys the Node/API/server application. + +`dev/` is not deployed as product runtime and must be excluded from runtime dependency paths. + +Environment differences remain governed by `.env` values and environment-managed secrets. The same deployable browser and API code paths must be promoted through Local, DEV, IST, UAT, and PROD. + +## Browser/API/Database Flow + +Required product-data flow: + +```text +Browser -> API -> Postgres/R2 +``` + +Rules: + +- Browser code reads and writes authoritative product data only through the API/service contract. +- Product metadata is persisted in Postgres. +- Product assets are persisted in Cloudflare R2. +- Browser storage, page arrays, source JSON files, `/tmp`, and dev workspace files are not authoritative product-data sources. +- Seed data is allowed only when it seeds the database through server/API/setup ownership. + +## Developer Local-Runtime Flow + +Local development may use the team-aware developer bootstrap and local runtime support, but the runtime boundary remains the same: + +```text +Developer command -> dev bootstrap -> local www server + local api server -> Postgres/R2 or approved local provider +``` + +Current local bootstrap commands remain unchanged by this plan. This PR does not modify `package.json` commands. + +The local developer workflow must continue to prove the same browser/API/database contract that deployed environments use. + +## Migration Strategy + +Migration must happen through small, reviewable, stacked PRs after this architecture plan is accepted. + +Rules: + +- No file moves occur in this plan PR. +- No feature work may be mixed into migration PRs. +- Each migration PR moves or rewires one bounded ownership area. +- Each migration PR must preserve the same product behavior unless the PR is explicitly a behavior change. +- Each migration PR must update references, validation, reports, and ZIP artifacts for only its scoped move. +- Each migration PR must include rollback notes or clear validation evidence. + +## Proposed Stacked PR Sequence + +1. `www/` shell and governance + - Create the destination shell and document browser-served ownership. + - Do not move product pages yet. + +2. `api/` shell and governance + - Create the destination shell and document API/server ownership. + - Do not move API/runtime implementation yet. + +3. Browser-served public section moves + - Move root browser-served product sections into `www/` in small groups. + - Preserve routes through compatibility redirects or server/static configuration as needed. + +4. Browser asset moves + - Move browser assets into `www/` ownership. + - Preserve asset URLs or update references in the same PR. + +5. API/server moves + - Move Node/API/server entry points and service code into `api/`. + - Preserve API contract shape and route behavior. + +6. Runtime/shared source boundary cleanup + - Move deployable browser/runtime/API modules into `www/` or `api/` ownership as appropriate. + - Keep shared runtime dependency direction explicit. + +7. Developer bootstrap and validation updates + - Update local developer bootstrap and validation paths after deployable surfaces are moved. + - Keep `dev/` developer-only. + +8. Legacy path cleanup + - Remove or archive obsolete empty folders and compatibility shims only after validation proves they are unused. + +## Hard Rules + +- No feature work may be mixed into repository layout migration. +- Runtime must never depend on `dev/`. +- Browser code must never own authoritative product data. +- Browser code must use Browser -> API -> Postgres/R2 for product data. +- API/server code must not import from developer-only reports, Project Instructions, tests, or workspace artifacts. +- Migration PRs must not change package commands unless the PR explicitly owns command migration. +- Migration PRs must not introduce Creator-writeable repository folders. +- Migration PRs must not hide behavior changes inside path moves. + +## Validation Expectations + +Every layout migration PR must at minimum run: + +```text +git diff --check +npm run validate:canonical-structure +``` + +Additional targeted validation must match the moved surface. + diff --git a/dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_branch-validation.md b/dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_branch-validation.md new file mode 100644 index 000000000..4c063b57e --- /dev/null +++ b/dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_branch-validation.md @@ -0,0 +1,13 @@ +# PR_26180_OWNER_004 Branch Validation + +| Gate | Result | Evidence | +|---|---|---| +| Project Instructions loaded | PASS | Version `2026.06.28.003` loaded before work began; PR bumps to `2026.06.28.004`. | +| Repository source | PASS | Loaded from `dev/build/ProjectInstructions/`. | +| Cached memory discarded | PASS | Repository files used as authority. | +| Branching policy loaded | PASS | `dev/build/ProjectInstructions/PROJECT_BRANCHING_POLICY.md`. | +| Start branch | PASS | Started from synchronized `main`. | +| Working branch | PASS | `PR_26180_OWNER_004-repository-layout-architecture-plan`. | +| Worktree before edits | PASS | Clean before edits. | +| Scope | PASS | Documentation/governance only. | + diff --git a/dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_manual-validation-notes.md b/dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_manual-validation-notes.md new file mode 100644 index 000000000..511e09a30 --- /dev/null +++ b/dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_manual-validation-notes.md @@ -0,0 +1,11 @@ +# PR_26180_OWNER_004 Manual Validation Notes + +- Confirmed the new architecture plan is proposal-only and explicitly does not authorize file moves. +- Confirmed proposed future layout documents `www/`, `api/`, and `dev/`. +- Confirmed migration hard rules prohibit feature work mixed with path migration. +- Confirmed runtime dependency on `dev/` is prohibited. +- Confirmed browser-owned authoritative product data is prohibited. +- Confirmed `BACKLOG_MASTER.md` contains the planned Owner backlog item. +- Confirmed Project Instructions version is updated to `2026.06.28.004`. +- Confirmed no package command changes. + diff --git a/dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_report.md b/dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_report.md new file mode 100644 index 000000000..b975f2e9f --- /dev/null +++ b/dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_report.md @@ -0,0 +1,53 @@ +# PR_26180_OWNER_004 Repository Layout Architecture Plan Report + +## Executive Summary + +PASS: Added a documentation/governance-only architecture plan for future repository layout simplification before any file moves. + +The proposed future layout is: + +- `www/` = browser-served application +- `api/` = Node/API/server application +- `dev/` = developer-only workspace + +No files were moved. No runtime, UI, API implementation, database implementation, or `package.json` command changes were made. + +## Changes + +- Added `dev/build/ProjectInstructions/repository/repository_layout_architecture_plan.md`. +- Updated `PROJECT_INSTRUCTIONS.md` to reference the new proposed layout plan. +- Bumped Project Instructions version to `2026.06.28.004`. +- Updated `BACKLOG_MASTER.md` with Owner planned work: + - Team: Owner + - Product Area: Repository Architecture Simplification + - Status: Planned + - Percent Complete: 0% + - Next Milestone: Architecture plan + +## Architecture Plan Coverage + +| Required Topic | Result | +|---|---| +| Proposed `www/`, `api/`, `dev/` layout | PASS | +| Deployment model | PASS | +| Browser/API/database flow | PASS | +| Developer local-runtime flow | PASS | +| Migration strategy | PASS | +| Stacked PR sequence | PASS | +| No feature work mixed into migration | PASS | +| Runtime must never depend on `dev/` | PASS | +| Browser must never own authoritative product data | PASS | + +## Scope Validation + +Changed files are limited to Project Instructions, backlog governance, and reports. + +Implementation files, runtime code, UI files, API implementation files, database implementation files, and package commands were not changed. + +## Artifact + +Repo-structured outcome ZIP: + +```text +dev/workspace/zips/PR_26180_OWNER_004-repository-layout-architecture-plan_delta.zip +``` diff --git a/dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_requirement-checklist.md b/dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_requirement-checklist.md new file mode 100644 index 000000000..0b7bdf07a --- /dev/null +++ b/dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_requirement-checklist.md @@ -0,0 +1,19 @@ +# PR_26180_OWNER_004 Requirement Checklist + +| Requirement | Result | Notes | +|---|---|---| +| Document proposed future layout `www/`, `api/`, `dev/` | PASS | Added to repository layout architecture plan. | +| Include deployment model | PASS | `www/` and `api/` deployable surfaces documented; `dev/` non-runtime. | +| Include browser/API/database flow | PASS | Browser -> API -> Postgres/R2 documented. | +| Include developer local-runtime flow | PASS | Developer command -> dev bootstrap -> local www/API flow documented. | +| Include migration strategy | PASS | Strategy and constraints documented. | +| Include stacked PR sequence | PASS | Eight-step proposed sequence documented. | +| Hard rule: no feature work mixed into migration | PASS | Documented. | +| Hard rule: runtime must never depend on `dev/` | PASS | Documented. | +| Hard rule: browser must never own authoritative product data | PASS | Documented. | +| Update `BACKLOG_MASTER.md` Owner planned item | PASS | Added Team/Product Area/Status/Percent/Next Milestone entry. | +| Increment Project Instructions version if ProjectInstructions changed | PASS | Version bumped to `2026.06.28.004`. | +| Do not move files | PASS | No file moves performed. | +| Do not modify runtime code | PASS | No runtime files changed. | +| Do not change `package.json` commands | PASS | `package.json` unchanged. | + diff --git a/dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_validation-report.md b/dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_validation-report.md new file mode 100644 index 000000000..30520dac8 --- /dev/null +++ b/dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_validation-report.md @@ -0,0 +1,23 @@ +# PR_26180_OWNER_004 Validation Report + +## Validation Commands + +| Command | Result | +|---|---| +| `git diff --check` | PASS | +| `npm run validate:canonical-structure` | PASS | + +## Canonical Structure Output + +```text +Canonical repository structure guardrail: PASS +Blocking violations: 0 +Approved legacy exceptions: 501 +``` + +## Scope Validation + +No runtime, UI, API implementation, database implementation, or package command files changed. + +Playwright was not run because this is documentation/governance-only and no runtime/UI files changed. + diff --git a/dev/reports/codex_changed_files.txt b/dev/reports/codex_changed_files.txt index dae75d365..b0fd56241 100644 --- a/dev/reports/codex_changed_files.txt +++ b/dev/reports/codex_changed_files.txt @@ -1,23 +1,25 @@ -dev/reports/PR_26179_CHARLIE_022-sprites-tool-shell.md -dev/reports/PR_26179_CHARLIE_023-sprites-toolbar-placeholders.md -dev/reports/PR_26179_CHARLIE_024-sprites-canvas-grid.md -dev/reports/PR_26179_CHARLIE_025-sprites-basic-drawing.md -dev/reports/PR_26179_CHARLIE_026-sprites-palette-panel.md -dev/reports/PR_26179_CHARLIE_027-sprites-preview-export.md -dev/reports/PR_26179_CHARLIE_028-sprites-editor-polish.md -dev/reports/PR_26179_CHARLIE_029-sprites-clear-reset-controls.md -dev/reports/PR_26179_CHARLIE_030-sprites-undo-redo.md -dev/reports/PR_26179_CHARLIE_031-sprites-picker-zoom.md -dev/reports/PR_26179_CHARLIE_032-sprites-shape-tools.md -dev/reports/PR_26179_CHARLIE_033-sprites-canvas-preview-sync.md -dev/reports/PR_26179_CHARLIE_034-sprites-frame-strip.md -dev/reports/PR_26179_CHARLIE_035-sprites-frame-editing.md -dev/reports/PR_26179_CHARLIE_036-sprites-animation-preview.md -dev/reports/PR_26179_CHARLIE_037-sprites-animation-export.md -dev/reports/PR_26179_CHARLIE_038-sprites-grid-dimension-fix.md -dev/reports/PR_26179_CHARLIE_039-sprites-color-and-zoom-fix.md -dev/reports/PR_26179_CHARLIE_040-dev-artifact-location-cleanup.md -dev/reports/codex_changed_files.txt -dev/reports/codex_review.diff -docs_build/dev/reports/codex_changed_files.txt -docs_build/dev/reports/codex_review.diff +# git diff --name-status merge-base(origin/main, HEAD)..working-tree +M dev/build/ProjectInstructions/PROJECT_INSTRUCTIONS.md +M dev/build/ProjectInstructions/PROJECT_INSTRUCTIONS_VERSION.md +M dev/build/ProjectInstructions/backlog/BACKLOG_MASTER.md +M dev/reports/codex_changed_files.txt +M dev/reports/codex_review.diff + +# git ls-files --others --exclude-standard +dev/build/ProjectInstructions/repository/repository_layout_architecture_plan.md +dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_branch-validation.md +dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_manual-validation-notes.md +dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_report.md +dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_requirement-checklist.md +dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_validation-report.md + +# git diff --stat merge-base(origin/main, HEAD)..working-tree +.../ProjectInstructions/PROJECT_INSTRUCTIONS.md | 3 +- + .../PROJECT_INSTRUCTIONS_VERSION.md | 3 +- + .../ProjectInstructions/backlog/BACKLOG_MASTER.md | 12 + + dev/reports/codex_changed_files.txt | 46 +- + dev/reports/codex_review.diff | 1085 +++++++------------- + 5 files changed, 430 insertions(+), 719 deletions(-) + +# merge-base +b3a2b30f51a1050596bbad2d7db211e1cba45b66 diff --git a/dev/reports/codex_review.diff b/dev/reports/codex_review.diff index 652f9f16a..086dfdf10 100644 --- a/dev/reports/codex_review.diff +++ b/dev/reports/codex_review.diff @@ -1,724 +1,421 @@ -diff --git a/docs_build/dev/reports/PR_26179_CHARLIE_022-sprites-tool-shell.md b/dev/reports/PR_26179_CHARLIE_022-sprites-tool-shell.md -similarity index 96% -rename from docs_build/dev/reports/PR_26179_CHARLIE_022-sprites-tool-shell.md -rename to dev/reports/PR_26179_CHARLIE_022-sprites-tool-shell.md -index 7833d2346..eb72dc560 100644 ---- a/docs_build/dev/reports/PR_26179_CHARLIE_022-sprites-tool-shell.md -+++ b/dev/reports/PR_26179_CHARLIE_022-sprites-tool-shell.md -@@ -16,9 +16,9 @@ The current repository did not contain `docs_build/tool-planning/sprites/`, and - - toolbox/sprites/index.html - - src/shared/toolbox/tool-metadata-inventory.js - - dev/tests/playwright/tools/SpritesToolShell.spec.mjs --- docs_build/dev/reports/PR_26179_CHARLIE_022-sprites-tool-shell.md --- docs_build/dev/reports/codex_changed_files.txt --- docs_build/dev/reports/codex_review.diff -+- dev/reports/PR_26179_CHARLIE_022-sprites-tool-shell.md -+- dev/reports/codex_changed_files.txt -+- dev/reports/codex_review.diff - - ## Branch Validation - -diff --git a/docs_build/dev/reports/PR_26179_CHARLIE_023-sprites-toolbar-placeholders.md b/dev/reports/PR_26179_CHARLIE_023-sprites-toolbar-placeholders.md -similarity index 93% -rename from docs_build/dev/reports/PR_26179_CHARLIE_023-sprites-toolbar-placeholders.md -rename to dev/reports/PR_26179_CHARLIE_023-sprites-toolbar-placeholders.md -index b5925c595..104eb3756 100644 ---- a/docs_build/dev/reports/PR_26179_CHARLIE_023-sprites-toolbar-placeholders.md -+++ b/dev/reports/PR_26179_CHARLIE_023-sprites-toolbar-placeholders.md -@@ -3,7 +3,7 @@ - Team: CHARLIE - Workflow: stacked feature workflow - Base branch: PR_26179_CHARLIE_022-sprites-tool-shell --Canonical ZIP path: dev/workspace/zip/PR_26179_CHARLIE_023-sprites-toolbar-placeholders_delta.zip -+Canonical ZIP path: dev/workspace/zips/PR_26179_CHARLIE_023-sprites-toolbar-placeholders_delta.zip - - ## Summary - -@@ -65,4 +65,4 @@ Results: - - ## ZIP Path - --`dev/workspace/zip/PR_26179_CHARLIE_023-sprites-toolbar-placeholders_delta.zip` -+`dev/workspace/zips/PR_26179_CHARLIE_023-sprites-toolbar-placeholders_delta.zip` -diff --git a/docs_build/dev/reports/PR_26179_CHARLIE_024-sprites-canvas-grid.md b/dev/reports/PR_26179_CHARLIE_024-sprites-canvas-grid.md -similarity index 93% -rename from docs_build/dev/reports/PR_26179_CHARLIE_024-sprites-canvas-grid.md -rename to dev/reports/PR_26179_CHARLIE_024-sprites-canvas-grid.md -index 4d7d89ce7..1ed7fbee0 100644 ---- a/docs_build/dev/reports/PR_26179_CHARLIE_024-sprites-canvas-grid.md -+++ b/dev/reports/PR_26179_CHARLIE_024-sprites-canvas-grid.md -@@ -3,7 +3,7 @@ - Team: CHARLIE - Workflow: stacked feature workflow - Base branch: PR_26179_CHARLIE_023-sprites-toolbar-placeholders --Canonical ZIP path: dev/workspace/zip/PR_26179_CHARLIE_024-sprites-canvas-grid_delta.zip -+Canonical ZIP path: dev/workspace/zips/PR_26179_CHARLIE_024-sprites-canvas-grid_delta.zip - - ## Summary - -@@ -59,4 +59,4 @@ Results: - - ## ZIP Path - --`dev/workspace/zip/PR_26179_CHARLIE_024-sprites-canvas-grid_delta.zip` -+`dev/workspace/zips/PR_26179_CHARLIE_024-sprites-canvas-grid_delta.zip` -diff --git a/docs_build/dev/reports/PR_26179_CHARLIE_025-sprites-basic-drawing.md b/dev/reports/PR_26179_CHARLIE_025-sprites-basic-drawing.md -similarity index 93% -rename from docs_build/dev/reports/PR_26179_CHARLIE_025-sprites-basic-drawing.md -rename to dev/reports/PR_26179_CHARLIE_025-sprites-basic-drawing.md -index 7f4879aa8..f8ab15d03 100644 ---- a/docs_build/dev/reports/PR_26179_CHARLIE_025-sprites-basic-drawing.md -+++ b/dev/reports/PR_26179_CHARLIE_025-sprites-basic-drawing.md -@@ -3,7 +3,7 @@ - Team: CHARLIE - Workflow: stacked feature workflow - Base branch: PR_26179_CHARLIE_024-sprites-canvas-grid --Canonical ZIP path: dev/workspace/zip/PR_26179_CHARLIE_025-sprites-basic-drawing_delta.zip -+Canonical ZIP path: dev/workspace/zips/PR_26179_CHARLIE_025-sprites-basic-drawing_delta.zip - - ## Summary - -@@ -61,4 +61,4 @@ Results: - - ## ZIP Path - --`dev/workspace/zip/PR_26179_CHARLIE_025-sprites-basic-drawing_delta.zip` -+`dev/workspace/zips/PR_26179_CHARLIE_025-sprites-basic-drawing_delta.zip` -diff --git a/docs_build/dev/reports/PR_26179_CHARLIE_026-sprites-palette-panel.md b/dev/reports/PR_26179_CHARLIE_026-sprites-palette-panel.md -similarity index 93% -rename from docs_build/dev/reports/PR_26179_CHARLIE_026-sprites-palette-panel.md -rename to dev/reports/PR_26179_CHARLIE_026-sprites-palette-panel.md -index 8a4036c83..151753b3b 100644 ---- a/docs_build/dev/reports/PR_26179_CHARLIE_026-sprites-palette-panel.md -+++ b/dev/reports/PR_26179_CHARLIE_026-sprites-palette-panel.md -@@ -3,7 +3,7 @@ - Team: CHARLIE - Workflow: stacked feature workflow - Base branch: PR_26179_CHARLIE_025-sprites-basic-drawing --Canonical ZIP path: dev/workspace/zip/PR_26179_CHARLIE_026-sprites-palette-panel_delta.zip -+Canonical ZIP path: dev/workspace/zips/PR_26179_CHARLIE_026-sprites-palette-panel_delta.zip - - ## Summary - -@@ -58,4 +58,4 @@ Results: - - ## ZIP Path - --`dev/workspace/zip/PR_26179_CHARLIE_026-sprites-palette-panel_delta.zip` -+`dev/workspace/zips/PR_26179_CHARLIE_026-sprites-palette-panel_delta.zip` -diff --git a/docs_build/dev/reports/PR_26179_CHARLIE_027-sprites-preview-export.md b/dev/reports/PR_26179_CHARLIE_027-sprites-preview-export.md -similarity index 93% -rename from docs_build/dev/reports/PR_26179_CHARLIE_027-sprites-preview-export.md -rename to dev/reports/PR_26179_CHARLIE_027-sprites-preview-export.md -index f1a8fa62f..cb6b6ffcf 100644 ---- a/docs_build/dev/reports/PR_26179_CHARLIE_027-sprites-preview-export.md -+++ b/dev/reports/PR_26179_CHARLIE_027-sprites-preview-export.md -@@ -3,7 +3,7 @@ - Team: CHARLIE - Workflow: stacked feature workflow - Base branch: PR_26179_CHARLIE_026-sprites-palette-panel --Canonical ZIP path: dev/workspace/zip/PR_26179_CHARLIE_027-sprites-preview-export_delta.zip -+Canonical ZIP path: dev/workspace/zips/PR_26179_CHARLIE_027-sprites-preview-export_delta.zip - - ## Summary - -@@ -59,4 +59,4 @@ Results: - - ## ZIP Path - --`dev/workspace/zip/PR_26179_CHARLIE_027-sprites-preview-export_delta.zip` -+`dev/workspace/zips/PR_26179_CHARLIE_027-sprites-preview-export_delta.zip` -diff --git a/docs_build/dev/reports/PR_26179_CHARLIE_028-sprites-editor-polish.md b/dev/reports/PR_26179_CHARLIE_028-sprites-editor-polish.md -similarity index 93% -rename from docs_build/dev/reports/PR_26179_CHARLIE_028-sprites-editor-polish.md -rename to dev/reports/PR_26179_CHARLIE_028-sprites-editor-polish.md -index 43a4c0b56..d5f2395cc 100644 ---- a/docs_build/dev/reports/PR_26179_CHARLIE_028-sprites-editor-polish.md -+++ b/dev/reports/PR_26179_CHARLIE_028-sprites-editor-polish.md -@@ -3,7 +3,7 @@ - Team: CHARLIE - Workflow: stacked feature workflow - Base branch: PR_26179_CHARLIE_027-sprites-preview-export --Canonical ZIP path for this batch: dev/workspace/zip/PR_26179_CHARLIE_028-sprites-editor-polish_delta.zip -+Canonical ZIP path for this batch: dev/workspace/zips/PR_26179_CHARLIE_028-sprites-editor-polish_delta.zip - - ## Summary - -@@ -69,4 +69,4 @@ PR_26179_CHARLIE_029-sprites-clear-reset-controls - - ## ZIP Path - --`dev/workspace/zip/PR_26179_CHARLIE_028-sprites-editor-polish_delta.zip` -+`dev/workspace/zips/PR_26179_CHARLIE_028-sprites-editor-polish_delta.zip` -diff --git a/docs_build/dev/reports/PR_26179_CHARLIE_029-sprites-clear-reset-controls.md b/dev/reports/PR_26179_CHARLIE_029-sprites-clear-reset-controls.md -similarity index 92% -rename from docs_build/dev/reports/PR_26179_CHARLIE_029-sprites-clear-reset-controls.md -rename to dev/reports/PR_26179_CHARLIE_029-sprites-clear-reset-controls.md -index 3f62e1528..14e923da9 100644 ---- a/docs_build/dev/reports/PR_26179_CHARLIE_029-sprites-clear-reset-controls.md -+++ b/dev/reports/PR_26179_CHARLIE_029-sprites-clear-reset-controls.md -@@ -3,7 +3,7 @@ - Team: CHARLIE - Workflow: stacked feature workflow - Base branch: PR_26179_CHARLIE_028-sprites-editor-polish --Canonical ZIP path for this batch: dev/workspace/zip/PR_26179_CHARLIE_029-sprites-clear-reset-controls_delta.zip -+Canonical ZIP path for this batch: dev/workspace/zips/PR_26179_CHARLIE_029-sprites-clear-reset-controls_delta.zip - - ## Summary - -@@ -68,4 +68,4 @@ PR_26179_CHARLIE_030-sprites-undo-redo - - ## ZIP Path - --`dev/workspace/zip/PR_26179_CHARLIE_029-sprites-clear-reset-controls_delta.zip` -+`dev/workspace/zips/PR_26179_CHARLIE_029-sprites-clear-reset-controls_delta.zip` -diff --git a/docs_build/dev/reports/PR_26179_CHARLIE_030-sprites-undo-redo.md b/dev/reports/PR_26179_CHARLIE_030-sprites-undo-redo.md -similarity index 97% -rename from docs_build/dev/reports/PR_26179_CHARLIE_030-sprites-undo-redo.md -rename to dev/reports/PR_26179_CHARLIE_030-sprites-undo-redo.md -index 62593187a..0866af13f 100644 ---- a/docs_build/dev/reports/PR_26179_CHARLIE_030-sprites-undo-redo.md -+++ b/dev/reports/PR_26179_CHARLIE_030-sprites-undo-redo.md -@@ -70,4 +70,4 @@ PASS - `npx playwright test dev/tests/playwright/tools/SpritesToolShell.spec.mjs - - ## ZIP - --`dev/workspace/zip/PR_26179_CHARLIE_030-sprites-undo-redo_delta.zip` -+`dev/workspace/zips/PR_26179_CHARLIE_030-sprites-undo-redo_delta.zip` -diff --git a/docs_build/dev/reports/PR_26179_CHARLIE_031-sprites-picker-zoom.md b/dev/reports/PR_26179_CHARLIE_031-sprites-picker-zoom.md -similarity index 97% -rename from docs_build/dev/reports/PR_26179_CHARLIE_031-sprites-picker-zoom.md -rename to dev/reports/PR_26179_CHARLIE_031-sprites-picker-zoom.md -index 4e61c7b6d..e02135a02 100644 ---- a/docs_build/dev/reports/PR_26179_CHARLIE_031-sprites-picker-zoom.md -+++ b/dev/reports/PR_26179_CHARLIE_031-sprites-picker-zoom.md -@@ -66,4 +66,4 @@ PASS - `npx playwright test dev/tests/playwright/tools/SpritesToolShell.spec.mjs - - ## ZIP - --`dev/workspace/zip/PR_26179_CHARLIE_031-sprites-picker-zoom_delta.zip` -+`dev/workspace/zips/PR_26179_CHARLIE_031-sprites-picker-zoom_delta.zip` -diff --git a/docs_build/dev/reports/PR_26179_CHARLIE_032-sprites-shape-tools.md b/dev/reports/PR_26179_CHARLIE_032-sprites-shape-tools.md -similarity index 97% -rename from docs_build/dev/reports/PR_26179_CHARLIE_032-sprites-shape-tools.md -rename to dev/reports/PR_26179_CHARLIE_032-sprites-shape-tools.md -index 200ac1ce8..58eb45a9f 100644 ---- a/docs_build/dev/reports/PR_26179_CHARLIE_032-sprites-shape-tools.md -+++ b/dev/reports/PR_26179_CHARLIE_032-sprites-shape-tools.md -@@ -68,4 +68,4 @@ PASS - `npx playwright test dev/tests/playwright/tools/SpritesToolShell.spec.mjs - - ## ZIP - --`dev/workspace/zip/PR_26179_CHARLIE_032-sprites-shape-tools_delta.zip` -+`dev/workspace/zips/PR_26179_CHARLIE_032-sprites-shape-tools_delta.zip` -diff --git a/docs_build/dev/reports/PR_26179_CHARLIE_033-sprites-canvas-preview-sync.md b/dev/reports/PR_26179_CHARLIE_033-sprites-canvas-preview-sync.md -similarity index 97% -rename from docs_build/dev/reports/PR_26179_CHARLIE_033-sprites-canvas-preview-sync.md -rename to dev/reports/PR_26179_CHARLIE_033-sprites-canvas-preview-sync.md -index 4426f9ea2..be0376bac 100644 ---- a/docs_build/dev/reports/PR_26179_CHARLIE_033-sprites-canvas-preview-sync.md -+++ b/dev/reports/PR_26179_CHARLIE_033-sprites-canvas-preview-sync.md -@@ -72,4 +72,4 @@ PASS - `npx playwright test dev/tests/playwright/tools/SpritesToolShell.spec.mjs - - ## ZIP - --`dev/workspace/zip/PR_26179_CHARLIE_033-sprites-canvas-preview-sync_delta.zip` -+`dev/workspace/zips/PR_26179_CHARLIE_033-sprites-canvas-preview-sync_delta.zip` -diff --git a/docs_build/dev/reports/PR_26179_CHARLIE_034-sprites-frame-strip.md b/dev/reports/PR_26179_CHARLIE_034-sprites-frame-strip.md -similarity index 96% -rename from docs_build/dev/reports/PR_26179_CHARLIE_034-sprites-frame-strip.md -rename to dev/reports/PR_26179_CHARLIE_034-sprites-frame-strip.md -index ccd669c7b..9e5a84a58 100644 ---- a/docs_build/dev/reports/PR_26179_CHARLIE_034-sprites-frame-strip.md -+++ b/dev/reports/PR_26179_CHARLIE_034-sprites-frame-strip.md -@@ -59,4 +59,4 @@ PASS - `npx playwright test dev/tests/playwright/tools/SpritesToolShell.spec.mjs - - ## ZIP - --`dev/workspace/zip/PR_26179_CHARLIE_034-sprites-frame-strip_delta.zip` -+`dev/workspace/zips/PR_26179_CHARLIE_034-sprites-frame-strip_delta.zip` -diff --git a/docs_build/dev/reports/PR_26179_CHARLIE_035-sprites-frame-editing.md b/dev/reports/PR_26179_CHARLIE_035-sprites-frame-editing.md -similarity index 96% -rename from docs_build/dev/reports/PR_26179_CHARLIE_035-sprites-frame-editing.md -rename to dev/reports/PR_26179_CHARLIE_035-sprites-frame-editing.md -index 54189a866..d9cf32ddf 100644 ---- a/docs_build/dev/reports/PR_26179_CHARLIE_035-sprites-frame-editing.md -+++ b/dev/reports/PR_26179_CHARLIE_035-sprites-frame-editing.md -@@ -64,4 +64,4 @@ PASS - `npx playwright test dev/tests/playwright/tools/SpritesToolShell.spec.mjs - - ## ZIP - --`dev/workspace/zip/PR_26179_CHARLIE_035-sprites-frame-editing_delta.zip` -+`dev/workspace/zips/PR_26179_CHARLIE_035-sprites-frame-editing_delta.zip` -diff --git a/docs_build/dev/reports/PR_26179_CHARLIE_036-sprites-animation-preview.md b/dev/reports/PR_26179_CHARLIE_036-sprites-animation-preview.md -similarity index 96% -rename from docs_build/dev/reports/PR_26179_CHARLIE_036-sprites-animation-preview.md -rename to dev/reports/PR_26179_CHARLIE_036-sprites-animation-preview.md -index 772128525..b0caa16b6 100644 ---- a/docs_build/dev/reports/PR_26179_CHARLIE_036-sprites-animation-preview.md -+++ b/dev/reports/PR_26179_CHARLIE_036-sprites-animation-preview.md -@@ -60,4 +60,4 @@ PASS - `npx playwright test dev/tests/playwright/tools/SpritesToolShell.spec.mjs - - ## ZIP - --`dev/workspace/zip/PR_26179_CHARLIE_036-sprites-animation-preview_delta.zip` -+`dev/workspace/zips/PR_26179_CHARLIE_036-sprites-animation-preview_delta.zip` -diff --git a/docs_build/dev/reports/PR_26179_CHARLIE_037-sprites-animation-export.md b/dev/reports/PR_26179_CHARLIE_037-sprites-animation-export.md -similarity index 96% -rename from docs_build/dev/reports/PR_26179_CHARLIE_037-sprites-animation-export.md -rename to dev/reports/PR_26179_CHARLIE_037-sprites-animation-export.md -index 1f32a2978..c4c9c8869 100644 ---- a/docs_build/dev/reports/PR_26179_CHARLIE_037-sprites-animation-export.md -+++ b/dev/reports/PR_26179_CHARLIE_037-sprites-animation-export.md -@@ -61,4 +61,4 @@ PASS - `npx playwright test dev/tests/playwright/tools/SpritesToolShell.spec.mjs - - ## ZIP - --`dev/workspace/zip/PR_26179_CHARLIE_037-sprites-animation-export_delta.zip` -+`dev/workspace/zips/PR_26179_CHARLIE_037-sprites-animation-export_delta.zip` -diff --git a/docs_build/dev/reports/PR_26179_CHARLIE_038-sprites-grid-dimension-fix.md b/dev/reports/PR_26179_CHARLIE_038-sprites-grid-dimension-fix.md -similarity index 96% -rename from docs_build/dev/reports/PR_26179_CHARLIE_038-sprites-grid-dimension-fix.md -rename to dev/reports/PR_26179_CHARLIE_038-sprites-grid-dimension-fix.md -index 4d8010eb4..1a238d1b9 100644 ---- a/docs_build/dev/reports/PR_26179_CHARLIE_038-sprites-grid-dimension-fix.md -+++ b/dev/reports/PR_26179_CHARLIE_038-sprites-grid-dimension-fix.md -@@ -63,4 +63,4 @@ PASS - `npx playwright test dev/tests/playwright/tools/SpritesToolShell.spec.mjs - - ## ZIP - --`dev/workspace/zip/PR_26179_CHARLIE_038-sprites-grid-dimension-fix_delta.zip` -+`dev/workspace/zips/PR_26179_CHARLIE_038-sprites-grid-dimension-fix_delta.zip` -diff --git a/docs_build/dev/reports/PR_26179_CHARLIE_039-sprites-color-and-zoom-fix.md b/dev/reports/PR_26179_CHARLIE_039-sprites-color-and-zoom-fix.md -similarity index 97% -rename from docs_build/dev/reports/PR_26179_CHARLIE_039-sprites-color-and-zoom-fix.md -rename to dev/reports/PR_26179_CHARLIE_039-sprites-color-and-zoom-fix.md -index aa665b793..b3d6e5549 100644 ---- a/docs_build/dev/reports/PR_26179_CHARLIE_039-sprites-color-and-zoom-fix.md -+++ b/dev/reports/PR_26179_CHARLIE_039-sprites-color-and-zoom-fix.md -@@ -75,4 +75,4 @@ PASS - `npx playwright test dev/tests/playwright/tools/SpritesToolShell.spec.mjs - - ## ZIP +diff --git a/dev/build/ProjectInstructions/PROJECT_INSTRUCTIONS.md b/dev/build/ProjectInstructions/PROJECT_INSTRUCTIONS.md +index 8ca721dc7..aeda69a61 100644 +--- a/dev/build/ProjectInstructions/PROJECT_INSTRUCTIONS.md ++++ b/dev/build/ProjectInstructions/PROJECT_INSTRUCTIONS.md +@@ -117,7 +117,7 @@ Rules: + + ## Current Version/Date + +-- Project Instructions Version: 2026.06.28.003 ++- Project Instructions Version: 2026.06.28.004 + - Date: 2026-06-28 + - Owner: OWNER + +@@ -195,6 +195,7 @@ That file owns Start of Day, PLAN_PR, BUILD_PR, APPLY_PR, and invalid command be + - Project branching policy: `dev/build/ProjectInstructions/PROJECT_BRANCHING_POLICY.md` + - Project state: `dev/build/ProjectInstructions/PROJECT_STATE.md` + - Repository folder placement SSoT: `dev/build/ProjectInstructions/repository/canonical_repository_structure.md` ++- Proposed repository layout architecture plan: `dev/build/ProjectInstructions/repository/repository_layout_architecture_plan.md` + - Codex workflow commands: `dev/build/ProjectInstructions/standards/CODEX_WORKFLOW_COMMANDS.md` + - Codex Start-of-Day bootstrap: `dev/build/ProjectInstructions/bootstrap/codex_start_of_day_bootstrap.md` + - Branch lifecycle: `dev/build/ProjectInstructions/addendums/project_instructions_single_source_eod_lock.md` +diff --git a/dev/build/ProjectInstructions/PROJECT_INSTRUCTIONS_VERSION.md b/dev/build/ProjectInstructions/PROJECT_INSTRUCTIONS_VERSION.md +index 56ae2b21e..d489f2af4 100644 +--- a/dev/build/ProjectInstructions/PROJECT_INSTRUCTIONS_VERSION.md ++++ b/dev/build/ProjectInstructions/PROJECT_INSTRUCTIONS_VERSION.md +@@ -1,6 +1,6 @@ + # Project Instructions Version + +-Current Project Instructions Version: 2026.06.28.003 ++Current Project Instructions Version: 2026.06.28.004 + + Last Updated: 2026-06-28 + +@@ -11,6 +11,7 @@ Last Updated: 2026-06-28 + - Added dedicated branching policy document. + - Startup validation now verifies the branching policy document was loaded instead of duplicating policy text. + - Added backlog startup assignment policy requiring `BACKLOG_MASTER.md` and Tool Votes/Admin Owner priority signal review during team startup. ++- Added proposed repository layout architecture plan for future `www/`, `api/`, and `dev/` separation. + - Codex must read this version file and the latest repository copy of `PROJECT_INSTRUCTIONS.md` before performing work. + - Codex must discard previously remembered Project Instructions and treat the repository copy as authoritative. + - Codex must validate canonical report and ZIP paths, branching model, and legacy path avoidance before work proceeds. +diff --git a/dev/build/ProjectInstructions/backlog/BACKLOG_MASTER.md b/dev/build/ProjectInstructions/backlog/BACKLOG_MASTER.md +index 3c47c2a1b..ee8160a46 100644 +--- a/dev/build/ProjectInstructions/backlog/BACKLOG_MASTER.md ++++ b/dev/build/ProjectInstructions/backlog/BACKLOG_MASTER.md +@@ -32,6 +32,18 @@ Completion percentages are updated at SOD, after every accepted PR, and at EOD. + + The backlog is the authoritative source for determining the next logical PRs. + ++## Owner Assignments ++ ++### Repository Architecture Simplification ++ ++- Team: Owner ++- Product Area: Repository Architecture Simplification ++- Status: Planned ++- Percent Complete: 0% ++- Active PR: PR_26180_OWNER_004-repository-layout-architecture-plan ++- Next Milestone: Architecture plan ++- Source / Reference: `dev/build/ProjectInstructions/repository/repository_layout_architecture_plan.md` ++ + ## Game Journey MVP --`dev/workspace/zip/PR_26179_CHARLIE_039-sprites-color-and-zoom-fix_delta.zip` -+`dev/workspace/zips/PR_26179_CHARLIE_039-sprites-color-and-zoom-fix_delta.zip` -diff --git a/dev/reports/PR_26179_CHARLIE_040-dev-artifact-location-cleanup.md b/dev/reports/PR_26179_CHARLIE_040-dev-artifact-location-cleanup.md + ### Idea +diff --git a/dev/reports/codex_changed_files.txt b/dev/reports/codex_changed_files.txt +index dae75d365..de565a339 100644 +--- a/dev/reports/codex_changed_files.txt ++++ b/dev/reports/codex_changed_files.txt +@@ -1,23 +1,23 @@ +-dev/reports/PR_26179_CHARLIE_022-sprites-tool-shell.md +-dev/reports/PR_26179_CHARLIE_023-sprites-toolbar-placeholders.md +-dev/reports/PR_26179_CHARLIE_024-sprites-canvas-grid.md +-dev/reports/PR_26179_CHARLIE_025-sprites-basic-drawing.md +-dev/reports/PR_26179_CHARLIE_026-sprites-palette-panel.md +-dev/reports/PR_26179_CHARLIE_027-sprites-preview-export.md +-dev/reports/PR_26179_CHARLIE_028-sprites-editor-polish.md +-dev/reports/PR_26179_CHARLIE_029-sprites-clear-reset-controls.md +-dev/reports/PR_26179_CHARLIE_030-sprites-undo-redo.md +-dev/reports/PR_26179_CHARLIE_031-sprites-picker-zoom.md +-dev/reports/PR_26179_CHARLIE_032-sprites-shape-tools.md +-dev/reports/PR_26179_CHARLIE_033-sprites-canvas-preview-sync.md +-dev/reports/PR_26179_CHARLIE_034-sprites-frame-strip.md +-dev/reports/PR_26179_CHARLIE_035-sprites-frame-editing.md +-dev/reports/PR_26179_CHARLIE_036-sprites-animation-preview.md +-dev/reports/PR_26179_CHARLIE_037-sprites-animation-export.md +-dev/reports/PR_26179_CHARLIE_038-sprites-grid-dimension-fix.md +-dev/reports/PR_26179_CHARLIE_039-sprites-color-and-zoom-fix.md +-dev/reports/PR_26179_CHARLIE_040-dev-artifact-location-cleanup.md +-dev/reports/codex_changed_files.txt +-dev/reports/codex_review.diff +-docs_build/dev/reports/codex_changed_files.txt +-docs_build/dev/reports/codex_review.diff ++# git diff --name-status merge-base(origin/main, HEAD)..working-tree ++M dev/build/ProjectInstructions/PROJECT_INSTRUCTIONS.md ++M dev/build/ProjectInstructions/PROJECT_INSTRUCTIONS_VERSION.md ++M dev/build/ProjectInstructions/backlog/BACKLOG_MASTER.md ++M dev/reports/codex_review.diff ++ ++# git ls-files --others --exclude-standard ++dev/build/ProjectInstructions/repository/repository_layout_architecture_plan.md ++dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_branch-validation.md ++dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_manual-validation-notes.md ++dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_report.md ++dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_requirement-checklist.md ++dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_validation-report.md ++ ++# git diff --stat merge-base(origin/main, HEAD)..working-tree ++.../ProjectInstructions/PROJECT_INSTRUCTIONS.md | 3 +- ++ .../PROJECT_INSTRUCTIONS_VERSION.md | 3 +- ++ .../ProjectInstructions/backlog/BACKLOG_MASTER.md | 12 + ++ dev/reports/codex_review.diff | 1043 +++++++------------- ++ 4 files changed, 357 insertions(+), 704 deletions(-) ++ ++# merge-base ++b3a2b30f51a1050596bbad2d7db211e1cba45b66 +diff --git a/dev/build/ProjectInstructions/repository/repository_layout_architecture_plan.md b/dev/build/ProjectInstructions/repository/repository_layout_architecture_plan.md new file mode 100644 -index 000000000..93c65a43d +index 000000000..f2ec47fee --- /dev/null -+++ b/dev/reports/PR_26179_CHARLIE_040-dev-artifact-location-cleanup.md -@@ -0,0 +1,103 @@ -+# PR_26179_CHARLIE_040-dev-artifact-location-cleanup ++++ b/dev/build/ProjectInstructions/repository/repository_layout_architecture_plan.md +@@ -0,0 +1,151 @@ ++# Repository Layout Architecture Plan ++ ++Status: Proposed ++Owner: Owner ++Scope: Documentation/governance only ++ ++## Purpose ++ ++Document the proposed repository architecture simplification before any file moves occur. ++ ++This plan does not authorize moving files, changing runtime behavior, changing package commands, or mixing feature work into layout migration PRs. ++ ++## Proposed Future Layout ++ ++```text ++www/ ++api/ ++dev/ ++``` + -+Team: CHARLIE ++### www/ + -+Base branch: PR_26179_CHARLIE_039-sprites-color-and-zoom-fix ++`www/` is the browser-served application. + -+Branch: PR_26179_CHARLIE_040-dev-artifact-location-cleanup ++It will own deployable browser pages, browser assets, and static application entry points currently spread across root product folders, `assets/`, `docs/`, `games/`, `toolbox/`, and browser-facing runtime surfaces. + -+## Scope ++`www/` must not own authoritative product data. + -+Development artifact location cleanup only. No runtime behavior, Sprite Editor functionality, DB/API/schema, or start_of_day files were changed. ++### api/ + -+## Project Instructions Read ++`api/` is the Node/API/server application. + -+- dev/build/ProjectInstructions/addendums/batch_governance_mode.md -+- dev/build/ProjectInstructions/repository/canonical_repository_structure.md -+- dev/build/ProjectInstructions/addendums/codex_artifact_and_reporting_standard.md -+- dev/build/ProjectInstructions/addendums/documentation_ownership.md ++It will own server entry points, API routing, API services, environment adapters, database access, storage access, server-side setup, and deployable API/runtime support code. + -+## Canonical Artifact Mapping ++`api/` owns the Browser -> API -> Postgres/R2 boundary. + -+| Legacy path | Canonical path | Action | -+| --- | --- | --- | -+| docs_build/dev/reports/PR_26179_CHARLIE_0*.md | dev/reports/PR_26179_CHARLIE_0*.md | Moved generated Charlie Sprite PR reports | -+| docs_build/dev/reports/codex_changed_files.txt | dev/reports/codex_changed_files.txt | Removed legacy tracked copy; regenerated canonical report | -+| docs_build/dev/reports/codex_review.diff | dev/reports/codex_review.diff | Removed legacy tracked copy; regenerated canonical diff | -+| dev/workspace/zip/ | dev/workspace/zips/ | Updated Charlie Sprite report references to canonical ZIP path | ++### dev/ + -+Canonical ZIP path confirmed from current Project Instructions: dev/workspace/zips/ ++`dev/` is the developer-only workspace. + -+## Files Moved ++It owns Project Instructions, governance, architecture docs, reports, tests, scripts, templates, local developer bootstrap, generated output, zips, logs, and historical archive material. + -+- docs_build/dev/reports/PR_26179_CHARLIE_022-sprites-tool-shell.md -> dev/reports/PR_26179_CHARLIE_022-sprites-tool-shell.md -+- docs_build/dev/reports/PR_26179_CHARLIE_023-sprites-toolbar-placeholders.md -> dev/reports/PR_26179_CHARLIE_023-sprites-toolbar-placeholders.md -+- docs_build/dev/reports/PR_26179_CHARLIE_024-sprites-canvas-grid.md -> dev/reports/PR_26179_CHARLIE_024-sprites-canvas-grid.md -+- docs_build/dev/reports/PR_26179_CHARLIE_025-sprites-basic-drawing.md -> dev/reports/PR_26179_CHARLIE_025-sprites-basic-drawing.md -+- docs_build/dev/reports/PR_26179_CHARLIE_026-sprites-palette-panel.md -> dev/reports/PR_26179_CHARLIE_026-sprites-palette-panel.md -+- docs_build/dev/reports/PR_26179_CHARLIE_027-sprites-preview-export.md -> dev/reports/PR_26179_CHARLIE_027-sprites-preview-export.md -+- docs_build/dev/reports/PR_26179_CHARLIE_028-sprites-editor-polish.md -> dev/reports/PR_26179_CHARLIE_028-sprites-editor-polish.md -+- docs_build/dev/reports/PR_26179_CHARLIE_029-sprites-clear-reset-controls.md -> dev/reports/PR_26179_CHARLIE_029-sprites-clear-reset-controls.md -+- docs_build/dev/reports/PR_26179_CHARLIE_030-sprites-undo-redo.md -> dev/reports/PR_26179_CHARLIE_030-sprites-undo-redo.md -+- docs_build/dev/reports/PR_26179_CHARLIE_031-sprites-picker-zoom.md -> dev/reports/PR_26179_CHARLIE_031-sprites-picker-zoom.md -+- docs_build/dev/reports/PR_26179_CHARLIE_032-sprites-shape-tools.md -> dev/reports/PR_26179_CHARLIE_032-sprites-shape-tools.md -+- docs_build/dev/reports/PR_26179_CHARLIE_033-sprites-canvas-preview-sync.md -> dev/reports/PR_26179_CHARLIE_033-sprites-canvas-preview-sync.md -+- docs_build/dev/reports/PR_26179_CHARLIE_034-sprites-frame-strip.md -> dev/reports/PR_26179_CHARLIE_034-sprites-frame-strip.md -+- docs_build/dev/reports/PR_26179_CHARLIE_035-sprites-frame-editing.md -> dev/reports/PR_26179_CHARLIE_035-sprites-frame-editing.md -+- docs_build/dev/reports/PR_26179_CHARLIE_036-sprites-animation-preview.md -> dev/reports/PR_26179_CHARLIE_036-sprites-animation-preview.md -+- docs_build/dev/reports/PR_26179_CHARLIE_037-sprites-animation-export.md -> dev/reports/PR_26179_CHARLIE_037-sprites-animation-export.md -+- docs_build/dev/reports/PR_26179_CHARLIE_038-sprites-grid-dimension-fix.md -> dev/reports/PR_26179_CHARLIE_038-sprites-grid-dimension-fix.md -+- docs_build/dev/reports/PR_26179_CHARLIE_039-sprites-color-and-zoom-fix.md -> dev/reports/PR_26179_CHARLIE_039-sprites-color-and-zoom-fix.md ++Production runtime, browser application code, and API deployment code must never depend on `dev/`. + -+## References Updated ++## Deployment Model + -+- Updated moved Charlie Sprite PR reports from docs_build/dev/reports/ to dev/reports/. -+- Updated moved Charlie Sprite PR reports from dev/workspace/zip/ to dev/workspace/zips/. -+- Left unrelated historical/report artifacts untouched, including docs_build/dev/reports/sprite-history-inventory.md. ++The proposed target deployment model has two deployable application surfaces: + -+## Files Intentionally Not Moved ++- `www/` deploys the browser-served application. ++- `api/` deploys the Node/API/server application. + -+- Product planning intended to remain in docs_build/ -+- Architecture documents intended to remain in docs_build/ -+- DDL, DML, and seed files -+- Documentation intended to remain in docs_build/ -+- Runtime, Sprite Editor, DB/API/schema, and start_of_day files ++`dev/` is not deployed as product runtime and must be excluded from runtime dependency paths. + -+## Validation Checklist ++Environment differences remain governed by `.env` values and environment-managed secrets. The same deployable browser and API code paths must be promoted through Local, DEV, IST, UAT, and PROD. ++ ++## Browser/API/Database Flow ++ ++Required product-data flow: ++ ++```text ++Browser -> API -> Postgres/R2 ++``` ++ ++Rules: ++ ++- Browser code reads and writes authoritative product data only through the API/service contract. ++- Product metadata is persisted in Postgres. ++- Product assets are persisted in Cloudflare R2. ++- Browser storage, page arrays, source JSON files, `/tmp`, and dev workspace files are not authoritative product-data sources. ++- Seed data is allowed only when it seeds the database through server/API/setup ownership. ++ ++## Developer Local-Runtime Flow ++ ++Local development may use the team-aware developer bootstrap and local runtime support, but the runtime boundary remains the same: ++ ++```text ++Developer command -> dev bootstrap -> local www server + local api server -> Postgres/R2 or approved local provider ++``` ++ ++Current local bootstrap commands remain unchanged by this plan. This PR does not modify `package.json` commands. ++ ++The local developer workflow must continue to prove the same browser/API/database contract that deployed environments use. ++ ++## Migration Strategy ++ ++Migration must happen through small, reviewable, stacked PRs after this architecture plan is accepted. ++ ++Rules: ++ ++- No file moves occur in this plan PR. ++- No feature work may be mixed into migration PRs. ++- Each migration PR moves or rewires one bounded ownership area. ++- Each migration PR must preserve the same product behavior unless the PR is explicitly a behavior change. ++- Each migration PR must update references, validation, reports, and ZIP artifacts for only its scoped move. ++- Each migration PR must include rollback notes or clear validation evidence. ++ ++## Proposed Stacked PR Sequence ++ ++1. `www/` shell and governance ++ - Create the destination shell and document browser-served ownership. ++ - Do not move product pages yet. ++ ++2. `api/` shell and governance ++ - Create the destination shell and document API/server ownership. ++ - Do not move API/runtime implementation yet. ++ ++3. Browser-served public section moves ++ - Move root browser-served product sections into `www/` in small groups. ++ - Preserve routes through compatibility redirects or server/static configuration as needed. ++ ++4. Browser asset moves ++ - Move browser assets into `www/` ownership. ++ - Preserve asset URLs or update references in the same PR. ++ ++5. API/server moves ++ - Move Node/API/server entry points and service code into `api/`. ++ - Preserve API contract shape and route behavior. ++ ++6. Runtime/shared source boundary cleanup ++ - Move deployable browser/runtime/API modules into `www/` or `api/` ownership as appropriate. ++ - Keep shared runtime dependency direction explicit. ++ ++7. Developer bootstrap and validation updates ++ - Update local developer bootstrap and validation paths after deployable surfaces are moved. ++ - Keep `dev/` developer-only. ++ ++8. Legacy path cleanup ++ - Remove or archive obsolete empty folders and compatibility shims only after validation proves they are unused. ++ ++## Hard Rules ++ ++- No feature work may be mixed into repository layout migration. ++- Runtime must never depend on `dev/`. ++- Browser code must never own authoritative product data. ++- Browser code must use Browser -> API -> Postgres/R2 for product data. ++- API/server code must not import from developer-only reports, Project Instructions, tests, or workspace artifacts. ++- Migration PRs must not change package commands unless the PR explicitly owns command migration. ++- Migration PRs must not introduce Creator-writeable repository folders. ++- Migration PRs must not hide behavior changes inside path moves. ++ ++## Validation Expectations ++ ++Every layout migration PR must at minimum run: ++ ++```text ++git diff --check ++npm run validate:canonical-structure ++``` ++ ++Additional targeted validation must match the moved surface. ++ +diff --git a/dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_branch-validation.md b/dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_branch-validation.md +new file mode 100644 +index 000000000..4c063b57e +--- /dev/null ++++ b/dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_branch-validation.md +@@ -0,0 +1,13 @@ ++# PR_26180_OWNER_004 Branch Validation ++ ++| Gate | Result | Evidence | ++|---|---|---| ++| Project Instructions loaded | PASS | Version `2026.06.28.003` loaded before work began; PR bumps to `2026.06.28.004`. | ++| Repository source | PASS | Loaded from `dev/build/ProjectInstructions/`. | ++| Cached memory discarded | PASS | Repository files used as authority. | ++| Branching policy loaded | PASS | `dev/build/ProjectInstructions/PROJECT_BRANCHING_POLICY.md`. | ++| Start branch | PASS | Started from synchronized `main`. | ++| Working branch | PASS | `PR_26180_OWNER_004-repository-layout-architecture-plan`. | ++| Worktree before edits | PASS | Clean before edits. | ++| Scope | PASS | Documentation/governance only. | ++ +diff --git a/dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_manual-validation-notes.md b/dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_manual-validation-notes.md +new file mode 100644 +index 000000000..511e09a30 +--- /dev/null ++++ b/dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_manual-validation-notes.md +@@ -0,0 +1,11 @@ ++# PR_26180_OWNER_004 Manual Validation Notes ++ ++- Confirmed the new architecture plan is proposal-only and explicitly does not authorize file moves. ++- Confirmed proposed future layout documents `www/`, `api/`, and `dev/`. ++- Confirmed migration hard rules prohibit feature work mixed with path migration. ++- Confirmed runtime dependency on `dev/` is prohibited. ++- Confirmed browser-owned authoritative product data is prohibited. ++- Confirmed `BACKLOG_MASTER.md` contains the planned Owner backlog item. ++- Confirmed Project Instructions version is updated to `2026.06.28.004`. ++- Confirmed no package command changes. ++ +diff --git a/dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_report.md b/dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_report.md +new file mode 100644 +index 000000000..b975f2e9f +--- /dev/null ++++ b/dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_report.md +@@ -0,0 +1,53 @@ ++# PR_26180_OWNER_004 Repository Layout Architecture Plan Report ++ ++## Executive Summary ++ ++PASS: Added a documentation/governance-only architecture plan for future repository layout simplification before any file moves. ++ ++The proposed future layout is: ++ ++- `www/` = browser-served application ++- `api/` = Node/API/server application ++- `dev/` = developer-only workspace ++ ++No files were moved. No runtime, UI, API implementation, database implementation, or `package.json` command changes were made. ++ ++## Changes ++ ++- Added `dev/build/ProjectInstructions/repository/repository_layout_architecture_plan.md`. ++- Updated `PROJECT_INSTRUCTIONS.md` to reference the new proposed layout plan. ++- Bumped Project Instructions version to `2026.06.28.004`. ++- Updated `BACKLOG_MASTER.md` with Owner planned work: ++ - Team: Owner ++ - Product Area: Repository Architecture Simplification ++ - Status: Planned ++ - Percent Complete: 0% ++ - Next Milestone: Architecture plan ++ ++## Architecture Plan Coverage ++ ++| Required Topic | Result | ++|---|---| ++| Proposed `www/`, `api/`, `dev/` layout | PASS | ++| Deployment model | PASS | ++| Browser/API/database flow | PASS | ++| Developer local-runtime flow | PASS | ++| Migration strategy | PASS | ++| Stacked PR sequence | PASS | ++| No feature work mixed into migration | PASS | ++| Runtime must never depend on `dev/` | PASS | ++| Browser must never own authoritative product data | PASS | ++ ++## Scope Validation ++ ++Changed files are limited to Project Instructions, backlog governance, and reports. ++ ++Implementation files, runtime code, UI files, API implementation files, database implementation files, and package commands were not changed. ++ ++## Artifact ++ ++Repo-structured outcome ZIP: ++ ++```text ++dev/workspace/zips/PR_26180_OWNER_004-repository-layout-architecture-plan_delta.zip ++``` +diff --git a/dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_requirement-checklist.md b/dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_requirement-checklist.md +new file mode 100644 +index 000000000..0b7bdf07a +--- /dev/null ++++ b/dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_requirement-checklist.md +@@ -0,0 +1,19 @@ ++# PR_26180_OWNER_004 Requirement Checklist + +| Requirement | Result | Notes | -+| --- | --- | --- | -+| Batch governance mode reviewed | PASS | Read dev/build/ProjectInstructions/addendums/batch_governance_mode.md | -+| Canonical artifact paths confirmed | PASS | Reports: dev/reports/; ZIPs: dev/workspace/zips/ | -+| Generated Charlie Sprite reports moved out of docs_build/ | PASS | PR 022 through PR 039 reports moved | -+| Legacy docs_build report aliases removed | PASS | Removed tracked codex_changed_files.txt and codex_review.diff from docs_build/dev/reports/ | -+| References updated within Charlie work only | PASS | Updated moved Charlie Sprite report references only | -+| No product planning, architecture, DDL, DML, seed, or intended docs_build docs moved | PASS | Scope limited to generated Charlie report artifacts | -+| No runtime behavior changed | PASS | Changed-file scope is reports/artifacts only | -+| No Sprite Editor functionality changed | PASS | No assets/toolbox or runtime source changes | -+| No DB/API/schema files changed | PASS | Changed-file scope check passed | -+| No start_of_day files changed | PASS | Changed-file scope check passed | ++|---|---|---| ++| Document proposed future layout `www/`, `api/`, `dev/` | PASS | Added to repository layout architecture plan. | ++| Include deployment model | PASS | `www/` and `api/` deployable surfaces documented; `dev/` non-runtime. | ++| Include browser/API/database flow | PASS | Browser -> API -> Postgres/R2 documented. | ++| Include developer local-runtime flow | PASS | Developer command -> dev bootstrap -> local www/API flow documented. | ++| Include migration strategy | PASS | Strategy and constraints documented. | ++| Include stacked PR sequence | PASS | Eight-step proposed sequence documented. | ++| Hard rule: no feature work mixed into migration | PASS | Documented. | ++| Hard rule: runtime must never depend on `dev/` | PASS | Documented. | ++| Hard rule: browser must never own authoritative product data | PASS | Documented. | ++| Update `BACKLOG_MASTER.md` Owner planned item | PASS | Added Team/Product Area/Status/Percent/Next Milestone entry. | ++| Increment Project Instructions version if ProjectInstructions changed | PASS | Version bumped to `2026.06.28.004`. | ++| Do not move files | PASS | No file moves performed. | ++| Do not modify runtime code | PASS | No runtime files changed. | ++| Do not change `package.json` commands | PASS | `package.json` unchanged. | + -+## Validation Lane +diff --git a/dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_validation-report.md b/dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_validation-report.md +new file mode 100644 +index 000000000..30520dac8 +--- /dev/null ++++ b/dev/reports/PR_26180_OWNER_004-repository-layout-architecture-plan_validation-report.md +@@ -0,0 +1,23 @@ ++# PR_26180_OWNER_004 Validation Report + -+- PASS: `rg -n "docs_build/dev/reports|docs_build\\dev\\reports|dev/workspace/zip/" dev/reports -g "PR_26179_CHARLIE_0*.md" -g "!PR_26179_CHARLIE_040-dev-artifact-location-cleanup.md"` returned no matches. -+- PASS: `git diff --name-only | rg -v "^(dev/reports/|docs_build/dev/reports/)"` returned no out-of-scope paths. -+- PASS: `git diff --check` returned no whitespace errors. Git reported CRLF normalization warnings only for moved markdown reports. ++## Validation Commands + -+## EOD Repair Note ++| Command | Result | ++|---|---| ++| `git diff --check` | PASS | ++| `npm run validate:canonical-structure` | PASS | + -+- Rebased against current `origin/main` after PRs 022 through 039 were merged. -+- Resolved generated report conflicts by regenerating `dev/reports/codex_changed_files.txt` and `dev/reports/codex_review.diff`. -+- Preserved canonical paths: reports under `dev/reports/` and ZIPs under `dev/workspace/zips/`. -+- Preserved obsolete tracked `docs_build/dev/reports/` Charlie report removals. ++## Canonical Structure Output + -+## Manual Validation Notes ++```text ++Canonical repository structure guardrail: PASS ++Blocking violations: 0 ++Approved legacy exceptions: 501 ++``` + -+- Confirmed this cleanup is artifact-only. -+- Confirmed canonical report files now live under dev/reports/. -+- Confirmed PR 040 ZIP will be generated under dev/workspace/zips/. -+- Confirmed unrelated docs_build/dev/reports/sprite-history-inventory.md remains untouched. ++## Scope Validation + -+## ZIP ++No runtime, UI, API implementation, database implementation, or package command files changed. ++ ++Playwright was not run because this is documentation/governance-only and no runtime/UI files changed. + -+- dev/workspace/zips/PR_26179_CHARLIE_040-dev-artifact-location-cleanup_delta.zip -diff --git a/dev/reports/codex_changed_files.txt b/dev/reports/codex_changed_files.txt -index 0e26265e5..dae75d365 100644 ---- a/dev/reports/codex_changed_files.txt -+++ b/dev/reports/codex_changed_files.txt -@@ -1,19 +1,23 @@ --M dev/build/ProjectInstructions/addendums/codex_artifact_and_reporting_standard.md --M dev/build/ProjectInstructions/addendums/pr_workflow.md --M dev/build/ProjectInstructions/repository/canonical_repository_structure.md --A dev/reports/PR277-post-merge-closeout_branch-validation.md --A dev/reports/PR277-post-merge-closeout_manual-validation-notes.md --A dev/reports/PR277-post-merge-closeout_report.md --A dev/reports/PR277-post-merge-closeout_requirement-checklist.md --A dev/reports/PR277-post-merge-closeout_validation-report.md --A dev/reports/PR_26179_OWNER_036-reports-are-tracked-source_branch-validation.md --A dev/reports/PR_26179_OWNER_036-reports-are-tracked-source_eod-report.md --A dev/reports/PR_26179_OWNER_036-reports-are-tracked-source_manual-validation-notes.md --A dev/reports/PR_26179_OWNER_036-reports-are-tracked-source_report.md --A dev/reports/PR_26179_OWNER_036-reports-are-tracked-source_requirement-checklist.md --A dev/reports/PR_26179_OWNER_036-reports-are-tracked-source_validation-report.md --M dev/reports/codex_changed_files.txt --M dev/reports/codex_review.diff --M dev/reports/PR_26179_OWNER_036-reports-are-tracked-source_branch-validation.md --M dev/reports/PR_26179_OWNER_036-reports-are-tracked-source_eod-report.md --M dev/reports/PR_26179_OWNER_036-reports-are-tracked-source_validation-report.md -+dev/reports/PR_26179_CHARLIE_022-sprites-tool-shell.md -+dev/reports/PR_26179_CHARLIE_023-sprites-toolbar-placeholders.md -+dev/reports/PR_26179_CHARLIE_024-sprites-canvas-grid.md -+dev/reports/PR_26179_CHARLIE_025-sprites-basic-drawing.md -+dev/reports/PR_26179_CHARLIE_026-sprites-palette-panel.md -+dev/reports/PR_26179_CHARLIE_027-sprites-preview-export.md -+dev/reports/PR_26179_CHARLIE_028-sprites-editor-polish.md -+dev/reports/PR_26179_CHARLIE_029-sprites-clear-reset-controls.md -+dev/reports/PR_26179_CHARLIE_030-sprites-undo-redo.md -+dev/reports/PR_26179_CHARLIE_031-sprites-picker-zoom.md -+dev/reports/PR_26179_CHARLIE_032-sprites-shape-tools.md -+dev/reports/PR_26179_CHARLIE_033-sprites-canvas-preview-sync.md -+dev/reports/PR_26179_CHARLIE_034-sprites-frame-strip.md -+dev/reports/PR_26179_CHARLIE_035-sprites-frame-editing.md -+dev/reports/PR_26179_CHARLIE_036-sprites-animation-preview.md -+dev/reports/PR_26179_CHARLIE_037-sprites-animation-export.md -+dev/reports/PR_26179_CHARLIE_038-sprites-grid-dimension-fix.md -+dev/reports/PR_26179_CHARLIE_039-sprites-color-and-zoom-fix.md -+dev/reports/PR_26179_CHARLIE_040-dev-artifact-location-cleanup.md -+dev/reports/codex_changed_files.txt -+dev/reports/codex_review.diff -+docs_build/dev/reports/codex_changed_files.txt -+docs_build/dev/reports/codex_review.diff -diff --git a/docs_build/dev/reports/codex_changed_files.txt b/docs_build/dev/reports/codex_changed_files.txt -deleted file mode 100644 -index 06b902964..000000000 ---- a/docs_build/dev/reports/codex_changed_files.txt -+++ /dev/null -@@ -1,7 +0,0 @@ --assets/theme-v2/css/gamefoundrystudio.css --assets/toolbox/sprites/js/index.js --dev/tests/playwright/tools/SpritesToolShell.spec.mjs --docs_build/dev/reports/PR_26179_CHARLIE_039-sprites-color-and-zoom-fix.md --docs_build/dev/reports/codex_changed_files.txt --docs_build/dev/reports/codex_review.diff --toolbox/sprites/index.html -diff --git a/docs_build/dev/reports/codex_review.diff b/docs_build/dev/reports/codex_review.diff -deleted file mode 100644 -index fe4994612..000000000 ---- a/docs_build/dev/reports/codex_review.diff -+++ /dev/null -@@ -1,245 +0,0 @@ --diff --git a/assets/theme-v2/css/gamefoundrystudio.css b/assets/theme-v2/css/gamefoundrystudio.css --index 5786394a2..b92e7101e 100644 ----- a/assets/theme-v2/css/gamefoundrystudio.css --+++ b/assets/theme-v2/css/gamefoundrystudio.css --@@ -1184,6 +1184,10 @@ body.tool-focus-mode .tool-column:last-of-type { -- grid-template-rows: repeat(32, minmax(0, 1fr)) -- } -- --+.sprite-canvas-shell[data-sprites-zoom-level="0.5"] .sprite-canvas-grid { --+ width: min(260px, 50%) --+} --+ -- .sprite-canvas-shell[data-sprites-zoom-level="2"] .sprite-canvas-grid { -- width: min(720px, 160%) -- } --@@ -1212,26 +1216,31 @@ body.tool-focus-mode .tool-column:last-of-type { -- background: var(--text) -- } -- --+.sprite-canvas-cell.is-painted.sprite-canvas-cell--ink, -- .sprite-canvas-cell--ink, -- .sprite-color-chip--ink { -- background: var(--text) -- } -- --+.sprite-canvas-cell.is-painted.sprite-canvas-cell--orange, -- .sprite-canvas-cell--orange, -- .sprite-color-chip--orange { -- background: var(--molten-orange) -- } -- --+.sprite-canvas-cell.is-painted.sprite-canvas-cell--gold, -- .sprite-canvas-cell--gold, -- .sprite-color-chip--gold { -- background: var(--forge-gold) -- } -- --+.sprite-canvas-cell.is-painted.sprite-canvas-cell--green, -- .sprite-canvas-cell--green, -- .sprite-color-chip--green { -- background: var(--green) -- } -- --+.sprite-canvas-cell.is-painted.sprite-canvas-cell--blue, -- .sprite-canvas-cell--blue, -- .sprite-color-chip--blue { -- background: var(--electric-blue) --diff --git a/assets/toolbox/sprites/js/index.js b/assets/toolbox/sprites/js/index.js --index e6d249c52..48f8ba56e 100644 ----- a/assets/toolbox/sprites/js/index.js --+++ b/assets/toolbox/sprites/js/index.js --@@ -1,7 +1,7 @@ -- const DEFAULT_GRID_SIZE = 16; -- const DEFAULT_FRAME_DURATION_MS = 120; -- const SUPPORTED_GRID_SIZES = Object.freeze([16, 32]); ---const SUPPORTED_ZOOM_LEVELS = Object.freeze([1, 2, 4]); --+const SUPPORTED_ZOOM_LEVELS = Object.freeze([0.5, 1, 2, 4]); -- const SHAPE_TOOLS = Object.freeze(["line", "rectangle", "circle"]); -- const EDITOR_TOOLS = Object.freeze(["pencil", "eraser", "fill", "picker", "zoom", ...SHAPE_TOOLS]); -- const EDITOR_COLOR_KEYS = Object.freeze(["ink", "orange", "gold", "green", "blue"]); --diff --git a/dev/tests/playwright/tools/SpritesToolShell.spec.mjs b/dev/tests/playwright/tools/SpritesToolShell.spec.mjs --index b04cb375d..3282b79fa 100644 ----- a/dev/tests/playwright/tools/SpritesToolShell.spec.mjs --+++ b/dev/tests/playwright/tools/SpritesToolShell.spec.mjs --@@ -219,6 +219,25 @@ async function previewCellHasPaint(page, row, column) { -- }, { column, gridSize, row }); -- } -- --+async function previewCellColor(page, row, column) { --+ const gridSize = Number(await page.locator("[data-sprites-pixel-grid]").getAttribute("data-sprites-grid-size")); --+ return page.locator("[data-sprites-preview-canvas]").evaluate((canvas, coordinates) => { --+ const context = canvas.getContext("2d"); --+ if (!context || !Number.isFinite(coordinates.gridSize) || coordinates.gridSize <= 0) { --+ return ""; --+ } --+ const cellSize = canvas.width / coordinates.gridSize; --+ const x = Math.max(0, Math.min(canvas.width - 1, Math.floor((coordinates.column - 0.5) * cellSize))); --+ const y = Math.max(0, Math.min(canvas.height - 1, Math.floor((coordinates.row - 0.5) * cellSize))); --+ const pixel = context.getImageData(x, y, 1, 1).data; --+ return `rgb(${pixel[0]}, ${pixel[1]}, ${pixel[2]})`; --+ }, { column, gridSize, row }); --+} --+ --+async function centerCellColor(page, row, column) { --+ return spriteCell(page, row, column).evaluate((cell) => getComputedStyle(cell).backgroundColor); --+} --+ -- async function canvasHasAnyPaint(locator) { -- return locator.evaluate((canvas) => { -- const context = canvas.getContext("2d"); --@@ -240,6 +259,9 @@ async function expectCenterAndPreviewPainted(page, row, column, colorClass = nul -- await expect(cell).toHaveClass(/is-painted/); -- if (colorClass) { -- await expect(cell).toHaveClass(new RegExp(colorClass)); --+ const centerColor = await centerCellColor(page, row, column); --+ expect(centerColor).not.toBe("rgb(255, 255, 255)"); --+ expect(await previewCellColor(page, row, column)).toBe(centerColor); -- } -- expect(await previewCellHasPaint(page, row, column)).toBe(true); -- } --@@ -337,6 +359,7 @@ test("Sprite Creator shell loads with visible tool, canvas, details, and status -- await expect(page.locator("[data-sprites-pixel-grid] [role='gridcell']")).toHaveCount(256); -- await expect(page.locator("[data-sprites-grid-status]")).toContainText("Canvas display mode: 16x16"); -- await expect(page.locator("[data-sprites-zoom-status]")).toContainText("100%"); --+ await expect(page.getByRole("button", { name: "50%" })).toBeVisible(); -- await page.getByRole("button", { name: "32x32" }).click(); -- await expect(page.locator("[data-sprites-pixel-grid]")).toHaveAttribute("aria-label", "Sprite Creator 32 by 32 pixel canvas"); -- await expect(page.locator("[data-sprites-pixel-grid] [role='gridcell']")).toHaveCount(1024); --@@ -412,6 +435,10 @@ test("Sprite Creator shell loads with visible tool, canvas, details, and status -- await expect(page.locator("[data-sprites-zoom-status]")).toContainText("400%"); -- await page.getByRole("button", { name: "100%" }).click(); -- await expect(page.locator("[data-sprites-grid-shell]")).toHaveAttribute("data-sprites-zoom-level", "1"); --+ await page.getByRole("button", { name: "50%" }).click(); --+ await expect(page.locator("[data-sprites-grid-shell]")).toHaveAttribute("data-sprites-zoom-level", "0.5"); --+ await expect(page.locator("[data-sprites-zoom-status]")).toContainText("50%"); --+ await expect(page.locator("[data-sprites-pixel-grid] [role='gridcell']")).toHaveCount(256); -- const gridCells = page.locator("[data-sprites-pixel-grid] [role='gridcell']"); -- await page.getByRole("button", { name: "Clear Canvas" }).click(); -- await page.getByRole("button", { name: "Green editor color" }).click(); --@@ -472,14 +499,14 @@ test("Sprite Creator canvas grid dimensions stay exact across modes and zoom", a -- await page.goto(`${server.baseUrl}/toolbox/sprites/index.html`, { waitUntil: "networkidle" }); -- -- await expectExactGridDimensions(page, 16); --- for (const zoomLabel of ["200%", "400%", "100%"]) { --+ for (const zoomLabel of ["50%", "200%", "400%", "100%"]) { -- await page.getByRole("button", { name: zoomLabel }).click(); -- await expectExactGridDimensions(page, 16); -- } -- -- await page.getByRole("button", { name: "32x32" }).click(); -- await expectExactGridDimensions(page, 32); --- for (const zoomLabel of ["200%", "400%", "100%"]) { --+ for (const zoomLabel of ["50%", "200%", "400%", "100%"]) { -- await page.getByRole("button", { name: zoomLabel }).click(); -- await expectExactGridDimensions(page, 32); -- } --diff --git a/docs_build/dev/reports/PR_26179_CHARLIE_039-sprites-color-and-zoom-fix.md b/docs_build/dev/reports/PR_26179_CHARLIE_039-sprites-color-and-zoom-fix.md --new file mode 100644 --index 000000000..aa665b793 ----- /dev/null --+++ b/docs_build/dev/reports/PR_26179_CHARLIE_039-sprites-color-and-zoom-fix.md --@@ -0,0 +1,78 @@ --+# PR_26179_CHARLIE_039-sprites-color-and-zoom-fix --+ --+Team: CHARLIE --+ --+Mode: Batch governance stacked bug-fix workflow --+ --+Base branch: PR_26179_CHARLIE_038-sprites-grid-dimension-fix --+ --+Branch: PR_26179_CHARLIE_039-sprites-color-and-zoom-fix --+ --+## Summary --+ --+Fixed Sprite Creator center canvas selected-color rendering and added a 50% zoom option. The center grid now uses color-specific painted-cell selectors with enough specificity to override the generic painted fallback, so Pencil, Fill, and Shape tools display the selected palette color instead of defaulting visually to the fallback color. The Playwright coverage now compares the center cell computed color with the right preview canvas pixel color to prove both surfaces use the same selected-color page-session state. --+ --+## Branch Validation --+ --+PASS --+ --+- Built from `PR_26179_CHARLIE_038-sprites-grid-dimension-fix`. --+- Scope stayed limited to selected color rendering, 50% zoom, and regression coverage. --+- No DB/API/schema changes. --+- No browser-owned authoritative product data added. --+- No start_of_day files changed. --+- ZIP package created at the requested path. --+ --+## Requirement Checklist --+ --+PASS - Center canvas drawing color follows selected palette color. --+ --+PASS - Pencil applies selected color to center grid. --+ --+PASS - Fill applies selected color to center grid. --+ --+PASS - Shape tools apply selected color to center grid. --+ --+PASS - Center grid, right preview, frame data, animation preview, and exports use the same selected-color pixel state. --+ --+PASS - Painted pixels do not default to white unless that is the selected palette color. --+ --+PASS - 50% zoom option added. --+ --+PASS - Existing 100%, 200%, and 400% zoom options retained. --+ --+PASS - Zoom does not change grid dimensions or pixel state. --+ --+PASS - Export path still works. --+ --+PASS - No DB/API/schema changes. --+ --+PASS - No browser-owned authoritative product data. --+ --+PASS - No start_of_day changes. --+ --+## Validation Lane --+ --+PASS - `node --check assets/toolbox/sprites/js/index.js` --+ --+PASS - `node --check dev/tests/playwright/tools/SpritesToolShell.spec.mjs` --+ --+PASS - `git diff --check -- toolbox/sprites/index.html assets/toolbox/sprites/js/index.js assets/theme-v2/css/gamefoundrystudio.css dev/tests/playwright/tools/SpritesToolShell.spec.mjs` --+ --+PASS - Runtime guard scan found no prohibited inline style/script/event-handler or stale placeholder text in touched runtime files. --+ --+PASS - `npx playwright test dev/tests/playwright/tools/SpritesToolShell.spec.mjs --workers=1 --reporter=list` --+ --+## Manual Validation Notes --+ --+1. Open `toolbox/sprites/index.html`. --+2. Select a non-white palette color such as Gold or Blue. --+3. Draw with Pencil and confirm the center grid cell uses the selected color. --+4. Confirm the right preview shows the same selected color. --+5. Use Fill and Shape tools with a selected color and confirm the center grid matches. --+6. Use 50%, 100%, 200%, and 400% zoom and confirm grid dimensions and pixels do not change. --+7. Download PNG and Animation Strip and confirm export status still completes. --+ --+## ZIP --+ --+`dev/workspace/zip/PR_26179_CHARLIE_039-sprites-color-and-zoom-fix_delta.zip` --diff --git a/docs_build/dev/reports/codex_changed_files.txt b/docs_build/dev/reports/codex_changed_files.txt --index 52e5e47e7..06b902964 100644 ----- a/docs_build/dev/reports/codex_changed_files.txt --+++ b/docs_build/dev/reports/codex_changed_files.txt --@@ -1,6 +1,7 @@ -- assets/theme-v2/css/gamefoundrystudio.css --+assets/toolbox/sprites/js/index.js -- dev/tests/playwright/tools/SpritesToolShell.spec.mjs ---docs_build/dev/reports/PR_26179_CHARLIE_038-sprites-grid-dimension-fix.md --+docs_build/dev/reports/PR_26179_CHARLIE_039-sprites-color-and-zoom-fix.md -- docs_build/dev/reports/codex_changed_files.txt -- docs_build/dev/reports/codex_review.diff -- toolbox/sprites/index.html --diff --git a/toolbox/sprites/index.html b/toolbox/sprites/index.html --index 78d0e76c4..46b480acb 100644 ----- a/toolbox/sprites/index.html --+++ b/toolbox/sprites/index.html --@@ -112,6 +112,7 @@ -- -- --
--+ -- -- --