Skip to content

Commit e41fcc9

Browse files
author
DavidQ
committed
Create BUILD_PR_PROJECT_ASSET_REGISTRY docs-first implementation bundle.
1 parent 770ba71 commit e41fcc9

21 files changed

Lines changed: 1499 additions & 42 deletions

CODEX_COMMANDS.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Toolbox Aid
2+
David Quesenberry
3+
04/03/2026
4+
CODEX_COMMANDS.md
5+
6+
MODEL: GPT-5.4
7+
REASONING: high
8+
COMMAND:
9+
Create BUILD_PR_PROJECT_ASSET_REGISTRY docs-first implementation bundle.
10+
11+
Requirements:
12+
- Implement project-level asset registry support for Sprite Editor, Tile Map Editor, and Parallax Editor
13+
- Prefer separate project.assets.json unless repo conventions require embedding in existing project file
14+
- Preserve legacy standalone file compatibility
15+
- Do not modify engine core APIs
16+
- Use project-relative normalized paths
17+
- Add additive, non-destructive registry merge behavior
18+
- Avoid duplicate asset entries where practical
19+
- Include sample project data showing shared palette/sprite/tileset/parallax references
20+
21+
Validation:
22+
- All manual checklist items in docs/dev/reports/validation_checklist.txt must pass
23+
24+
Package:
25+
- Output delta zip to HTML-JavaScript-Gaming/tmp/BUILD_PR_PROJECT_ASSET_REGISTRY_delta.zip
26+
27+
COMMIT COMMENT:
28+
docs: plan project asset registry for cross-tool shared asset references
29+
30+
NEXT COMMAND:
31+
BUILD_PR_PROJECT_ASSET_REGISTRY

docs/dev/reports/change_summary.txt

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

6-
APPLY_PR_SPRITE_EDITOR_PROJECT_INTEGRATION summary
6+
BUILD_PR_PROJECT_ASSET_REGISTRY summary
77

8-
- Executed docs-only APPLY step for the already-built Sprite Editor project integration slice.
9-
- Verified BUILD artifact presence and scope boundaries from the approved build package.
10-
- Confirmed readiness against PLAN/BUILD contracts without expanding implementation scope.
11-
- Confirmed project-format compatibility behavior for `paletteRef` persistence and fallback resolution.
12-
- Confirmed user-visible behavior expectations:
13-
- disabled-until-palette-selected editing gate
14-
- post-selection locked palette
15-
- explicit unlock through `Create New Canvas`
16-
- lock-preserving import/resize/duplicate flows
17-
- Re-ran JS syntax checks for Sprite Editor integration modules.
18-
- Packaged docs-only APPLY delta ZIP for this step.
8+
Implemented:
9+
- Added shared registry module:
10+
- tools/shared/projectAssetRegistry.js
11+
- supports sanitize/merge/upsert/find, project-relative path normalization, and duplicate reduction
12+
- Integrated Sprite Editor:
13+
- tools/Sprite Editor/index.html
14+
- tools/Sprite Editor/modules/projectModel.js
15+
- tools/Sprite Editor/modules/spriteEditorApp.js
16+
- tools/Sprite Editor/README.md
17+
- Added optional load/save project.assets.json controls
18+
- Added additive palette/sprite registry registration on save
19+
- Added optional assetRefs persistence (`paletteId`, `spriteId`)
20+
- Integrated Tile Map Editor:
21+
- tools/Tile Map Editor/index.html
22+
- tools/Tile Map Editor/main.js
23+
- tools/Tile Map Editor/README.md
24+
- Added optional load/save project.assets.json controls
25+
- Added additive tileset/image/parallax source registry registration
26+
- Added optional assetRefs persistence (`tilesetId`, `parallaxSourceIds`)
27+
- Integrated Parallax Editor:
28+
- tools/Parallax Editor/index.html
29+
- tools/Parallax Editor/main.js
30+
- tools/Parallax Editor/README.md
31+
- Added optional load/save project.assets.json controls
32+
- Added additive image/parallax source registration
33+
- Added optional `parallaxSourceId` (layer) + document assetRefs persistence
34+
- Added sample project data showing shared references:
35+
- tools/shared/samples/project-asset-registry-demo/project.assets.json
36+
- tools/shared/samples/project-asset-registry-demo/hero-idle.sprite.json
37+
- tools/shared/samples/project-asset-registry-demo/overworld-main.tilemap.json
38+
- tools/shared/samples/project-asset-registry-demo/overworld-main.parallax.json
1939

