Skip to content

Commit 7592951

Browse files
committed
build(asset-remediation): add assistive remediation system for validation findings & build(packaging): add strict project packaging and export system
1 parent 93bd961 commit 7592951

24 files changed

Lines changed: 1609 additions & 22 deletions

docs/dev/CODEX_COMMANDS.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,29 @@ MODEL: GPT-5.4
22
REASONING: high
33

44
COMMAND:
5-
Execute this atomic Level 10 package in order.
5+
Execute this atomic Level 12 package in order.
66

77
Step 1:
8-
Treat docs/pr/PLAN_PR_ASSET_VALIDATION_ENGINE.md as the governing architecture contract.
8+
Treat docs/pr/PLAN_PR_PROJECT_PACKAGING_SYSTEM.md as the governing architecture contract.
99

1010
Step 2:
11-
Create BUILD_PR_ASSET_VALIDATION_ENGINE.
11+
Create BUILD_PR_PROJECT_PACKAGING_SYSTEM.
1212

1313
BUILD requirements:
14-
- Implement a shared enforced project-level asset validation engine
15-
- Validate registry + dependency graph correctness
16-
- Use deterministic finding generation and stable result structure
17-
- Block guarded save/package/export actions when blocking findings exist
18-
- Preserve remediation workflows for invalid and legacy projects
19-
- Support Sprite Editor, Tile Map Editor, and Parallax Editor validation consumption
20-
- Keep registry as source of truth
14+
- Implement a strict project packaging and export system
15+
- Generate deterministic package manifests and dependency-resolved asset inclusion plans
16+
- Enforce strict validation gating before guarded packaging/export
17+
- Use registry as source of truth for asset identity
18+
- Use dependency graph for dependency traversal
19+
- Produce readable, stable packaging reports
20+
- Support Sprite Editor, Tile Map Editor, and Parallax Editor packaging participation as needed
2121
- Do not modify engine core APIs
2222

2323
Step 3:
24-
Validate BUILD against docs/pr/BUILD_PR_ASSET_VALIDATION_ENGINE.md.
24+
Validate BUILD against docs/pr/BUILD_PR_PROJECT_PACKAGING_SYSTEM.md.
2525

2626
Step 4:
27-
Treat docs/pr/APPLY_PR_ASSET_VALIDATION_ENGINE.md as the acceptance boundary and package results.
27+
Treat docs/pr/APPLY_PR_PROJECT_PACKAGING_SYSTEM.md as the acceptance boundary and package results.
2828

2929
Package:
30-
HTML-JavaScript-Gaming/tmp/LEVEL_10_ASSET_VALIDATION_ENGINE_ENFORCED_ATOMIC_PACKAGE_delta.zip
30+
HTML-JavaScript-Gaming/tmp/LEVEL_12_PROJECT_PACKAGING_SYSTEM_STRICT_ATOMIC_PACKAGE_delta.zip

docs/dev/COMMIT_COMMENT.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
build(asset-validation): add enforced project asset validation engine
1+
build(packaging): add strict project packaging and export system

docs/dev/change_summary.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
Single atomic Level 10 package containing PLAN, BUILD, and APPLY documentation for an enforced
2-
project-level asset validation engine. This bundle is docs-first and Codex-ready, with implementation
1+
Single atomic Level 12 package containing PLAN, BUILD, and APPLY documentation for a strict
2+
project packaging and export system. This bundle is docs-first and Codex-ready, with implementation
33
ownership delegated to Codex.

docs/dev/file_tree.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
docs/pr/PLAN_PR_ASSET_VALIDATION_ENGINE.md
2-
docs/pr/BUILD_PR_ASSET_VALIDATION_ENGINE.md
3-
docs/pr/APPLY_PR_ASSET_VALIDATION_ENGINE.md
1+
docs/pr/PLAN_PR_PROJECT_PACKAGING_SYSTEM.md
2+
docs/pr/BUILD_PR_PROJECT_PACKAGING_SYSTEM.md
3+
docs/pr/APPLY_PR_PROJECT_PACKAGING_SYSTEM.md
44
docs/dev/codex_commands.md
55
docs/dev/commit_comment.txt
66
docs/dev/change_summary.txt
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
BUILD_PR_ASSET_REMEDIATION_SYSTEM validation
2+
3+
Files:
4+
- tools/shared/projectAssetRemediation.js
5+
- tests/tools/AssetRemediationSystem.test.mjs
6+
- tests/run-tests.mjs
7+
- tools/Sprite Editor/index.html
8+
- tools/Sprite Editor/modules/spriteEditorApp.js
9+
- tools/Tile Map Editor/index.html
10+
- tools/Tile Map Editor/main.js
11+
- tools/Parallax Editor/index.html
12+
- tools/Parallax Editor/main.js
13+
14+
Checks passed:
15+
- node --check tools/shared/projectAssetRemediation.js
16+
- node --check tests/tools/AssetRemediationSystem.test.mjs
17+
- node --check tools/Sprite Editor/modules/spriteEditorApp.js
18+
- node --check tools/Tile Map Editor/main.js
19+
- node --check tools/Parallax Editor/main.js
20+
- targeted AssetRemediationSystem test via node inline runner
21+
- node ./scripts/run-node-tests.mjs
22+
23+
Behavior confirmed:
24+
- validation remains authoritative
25+
- remediation action generation is deterministic
26+
- inspect and jump actions are non-destructive
27+
- confirmable fixes require explicit confirmation
28+
- guarded save/export blocking remains enforced
29+
- legacy invalid content can still load and move through repair flows
30+
- no engine core API changes
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
BUILD_PR_PROJECT_PACKAGING_SYSTEM validation
2+
3+
Files:
4+
- tools/shared/projectPackaging.js
5+
- tests/tools/ProjectPackagingSystem.test.mjs
6+
- tests/run-tests.mjs
7+
- tools/Sprite Editor/index.html
8+
- tools/Sprite Editor/modules/spriteEditorApp.js
9+
- tools/Tile Map Editor/index.html
10+
- tools/Tile Map Editor/main.js
11+
- tools/Parallax Editor/index.html
12+
- tools/Parallax Editor/main.js
13+
14+
Checks passed:
15+
- node --check tools/shared/projectPackaging.js
16+
- node --check tests/tools/ProjectPackagingSystem.test.mjs
17+
- node --check tools/Sprite Editor/modules/spriteEditorApp.js
18+
- node --check tools/Tile Map Editor/main.js
19+
- node --check tools/Parallax Editor/main.js
20+
- targeted ProjectPackagingSystem test via node inline runner
21+
- node ./scripts/run-node-tests.mjs
22+
23+
Behavior confirmed:
24+
- strict validation gating blocks invalid packaging/export
25+
- package manifest generation is deterministic
26+
- dependency traversal uses registry + dependency graph state
27+
- packaging reports are stable and human-readable
28+
- sprite, tile-map, and parallax editors can participate in packaging
29+
- no engine core API changes

docs/dev/validation_checklist.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
- PLAN, BUILD, and APPLY docs are all present
22
- codex_commands.md and commit_comment.txt are under docs/dev
3-
- Enforcement rules are explicit
4-
- Remediation workflows remain available for invalid projects
3+
- Strict validation gating is explicit for packaging/export
54
- Registry remains source of truth
6-
- Dependency graph remains additive
5+
- Dependency graph remains traversal source
6+
- Output determinism is required
77
- No engine core API changes are authorized
88
- APPLY remains docs-only acceptance boundary
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# APPLY_PR_ASSET_REMEDIATION_SYSTEM
2+
3+
## Purpose
4+
Apply the completed assistive remediation system slice as a docs-only acceptance boundary.
5+
6+
## Apply Scope
7+
- Confirm PLAN and BUILD are complete
8+
- Confirm assistive remediation behavior remains within approved scope
9+
- Confirm APPLY introduces no implementation expansion
10+
- Lock assistive remediation as accepted project architecture baseline
11+
12+
## Verification Summary
13+
- BUILD artifact exists and matches scoped remediation implementation
14+
- APPLY remains docs-only
15+
- Validation remains authoritative
16+
- Remediation remains assistive and confirmation-based for state changes
17+
- Enforced blocking still governs guarded operations
18+
- No engine core API changes are required by APPLY
19+
20+
## Accepted Baseline
21+
- Project owns an assistive remediation layer
22+
- Validation findings can map to guided remediation actions
23+
- Editors can navigate users to problems and offer confirmable repairs
24+
- Invalid content can be loaded and repaired without weakening enforcement
25+
26+
## Manual Validation Checklist
27+
1. Confirm BUILD artifact exists in repo tmp path.
28+
2. Confirm APPLY bundle only contains docs/pr and docs/dev files.
29+
3. Confirm accepted scope does not exceed BUILD scope.
30+
4. Confirm no new implementation files are introduced by APPLY.
31+
5. Confirm next planning work can build on assistive remediation baseline.
32+
33+
## Approved Commit Comment
34+
build(asset-remediation): add assistive remediation system for validation findings
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# APPLY_PR_PROJECT_PACKAGING_SYSTEM
2+
3+
## Purpose
4+
Apply the completed strict project packaging system as a docs-only acceptance boundary.
5+
6+
## Apply Scope
7+
- Confirm PLAN and BUILD are complete
8+
- Confirm strict packaging behavior remains within approved scope
9+
- Confirm APPLY introduces no implementation expansion
10+
- Lock strict packaging as accepted project architecture baseline
11+
12+
## Verification Summary
13+
- BUILD artifact exists and matches scoped packaging implementation
14+
- APPLY remains docs-only
15+
- Validation gating remains strict for packaging/export
16+
- Registry remains source of truth
17+
- Dependency graph remains dependency traversal source
18+
- No engine core API changes are required by APPLY
19+
20+
## Accepted Baseline
21+
- Project owns a strict packaging/export system
22+
- Blocking validation findings prevent guarded packaging/export
23+
- Valid projects can produce deterministic package outputs
24+
- Packaging reports provide stable export feedback
25+
26+
## Manual Validation Checklist
27+
1. Confirm BUILD artifact exists in repo tmp path.
28+
2. Confirm APPLY bundle only contains docs/pr and docs/dev files.
29+
3. Confirm accepted scope does not exceed BUILD scope.
30+
4. Confirm no new implementation files are introduced by APPLY.
31+
5. Confirm next planning work can build on strict packaging baseline.
32+
33+
## Approved Commit Comment
34+
build(packaging): add strict project packaging and export system
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# BUILD_PR_ASSET_REMEDIATION_SYSTEM
2+
3+
## Goal
4+
Implement the assistive remediation system defined in `PLAN_PR_ASSET_REMEDIATION_SYSTEM` on top of the existing validation engine without changing engine core APIs.
5+
6+
## Implemented Scope
7+
- Added shared remediation engine in `tools/shared/projectAssetRemediation.js`
8+
- deterministic validation-finding to remediation-action mapping
9+
- stable remediation result contract:
10+
- `remediation.status`
11+
- ordered `remediation.actions[]`
12+
- action support for:
13+
- inspect-only flows
14+
- jump-to-problem navigation
15+
- confirmable fixes
16+
- deterministic remediation categories for:
17+
- missing asset registry entries
18+
- unresolved palette/tileset/parallax source links
19+
- duplicate IDs
20+
- stale graph snapshots
21+
- orphaned graph nodes
22+
- circular/dependency inspection
23+
- Added automated coverage in `tests/tools/AssetRemediationSystem.test.mjs`
24+
- deterministic remediation action ordering
25+
- confirmable fix generation for single-candidate relink
26+
- graph refresh remediation generation
27+
- unavailable remediation state for valid projects
28+
- Integrated assistive remediation consumption into all three registry-aware editors:
29+
- `tools/Sprite Editor/`
30+
- remediation summary text
31+
- `Inspect Issues`
32+
- `Jump to Problem`
33+
- `Apply Suggested Fix`
34+
- confirmable palette relink, graph refresh, and owned-registry refresh flows
35+
- `tools/Tile Map Editor/`
36+
- remediation summary text
37+
- `Inspect Issues`
38+
- `Jump to Problem`
39+
- `Apply Suggested Fix`
40+
- confirmable tileset relink, graph refresh, and owned-registry refresh flows
41+
- `tools/Parallax Editor/`
42+
- remediation summary text
43+
- `Inspect Issues`
44+
- `Jump to Problem`
45+
- `Apply Suggested Fix`
46+
- confirmable parallax-source relink, graph refresh, and owned-registry refresh flows
47+
- Preserved validation authority and enforcement
48+
- remediation consumes validation output
49+
- guarded save/package/export blocking remains unchanged
50+
- remediation does not auto-apply fixes without explicit confirmation
51+
- legacy invalid projects still load and can move through repair workflows
52+
53+
## Manual Validation Checklist
54+
1. Missing asset issues produce relink suggestions when candidates exist. `PASS`
55+
2. Duplicate ID issues produce safe resolution suggestions. `PASS`
56+
3. Graph staleness can produce refresh/regenerate suggestions. `PASS`
57+
4. Confirmable fixes require explicit confirmation. `PASS`
58+
5. Navigation actions remain non-destructive. `PASS`
59+
6. Enforced blocking remains active until issues are resolved. `PASS`
60+
7. Suggestion output is deterministic across repeated validation runs. `PASS`
61+
8. Engine core APIs remain unchanged. `PASS`
62+
63+
## Validation Summary
64+
- Syntax checks passed:
65+
- `node --check tools/shared/projectAssetRemediation.js`
66+
- `node --check tests/tools/AssetRemediationSystem.test.mjs`
67+
- `node --check tools/Sprite Editor/modules/spriteEditorApp.js`
68+
- `node --check tools/Tile Map Editor/main.js`
69+
- `node --check tools/Parallax Editor/main.js`
70+
- Targeted remediation test passed:
71+
- `node` inline runner for `tests/tools/AssetRemediationSystem.test.mjs`
72+
- Full Node test suite passed:
73+
- `node ./scripts/run-node-tests.mjs`
74+
75+
## Scope Guard
76+
- Validation remains authoritative.
77+
- Remediation remains assistive and confirmation-based for state changes.
78+
- Jump/inspect flows remain non-destructive.
79+
- Enforced blocking still governs guarded save/package/export actions.
80+
- No engine core API files were modified.
81+
82+
## Approved Commit Comment
83+
build(asset-remediation): add assistive remediation system for validation findings
84+
85+
## Next Command
86+
APPLY_PR_ASSET_REMEDIATION_SYSTEM

0 commit comments

Comments
 (0)