Skip to content
Development
Command

/risk

Score the defect risk of a change — a commit or a base..head range — as a single 0–10 with drivers.

From plugin
repowise
5.1k12 skills12 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.

Score the defect risk of a change — a commit or a base..head range — as a single 0–10 with drivers.

Command definition

risk.md
description: Score the defect risk of a change — a commit or a base..head range — as a single 0–10 with drivers.
allowed-tools: Bash, Read

Repowise Risk

Score a *change* (not a file) for defect risk. Repowise reads the diff shape — lines added/deleted, files, directories, subsystems, change entropy, and author familiarity — and returns a 0–10 score with an attributable driver breakdown. 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 score, level, and top drivers — calling out *why* it's risky (e.g. wide diffusion across subsystems, low author familiarity).

Choosing the revspec

  • No args → `repowise risk` (scores `HEAD`)
  • 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 score + features + drivers
  • `--path <dir>` — point at a different git repo

How this differs from the other risk views

  • This command = the **whole change** as one number (defect-risk gate).
  • For **per-file** blast radius (what breaks, missing co-changes, 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