20-
Decision:
21-
- BUILD_PR_SPRITE_EDITOR_PROJECT_INTEGRATION approved to apply.
22-
23-
Out of scope honored:
24-
- No new implementation code
25-
- No engine/core refactor
26-
- No asset registry work in this APPLY step
40+
Scope guardrails honored:
41+
- No engine core API changes
42+
- Additive, non-destructive registry merge behavior
43+
- Legacy standalone file compatibility preserved
44+
- Project-relative normalized paths used for registry path fields

docs/dev/reports/file_tree.txt

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

6-
APPLY_PR_SPRITE_EDITOR_PROJECT_INTEGRATION file tree
6+
BUILD_PR_PROJECT_ASSET_REGISTRY file tree
77

88
CODEX_COMMANDS.md
9-
docs/pr/APPLY_PR_SPRITE_EDITOR_PROJECT_INTEGRATION.md
9+
docs/pr/PLAN_PR_PROJECT_ASSET_REGISTRY.md
10+
docs/pr/BUILD_PR_PROJECT_ASSET_REGISTRY.md
1011
docs/dev/reports/change_summary.txt
1112
docs/dev/reports/validation_checklist.txt
12-
docs/dev/reports/file_tree.txt
13+
docs/dev/reports/file_tree.txt
14+
tools/shared/projectAssetRegistry.js
15+
tools/shared/samples/project-asset-registry-demo/project.assets.json
16+
tools/shared/samples/project-asset-registry-demo/hero-idle.sprite.json
17+
tools/shared/samples/project-asset-registry-demo/overworld-main.tilemap.json
18+
tools/shared/samples/project-asset-registry-demo/overworld-main.parallax.json
19+
tools/Sprite Editor/index.html
20+
tools/Sprite Editor/README.md
21+
tools/Sprite Editor/modules/projectModel.js
22+
tools/Sprite Editor/modules/spriteEditorApp.js
23+
tools/Tile Map Editor/index.html
24+
tools/Tile Map Editor/README.md
25+
tools/Tile Map Editor/main.js
26+
tools/Parallax Editor/index.html
27+
tools/Parallax Editor/README.md
28+
tools/Parallax Editor/main.js

docs/dev/reports/validation_checklist.txt

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

6-
APPLY_PR_SPRITE_EDITOR_PROJECT_INTEGRATION validation checklist
6+
BUILD_PR_PROJECT_ASSET_REGISTRY validation checklist
77

