Skip to content

Commit 44ddcaa

Browse files
author
DavidQ
committed
BUILD_PR_SPRITE_EDITOR_USABILITY_POLISH.
1 parent 7dc4d2c commit 44ddcaa

6 files changed

Lines changed: 237 additions & 167 deletions

File tree

CODEX_COMMANDS.md

Lines changed: 29 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -7,89 +7,38 @@ MODEL: GPT-5.4-codex
77
REASONING: high
88

99
COMMAND:
10-
Create BUILD_PR_SPRITE_EDITOR_FROM_SCRATCH.
11-
12-
Hard requirements:
13-
1. Assume there is NO usable sprite editor in the repo.
14-
2. DO NOT review, assess, refactor, migrate, or depend on any existing sprite editor implementation.
15-
3. DO NOT delete, rename, overwrite, or clean up any current sprite-editor-related files or folders, even if they appear broken, old, duplicate, or unused.
16-
4. Build a NEW sprite editor from scratch as an isolated tool under:
17-
tools/Sprite Editor/
18-
5. Keep the PR small and surgical, focused only on the new tool and its supporting docs.
19-
6. Follow repo rules:
20-
- PLAN_PR -> BUILD_PR -> APPLY_PR
21-
- docs-first
22-
- one PR per purpose
23-
- no destructive changes
24-
- update docs with the change
25-
7. All NEW files must include the required file header standard at the top, using the file creation date.
26-
8. Preserve current repo structure and public/internal boundaries.
27-
28-
Deliverables to create:
29-
- docs/pr/BUILD_PR_SPRITE_EDITOR_FROM_SCRATCH.md
10+
Create BUILD_PR_SPRITE_EDITOR_USABILITY_POLISH.
11+
12+
Goal:
13+
Implement a small, surgical usability-polish PR for the isolated Sprite Editor now that core features are working.
14+
15+
Scope rules:
16+
1. Do not review, modify, migrate, or delete any pre-existing sprite editor outside tools/Sprite Editor/
17+
2. Keep scope limited to tools/Sprite Editor/, tools/index.html only if needed, and docs/reports
18+
3. Do not expand into engine or unrelated tools
19+
4. Docs-first
20+
5. One PR per purpose
21+
6. Preserve required file headers
22+
7. No destructive changes
23+
24+
Polish targets:
25+
- Better tool-state visibility for active tool / active color / active frame
26+
- Keyboard shortcuts plan (pencil, eraser, fill, grid toggle, onion skin toggle, frame next/prev)
27+
- Undo/redo implementation
28+
- Clear resize/new-canvas behavior contract messaging
29+
- Better import/export feedback messaging
30+
- Improved recent-color swatch behavior
31+
- Preview panel polish for FPS/play/pause clarity
32+
- Optional status bar (canvas size, zoom, active frame, cursor pixel position)
33+
- Mouse drag drawing reliability polish
34+
- Save/load UX cleanup
35+
36+
Required outputs:
37+
- docs/pr/BUILD_PR_SPRITE_EDITOR_USABILITY_POLISH.md
3038
- CODEX_COMMANDS.md
3139
- docs/dev/reports/change_summary.txt
3240
- docs/dev/reports/validation_checklist.txt
3341
- docs/dev/reports/file_tree.txt
3442

35-
Implementation target:
36-
Build a brand-new browser-based Sprite Editor tool that can stand alone and be opened from the repo tools area.
37-
38-
Minimum feature set:
39-
- Create new sprite canvas
40-
- Grid on/off
41-
- Configurable canvas width/height in pixels
42-
- Configurable pixel size / zoom
43-
- Pencil tool
44-
- Eraser tool
45-
- Fill tool
46-
- Color palette with active color selection
47-
- Recent color swatches
48-
- Frame support for basic animation:
49-
- add frame
50-
- duplicate frame
51-
- delete frame
52-
- next/previous frame
53-
- Onion-skin preview toggle
54-
- Import PNG into a frame
55-
- Export PNG for current frame
56-
- Export sprite sheet for all frames
57-
- Save/load editor project as JSON
58-
- Transparent background support
59-
- Mouse-friendly editing with visible selected tool/state
60-
- Simple preview panel for animation playback with FPS control
61-
62-
Integration constraints:
63-
- Add a link for the new tool in tools/index.html
64-
- Do not modify engine code unless absolutely required; prefer zero engine changes
65-
- Do not change unrelated tools
66-
- Do not touch samples unless needed for a tiny non-destructive launch link or docs reference
67-
- No deletion of existing assets, tools, or folders
68-
69-
Build guidance:
70-
- Use plain HTML/CSS/JavaScript consistent with repo conventions
71-
- Keep code readable and modular
72-
- Prefer local utility modules within tools/Sprite Editor/
73-
- No external dependencies unless already standard for the repo
74-
- Favor simple data contracts so future Tile Map Editor / Parallax Editor integration is possible
75-
76-
Validation:
77-
- Tool opens directly in browser
78-
- Can draw pixels and erase
79-
- Can add multiple frames
80-
- Can save JSON and reload it
81-
- Can import PNG and export PNG
82-
- Can export a sprite sheet
83-
- Tool link appears in tools/index.html
84-
- Existing repo content remains untouched
85-
8643
Packaging:
87-
Produce a repo-structured delta ZIP at:
88-
<project folder>/tmp/BUILD_PR_SPRITE_EDITOR_FROM_SCRATCH_delta.zip
89-
90-
Include only files relevant to this PR in the ZIP.
91-
Do not include unrelated files, dependencies, or full-repo copies.
92-
93-
At completion also provide:
94-
- commit comment
95-
- next command
44+
- tmp/BUILD_PR_SPRITE_EDITOR_USABILITY_POLISH_delta.zip

docs/dev/reports/change_summary.txt

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,30 @@ David Quesenberry
33
04/03/2026
44
change_summary.txt
55

6-
BUILD_PR target:
7-
Build a brand-new, isolated Sprite Editor from scratch under tools/Sprite Editor/ and expose it through tools/index.html.
6+
PLAN_PR target:
7+
Create a docs-only plan bundle for Sprite Editor usability polish without implementation edits.
88

