get_health
Assess code health with scores for defect risk, maintainability, and performance, and receive findings with actionable details, optionally targeting specific files for pre/post-edit checks.
Instructions
Code-health scores and findings — self-check a file before/after editing.
No ``targets`` → repo dashboard (KPIs, worst files, ``high_leverage_files``
ranked by ``weighted_deficit`` = the files that actually move the repo
average). With ``targets`` → per-file scores + findings for those paths.
Three co-equal dimensions per file: ``score`` (defect risk, the headline),
``maintainability_score`` (readability/change-cost smells), and
``performance_score`` (static I/O-in-loop / N+1 RISK, high-precision /
low-recall, never blended into the defect headline). Each finding carries
its ``dimension``; a performance finding's ``details`` name the
``boundary_kind`` (db/network/filesystem/subprocess/lock) and, for
cross-function N+1, the caller→sink ``path``.
Args:
targets: file paths or ``module:<name>``. Empty → dashboard mode.
include: opt-in blocks (default stays lean): ``biomarkers`` (findings
in dashboard mode) | ``refactoring`` (deterministic suggestion per
finding) | ``trend`` | ``coverage`` | ``accuracy`` (does the score
rank the buggy files first) | ``signals`` (per-file churn/owners/
degree, targeted mode) | ``churn_complexity`` (danger-zone
quadrant) | ``performance``/``defect``/``maintainability``
(filter findings to one dimension).
repo: usually omitted.
limit: max rows in ranked lists (capped at 50).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | No | ||
| limit | No | ||
| include | No | ||
| targets | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |