|
| 1 | +# BUILD_PR — LEVEL 09_11 — RUNTIME ASSET BINDING |
| 2 | + |
| 3 | +## Objective |
| 4 | +Finish the next dependency-ordered step after game asset manifest coordination by binding runtime consumers to the deterministic game asset manifest and shared emitted asset records, without allowing runtime code to read tool/editor-only data. |
| 5 | + |
| 6 | +This PR follows: |
| 7 | +- 09_09 asset pipeline tooling |
| 8 | +- 09_10 game asset manifest coordination |
| 9 | + |
| 10 | +09_10 established deterministic manifest generation at `games/<game>/assets/<game>.assets.json`. |
| 11 | +09_11 now binds runtime-facing asset lookup to that manifest so games consume one clean coordinated surface. |
| 12 | + |
| 13 | +## Why This PR Exists |
| 14 | +The repo now has: |
| 15 | +- shared pipeline stages |
| 16 | +- data contract enforcement |
| 17 | +- deterministic manifest coordination |
| 18 | + |
| 19 | +What still needs to be finished is the runtime-facing binding layer that: |
| 20 | +- resolves runtime assets from the coordinated manifest |
| 21 | +- keeps runtime code out of `assets/<domain>/data/` |
| 22 | +- centralizes manifest-based asset lookup instead of ad hoc path usage |
| 23 | + |
| 24 | +Without this PR: |
| 25 | +- games may keep directly referencing asset paths inconsistently |
| 26 | +- manifest coordination exists but is not yet the standard runtime lookup surface |
| 27 | +- runtime/tool-data separation can still be bypassed |
| 28 | + |
| 29 | +## In Scope |
| 30 | +- define a runtime-facing asset binding layer |
| 31 | +- consume the deterministic game asset manifest as the approved lookup source |
| 32 | +- centralize runtime asset resolution by asset/domain identifiers |
| 33 | +- explicitly block editor/tool-data paths from runtime binding |
| 34 | +- add focused tests for manifest-based runtime binding behavior |
| 35 | +- keep the implementation within repo architecture boundaries |
| 36 | + |
| 37 | +## Out of Scope |
| 38 | +- no tool UI redesign |
| 39 | +- no engine feature expansion |
| 40 | +- no gameplay feature work |
| 41 | +- no new asset formats |
| 42 | +- no broad asset moves |
| 43 | +- no changes that let runtime depend on tool/editor data |
| 44 | + |
| 45 | +## Architectural Target |
| 46 | +Preferred shape: |
| 47 | +- shared runtime-safe asset binding utilities |
| 48 | +- manifest-driven lookup helpers |
| 49 | +- clear boundary between: |
| 50 | + - runtime asset resolution |
| 51 | + - editor-only/tool data |
| 52 | + |
| 53 | +This may live in a runtime-safe shared location appropriate to the current repo structure, but must not weaken the tool/runtime separation. |
| 54 | + |
| 55 | +## Required Responsibilities |
| 56 | +1. Read runtime-facing records from `games/<game>/assets/<game>.assets.json` |
| 57 | +2. Resolve runtime asset references deterministically |
| 58 | +3. Prevent `/data/` records from being treated as runtime assets |
| 59 | +4. Support active domains first: |
| 60 | +- sprites |
| 61 | +- tilemaps |
| 62 | +- parallax |
| 63 | +- vectors |
| 64 | +- tilesets only if directly required |
| 65 | +5. Keep lookup semantics stable enough for future migration/refactor work |
| 66 | + |
| 67 | +## Validation Expectations |
| 68 | +At minimum: |
| 69 | +- touched files parse cleanly |
| 70 | +- runtime binding resolves manifest-backed records correctly |
| 71 | +- `/data/` paths are rejected or excluded from runtime binding |
| 72 | +- deterministic lookup works by asset/domain identifiers |
| 73 | +- existing manifest coordination and pipeline tests still pass |
| 74 | + |
| 75 | +## Acceptance Criteria |
| 76 | +- runtime asset binding uses the coordinated manifest |
| 77 | +- runtime code no longer needs ad hoc per-domain path assumptions where touched |
| 78 | +- tool/editor data remains excluded from runtime binding |
| 79 | +- active domains resolve consistently |
| 80 | +- focused tests/checks pass |
| 81 | +- no unrelated engine/gameplay expansion occurs |
| 82 | + |
| 83 | +## Deliverables |
| 84 | +Return a repo-structured ZIP at: |
| 85 | +`<project folder>/tmp/BUILD_PR_LEVEL_09_11_RUNTIME_ASSET_BINDING.zip` |
| 86 | + |
| 87 | +Include: |
| 88 | +- docs/pr/BUILD_PR_LEVEL_09_11_RUNTIME_ASSET_BINDING.md |
| 89 | +- docs/dev/codex_commands.md |
| 90 | +- docs/dev/commit_comment.txt |
| 91 | +- docs/dev/next_command.txt |
| 92 | +- docs/dev/reports/change_summary.txt |
| 93 | +- docs/dev/reports/validation_checklist.txt |
0 commit comments