## Summary
This PR improves the pre-commit hook performance by:
- Using `vitest related` to run only tests affected by changed files
- Adding ability to skip expensive tests (filter tests) during
pre-commit
- Providing a consistent mechanism for skipping expensive tests
## Changes
- Modified `lint-staged.config.mjs` to run `vitest related` with
`SKIP_EXPENSIVE_TESTS=true`
- Updated `test/filter-tests.ts` to use idiomatic `describe.skipIf()`
for conditional test execution
- Changed `test-min` script to use `SKIP_EXPENSIVE_TESTS` environment
variable instead of `--exclude`
- Updated `CLAUDE.md` with documentation about the new test workflow
## Impact
- Pre-commit hooks are now much faster as they:
- Only run tests related to changed files
- Skip 688 expensive filter tests
- Use the same skipping mechanism as `npm run test-min`
## Testing
- ✅ Verified `vitest related` correctly identifies and runs related
tests
- ✅ Confirmed filter tests are skipped when `SKIP_EXPENSIVE_TESTS=true`
- ✅ Tested that full test suite still runs all tests when env var is not
set
- ✅ Pre-commit hooks work correctly with the new setup
🤖 Generated with [Claude Code](https://claude.ai/code)
---------
Co-authored-by: Claude <noreply@anthropic.com>