# REPORT-A: library audit script

**What changed (plain):** added `tools/audit_library.py`, a stdlib-only script that reads the asset repo and writes `audit/audit.json` and `audit/audit.md`. It covers the six checks asked for: coverage, embeddings, broken entries, rigs, variants, usage. Ran it once against the two blob dirs and the creatures worktree cards.

**Evidence (run at 14:49 UTC / 16:49 CET):**
- 454 active assets, 30 extra creature cards (not indexed). 0 invalid cards, 0 index entries without a card file.
- Embeddings: 0 missing visual description, text vector, image vector, description vector, or thumbnail (npz member check matches lib/search.py key `sha256(id@release)`).
- GAPs (under 5 active): animals 0 (17 creature cards waiting), monsters 4, weapons 3.
- 30 creature GLBs missing from both blob dirs (they are not in integrate/search store yet).
- Drivable vehicles without wheels+steer: 30. Without doors: 68. Example checked by hand: `vehicle.car.sedan/kenney-sedan` has only `body` and `wheels` nodes.
- Furniture that opens without door/drawer/lid nodes: 3. Characters without clips: 38 (no rig gap).
- Variant-looking cards: 128, none with a parent link. Usage fields: none.

**Decisions I made:**
- Thumbnails: `site/out` is gitignored, so the script takes `--thumbs <dir>` (I pointed it at the main checkout's thumbs, read-only).
- Props = `prop.*` minus furniture, so the two categories do not double count.
- `bookcase` counts as "opens" only when its name mentions door or glass. `box` is in the opening list as the brief says.
- Extra creature cards count in coverage and get a validity and blob check, but no embedding or rig checks (their vectors are not in this worktree).
- Per-class detail is in `audit.json` only; `audit.md` keeps to per-kind counts to stay short.

**What would break / caveats:**
- The 128 variant hits are a text match (name, id, provenance), so some are false positives.
- The usage check looks for key names; it will not catch a usage recorded as a free-text value.
- Rig checks use node name prefixes (`wheel`, `steer`, `door`, `drawer`, `lid`), not the rig itself.

**Not done:** no fixes to any asset (per brief). Did not touch main, integrate, the creatures worktree, gex44/ax42/box1/prod. No publish or deploy. No scratch dir was made.
