ANTIGRAVITY LABJP
Articles/Agents & Manager
Agents & Manager/2026-07-01Advanced

Detecting and Fixing Drift Between a Guide Skill and Your Code

Pin a procedure into a built-in Guide skill and it gets left behind when the code later changes. Here is an operational design that machine-checks the things a Guide references, catches drift early, and keeps the Guide thin.

Antigravity297Guide skillagents113driftdesign14

Premium Article

Since the built-in Guide skill landed in Antigravity at the end of June, I've been folding more of my repetitive work into Guides: the push procedure for my blogs, the article verification steps, the pre-release checklist. Write the steps once and you can hand them straight to a dynamic sub-agent, and the chore of re-explaining every time disappears.

A few weeks later, though, one Guide was steering an agent to a script path that no longer existed. I had tidied files on the repository side, but the Guide's steps were left behind, still old. No error surfaced. The agent tried to follow the instructions faithfully and quietly whiffed in front of a target that wasn't there.

That silent drift is the weak point of any mechanism that pins a procedure. This article lays out a design for catching drift between a Guide and code early and keeping the Guide thin, together with the verification shape I use across my own indie apps and Dolice blogs.

Why a Guide skill drifts quietly

A Guide skill is a procedure captured from the code and operations at one point in time. Accurate the moment it's captured, but the code keeps moving. Files relocate, command options change, and the behaviors it assumed get updated.

The problem is that there is no connection between the Guide and the code. Fix the code and the Guide knows nothing. When the Guide goes stale, the drift stays hidden until someone actually runs the procedure end to end. And because agents are faithful to instructions, they dutifully try to execute even a stale procedure, ending not in failure but in a whiff, the hardest outcome to notice.

The three layers where drift happens

When I review a Guide, I first sort out which layer the drift is in, because each layer is detectable to a different degree.

LayerExample of driftEase of detection
PathA referenced file or script was moved or deletedEasy to catch mechanically by existence checks
StepsA command's options or order changedOnly clear on execution. Medium
AssumptionsAn implicit premise like "this step is idempotent" brokeNeeds a human to read. Hard

Of these, the path layer can be all but automatically cleared with existence checks. I assign the steps layer to runtime checks and the assumptions layer to a design that keeps the Guide thin. Hardening the most tractable path layer first with a mechanism gave the best return.

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
How to separate the three layers where a Guide skill silently drifts: paths, steps, and assumptions
A ~35-line verification script that checks the entities a Guide references (files, commands, scripts) still exist
Rules for keeping code as the source of truth and the Guide thin, plus wiring the check into pre-push
Secure payment via Stripe · Cancel anytime

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Antigravity Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

Related Articles

Agents & Manager2026-06-28
A Review Gate Design for Safely Folding Parallel Agents' Diffs into One Branch
Antigravity 2.0 made running multiple agents in parallel practical, but verifying each agent's output and integrating it into one branch is left to you. Here is how to build a diff-level review gate in stages, with judgment criteria and scripts.
Agents & Manager2026-06-28
Treating Built-in Guide Skills as Design Assets, Not Throwaway Prompts
Antigravity v2.2.1 added built-in Guide skills. Here is a concrete structure and set of judgment calls for running them as version-controlled, shared design assets instead of one-off instructions.
Agents & Manager2026-06-29
When Your Antigravity-Written Tests Only Look Green: Measuring Effectiveness with Mutation Testing
Tests written by an Antigravity agent can pass and still fail to catch the bug that matters. Here is how to measure their real effectiveness with mutation testing and only adopt tests after they kill the surviving mutants — with working code.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →