Measure lab CLS with profile:cls, debug layout shift from loading shells and first-paint jump, and keep budgets tied to a CI artifact. Use when editing first-paint CSS, loading shells, critical-shell, or when the user mentions CLS, layout shift, or Lighthouse.
Run the headless app, catalog-load, and ZIP profilers and interpret the JSON the way a human would from window.profiler.report(), profile:load, and the ZIP console table. Use when editing sources/canvas/, load-image, renderer, zip export, zip-helpers,…
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.
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…
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…
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,…
Write TypeScript that satisfies this repo's lint and tsconfig rules, and convert an existing .js file to .ts without breaking its call sites. Use when adding or editing a .ts file, converting a .js file, adding the first .ts browser spec, or hitting a…
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.