Skip to content
Arxo Arxo

Evidence

Evidence is the concrete “where and why” attached to metric results. Metrics can emit findings that include file, line, snippet, and recommendation; each finding contains a list of evidence items so you can fix issues directly in the code.

Findings (evidence)Policy violations
SourceMetric plugins (optional)Policy evaluation
ContentTitle, description, evidence (file/line/snippet), recommendationMetric key, expected vs actual, operator
PurposeExplain where and how to fixPass/fail gate on numeric thresholds

A policy violation says “scc.max_cycle_size was 3, expected 0.” A finding with evidence says “cycle involves src/a.ts, src/b.ts, src/c.ts” with file/line/snippet so you can open the exact locations.

A finding (attached to a MetricResult) typically has:

  • finding_type — e.g. CyclicDependency, LayeringViolation, HighBlastRadius.
  • severity — For UI/prioritization.
  • title / description — Short summary and longer explanation.
  • evidence — List of evidence items (see below).
  • recommendation — What to do (e.g. “Break the cycle by moving shared code to a util.”).
  • effort / impact — For prioritization.

Each evidence item points to a concrete location:

  • file — Path to the file (optional).
  • line — Line number (optional).
  • snippet — Code or context snippet (optional).
  • metadata — Extra key-value context (e.g. symbol, weight).

Not all metrics produce findings; many only produce numeric values. Metrics that do emit findings (e.g. cross-metric insights, refactoring recommendations, LLM integration, layer violations) use evidence so reports and UIs can link to the right place in the repo.

  • JSON reportMetricResult.findings[].evidence[].
  • HTML report — Findings rendered with clickable file/line links.
  • SARIF — Mapped to SARIF locations and results for IDE/CI integration.
  • Metrics — How metric results and findings relate
  • Violations — Policy failures (no evidence, just expected/actual)
  • Cross-Metric Insights — Example metric that produces findings with evidence