/impacted-tests
Print the tests whose coverage intersects a change's changed lines — for a commit, base..head range, or staged diff.
> /plugin marketplace add repowise-dev/repowise > /plugin install repowise@repowise
How it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/impacted-tests
Context preview
What this command does when you run it.
Print the tests whose coverage intersects a change's changed lines — for a commit, base..head range, or staged diff.
Command definition
impacted-tests.mddescription: Print the tests whose coverage intersects a change's changed lines — for a commit, base..head range, or staged diff.
allowed-tools: Bash, Read
Repowise Impacted Tests
Map a change to the tests that actually exercise its changed lines, using the per-test coverage map from `repowise coverage add`. No LLM, no network — an index lookup. Useful as a pre-merge / CI gate ("run these 40, not all 4,000").
Steps
1. If `.repowise/` doesn't exist: "This repo isn't indexed yet. Run `/repowise:init` first." Stop. 2. Resolve the target from `$ARGUMENTS`, run `repowise impacted-tests`, and present the test ids. Be honest about gaps (see Notes).
Choosing the revspec
- No args → `repowise impacted-tests` (staged changes; same as `--staged`)
- A commit SHA → `repowise impacted-tests <sha>`
- A range / PR / branch → `repowise impacted-tests <base>..<head>`
(e.g. `repowise impacted-tests main..HEAD`)
- "staged" → `repowise impacted-tests --staged`
Useful flags:
- `--format list` — test ids one per line (pipe to `xargs pytest`)
- `--format json` — full report
- `--path <dir>` — point at a different repo
repowise impacted-tests main..HEAD --format list | xargs pytest
Notes
- Requires a per-test map from `repowise coverage add` on a report with
contexts. If none is ingested, the command prompts to run `/repowise:coverage` / `repowise coverage add` — it does **not** invent an empty "no tests needed" result.
- A changed file with no coverage rows may get a filename-pattern **guess**
labelled as a guess — never present guesses as coverage-backed.
- A brand-new file with neither coverage nor a paired test is "unknown, run
the full suite".
- For a whole-change defect-risk score, use `/repowise:risk`. For per-file
blast radius / `tests_to_run`, use the `get_risk` MCP tool.
Read more
description: Print the tests whose coverage intersects a change's changed lines — for a commit, base..head range, or staged diff. allowed-tools: Bash, Read
Repowise Impacted Tests
Map a change to the tests that actually exercise its changed lines, using the per-test coverage map from `repowise coverage add`. No LLM, no network — an index lookup. Useful as a pre-merge / CI gate ("run these 40, not all 4,000").
Steps
1. If `.repowise/` doesn't exist: "This repo isn't indexed yet. Run `/repowise:init` first." Stop. 2. Resolve the target from `$ARGUMENTS`, run `repowise impacted-tests`, and present the test ids. Be honest about gaps (see Notes).
Choosing the revspec
- No args → `repowise impacted-tests` (staged changes; same as `--staged`)
- A commit SHA → `repowise impacted-tests <sha>`
- A range / PR / branch → `repowise impacted-tests <base>..<head>`
(e.g. `repowise impacted-tests main..HEAD`)
- "staged" → `repowise impacted-tests --staged`
Useful flags:
- `--format list` — test ids one per line (pipe to `xargs pytest`)
- `--format json` — full report
- `--path <dir>` — point at a different repo
repowise impacted-tests main..HEAD --format list | xargs pytest
Notes
- Requires a per-test map from `repowise coverage add` on a report with
contexts. If none is ingested, the command prompts to run `/repowise:coverage` / `repowise coverage add` — it does **not** invent an empty "no tests needed" result.
- A changed file with no coverage rows may get a filename-pattern **guess**
labelled as a guess — never present guesses as coverage-backed.
- A brand-new file with neither coverage nor a paired test is "unknown, run
the full suite".
- For a whole-change defect-risk score, use `/repowise:risk`. For per-file
blast radius / `tests_to_run`, use the `get_risk` MCP tool.
Codebase intelligence for AI and humans: code health scores, auto-generated docs, git analytics, dead code detection, and architectural decisions via MCP.
Repo: repowise-dev/repowise
Other commands on repowise.
- /coverage
Ingest or inspect test-coverage reports — LCOV, Cobertura/Clover, or coverage.py .coverage (builds the per-test map when contexts are present).
Open command - /dead-code
Report unreachable files, unused exports, and zombie packages, tiered by confidence.
Open command - /decision
Work with architectural decisions — list, inspect health, add, or confirm auto-proposed decisions.
Open command - /doctor
Diagnose the Repowise setup — install, API keys, index/store drift — and optionally repair it.
Open command - /health
Show Repowise code-health — KPIs, lowest-scoring files, refactoring targets, trends, or per-file markers.
Open command - /init
Set up Repowise for this codebase. Installs if needed, asks about your preferences, and runs the indexing.
Open command