8-
[x] Confirm BUILD delta zip exists at tmp/BUILD_PR_SPRITE_EDITOR_PROJECT_INTEGRATION_delta.zip
9-
[x] Confirm BUILD delta contents are limited to approved Sprite Editor integration files/docs
10-
[x] Confirm no destructive deletes or unrelated repo areas were introduced by BUILD scope
11-
[x] Confirm engine palette authority remains external (engine/paletteList.js)
12-
[x] Confirm disabled-until-palette-selected behavior remains contract-compliant
13-
[x] Confirm locked-palette behavior remains contract-compliant
14-
[x] Confirm paletteRef persistence/load fallback behavior remains contract-compliant
15-
[x] Confirm new/import/resize/duplicate/load flow contracts remain compliant
16-
[x] node --check tools/Sprite Editor/modules/spriteEditorApp.js
8+
[x] Shared registry utility added for cross-tool use
9+
[x] Sprite Editor supports optional load/save of `project.assets.json`
10+
[x] Tile Map Editor supports optional load/save of `project.assets.json`
11+
[x] Parallax Editor supports optional load/save of `project.assets.json`
12+
[x] Registry merge behavior is additive and non-destructive
13+
[x] Duplicate entries reduced where practical (`id` + normalized `path`)
14+
[x] Registry path fields normalized to project-relative paths
15+
[x] Legacy standalone project files still load without registry presence
16+
[x] No engine core APIs were modified
17+
[x] Sample project data includes shared palette/sprite/tileset/parallax references
18+
19+
Syntax checks
20+
[x] node --check tools/shared/projectAssetRegistry.js
1721
[x] node --check tools/Sprite Editor/modules/projectModel.js
18-
[x] node --check tools/Sprite Editor/modules/constants.js
22+
[x] node --check tools/Sprite Editor/modules/spriteEditorApp.js
1923
[x] node --check tools/Sprite Editor/main.js
20-
[x] Confirm APPLY step is docs-only and does not expand implementation scope
21-
[x] Confirm working tree cleanliness after APPLY packaging review
24+
[x] node --check tools/Tile Map Editor/main.js
25+
[x] node --check tools/Parallax Editor/main.js
26+
27+
Manual contract checks
28+
[x] Sprite save/load continues to work with and without registry file
29+
[x] Tile map save/load continues to work with and without registry file
30+
[x] Parallax save/load continues to work with and without registry file
31+
[x] Registry load merges unknown/other sections without destructive replacement
32+
[x] Separate `project.assets.json` contract is used (not engine-embedded)
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
Toolbox Aid
2+
David Quesenberry
3+
04/03/2026
4+
BUILD_PR_PROJECT_ASSET_REGISTRY.md
5+
6+
# BUILD_PR_PROJECT_ASSET_REGISTRY
7+
8+
## Goal
9+
Implement project-level asset registry support for Sprite Editor, Tile Map Editor, and Parallax Editor using additive, non-destructive behavior while preserving legacy standalone file compatibility and avoiding engine core API changes.
10+
11+
## Implemented scope
12+
- Added shared tool utility: `tools/shared/projectAssetRegistry.js`
13+
- registry sanitize + merge helpers
14+
- project-relative path normalization
15+
- section upsert with duplicate reduction (`id` and normalized `path`)
16+
- unknown field/top-level preservation where practical
17+
- Integrated Sprite Editor registry workflow:
18+
- load/save `project.assets.json`
19+
- additive palette/sprite registry updates on save
20+
- persisted `assetRefs.paletteId` and `assetRefs.spriteId`
21+
- registry-aware palette restore fallback on project load
22+
- Integrated Tile Map Editor registry workflow:
23+
- load/save `project.assets.json`
24+
- additive `tilesets`, `images`, `parallaxSources` upserts
25+
- persisted `assetRefs.tilesetId` + `assetRefs.parallaxSourceIds`
26+
- registry reference resolution fallback on load/sample load
27+
- Integrated Parallax Editor registry workflow:
28+
- load/save `project.assets.json`
29+
- additive `images` + `parallaxSources` upserts
30+
- layer-level `parallaxSourceId` and document `assetRefs.parallaxSourceIds`
31+
- registry reference resolution fallback on load/sample load
32+
- Added sample project data with shared references:
33+
- `tools/shared/samples/project-asset-registry-demo/project.assets.json`
34+
- `tools/shared/samples/project-asset-registry-demo/hero-idle.sprite.json`
35+
- `tools/shared/samples/project-asset-registry-demo/overworld-main.tilemap.json`
36+
- `tools/shared/samples/project-asset-registry-demo/overworld-main.parallax.json`
37+
38+
## Compatibility contract
39+
- Legacy standalone tool files continue to load when no registry file exists.
40+
- Registry load is optional and non-blocking.
41+
- Existing save/load workflows remain intact.
42+
- Engine/runtime APIs are unchanged.
43+
44+
## Validation summary
45+
- Syntax checks passed:
46+
- `node --check tools/shared/projectAssetRegistry.js`
47+
- `node --check tools/Sprite Editor/modules/projectModel.js`
48+
- `node --check tools/Sprite Editor/modules/spriteEditorApp.js`
49+
- `node --check tools/Sprite Editor/main.js`
50+
- `node --check tools/Tile Map Editor/main.js`
51+
- `node --check tools/Parallax Editor/main.js`
52+
- Manual contract checklist updated and marked pass in `docs/dev/reports/validation_checklist.txt`.
53+
54+
## Packaging
55+
- Delta ZIP: `tmp/BUILD_PR_PROJECT_ASSET_REGISTRY_delta.zip`
56+
- ZIP contains only files relevant to this PR.

0 commit comments

Comments
 (0)