|
| 1 | +# PR_26177_CHARLIE_009-sprites-legacy-audit-plan |
| 2 | + |
| 3 | +Status: PASS |
| 4 | +Team: Charlie |
| 5 | +Branch: PR_26177_CHARLIE_009-sprites-legacy-audit-plan |
| 6 | +Date: 2026-06-26 |
| 7 | +Base branch: main |
| 8 | +Base commit: 1420bc8b2634b4976da1b35ae33dd5575279f56b |
| 9 | + |
| 10 | +## Scope |
| 11 | + |
| 12 | +This PR audits the legacy `archive/v1-v2/tools/old_Sprite Editor` implementation and creates the Sprites MVP plan. It does not implement runtime behavior. |
| 13 | + |
| 14 | +The current OWNER command assigns this work to Team Charlie. Current Project Instructions normally route creator content tools to Bravo, so this report records the active assignment as an OWNER-scoped Team Charlie execution context for this Sprites batch. |
| 15 | + |
| 16 | +## Legacy Reference Reviewed |
| 17 | + |
| 18 | +Reviewed files: |
| 19 | + |
| 20 | +- `archive/v1-v2/tools/old_Sprite Editor/README.md` |
| 21 | +- `archive/v1-v2/tools/old_Sprite Editor/index.html` |
| 22 | +- `archive/v1-v2/tools/old_Sprite Editor/main.js` |
| 23 | +- `archive/v1-v2/tools/old_Sprite Editor/modules/constants.js` |
| 24 | +- `archive/v1-v2/tools/old_Sprite Editor/modules/projectModel.js` |
| 25 | +- `archive/v1-v2/tools/old_Sprite Editor/modules/spriteEditorApp.js` |
| 26 | +- `archive/v1-v2/tools/old_Sprite Editor/modules/colorUtils.js` |
| 27 | +- `archive/v1-v2/tools/old_Sprite Editor/spriteEditor.css` |
| 28 | +- `archive/v1-v2/tools/old_Sprite Editor/how_to_use.html` |
| 29 | + |
| 30 | +Current GFS reference files reviewed: |
| 31 | + |
| 32 | +- `toolbox/sprites/index.html` |
| 33 | +- `toolbox/colors/index.html` |
| 34 | +- `toolbox/assets/index.html` |
| 35 | +- `src/shared/toolbox/tool-metadata-inventory.js` |
| 36 | +- `docs_build/database/ddl/palette.sql` |
| 37 | +- `docs_build/database/ddl/asset.sql` |
| 38 | +- `docs_build/database/seed/guest/sprites.json` |
| 39 | +- `docs_build/database/seed/guest/palette.json` |
| 40 | +- `docs_build/dev/ProjectInstructions/addendums/postgres_only.md` |
| 41 | +- `docs_build/dev/ProjectInstructions/addendums/environment_governance_model.md` |
| 42 | +- `docs_build/dev/ProjectInstructions/addendums/environment_configuration_standards.md` |
| 43 | +- `docs_build/dev/ProjectInstructions/addendums/table_first_ui.md` |
| 44 | +- `docs_build/dev/ProjectInstructions/addendums/referenced_asset_protection.md` |
| 45 | + |
| 46 | +## Legacy Findings |
| 47 | + |
| 48 | +The archived tool is a browser-based Sprite Editor, not a current GFS asset management tool. It includes: |
| 49 | + |
| 50 | +- Canvas-first pixel drawing. |
| 51 | +- Frame add, duplicate, delete, undo, redo, onion-skin, and playback preview. |
| 52 | +- Tool-local project JSON import/export. |
| 53 | +- Tool-local asset registry export/import. |
| 54 | +- PNG and sprite sheet import/export flows. |
| 55 | +- Palette selection from a legacy engine palette list. |
| 56 | +- Tool-local palette arrays and recent color arrays. |
| 57 | +- Page-local CSS and legacy shell assets. |
| 58 | +- Direct browser document ownership of the sprite project model. |
| 59 | + |
| 60 | +Useful behaviors to preserve conceptually: |
| 61 | + |
| 62 | +- Explicit sprite dimensions and file metadata. |
| 63 | +- Preview and metadata surfacing. |
| 64 | +- Archive/delete safety expectations. |
| 65 | +- Asset registry thinking around sprite references. |
| 66 | +- Palette dependency awareness. |
| 67 | +- Clear unavailable-state messaging when palette data cannot be loaded. |
| 68 | + |
| 69 | +Legacy behaviors rejected for MVP implementation: |
| 70 | + |
| 71 | +- Rebuilding a pixel editor as the MVP. |
| 72 | +- Browser-owned sprite records. |
| 73 | +- Browser-generated authoritative sprite keys. |
| 74 | +- Page-local product data arrays. |
| 75 | +- Browser storage as product-data source of truth. |
| 76 | +- Tool-local palette color definitions. |
| 77 | +- Duplicated Palette/Colors records. |
| 78 | +- Legacy `engine/paletteList` as an authoritative color source. |
| 79 | +- File-download JSON as authoritative persistence. |
| 80 | +- Page-local CSS, inline script patterns, and legacy shell styling. |
| 81 | +- Hardcoded named reusable colors inside Sprites. |
| 82 | +- Silent fallback data when API, database, storage, or Palette/Colors is unavailable. |
| 83 | + |
| 84 | +## Current Product Position |
| 85 | + |
| 86 | +`toolbox/sprites/index.html` currently exists as a static Theme V2 wireframe. It says no database, persistence, save, load, or runtime behavior is implemented. |
| 87 | + |
| 88 | +The Sprites MVP should therefore complete the existing route as an API-backed asset management tool. It should not become a full image editor. Creation and editing in this MVP means creating and maintaining sprite asset records and metadata, not painting pixels in browser-owned product data. |
| 89 | + |
| 90 | +## Palette/Colors Ownership Rule |
| 91 | + |
| 92 | +Palette/Colors is the authoritative source for reusable colors. |
| 93 | + |
| 94 | +Sprites must: |
| 95 | + |
| 96 | +- Reference Palette/Colors records by API/database key when color linkage is needed. |
| 97 | +- Display Palette/Colors unavailable or empty states when the integration is unavailable. |
| 98 | +- Keep color names, hex values, reusable swatches, and saved palettes owned by Palette/Colors. |
| 99 | + |
| 100 | +Sprites must not: |
| 101 | + |
| 102 | +- Own reusable color definitions. |
| 103 | +- Create reusable colors. |
| 104 | +- Duplicate Palette/Colors records. |
| 105 | +- Use page-local color arrays. |
| 106 | +- Hardcode selectable, reusable, named, or saved colors. |
| 107 | +- Persist Palette/Colors data through Sprites-owned records except for approved key references. |
| 108 | + |
| 109 | +## MVP Data Needs |
| 110 | + |
| 111 | +Sprites MVP records should support: |
| 112 | + |
| 113 | +- `key` |
| 114 | +- `name` |
| 115 | +- `status` |
| 116 | +- `category` |
| 117 | +- `tags` or `tagKeys` |
| 118 | +- `source` or storage reference |
| 119 | +- `mimeType` |
| 120 | +- `width` |
| 121 | +- `height` |
| 122 | +- `size` |
| 123 | +- `paletteColorKeys` or equivalent Palette/Colors key references |
| 124 | +- `usageCount` |
| 125 | +- `createdAt` |
| 126 | +- `updatedAt` |
| 127 | +- `createdBy` |
| 128 | +- `updatedBy` |
| 129 | + |
| 130 | +Server/API must own: |
| 131 | + |
| 132 | +- ULID key generation. |
| 133 | +- Audit timestamps. |
| 134 | +- Audit user fields. |
| 135 | +- Duplicate detection. |
| 136 | +- Archive/delete rules. |
| 137 | +- Reference protection. |
| 138 | + |
| 139 | +## MVP PR Plan |
| 140 | + |
| 141 | +### PR_26177_CHARLIE_010-sprites-api-db-foundation |
| 142 | + |
| 143 | +Add the Sprites API and Postgres DDL/DML/seed foundation. Include server-owned keys and audit fields. Define list, read, create, update, archive, delete-safe, and reference contracts. Do not store color definitions. |
| 144 | + |
| 145 | +### PR_26177_CHARLIE_011-sprites-tool-shell |
| 146 | + |
| 147 | +Replace the static Sprites wireframe with the current GFS tool shell and read/list connection. Add loading, empty, and error states. Keep Palette/Colors unavailable state visible if color references are exposed. |
| 148 | + |
| 149 | +### PR_26177_CHARLIE_012-sprites-library-crud |
| 150 | + |
| 151 | +Implement the API-backed Sprites library table and create/edit/archive/delete flow. Guest save redirects to `account/sign-in.html`. |
| 152 | + |
| 153 | +### PR_26177_CHARLIE_013-sprites-import-preview-metadata-palette |
| 154 | + |
| 155 | +Add import/preview/metadata flows only where existing API and storage contracts support them. Show explicit unavailable states when storage or Palette/Colors contracts are not available. Duplicate via API-owned new key. |
| 156 | + |
| 157 | +### PR_26177_CHARLIE_014-sprites-tags-categories-search |
| 158 | + |
| 159 | +Add API/database-backed search, tags, categories, and table filtering. Reuse Tags service contracts when available. |
| 160 | + |
| 161 | +### PR_26177_CHARLIE_015-sprites-reference-protection |
| 162 | + |
| 163 | +Add reference viewer and destructive delete protection. If real references are not yet available, expose an empty contract state and document the limitation. |
| 164 | + |
| 165 | +### PR_26177_CHARLIE_016-sprites-playwright-final-polish |
| 166 | + |
| 167 | +Complete Theme V2 polish, Playwright coverage, no inline CSS/JS verification, navigation verification, Palette/Colors ownership verification, and backlog completion update. |
| 168 | + |
| 169 | +## Validation Summary |
| 170 | + |
| 171 | +- PASS: Project Instructions reviewed. |
| 172 | +- PASS: Current branch started from clean, synchronized `main`. |
| 173 | +- PASS: Legacy Sprite Editor reference located and reviewed. |
| 174 | +- PASS: Current Sprites route located. |
| 175 | +- PASS: Palette/Colors ownership rule documented. |
| 176 | +- PASS: Rejected legacy patterns documented. |
| 177 | +- PASS: No runtime implementation added. |
| 178 | +- PASS: No `start_of_day` files changed. |
| 179 | + |
| 180 | +## Follow-Up Constraints For Later PRs |
| 181 | + |
| 182 | +- Later implementation PRs must use the shared API/service contract. |
| 183 | +- Later implementation PRs must not split Local API and Public API contracts. |
| 184 | +- Later implementation PRs must target Postgres DDL/DML/seed patterns. |
| 185 | +- Later implementation PRs must use Theme V2 and external JavaScript. |
| 186 | +- Later implementation PRs must preserve Palette/Colors as the color source of truth. |
| 187 | +- Later implementation PRs must stop on validation failure before proceeding. |
0 commit comments