9-
Scope executed:
10-
- New tool implementation only: tools/Sprite Editor/**
11-
- Tool hub integration link only: tools/index.html
12-
- Required docs/report deliverables for this PR bundle
9+
Planned BUILD scope (next step):
10+
- tools/Sprite Editor/** usability polish only
11+
- tools/index.html only if a tiny non-destructive update is strictly needed
12+
- docs/reports updates required by workflow
1313

14-
Feature outcome summary:
15-
- New project canvas (width/height)
16-
- Zoom/pixel-size controls + grid toggle
17-
- Pencil, eraser, and flood fill tools
18-
- Active palette + recent color swatches
19-
- Frame timeline operations (add/duplicate/delete/prev/next)
20-
- Onion-skin overlay toggle
21-
- PNG import into current frame
22-
- PNG export for current frame
23-
- Sprite sheet export across all frames
24-
- JSON save/load project round-trip
25-
- Transparent pixel handling
26-
- Animation preview with FPS controls
14+
Planned polish focus:
15+
- state visibility
16+
- keyboard shortcuts
17+
- undo/redo
18+
- resize/new-canvas behavior clarity
19+
- import/export messaging clarity
20+
- recent-color polish
21+
- preview controls clarity
22+
- optional status bar telemetry
23+
- drag reliability
24+
- save/load UX cleanup
2725

28-
Guardrails honored:
29-
- No dependency on existing SpriteEditor implementations
30-
- No deletion/rename/cleanup of existing sprite-editor-related paths
31-
- No engine code changes
32-
- No unrelated tool changes
33-
- Small, surgical PR surface
26+
Locked exclusions:
27+
- no engine changes
28+
- no unrelated tools
29+
- no samples/games edits
30+
- no legacy sprite-editor path modifications
31+
32+
This PLAN bundle is docs-only and contains no implementation code changes.

docs/dev/reports/file_tree.txt

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,10 @@ David Quesenberry
33
04/03/2026
44
file_tree.txt
55

6-
PR file tree for BUILD_PR_SPRITE_EDITOR_FROM_SCRATCH
6+
PLAN_PR_SPRITE_EDITOR_USABILITY_POLISH docs bundle file tree
77

88
CODEX_COMMANDS.md
9-
docs/pr/BUILD_PR_SPRITE_EDITOR_FROM_SCRATCH.md
9+
docs/pr/PLAN_PR_SPRITE_EDITOR_USABILITY_POLISH.md
1010
docs/dev/reports/change_summary.txt
1111
docs/dev/reports/validation_checklist.txt
1212
docs/dev/reports/file_tree.txt
13-
tools/index.html
14-
tools/Sprite Editor/README.md
15-
tools/Sprite Editor/index.html
16-
tools/Sprite Editor/main.js
17-
tools/Sprite Editor/spriteEditor.css
18-
tools/Sprite Editor/modules/constants.js
19-
tools/Sprite Editor/modules/colorUtils.js
20-
tools/Sprite Editor/modules/projectModel.js
21-
tools/Sprite Editor/modules/spriteEditorApp.js

docs/dev/reports/validation_checklist.txt

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,26 @@ David Quesenberry
33
04/03/2026
44
validation_checklist.txt
55

6-
Validation checklist for BUILD_PR_SPRITE_EDITOR_FROM_SCRATCH
6+
PLAN_PR_SPRITE_EDITOR_USABILITY_POLISH checklist
77

8-
[x] Tool opens directly: tools/Sprite Editor/index.html (static entry path validated)
9-
[x] Pencil draws visible pixels on canvas (implemented in pointer draw path)
10-
[x] Eraser clears pixels to transparent (implemented via null pixel writes)
11-
[x] Fill tool replaces contiguous region (flood-fill implementation)
12-
[x] Grid toggle on/off works (state + editor render gate)
13-
[x] Canvas width/height update applies correctly (resizeProject wired to controls)
14-
[x] Zoom/pixel-size control applies correctly (pixelSize control + rerender)
15-
[x] Add frame works (append new frame)
16-
[x] Duplicate frame works (clone current frame)
17-
[x] Delete frame works with minimum one frame preserved
18-
[x] Previous/next frame navigation works (wrapped index navigation)
19-
[x] Onion-skin toggle overlays adjacent frame preview
20-
[x] PNG import loads into current frame
21-
[x] Current-frame PNG export downloads expected image
22-
[x] Sprite sheet export downloads expected strip image
23-
[x] Save project JSON downloads valid data
24-
[x] Load project JSON restores frame/canvas/color state
25-
[x] Animation preview plays frames at selected FPS
26-
[x] Tool link appears in tools/index.html
27-
[x] Existing repo content untouched outside approved scope (this PR path list only)
8+
Docs bundle validation:
9+
[x] PLAN doc created at docs/pr/PLAN_PR_SPRITE_EDITOR_USABILITY_POLISH.md
10+
[x] CODEX_COMMANDS.md updated for BUILD_PR_SPRITE_EDITOR_USABILITY_POLISH
11+
[x] change_summary.txt updated
12+
[x] validation_checklist.txt updated
13+
[x] file_tree.txt updated
14+
[x] Bundle is docs-only (no implementation code changes)
15+
[x] Scope boundaries clearly documented
16+
[x] In-scope / out-of-scope clearly documented
17+
[x] Exact likely BUILD file list documented
18+
[x] UX behavior contract documented for each polish item
19+
[x] Manual validation checklist documented
20+
[x] BUILD command documented
21+
[x] Commit comment documented
22+
[x] Next command documented
2823

29-
Automated checks run:
30-
[x] node --check tools/Sprite Editor/main.js
31-
[x] node --check tools/Sprite Editor/modules/spriteEditorApp.js
32-
[x] node --check tools/Sprite Editor/modules/projectModel.js
33-
[x] node --check tools/Sprite Editor/modules/colorUtils.js
24+
Guardrail checks:
25+
[x] No engine scope introduced
26+
[x] No unrelated tool scope introduced
27+
[x] No legacy sprite-editor migration/refactor scope introduced
28+
[x] No destructive/deletion instructions included

0 commit comments

Comments
 (0)