Skip to main content

Understanding the DriftScore

A deep dive into how the Vibgrate DriftScore is calculated — the four weighted components, risk levels, and how to interpret your score.

Vibgrate Docs

Vibgrate Help

What Is the DriftScore?

The DriftScore is a deterministic, versioned metric (0–100) that represents how far behind your codebase is relative to the current stable ecosystem baseline.

Lower score = healthier upgrade posture. 0 means no drift (fully current); 100 means maximum drift — higher is worse.

Risk Levels

ScoreRisk LevelWhat It Means
0–30LowYou're in good shape
31–60ModerateSome attention needed
61–100HighSignificant upgrade debt

Score Components

The overall score is a weighted combination of four components:

Runtime (Weight: High)

Measures Node.js or .NET runtime major version lag. Running a current LTS version scores lowest (least drift). Running an older but still supported version scores moderately. Running an end-of-life runtime scores very high.

Frameworks (Weight: High)

Measures major version distance for core frameworks — React, Next.js, NestJS, ASP.NET Core, Angular, Vue, etc. Frameworks are weighted heavily because major version upgrades often require significant code changes.

Dependencies (Weight: Medium)

Measures the age distribution across all dependencies. The scan classifies each dependency as:

  • Current — on the latest major version
  • One major behind — one major version lag
  • Two-plus majors behind — two or more major versions behind

The stacked distribution determines the score contribution.

EOL Risk (Weight: High)

Measures proximity to end-of-life for runtimes and frameworks. As an EOL date approaches, the score rises sharply. After EOL, this component contributes very high scores.

Deterministic and Versioned

The score algorithm is versioned (schemaVersion: "1.0"), meaning the same inputs always produce the same score. This makes the score suitable for CI quality gates — you won't get different scores on different runs without actual dependency changes.

Improving Your Score

The fastest ways to improve your drift score:

  1. Upgrade your runtime — moving from Node 18 to Node 22, or .NET 6 to .NET 8, has the biggest impact
  2. Upgrade core frameworks — React 17 → 19, Next 13 → 15, Angular 15 → 18, etc.
  3. Batch-upgrade stale dependencies — focus on the "two-plus majors behind" bucket first
  4. Set a drift budget — use --drift-budget in CI to prevent backsliding

Tracking Over Time

Use baselines to track your score over time:

# Set a baseline
vg baseline

# Later, compare
vg scan --baseline .vibgrate/baseline.json

The dashboard provides historical trend charts if you push results with vg push.

Related Commands