Skip to content

About

Make your Google Antigravity agent finish what it starts — with proof. Verification gate, task router, early-stop guard and goal engine as an Antigravity plugin.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Ultragravity for Antigravity — your agent finishes what it starts, with proof

CI Release License: MIT Google Antigravity plugin Python 3.9+ Zero dependencies

English · Español


Ultragravity is a plugin for Google Antigravity that stops your agent from declaring victory too early.

It doesn't make the model smarter. It makes it do the things a careful engineer does — run what it built, look at the result, chase the real root cause, and refuse to say "done" without proof — as procedure enforced by Antigravity's lifecycle hooks, not as a hopeful line in a prompt.

Agent:  Created tres.py. Evidence: inspected the file, it contains print("tres").
        ⛔ Stop hook blocked termination: ultragravity gate: run the narrowest verification
           command for the changed behavior before final response, or record why none applies.
Agent:  > python -m py_compile tres.py      ✓ exit 0
        Created tres.py without running it (as you asked).
        Evidence: syntax-checked with py_compile (exit 0).

Condensed and translated from a real Antigravity session (Gemini 3.8 Flash). The user had said "don't run it", so the agent found a check that respects that.

✨ What you get

Feature What it does
🧭 Task router Every prompt is classified as quick, normal or deep (English, Spanish and Korean keywords) and the matching discipline is injected — investigation protocol for bugs, render-and-look loop for UI/HTML/SVG/games.
⛔ Verification gate A deep task that changed files can't end until a verification actually ran and succeeded — observed by the hook, not claimed by the model. Capped at 2 nudges, then it reports the gap instead of looping.
🛑 Early-stop guard Catches replies that end with "I'll now implement…" / "voy a…" without doing it, and sends the agent back to do the work. Questions to you pass through.
🎯 Goal engine /ultragravity splits big work into stories. complete is refused without evidence, and the final story is refused without a verify command and its result. State survives across conversations.
🔁 Failure ledger Tracks changed files, checks and failures per turn. If the same failure repeats, the agent is told to stop retrying silently and report.
🪶 Zero dependencies Pure Python standard library. No servers, no network calls, no telemetry. Every hook fails open.

🚀 Install

Windows (PowerShell)

irm https://raw.githubusercontent.com/ibsorn/ultragravity/main/install.ps1 | iex

macOS / Linux

curl -fsSL https://raw.githubusercontent.com/ibsorn/ultragravity/main/install.sh | sh

Manual

git clone https://github.com/ibsorn/ultragravity ~/.gemini/config/plugins/ultragravity

Then restart Antigravity — new plugins are discovered at startup. You'll find Ultragravity for Antigravity under Plugins. Requires Python 3.9+ on PATH.

Update: run the installer again. Uninstall: delete ~/.gemini/config/plugins/ultragravity (state lives in ~/.ultragravity).

🕹️ Use it

It works on its own: the always-on rule and the hooks route every prompt. To drive it explicitly:

/ultragravity migrate the settings page to the new API and see it through
Say this Ultragravity does
"fix the crash on startup" Investigation protocol: reproduce first → 3+ competing hypotheses → evidence → full causal chain → verify before/after → report rejected hypotheses
"build a snake game in HTML" Grounding loop: open it in the browser, look at a screenshot, fix what's visibly wrong, re-check once
"refactor auth thoroughly" Deep mode: defines the exit proof up front; the Stop gate holds the turn until a check really ran
"explain this function quickly" Quick mode: stays out of your way

⚙️ How it works

Router, ledger and stop gate around the Antigravity agent loop

Piece File Antigravity hook
Always-on operating rules rules/AGENTS.md plugin rule
Full procedure + /ultragravity skills/ultragravity/SKILL.md skill
Router, ledger, gates hooks/ultragravity_hook.py PreInvocation, PostToolUse, Stop
Goal engine scripts/goals.py run by the agent
Details for the curious
  • The router reads the conversation transcript to find the newest <USER_REQUEST>, classifies it, and injects an ephemeral message once per turn — it never re-injects on later model calls.
  • PostToolUse must return {} in Antigravity, so notes (e.g. "a tool failed") are queued and delivered by the next PreInvocation.
  • Only edit tools count as changes; running a changed file (python app.py) counts as verification, as do tests, builds, linters and type checkers.
  • Stop decisions are made from observed state in the ledger, never from what the model says, so they are language-independent.
  • Normal turns end on terminationReason: "NO_TOOL_CALL" in Antigravity 2.x; errors, cancellations and max-step terminations are never fought.
  • Debug mode: create ~/.ultragravity/debug and the last raw payload of each hook is saved to ~/.ultragravity/payloads/.

✅ Verified, not vibes

  • 29 automated tests across Windows, macOS and Linux on every push (CI), including a replay of a transcript in the exact format observed in live Antigravity sessions.
  • Tested in a live Antigravity 2.23 install: the router's injected mode was quoted back by the model; a deep turn that ended without verification was blocked by the Stop gate and the agent went on to verify; a turn that verified on its own was let through with zero false positives.
  • Bugs found that way (and fixed): the docs say turns end with model_stop, real sessions send NO_TOOL_CALL; view_file carries a path and was miscounted as an edit; the bare gate message made the model go read the plugin's source.

🤔 FAQ

Does it slow the agent down? Hooks are tiny Python scripts (one process per event, no network). On quick tasks nothing changes.

Will it loop forever? No. The verification gate nudges at most twice per turn, the early-stop guard once, and both skip error/max-step terminations.

Does it work in the Antigravity IDE and CLI? It uses the standard plugin layout and hook contract shared by Antigravity surfaces; it has been tested live in Antigravity 2.x.

Is my data sent anywhere? No. Everything runs locally; the ledger lives in ~/.ultragravity.

🤝 Contributing

Issues and PRs welcome — see CONTRIBUTING.md. Run the tests with:

python tests/test_hooks.py && python tests/test_goals.py

🙏 Credits

Ultragravity is an Antigravity-native evolution of fablize by fivetaku (MIT), originally built for Claude Code. The procedures — verification grounding, the goal engine, the investigation protocol and the stop gates — come from that work.

📄 License

MIT © 2026 ibsorn · portions © 2026 fivetaku

If Ultragravity saved you from a "✅ Done!" that wasn't, a ⭐ helps other people find it.

About

Make your Google Antigravity agent finish what it starts — with proof. Verification gate, task router, early-stop guard and goal engine as an Antigravity plugin.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages