Skip to content
Development
Command

/impacted-tests

Print the tests whose coverage intersects a change's changed lines — for a commit, base..head range, or staged diff.

From plugin
repowise
8.1k17 skills17 commands1 MCP
> /plugin marketplace add repowise-dev/repowise
> /plugin install repowise@repowise

Command definition

impacted-tests.md
description: Print the tests whose coverage intersects a change's changed lines — for a commit, base..head range, or staged diff.
allowed-tools: Bash(repowise impacted-tests:*), Read
disable-model-invocation: true

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`); nothing on

stdout and `Run every test: <reason>` on stderr when the whole suite must run

  • `--format json` — full report
  • `--format args` — one line of runner arguments, or `:all` when the whole suite

must run; reasons go to stderr. `--runner pytest|go|jest|files|auto` picks the argument shape

  • `--path <dir>` — point at a different repo
repowise impacted-tests main..HEAD --format list | xargs pytest

Notes

  • Line-precise answers need a per-test map from `repowise coverage add` on a

report with contexts. If none is ingested, the command still 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 gets *candidates* instead, in a table

headed "NOT coverage-backed", each carrying a `via` marker: `changed-test` (the changed file is itself a test), `call-graph` or `import-graph` (a test file that reaches it, no ingest needed), or `filename-pattern` (a name-shaped guess). Report them as candidates. Only `via: coverage` proves a test executed the change.

  • A file none of those can speak to is "unknown, run the full suite".
  • In CI, `--format args` prints `:all` whenever the selection is not certain

(lockfiles, build or CI config, a changed file no test reaches, an index built at neither end of the change). Run everything when you see it.

  • For a whole-change repo-relative review priority, use `/repowise:risk`. For per-file

blast radius / `tests_to_run`, use `repowise risk --target <path> --changed-file <path>`.

Read more
@repowise-dev
Ships withrepowise

Codebase intelligence for AI and humans: code health scores, auto-generated docs, git analytics, dead code detection, and architectural decisions via MCP.

8.1k9 skills1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
8.1k
Star history of repowise-dev/repowise on GitHub, a chart by star-history.com

Other commands on repowise.

ask

ask

Command

Ask a codebase question and get a cited, synthesised answer with a confidence rating (costs an LLM call).

@repowise-dev@repowise-devInstall Command
context

context

Command

Triage card for files, modules, or symbols — layer, hotspot, fix history, freshness (relationships, not source bytes).

@repowise-dev@repowise-devInstall Command
coverage

coverage

Command

Ingest or inspect test-coverage reports (LCOV, Cobertura, Clover, Go cover profiles, JaCoCo, Salesforce Apex JSON, or repowise…

@repowise-dev@repowise-devInstall Command
decision

decision

Command

Work with architectural decisions; list, check health, record, pin, or put background records in force.

@repowise-dev@repowise-devInstall Command
doctor

doctor

Command

Diagnose the Repowise setup — install, API keys, index/store drift — and optionally repair it.

@repowise-dev@repowise-devInstall Command

More commands from other plugins.

build
Auto-invoked

build

Command

Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

@addyosmani@addyosmaniInstall Command