Author a UI Test Case
Scaffold an asset-generation test case of
asset_kind = "ui": a high-resolution interface asset such as a HUD plate,
panel, button, frame, icon, insignia, title, or background, painted one recorded
operation at a time with the paint layered painter and the ui binary for
crisp shapes, text, and nine-slice. Read
Authoring a UI Test Case for the
full procedure;
UI cases is the authoritative
schema.
For a tileable PBR material see Author a Material Test Case.
Layout
Section titled “Layout”A version lives at
test-cases/asset-generation/<difficulty>/<slug>/<version>/. A version with runs
recorded against it is frozen; revise a case by adding a new version.
test-cases/asset-generation/<difficulty>/<slug>/<version>/ test-case.toml # manifest: type, asset_kind, canvas, ui, tool, output variants/ # one standalone TOML file per variant prompt.hbs # rendered into the harness instruction; not seeded changelog.md # required per-version entry; not seeded description.md # site blurb; not seeded specs/brief.md # what to paint and how the tools behave; seededA run seeds the brief, paint.config.json, a single empty action log, and a
blank starting preview per element. Core emits the flattened per-element PNGs and
ui.json, so the manifest names neither. The case is reviewed by a human against
its brief, so it declares no [[reference]] and carries no target image.
- Pick a catalog slug and the asset to paint, then decide the version’s shape: a
single full-canvas image, which omits the
[ui]table, or a kit of named elements, which declares it. - Write
specs/brief.md: the interface’s role and mood, the exact palette as named colors with hex values, each element’s size, the nine-slice stretch region for any frame, panel, or button, and how the tools behave. Both binaries are onPATH, share one workspace and one operation log, and only marks made through them count. Keep the brief self-contained. - Write
prompt.hbs. It renders in strict mode against{{variant.*}},{{#each specs}},{{workspace}}, and{{time_limit_hours}}. Point the model at both binaries’--help. - Write
test-case.toml: metadata, the requiredchangelog,type = "asset-generation",asset_kind = "ui", and thevariantslist of paths to standalone files undervariants/. It is a root key, so it precedes the first table header, and the first entry is the default variant. - Declare
[canvas]with the base element size and abackground, and[tool]withbinary = "paint".[tool].previewcarries the{element}token for a kit and names a single file for one image.[output].actionsnames a single interleaved log and rejects the{element}token. - For a kit, declare
[ui]with one[[ui.element]]per element, each carrying a uniquename, a positivewidthandheight, and an optionalnine_slicethat fits within those bounds. - Declare the single
overall[[domain]]a human rates the kit under. The kit is judged as a whole against its brief on that one rating, so the case declares no[[review_item]]checklist, no[[reference]], no[build], and no[[check]].
thunderhead-hud, a five-element fleet-command HUD kit, is the worked example.
Validate
Section titled “Validate”Run these for every variant.
npm run lint:specstcab prompt --test-case <slug> --version <version> --variant <variant>tcab seed --test-case <slug> --version <version> --variant <variant>prompt catches strict-mode template and manifest errors, including a missing
{element} token on a kit’s preview and an {element} token on the action
log. seed writes the seeded repository under tmp/, where you confirm the
seeded set is self-contained.
Next steps
Section titled “Next steps”- Run a Test Case to exercise it end to end.
- Review a Run to assess the result against its brief.