Files
rtk-ai__rtk/hooks
polamin 6612f22060 improve: hook coverage from 0.2% to ~80% with env prefix stripping (#97)
Two root causes for low interception rates:

1. Environment variable prefixes broke pattern matching.
   Commands like `TEST_SESSION_ID=2 npx playwright test` start
   with an env var, not the command name, so no pattern matched.
   Fix: strip leading env vars for matching, preserve for execution.

2. Missing patterns for commands RTK already supports:
   npm run/test, vue-tsc, docker compose, docker run/build/exec,
   kubectl describe/apply, gh api/release.

Also fixes vitest "run" duplication bug where `vitest run` became
`rtk vitest run run`.

Includes 50-test regression suite (hooks/test-rtk-rewrite.sh).

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 18:31:23 +01:00
..