get_change_risk
Evaluate a commit, range, or uncommitted work to detect newly introduced defects, maintainability issues, and performance risks. Provides a health_delta with attribution and confidence for each finding.
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 across defect, maintainability, and performance).
Both sides are analysed from their own content, so a finding present at
head is only reported when the diff explains it; every finding names its
``attribution`` basis and confidence.
Trust ``health_delta.status``: ``partial`` means files were skipped and the
change is not cleared. ``scope`` counts what was actually compared.
``impacted_tests`` keeps measured coverage and inferred candidates distinct.
``prior_fixes`` counts past fixes overlapping this diff. ``change_shape``
ranks the diff's size and spread against recent commits.
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/"]``.
baseline: Recent commits sampled for percentile ranking; 0 disables it.
include: ``"findings"`` for every change finding, ``"diagnostics"`` for
raw score mechanics, ``"scales"`` for units. All identical on
repeat, so ask once.
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 | ||
| exclude_patterns | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |