|
| 1 | +# BUILD_PR_LEVEL_9_7_REMOVE_INTERNAL_REFERENCES_AND_INLINE_DATA |
| 2 | + |
| 3 | +## Objective |
| 4 | +Convert Asteroids from: |
| 5 | + |
| 6 | +```text |
| 7 | +single JSON file with internal references |
| 8 | +``` |
| 9 | + |
| 10 | +to: |
| 11 | + |
| 12 | +```text |
| 13 | +single JSON file with direct inline data |
| 14 | +``` |
| 15 | + |
| 16 | +## Current Bad Patterns |
| 17 | + |
| 18 | +Remove these from `games/Asteroids/game.manifest.json`: |
| 19 | + |
| 20 | +### 1. Root `assetCatalog` |
| 21 | +Remove the root `assetCatalog` object unless it only describes external binary/media files. If kept for binaries, rename/limit to asset-browser external file assets only and do not use it for JSON data. |
| 22 | + |
| 23 | +Bad: |
| 24 | + |
| 25 | +```json |
| 26 | +"assetCatalog": { |
| 27 | + "palette.asteroids.classic": { |
| 28 | + "path": "/games/Asteroids/game.manifest.json#tools/primitive-skin-editor/palettes/palette.asteroids.classic" |
| 29 | + } |
| 30 | +} |
| 31 | +``` |
| 32 | + |
| 33 | +### 2. `runtimeSource` |
| 34 | +Remove fields like: |
| 35 | + |
| 36 | +```json |
| 37 | +"runtimeSource": "/games/Asteroids/game.manifest.json#tools/..." |
| 38 | +``` |
| 39 | + |
| 40 | +### 3. Internal `source.path` |
| 41 | +Remove fields like: |
| 42 | + |
| 43 | +```json |
| 44 | +"source": { |
| 45 | + "kind": "svg", |
| 46 | + "path": "/games/Asteroids/game.manifest.json#tools/vector-asset-studio/vectors/vector.asteroids.ship" |
| 47 | +} |
| 48 | +``` |
| 49 | + |
| 50 | +### 4. Internal fragment paths |
| 51 | +Remove any string containing: |
| 52 | + |
| 53 | +```text |
| 54 | +/game.manifest.json# |
| 55 | +#tools/ |
| 56 | +#tools. |
| 57 | +``` |
| 58 | + |
| 59 | +### 5. Lineage pointer sections |
| 60 | +Remove: |
| 61 | +- `lineage.inlinedSourceFiles` |
| 62 | +- `lineage.toolDomains` |
| 63 | + |
| 64 | +Keep only minimal build note if needed: |
| 65 | + |
| 66 | +```json |
| 67 | +"lineage": { |
| 68 | + "build": "BUILD_PR_LEVEL_9_7_REMOVE_INTERNAL_REFERENCES_AND_INLINE_DATA" |
| 69 | +} |
| 70 | +``` |
| 71 | + |
| 72 | +or remove `lineage` entirely if not needed. |
| 73 | + |
| 74 | +## Correct Data Model |
| 75 | + |
| 76 | +### Vector Data |
| 77 | +Correct: |
| 78 | + |
| 79 | +```json |
| 80 | +{ |
| 81 | + "id": "vector.asteroids.ship", |
| 82 | + "type": "vector", |
| 83 | + "geometry": { |
| 84 | + "viewBox": "-24 -24 48 48", |
| 85 | + "paths": [] |
| 86 | + }, |
| 87 | + "style": { |
| 88 | + "stroke": true, |
| 89 | + "fill": false |
| 90 | + } |
| 91 | +} |
| 92 | +``` |
| 93 | + |
| 94 | +No internal `source.path`. |
| 95 | + |
| 96 | +### Sprite Data |
| 97 | +Correct: |
| 98 | + |
| 99 | +```json |
| 100 | +{ |
| 101 | + "id": "sprite.asteroids.demo", |
| 102 | + "frames": [] |
| 103 | +} |
| 104 | +``` |
| 105 | + |
| 106 | +No `runtimeSource`. |
| 107 | + |
| 108 | +### Tilemap Data |
| 109 | +Correct: |
| 110 | + |
| 111 | +```json |
| 112 | +{ |
| 113 | + "id": "tilemap.asteroids.stage", |
| 114 | + "screens": [], |
| 115 | + "systems": [] |
| 116 | +} |
| 117 | +``` |
| 118 | + |
| 119 | +No `project.runtimeSource`. |
| 120 | + |
| 121 | +### Parallax Data |
| 122 | +Correct: |
| 123 | + |
| 124 | +```json |
| 125 | +{ |
| 126 | + "id": "parallax.asteroids.overlay", |
| 127 | + "role": "gameplay-overlay", |
| 128 | + "enabled": true |
| 129 | +} |
| 130 | +``` |
| 131 | + |
| 132 | +No `runtimeSource`. |
| 133 | + |
| 134 | +### Primitive Skin / HUD Data |
| 135 | +Correct: |
| 136 | +- HUD/skin data belongs under `primitive-skin-editor`. |
| 137 | +- It must be actual color/skin JSON data. |
| 138 | +- It must not be a reference to old `hud.json`. |
| 139 | + |
| 140 | +### External File Assets |
| 141 | +Only binary/media assets may keep paths: |
| 142 | +- audio |
| 143 | +- png/webp/svg image files |
| 144 | +- fonts |
| 145 | + |
| 146 | +These belong under `asset-browser`. |
| 147 | + |
| 148 | +## Required Validation |
| 149 | + |
| 150 | +After changes: |
| 151 | + |
| 152 | +Search `games/Asteroids/game.manifest.json` for: |
| 153 | +- `runtimeSource` |
| 154 | +- `assetCatalog` |
| 155 | +- `game.manifest.json#` |
| 156 | +- `#tools/` |
| 157 | +- `#tools.` |
| 158 | +- `inlinedSourceFiles` |
| 159 | +- `toolDomains` |
| 160 | +- old deleted JSON filenames |
| 161 | + |
| 162 | +Expected: |
| 163 | +- none remain, except external media paths that are not JSON. |
| 164 | + |
| 165 | +## Direct Launch |
| 166 | +Asteroids must still launch directly. |
| 167 | + |
| 168 | +## Required Report |
| 169 | +Create: |
| 170 | + |
| 171 | +```text |
| 172 | +docs/dev/reports/level_9_7_remove_internal_references_report.md |
| 173 | +``` |
| 174 | + |
| 175 | +Report: |
| 176 | +- removed internal references count |
| 177 | +- remaining external file paths |
| 178 | +- remaining JSON file count under Asteroids |
| 179 | +- direct launch result |
| 180 | +- any retained reference and reason |
| 181 | + |
| 182 | +## Acceptance |
| 183 | +- `games/Asteroids/**/*.json` count remains 1. |
| 184 | +- `game.manifest.json` contains no internal `#tools` references. |
| 185 | +- `game.manifest.json` contains no `runtimeSource`. |
| 186 | +- `game.manifest.json` contains no root JSON-data `assetCatalog`. |
| 187 | +- Actual data remains in owning tool sections. |
| 188 | +- External media paths are allowed only for non-JSON files. |
| 189 | +- Asteroids launches directly. |
| 190 | +- No validators added. |
| 191 | +- No `start_of_day` changes. |
0 commit comments