◉ANTIGRAVITY LABJP
Articles/Tips & Best Practices
✦ Tips & Best Practices/2026-06-27Advanced

Before Desktop and CLI Drift Apart: Put Agent Steps in One Versioned File

As Antigravity 2.0 multiplies entry points across desktop, CLI, and SDK, the instructions for the same task slowly diverge per surface. As an indie developer running several sites on autopilot, I lay out a design that consolidates the steps into a single versioned file each surface merely reads.

Antigravity421workflow design3version controlautomation96

✦ Premium Article

There was a stretch where I noticed the same article-generation steps produced subtly different results from the desktop than from the CLI. Tracing it, I found I had fixed the order of the quality gates on the desktop side one day, while the CLI side still held the old order. Both ran believing they had the "correct steps," yet the content of correctness disagreed.

Now that Antigravity 2.0 has multiplied entry points across a desktop app, a CLI, and an SDK, this divergence will only spread if left alone. The more surfaces there are, the more places hold instructions for the same task, and the easier it is to fix one and forget the other. Here I want to describe a design that gives no surface its own steps and instead consolidates them into one versioned file.

Suspect a "scattered" state of your steps

The first thing to review is whether the same task's steps are written in more than one place. If similar steps are embedded in your desktop settings, your CLI script, and your SDK call code, they are already scattered.

Scattered steps start identical. The problem is time. In operation, steps always change. The assumption that you can edit every place identically each time eventually breaks as long as a human does it. The moment it breaks, different work begins running quietly per surface.

Pull the steps out into a single file

The direction of the fix is simple. Peel the steps themselves away from each surface, write them in one file, and let each surface merely read it. The idea is to manage the instructions and the gate order in one place, just like code.

# pipeline.yaml — the single source of truth for the steps
version: 7
steps:
  - id: draft        # generate the draft
    prompt_ref: prompts/draft.md
  - id: gate-quality # quality gates (order fixed here)
    run: [article_gate, templating_gate, frontmatter_integrity]
  - id: bilingual    # keep JA and EN in sync
    require: { ja: true, en: true }
  - id: publish
    when: all_gates_passed

Desktop, CLI, and SDK hold no steps of their own; they merely load and run this pipeline.yaml. That way, when you want to change the steps, the place to edit is fixed to one. To reorder, edit steps, and the change takes effect on every surface at once.

✦

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
✦A layout where each surface holds no copy of the steps and instead reads one versioned source file
✦The three paths by which steps quietly drift (in-place edits, copy proliferation, surface-specific exceptions) and how git stops them
✦How consolidating my four sites' auto-publish steps into one file nearly eliminated missed fix propagation
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

✦ Tips2026-11-19
Before an Agent Clones Your Template Repo, Hand It a Trap Index: One Line per Fix, the Reasons Kept in One Place
When you copy a running site to start the next one, an agent carries the fixes over but leaves the reasons behind. A symptom-first trap index, a one-page porting plan written before the copy, and three small scripts that catch drift between the index, the source docs and their mirrors.
✦ Tips2026-11-17
Why a Small sizes Value Shrinks the Image Itself, and the CSS Line to Add When width and height Attributes Stretch It
The day I added responsive images, one artwork shrank and another stretched sideways. How sizes sets the displayed size, the one CSS line for width and height attributes, and how to work out sizes for tall art in a frame, with numbers and a check script.
✦ Tips2026-10-30
The sed -i That Worked on Linux and Stalled on My iMac: Checking an Agent's Steps Before You Run Them
A sed -i step that ran fine on Linux can stall on a Mac or leave backup files behind. Here is what I reproduced with GNU sed, the forms that behave the same on both, and a short check to run first.