◉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.

Antigravity376Guide skillagents143driftdesign14

✦ 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 $15 for lifetime access
View Membership →

Related Articles

◈ Agents & Manager2026-09-08
Before I accept what /boost says it verified, I count what its throwaway worktree never saw
Antigravity's /boost runs its tests inside an ephemeral isolated worktree. If your build reaches for files git never tracked, that verification passed on a different tree than yours. Here is how I measure the gap first.
◈ Agents & Manager2026-09-06
With scheduled agents, I now look for runs that never happened before I look for failures
My run ledger showed a 100% success rate while the evening slot had not fired for two weeks. Here is the reconciliation I now run against an expected-fire table, with measured notes on cron expansion, exit codes, and how the ledger itself gets written.
◈ Agents & Manager2026-04-26
Designing Antigravity Agent Traces That Tell You Why It Failed — Observability in Practice
Run Antigravity agents long enough and unreadable failure logs pile up fast. This piece walks span structure, attribute design, failure tagging, dashboards, cost visibility, and retry policy — backed by six months of production metrics — so you can cut post-incident debugging time in half.
📚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