get_change_risk
Review a commit, commit range, or uncommitted changes to assess change risk, health impact, findings, and test coverage.
Instructions
Review a commit, base..head range, or uncommitted work.
Leads with ``directive`` (what to do) and ``health_delta`` (what this
change newly made worse). Findings are reported only when the diff explains
them, name their ``attribution`` basis, and sort change-written above
pre-existing.
Trust ``health_delta.status``: ``partial`` means files were skipped and the
change is not cleared.
``impacted_tests`` keeps measured coverage and inferred candidates distinct.
``patch_coverage`` is the share of changed executable lines stored coverage
ran; ``hints`` name tests to extend. ``fix_history`` is the changed files'
bug-fix record, ``overlap`` the past fixes on these exact lines,
``branch_overlap`` other branches editing them. ``diff_shape`` is one line
on size, not a danger verdict. An empty diff returns
``status: "nothing_to_score"``.
Args:
revspec: Commit or ``base..head`` range. Omit to review uncommitted
work, or ``HEAD`` when the tree is clean.
repo: Repository alias in workspace mode; omit for the default.
extensions: File suffixes to count, e.g. ``[".py", ".ts"]``.
exclude_patterns: Gitignore-style paths to omit, e.g. ``["tests/"]``.
include_paths: Gitignore-style paths to keep, as a list or one
comma-separated string, e.g. ``"src/api/,src/db/"``. Omit for all.
baseline: Recent commits sampled for percentile ranking; 0 disables it.
include: ``"findings"``, ``"diagnostics"`` (raw score mechanics) or
``"scales"`` (units).
finding_id: Expand one ``health_delta`` finding by its id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | No | ||
| include | No | ||
| revspec | No | ||
| baseline | No | ||
| extensions | No | ||
| finding_id | No | ||
| include_paths | No | ||
| exclude_patterns | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |