vibgrate baseline — Create a Drift Baseline

Establish a drift baseline snapshot for delta comparison. Baselines are the foundation of drift fitness functions and CI regression gates.

Vibgrate Docs

Vibgrate Help

Usage

vibgrate baseline [path]

What It Does

vibgrate baseline runs a full scan and saves the result to .vibgrate/baseline.json. This snapshot becomes your reference point for measuring whether drift is improving or worsening over time.

Why Baselines Matter

Without a baseline, every scan is a standalone snapshot — you know your score, but you cannot tell whether things are getting better or worse. With a baseline:

  • CI can detect regression — if drift worsens beyond a threshold, the pipeline fails
  • Teams can track improvement — each sprint's score can be compared to the starting point
  • Fitness functions become possible--drift-budget and --drift-worsening require a baseline to work

Recommended Workflow

Step 1: Create baseline on main branch

vibgrate baseline .

This writes .vibgrate/baseline.json. Commit it to version control.

Step 2: Use baseline in CI

vibgrate scan . \
  --baseline .vibgrate/baseline.json \
  --drift-budget 40 \
  --drift-worsening 5 \
  --fail-on error

Step 3: Refresh after planned upgrades

When your team completes a round of dependency upgrades, refresh the baseline:

vibgrate baseline .
git add .vibgrate/baseline.json
git commit -m 'chore: refresh drift baseline after Q1 upgrades'

Baseline vs Scan Artifact

FilePurposeCommitted?
.vibgrate/baseline.jsonReference point for drift comparisonYes
.vibgrate/scan_result.jsonLatest scan outputNo (add to .gitignore)

Best Practices

  • Always create your first baseline on the default branch before enabling CI gates
  • Refresh the baseline periodically (e.g. quarterly, or after each upgrade sprint)
  • Never delete the baseline without replacing it — CI gates that reference a missing baseline will behave unpredictably
  • Store the baseline in version control so all branches can compare against the same reference

Related Commands