This guide explains how to create a drift baseline and why a baseline is the cornerstone of measuring change over time. It is for teams that want to track drift rather than just observe a single number.
Overview
A baseline is a stored snapshot of your project's drift state at a point in time. Once you have a baseline, scans can report drift as a delta from that snapshot, which is what makes drift fitness functions and quality gates possible.
Prerequisites
Initialize the project first if you have not already:
vg init
Create the baseline
From the repository root, run:
vg baseline
This captures the current drift state into a baseline snapshot stored under your .vibgrate directory. You can also create the baseline at setup time in one step with vg init --baseline.
Commit the baseline
Commit the baseline so every teammate and your CI compare against the same reference. A baseline that only exists on one laptop cannot enforce a shared standard.
When to create a baseline
- Right after adopting Vibgrate, to mark your starting point.
- After a deliberate, completed upgrade, to lock in the improved state.
- When a project's expectations change and the old reference is no longer meaningful.
What comes next
With a baseline in place, scan against it to see the delta and gate on it in CI. See the scan-against-baseline guide and the drift budget article for the next steps.
Related
See the baseline refresh guide for maintaining the snapshot over time, and the DriftScore explainer to interpret the numbers.