Commit graph

2 commits

Author SHA1 Message Date
Admin
25d7c2d3f2 assets: fix the GLB magic that made all model metadata a lie; index kits
THE BUG: GLB_MAGIC was 0x4655_4C67, which spells "gLUF" — not "glTF"
(0x4654_6C67). The magic check therefore rejected EVERY REAL GLB, probe()
returned defaults, and the entire 4,442-model library indexed with
rigged:false, animated:false, size:None. Size filters silently matched
nothing; no model was ever detected as rigged. Any claim made from that
metadata — including "Kenney has essentially no rigging" — was measuring a
no-op, not the catalogue.

It stayed invisible because THE TEST FIXTURE WROTE THE SAME WRONG MAGIC, so
the test and the bug agreed with each other. Fixing the constant broke that
test, which is exactly how a fixture should behave once it stops encoding the
defect. A second bug sat behind it: bounds() searched for "max" only AFTER
"min", but Kenney's exporter writes max first, so bounds would have failed
even with the magic fixed. Both fixed, both with regression tests.

Consequence: the previously-reported 120 ms index build was timing a no-op.
Real probing is ~1.8 s for 5,309 models, now cut to the declared JSON chunk
and parallelised across <=8 threads (std-only, order preserved,
deterministic). The proper fix is caching probes by path+mtime — NOT done, and
the perf bound is now 12 s with a comment saying why rather than a tight
number the test cannot control under contention.

KIT INVENTORY — 23 kits, 2,064 tiles, grouped so a query returns a coherent
visually-matching set instead of one tile from each of five kits. Tile size is
the MEDIAN horizontal extent (kits ship occasional double-width pieces, and a
mean lands between grid pitches — a value no tile uses). Highlights:
city-kit-roads 72 tiles @1.00, coaster-kit 183 @4.00, tower-defense-kit 160
@1.00, marble-kit 162 @1.20, platformer-kit 153 @1.00, modular-buildings 108
@1.00, racing-kit 112 @1.05. The most useful single fact: modular-dungeon,
-cave and -space kits have IDENTICAL role histograms — one layout algorithm
drives all three and the kit choice is pure theming.

Honest failure: city-kit-commercial (41) and city-kit-industrial (25) yield
ZERO roles — their files are building-a..building-z, whole buildings with no
role vocabulary. Grid-placeable but not composable; arguably not kits.

Adjacency ships as DATA (ROLE_ADJACENCY) for the composition layer and is
deliberately coarse: Kenney filenames say what a piece IS, never which edges
are open, so anything finer would be invented. Also added: role/kit/clips/
joints on entries, kits()/kit_tiles() grouping, a find_kit agent tool (<2 KB
so the AI can discover a coherent set before composing), and composition-intent
vocabulary.

Inert per the Kenney-only scope cut: clip extraction, Quaternius source
support, .gltf support — tested and harmless. 64 fetched Quaternius models
were deleted after verifying they parse (46 joints/13 clips).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-03 10:15:42 +02:00
Admin
969cb2c3d9 Arcade: Kenney CC0 asset library with an AI-queryable index
75 models (5 KenneyNL starter kits, .glb, pinned commits + sha256, 2.8MB)
and 556 sounds (7 packs via kenney.nl content-hashed URLs, each zip
sha256-verified, 13MB). Nothing large enters git: dirs are gitignored, only
CREDITS.toml and .gitignore files are tracked.

The index is the point — an AI cannot use a library it can't name:
- id is kenney/racing/vehicle-truck-yellow, anchored to where the file
  LIVES, not its category, so retuning the category tree never invalidates
  a saved game
- Filename tokens are the floor; the value is two hand-curated alias tables
  (76 model rows, 116 audio FAMILY rows — Kenney's footstep_wood_000..004
  collapse to one family, so 556 files stay maintainable) spanning
  synonyms, kid vocabulary and misspellings (vehical, hosue, motercycle),
  function over identity ("something to hide behind"), colour/size/
  material, and theme, plus ~190 query-time synonym expansions
- AssetKind model/sound/music so a 30-second track can't be returned as a
  hit sound; GLB probe reads skins -> rigged, animations -> animated
- FIND_MODEL tool descriptor (provider-neutral plain data) + compact
  results; library_summary() is 469 chars for 632 entries and provably
  doesn't grow with the catalogue; resolve_or_explain() rejects
  hallucinated ids with near-misses; local_spawn() gives the local
  librarian a best match plus a confidence blending strength with margin

HONEST GAP: every Kenney audio pack is Ogg Vorbis only — no WAV exists
upstream — and this tree has no vorbis decoder. Sounds are indexed and
searchable but NOT playable: entries carry decodable:false, the agent JSON
emits playable:false so a game cannot fire a silent sound, and
--transcode converts via ffmpeg when present. A real decoder is the fix.

Three bugs found by testing, all fixed: sci-fi-sounds.zip ships a directory
with no owner-write bit so that pack alone silently extracted 0 of 73 files;
prepositions matched phrase aliases ("...at the roadworks" hit "something to
shoot at"), so function words must be dropped, not down-weighted; and exact
names lost to incidental aliases (a coin SOUND outranked the coin MODEL).
Miss list left visible at 2/52 rather than tuned away — both are defensible
answers against over-narrow expectations.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-03 08:31:26 +02:00