Phase 1: Spec-Driven Development · 45 min · Git · GitHub Actions · Python
Spec-Code Drift and How to Prevent It
Drift isn't a bug you fix later — it's invisible by construction until something blocks the merge that creates it.
What you will learn
- Explain silent spec-code drift as a structural failure mode, not an occasional mistake
- Describe how a drift gate makes spec-code divergence a blocking merge condition instead of an invisible one
- Justify the same-commit contract update rule and why 'update the spec later' defeats the gate's purpose
- Implement a real, git-based drift gate that detects business-logic changes made without a corresponding spec update
Introduction
Spec-Code Drift and How to Prevent It
Objective
Build a real drift gate that uses actual git diffs to detect when business-logic files changed without a corresponding spec update in the same commit, and blocks that commit.
Unlock the full lesson
You've read the first 2 sections. The rest of this lesson covers The Problem, The Concept, Build, Check Yourself, Key Terms & Next — plus a hands-on lab, quiz, and project artifact.
Create a free account — the opening phases of 29 of 35 courses are free, no credit card.
Browse all courses · View pricing · DeVenture Academy