Distinguish type checks, prose, and executable examples
The validation table gives API type changes, JSDoc text changes, and JSDoc examples different commands. Documentation-only work does not need tests unless examples or code changed.
.agents/AGENTS.mdL17–26
Source excerpt starting at line 17.
17Use the narrowest validation that covers the change:1819| Change type | Validation |20| -------------------------------- | ---------------------------------------------------------------------------------- |21| Code changes | `pnpm lint-fix`, targeted `pnpm test --run <test_file.ts>`, `pnpm check` |22| Tests-only changes | `pnpm lint-fix`, targeted `pnpm test --run <test_file.ts>`, `pnpm check` |23| Type-level/API type changes | Targeted `pnpm test-types <filename>`, plus `pnpm check` when source types changed |24| JSDoc text/category/link changes | `pnpm jsdocs --check`, `pnpm lint` |25| JSDoc example changes | `pnpm jsdocs --check`, `pnpm lint`, root `pnpm doctest --run <files>` |26| Docs-only changes | `pnpm lint-fix`; no tests unless examples or code changed |
Four test commands cover development and production under both Turbopack and Webpack. The result must match the runtime combination being changed.
AGENTS.mdL138–143
Source excerpt starting at line 138.
138**Test commands by mode:**139140- `pnpm test-dev-turbo` - Development mode with Turbopack (default)141- `pnpm test-dev-webpack` - Development mode with Webpack142- `pnpm test-start-turbo` - Production build+start with Turbopack143- `pnpm test-start-webpack` - Production build+start with Webpack
The file says the cheap default runs Vitest and keeps browser suites opt-in. It reserves the fuller check for a PR-ready hand-off or changes whose scope needs it.
AGENTS.mdL161–168
Source excerpt starting at line 161.
161This is the cheap default and only runs the Vitest suite. Browser suites stay opt-in:162163```sh164pnpm test:e2e165pnpm test:release-smoke166```167168Run the browser suites only when your change touches them or when you are explicitly verifying CI/release flows.