spriteforge/docs/introspection.md

35 lines
1.2 KiB
Markdown

# Text-first introspection
Agents inspect generated libraries through commands, never by opening images.
All commands default to `build/` and accept `--build-dir`.
```text
sf list [--tag TAG] [--backend BACKEND]
sf describe ASSET_ID
sf ascii ASSET_ID [--frame N] [--columns 40]
sf palette NAME
sf validate [MANIFEST ...]
sf diff ASSET_ID --against HASH_OR_PREFIX
sf stats
```
`list` reports ID, backend, frame/direction counts, dimensions, build hash and
status. `describe` includes the complete normalized manifest specification.
`ascii` reads only indexed silhouette data and produces a preview around forty
columns wide. `validate` checks hashes, binary structure, empty frames,
durations, pivots, metadata consistency, palettes, and manifest entries missing
from the catalog.
Each build writes `index.json`. `hash` identifies the build inputs and tool
versions; `content_hash` verifies the `.sfa` bytes. Text snapshots under
`.sfmeta/` allow `diff` to explain changes without decoding images.
## Human-only contact sheets
```text
sf contact-sheet --output contact-sheet.png
```
This is explicitly for a human. An agent must not open the resulting PNG; it
must use `sf validate` and `sf ascii` to inspect output.