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
8.1k17 skills17 commands1 MCP
> /plugin marketplace add repowise-dev/repowise
> /plugin install repowise@repowise

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(repowise risk:*), Read
disable-model-invocation: true

Repowise Risk

Rank a *change* (not a file) by size and spread. `risk_percentile` is its rank among the repo's recent commits by diff size: not a bug predictor. The response includes `fix_history`: the recency-weighted bug-fix record of the files the change touches, manifests and lockfiles excluded. 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 size-and-spread percentile, then the fix history (which files carry prior bug fixes), 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 `repowise risk --target <path> --changed-file <path>` / the `change-review` skill.

  • For **per-file health** scores, use `/repowise:health`.
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.1k8 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, inspect health, add, or confirm auto-proposed decisions.

@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