Run and read unit-test coverage for this repo and satisfy the codecov/patch and codecov/changes gates. Use when a PR check fails on coverage, after editing gated production code under sources/ or scripts/, or when the user mentions coverage, Codecov, patch,…
Thread CatalogReader and State through Mithril attrs, never a hidden global. Handle Result/LoadError, seed test catalogs, and keep URL hashes stable. Use when adding or editing a component, a browser spec, or sources/state/ code, or when the user mentions…
Diagnose missing or stale dist/*-metadata.js, the Vite metadata plugin cache, and the ../name-metadata.js import alias. Use when dist/ is missing, a catalog resolves nothing, a spec fails only locally, or editing the Vite metadata plugin. Do not hand-edit…
Run or add Playwright visual specs and know when a layout or CSS change needs npm run test:visual. Use after first-paint, panel-layout, or PurgeCSS safelist changes, or when adding a Playwright case.
Change the offscreen renderer, palette recolor, z-position order, or magenta mask, and ask the user to check WebGL and the CPU fallback. Use when editing sources/canvas/, palette recolor, z-positions, or renderer output.
Run a single Node, browser, or Playwright spec instead of the full suite. Use when debugging one test, iterating on a failing spec, or the user asks to run one file, one test, or a filtered suite. Do not start with npm test.
Add or edit sheet_definitions JSON for items, categories, variants, credits, layers, or z-positions. Use when adding art, a new category, a credits entry, or renaming an asset. Copy a neighboring definition; do not invent keys.
Write a browser Mocha, Node, or Playwright visual spec for this repo. Use when adding a test, covering new production lines, or the user asks for a spec. New specs are TypeScript. Register browser specs in tests/tests.js.