Follow-up to #328.
Add historical metric trend support: compute VCS (and optionally AST) metrics at N historical points in time, surfacing improving-vs-degrading code over the project's lifetime.
Why
A single snapshot of risk_score answers "what's risky now." A trend answers "is this getting better or worse" — which is the actionable question for technical-debt programs. The Kamei JIT survey notes that JIT models lose predictive power over time, which is a different framing of the same phenomenon: metrics decay; trends are more durable.
Scope
- New CLI flag:
bca vcs trend --points <N> --span <DURATION> (e.g., 12 points over 24 months → monthly metric snapshots).
- For each point in time: check out the repo at that commit (or use
gix to read trees without checking out), compute VCS metrics with --as-of set to that point.
- Emit a time-series JSON:
{ files: { path: [{ as_of, risk_score, ... }, ...] } }.
- Optional delta summary: which files improved / regressed the most.
Edge cases
- Files that didn't exist at an older time point: emit
null.
- Renamed files: track via rename detection if
--follow-renames.
- Very deep histories: cap point count; document.
Acceptance criteria
Follow-up to #328.
Add historical metric trend support: compute VCS (and optionally AST) metrics at N historical points in time, surfacing improving-vs-degrading code over the project's lifetime.
Why
A single snapshot of
risk_scoreanswers "what's risky now." A trend answers "is this getting better or worse" — which is the actionable question for technical-debt programs. The Kamei JIT survey notes that JIT models lose predictive power over time, which is a different framing of the same phenomenon: metrics decay; trends are more durable.Scope
bca vcs trend --points <N> --span <DURATION>(e.g., 12 points over 24 months → monthly metric snapshots).gixto read trees without checking out), compute VCS metrics with--as-ofset to that point.{ files: { path: [{ as_of, risk_score, ... }, ...] } }.Edge cases
null.--follow-renames.Acceptance criteria