Skip to content
Development
Command

/risk

Rank a live change for review using a repo-relative percentile and an auditable supporting diff-shape score.

From plugin
repowise
6.4k17 skills17 commands1 MCP
Install
> /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/risk

Context preview

What this command does when you run it.

Rank a live change for review using a repo-relative percentile and an auditable supporting diff-shape score.

Command definition

risk.md
description: Rank a live change for review using a repo-relative percentile and an auditable supporting diff-shape score.
allowed-tools: Bash, Read

Repowise Risk

Assess a *change* (not a file) for review priority. The authoritative fields are the repo-relative `risk_percentile` and `classification`. The response includes `fix_history`: the recency-weighted bug-fix record of the files the change touches, which of them carry it, and where that sits among the repo's own recent commits. The supporting 0–10 score measures diff size and spread (named in `score_measures`) rather than danger and is not a probability. Pure git + learned constants: no LLM, no network. A natural pre-merge / PR gate.

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 risk`, and present the fix history first (which files keep breaking, and the repo-relative percentile), then the score and its drivers.

Choosing the revspec

  • No args → `repowise risk` (scores uncommitted work, or `HEAD` when the tree is clean)
  • A commit SHA → `repowise risk <sha>`
  • A range / PR / branch → `repowise risk <base>..<head>` (e.g. `repowise risk main..HEAD`)

Useful flags:

  • `--ext .py,.ts` — only count changes in those file types
  • `-x, --exclude <pattern>` — gitignore-style pattern to drop from the diff (repeatable; also honors a `.riskignore` file)
  • `--format json` — machine-readable fix history + score + features + drivers
  • `--baseline <n>` — how many recent commits to rank the change against (0 disables)
  • `-t, --target <path>` — score what history says about named files instead of a change (repeatable; reads the index)
  • `--path <dir>` — point at a different git repo

How this differs from the other risk views

  • This command = the **whole change** ranked against recent repository history.
  • For **per-file** structural reach, missing co-changes, and missing tests,

use the `get_risk` MCP tool / the `change-review` skill.

  • For **per-file health** scores, use `/repowise:health`.
Read more
Ships withrepowise

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

Get the whole plugin

Other commands on repowise.