Ratchet Your Drift Budget Down Over Time
Apply the ratchet pattern with vg scan --drift-budget: set the budget to today's level, reduce drift, then tighten the budget to lock in each gain so drift only ever moves down.
The ratchet pattern keeps drift from creeping back. You set the budget to your current level, do work to lower drift, then tighten the budget to lock in the improvement. Repeat and your project gets steadily healthier without ever sliding backward.
Prerequisites
- Vibgrate CLI installed (
npm i -g @vibgrate/cli) - A drift budget already used in your scans
Steps
1. Measure the current drift level
Start from reality, not aspiration:
vg
Record the DriftScore as the starting budget.
2. Set the budget to today's level
Pin the budget at whatever you measured so the gate passes today:
vg scan --drift-budget 60
3. Reduce drift, then tighten
Upgrade a dependency or resolve a hotspot, re-scan, and confirm the drift dropped. Then tighten the budget to the new, lower number:
vg scan --drift-budget 50
4. Lock in the gain
Commit the lowered budget value in your CI configuration so the new ceiling is enforced for everyone.
5. Repeat each cycle
Each release cycle, reduce drift a little more and lower the budget again. The number only ever goes down.
6. Verify the ratchet holds
Try a scan with the previous, looser budget restored locally and confirm you would still pass, proving the gain is real and not noise.
Verification
After each tightening, vg scan --drift-budget with the new lower value should exit zero. If a future change pushes drift back above the budget, the scan exits non-zero and blocks the regression.
Next Steps
- Track the budget trend across releases for a visible improvement story.
- Enforce different budgets per team so each owns its own ceiling.