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.

Antigravity275workflow design3version controlautomation65

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-03-30
Antigravity × Custom Code Generator — Building Project-Specific Code Generation Pipelines with Template Engines + AI Agents
Learn how to build custom code generators by combining Antigravity's AI agents with template engines. Master Hygen, Plop, and custom TypeScript scaffolding integrated with AGENTS.md to elevate your team's code quality and productivity.
Tips2026-06-22
Strip Secrets Out of the Agent Logs You Keep: Designing a Redaction Layer
Once you start keeping logs from unattended agents, a token or API key eventually lands in them in plaintext. Rotating the key doesn't unmake the leaked log. This designs a redaction layer that reliably drops secrets right before the write, going beyond regex to register known secrets and mask them for certain, with working Python and field notes.
Tips2026-06-21
Tracing What a Long Agent Run Actually Did: Review That Starts From In-Conversation Search
How to use the in-conversation search added in Antigravity v2.1.4 as the starting point for reviewing long agent runs. Choosing search terms, the decision points to inspect, and reconciling with background-agent logs, with concrete steps.
📚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 →