716 B
716 B
Policy testing
Work only in repository fixtures until activation is explicitly approved.
- Put policy fixtures in
tests/fixtures/personal-config/policies/. - Put ast-grep rules below
tests/fixtures/personal-config/ast-grep/rules/and keep severity belowerror. - Cover TS and TSX positives, nearby negatives, the exact named suppression with a
-- rationale, Unicode ranges, and malformed analyzer output where relevant. - Assert multiple policies sharing one analyzer key cause one adapter invocation.
- Run:
npm run typecheck
npm test
Use /hooks-doctor only after authorized initialization. Never make a policy evaluator invoke ast-grep, a linter, LSP, shell, or Pi API directly.