<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Darren "Dazbo" Lester</title>
    <description>The latest articles on DEV Community by Darren "Dazbo" Lester (@dazbo).</description>
    <link>https://dev.to/dazbo</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F548192%2F86492fc3-866f-4a3f-8a58-de3c6f467742.jpg</url>
      <title>DEV Community: Darren "Dazbo" Lester</title>
      <link>https://dev.to/dazbo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dazbo"/>
    <language>en</language>
    <item>
      <title>Using the Gemini Decisions API to Speed Up My Agentic Evaluations</title>
      <dc:creator>Darren "Dazbo" Lester</dc:creator>
      <pubDate>Sun, 29 Nov 2026 21:03:36 +0000</pubDate>
      <link>https://dev.to/gde/using-the-gemini-decisions-api-to-speed-up-my-agentic-evaluations-3lc5</link>
      <guid>https://dev.to/gde/using-the-gemini-decisions-api-to-speed-up-my-agentic-evaluations-3lc5</guid>
      <description>&lt;p&gt;Howdy friends!&lt;/p&gt;

&lt;p&gt;In my &lt;em&gt;&lt;a href="https://dev.to/gde/from-vibing-chaos-to-reliable-agents-the-what-why-and-how-of-harness-engineering-4ba0"&gt;Beyond Vibe Coding: Harness Engineering with Google&lt;/a&gt;&lt;/em&gt; series, I described how to build a harness around the model. In &lt;a href="https://dev.to/gde/loop-engineering-in-the-harness-autonomous-self-correcting-systems-part-2-155e"&gt;Part 2: Loop Engineering in the Harness&lt;/a&gt;, I wired up an autonomous execution loop with a two-phase evaluation rubric that runs on every iteration. Having that rubric is a massive win: &lt;strong&gt;it verifies that everything the agent builds actually meets the spec, passes every test and static check, and gets independently evaluated by an agent-as-a-judge before the loop is allowed to call it done.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fl0z6s69jg8ke2644msk1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fl0z6s69jg8ke2644msk1.jpg" alt="Two Phase Rubric" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There was just one snag: &lt;strong&gt;it can get slow and expensive when you run it on every single loop pass.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How My Two-Phase Rubric Works
&lt;/h2&gt;

&lt;p&gt;When I first built the rubric, I split every check cleanly into two phases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Phase 1 — Deterministic Gates:&lt;/strong&gt; Local linters, typecheckers, and unit tests (&lt;code&gt;codespell&lt;/code&gt;, &lt;code&gt;ruff&lt;/code&gt;, &lt;code&gt;pytest&lt;/code&gt;). This phase is super fast and doesn't consume any tokens. If Phase 1 fails, the loop stops immediately and our agent then makes the required fixes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Phase 2 — Semantic Critic:&lt;/strong&gt; Once Phase 1 is green, a fresh subagent with zero session history inspects the workspace against my specification. It asks questions like &lt;em&gt;"Did this actually implement the spec without cutting corners?"&lt;/em&gt;, and &lt;em&gt;"Has the documentation been updated to match the changes?"&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  How You Wire It Into a Repo
&lt;/h4&gt;

&lt;p&gt;To use this rubric we just provide any given repo with a plain-Markdown table of binary assertions (&lt;code&gt;B1&lt;/code&gt;–&lt;code&gt;Bn&lt;/code&gt;). We would typically do this inside of a file like &lt;code&gt;SPEC.md&lt;/code&gt;, &lt;code&gt;LOOPS.md&lt;/code&gt;, or &lt;code&gt;RUBRIC.md&lt;/code&gt;. The table might look something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;| ID | Falsifiable Condition | Verification Target |
| :--- | :--- | :--- |
| &lt;span class="sb"&gt;`B1`&lt;/span&gt; | Static checks (&lt;span class="sb"&gt;`codespell`&lt;/span&gt;, &lt;span class="sb"&gt;`ruff`&lt;/span&gt;) and unit tests pass | &lt;span class="sb"&gt;`make check`&lt;/span&gt; |
| &lt;span class="sb"&gt;`B2`&lt;/span&gt; | &lt;span class="sb"&gt;`README.md`&lt;/span&gt; and &lt;span class="sb"&gt;`.env.template`&lt;/span&gt; document every new CLI flag and env variable | &lt;span class="sb"&gt;`README.md, .env.template`&lt;/span&gt; |
| &lt;span class="sb"&gt;`B3`&lt;/span&gt; | CLI commands support &lt;span class="sb"&gt;`--json`&lt;/span&gt;, &lt;span class="sb"&gt;`--dry-run`&lt;/span&gt; on mutations, and actionable error hints on &lt;span class="sb"&gt;`stderr`&lt;/span&gt; | &lt;span class="sb"&gt;`src/cli.py`&lt;/span&gt; |
| &lt;span class="sb"&gt;`B4`&lt;/span&gt; | Core logic stays separated from API/UI handlers; invalid inputs return actionable errors without leaking stack traces | &lt;span class="sb"&gt;`src/api.py, src/core.py`&lt;/span&gt; |
| &lt;span class="sb"&gt;`B5`&lt;/span&gt; | &lt;span class="sb"&gt;`.gitignore`&lt;/span&gt; excludes &lt;span class="sb"&gt;`.env`&lt;/span&gt; and cache folders, with zero hardcoded secrets or project IDs | &lt;span class="sb"&gt;`.gitignore, src/`&lt;/span&gt; |
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On every loop iteration, the agent runs the deterministic checks, then hands the remaining assertions and the diff to the semantic critic. No sycophancy, no polluted context window, and no "looks good to me!" hand-waving.&lt;/p&gt;

&lt;h4&gt;
  
  
  The Semantic Bottleneck
&lt;/h4&gt;

&lt;p&gt;The catch is the tax you pay on every iteration that passes the deterministic phase. Spawning a reasoning subagent typically takes &lt;strong&gt;&lt;code&gt;10–20&lt;/code&gt; seconds&lt;/strong&gt; and burns standard output and thinking tokens even for straightforward checks like &lt;em&gt;"Did you document the new CLI flag in &lt;code&gt;README.md&lt;/code&gt;?"&lt;/em&gt; or &lt;em&gt;"Did you actually add the unit test you promised?"&lt;/em&gt; Run four or five loop passes on a feature branch, and you spend more time waiting on the critic than writing code.&lt;/p&gt;

&lt;p&gt;There are a couple of initial ways we might try to solve this problem. &lt;/p&gt;

&lt;p&gt;We might instead use a much faster, cheaper model to do the entire semantic phase. The problem with this approach is that the cheaper model is often not smart enough to perform accurate evaluations.&lt;/p&gt;

&lt;p&gt;Alternatively, we might introduce a fast, cheap model to perform triage. This model would perform initial fast evaluations where it can, and then route to a smarter model only where needed. The triage phase would generate its own set of structured output. But as &lt;a href="https://medium.com/google-cloud/how-llm-routing-strategies-compare-7ea3d03514e3" rel="noopener noreferrer"&gt;Karl Weinmeister proved&lt;/a&gt; in his routing benchmarks, asking an LLM for JSON creates its own bottlenecks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Generation latency:&lt;/strong&gt; Even Google's super-fast &lt;code&gt;gemini-3.5-flash-lite&lt;/code&gt; took a median of over &lt;code&gt;2&lt;/code&gt; seconds just to emit a structured JSON routing verdict in Karl's benchmarks. This adds so much overhead that the combined call was slower end-to-end than skipping routing altogether.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Output-token markups:&lt;/strong&gt; Generative models bill output and hidden thinking tokens at &lt;code&gt;4x–8x&lt;/code&gt; the input token rate, meaning you pay a premium just to generate &lt;code&gt;{&lt;/code&gt;, &lt;code&gt;"&lt;/code&gt;, &lt;code&gt;:&lt;/code&gt;, and &lt;code&gt;}&lt;/code&gt; punctuation in the structured output.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hallucinated confidence:&lt;/strong&gt; Asking a model to output &lt;code&gt;"confidence": 0.95&lt;/code&gt; looks right on the surface, but it is just predicting plausible-looking text tokens — effectively hallucinating a score rather than computing a calibrated probability you can safely set thresholds against.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fap1ej890jf6v1j5m4d9o.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fap1ej890jf6v1j5m4d9o.jpg" alt="Why naive fixes for the semantic bottleneck fall short" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Is there a way we can do a much faster and cheaper triage between our deterministic layer and our semantic critic?&lt;/p&gt;

&lt;h2&gt;
  
  
  Enter the Gemini Decisions API
&lt;/h2&gt;

&lt;p&gt;Every standard LLM call has two steps: first, the model reads your entire prompt all at once in parallel (known as &lt;strong&gt;prefill&lt;/strong&gt;); second, it writes its reply out one token at a time (&lt;strong&gt;generation&lt;/strong&gt;), which is where most of the latency and output-token cost lives. A &lt;strong&gt;dedicated decision model&lt;/strong&gt; skips that second step altogether — it runs a single prefill pass over your input and questions, reads the probability scores straight out of the model, and returns calibrated verdicts with zero text generated. &lt;a href="https://typesafe.ai" rel="noopener noreferrer"&gt;&lt;strong&gt;TypeSafe's Jev&lt;/strong&gt;&lt;/a&gt; had already shown how well this emerging category works for fast yes/no and routing decisions.&lt;/p&gt;

&lt;p&gt;In November 2026, Google DeepMind dropped the &lt;a href="https://blog.google/innovation-and-ai/technology/developers-tools/gemini-decisions-api/?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;&lt;strong&gt;Gemini Decisions API&lt;/strong&gt;&lt;/a&gt;, powered by a purpose-built model called &lt;strong&gt;Gemini Decision 1&lt;/strong&gt; (&lt;code&gt;gemini-decision-1&lt;/code&gt;) on the Gemini Developer API (&lt;code&gt;v1beta&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;Instead of treating a yes/no judgement or rubric score as a text-generation task, &lt;code&gt;gemini-decision-1&lt;/code&gt; evaluates your context and up to &lt;strong&gt;&lt;code&gt;1,000&lt;/code&gt; independent questions&lt;/strong&gt; in a single prefill pass. It generates &lt;strong&gt;&lt;code&gt;0&lt;/code&gt; output tokens&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;0&lt;/code&gt; thinking tokens&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhcnfnc7fxgaww3fm8gkr.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhcnfnc7fxgaww3fm8gkr.jpg" alt="Gemini Decisions API single-pass parallel fan-out" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Because there is no token-by-token generation loop, the economics shift dramatically:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Speed:&lt;/strong&gt; End-to-end latency is roughly &lt;strong&gt;&lt;code&gt;0.2&lt;/code&gt; seconds&lt;/strong&gt; across contexts up to &lt;code&gt;16K&lt;/code&gt; tokens — and it stays nearly flat whether you ask &lt;code&gt;1&lt;/code&gt; question or &lt;code&gt;100&lt;/code&gt; in the same call.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pricing:&lt;/strong&gt; Standard paid input is &lt;strong&gt;&lt;code&gt;$0.10&lt;/code&gt; per 1M input tokens&lt;/strong&gt;, and &lt;strong&gt;&lt;code&gt;$0&lt;/code&gt; for output&lt;/strong&gt; (because there &lt;em&gt;are&lt;/em&gt; no output tokens!). Google reports that &lt;code&gt;gemini-decision-1&lt;/code&gt; is typically &lt;strong&gt;&lt;code&gt;5x&lt;/code&gt; cheaper&lt;/strong&gt; across its shared benchmark suite than running &lt;code&gt;gemini-3.5-flash-lite&lt;/code&gt; on the Interactions API — and your shared input payload is billed &lt;strong&gt;only once per request&lt;/strong&gt;, no matter how many questions you attach.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Native multimodality:&lt;/strong&gt; Within a &lt;code&gt;256K&lt;/code&gt;-token context window, a single &lt;code&gt;input&lt;/code&gt; block can combine text, JSON, images, audio, video, and PDFs directly without separate OCR or transcription pipelines.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To put those numbers in context (from the official &lt;a href="https://aistudio.google.com/docs/pricing?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco#gemini-decision" rel="noopener noreferrer"&gt;Gemini API pricing table&lt;/a&gt;): &lt;code&gt;gemini-decision-1&lt;/code&gt; works out roughly &lt;strong&gt;&lt;code&gt;5x&lt;/code&gt; cheaper&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;10x&lt;/code&gt; faster&lt;/strong&gt; than &lt;code&gt;gemini-3.5-flash-lite&lt;/code&gt; (&lt;code&gt;$0.30&lt;/code&gt; input / &lt;code&gt;$2.50&lt;/code&gt; output per &lt;code&gt;1M&lt;/code&gt; tokens). And compared with &lt;strong&gt;&lt;code&gt;gemini-4-hydrogen&lt;/code&gt;&lt;/strong&gt; (&lt;code&gt;$1.50&lt;/code&gt; input / &lt;code&gt;$7.50&lt;/code&gt; output per &lt;code&gt;1M&lt;/code&gt; tokens) — the model I currently use as my semantic rubric judge — &lt;code&gt;gemini-decision-1&lt;/code&gt; is &lt;strong&gt;&lt;code&gt;15x&lt;/code&gt; cheaper on input alone&lt;/strong&gt; (with zero output or thinking-token bills) and more than an order of magnitude faster.&lt;/p&gt;

&lt;p&gt;As detailed in &lt;a href="https://blog.google/innovation-and-ai/technology/developers-tools/gemini-decisions-api/?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Google's launch post&lt;/a&gt;, Google is already running the Decisions API in production across its own products — routing queries in &lt;strong&gt;Gemini Notebook&lt;/strong&gt; (cutting everyday latency by up to &lt;strong&gt;&lt;code&gt;40%&lt;/code&gt;&lt;/strong&gt;), powering instant wireframe edits in &lt;strong&gt;Stitch Rapid&lt;/strong&gt;, selecting from &lt;code&gt;200+&lt;/code&gt; emoji reactions in &lt;strong&gt;CC&lt;/strong&gt;, and screening MCP tool behaviour in &lt;strong&gt;Google Search&lt;/strong&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  Core Decision Primitives
&lt;/h4&gt;

&lt;p&gt;Every question passed to &lt;code&gt;client.decisions.create&lt;/code&gt; (requiring &lt;code&gt;google-genai &amp;gt;= 3.2.0&lt;/code&gt; configured with &lt;code&gt;v1beta&lt;/code&gt;) uses one of three structured primitives documented in the &lt;a href="https://aistudio.google.com/docs/decisions-api?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Decisions API guide&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fz35nbrczjgvn4ueuadur.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fz35nbrczjgvn4ueuadur.jpg" alt="Core Decision Primitives: noul, choice, and score" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is how concise a live Python call looks:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;google&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;genai&lt;/span&gt;

&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;genai&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Client&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;http_options&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"api_version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"v1beta"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;decisions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"gemini-decision-1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nb"&gt;input&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"Diff and spec payload go here..."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;questions&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="s2"&gt;"docs_updated"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="s2"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"noul"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="s2"&gt;"instructions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Does the diff update README.md with the new CLI flag?"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="s2"&gt;"criteria"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="s2"&gt;"true_description"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"README.md is present and documents the new flag."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"false_description"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"README.md omits or contradicts the new flag."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;verdict&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;answers&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"docs_updated"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="c1"&gt;# verdict.noul: calibrated probability from 0.01 (no) to 0.99 (yes)&lt;/span&gt;
&lt;span class="c1"&gt;# verdict.confidence: certainty in the verdict — max(noul, 1 - noul)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"P(yes)={verdict.noul:.2f} confidence={verdict.confidence:.2f}"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="c1"&gt;# Example output: P(yes)=0.97 confidence=0.97&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For a &lt;code&gt;noul&lt;/code&gt; question, &lt;code&gt;verdict.noul&lt;/code&gt; gives you a calibrated probability between &lt;code&gt;0.01&lt;/code&gt; (&lt;em&gt;definitely no&lt;/em&gt;) and &lt;code&gt;0.99&lt;/code&gt; (&lt;em&gt;definitely yes&lt;/em&gt;), while &lt;code&gt;verdict.confidence&lt;/code&gt; tells you how certain the model is in that call — giving you real numbers you can write pass/fail thresholds against in code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Investigating How to Build a Faster, Cheaper, Safer Rubric
&lt;/h2&gt;

&lt;p&gt;As soon as &lt;code&gt;gemini-decision-1&lt;/code&gt; was launched, I figured it was going to be the perfect answer to our problem.&lt;/p&gt;

&lt;p&gt;I didn't have to start my investigation from scratch. In two excellent articles — &lt;a href="https://medium.com/google-cloud/routing-models-with-the-gemini-decisions-api-6c6a0a043aef" rel="noopener noreferrer"&gt;&lt;em&gt;Routing models with the Gemini Decisions API&lt;/em&gt;&lt;/a&gt; and &lt;a href="https://medium.com/google-cloud/how-llm-routing-strategies-compare-7ea3d03514e3" rel="noopener noreferrer"&gt;&lt;em&gt;How LLM routing strategies compare&lt;/em&gt;&lt;/a&gt; — Google Cloud's &lt;strong&gt;Karl Weinmeister&lt;/strong&gt; benchmarked &lt;code&gt;150&lt;/code&gt; multimodal tasks across text, code, charts, PDFs, and audio using his &lt;a href="https://github.com/kweinmeister/gemini-decision-router" rel="noopener noreferrer"&gt;&lt;code&gt;gemini-decision-router&lt;/code&gt;&lt;/a&gt; sandbox. He observed that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Routing overhead drops from over &lt;code&gt;2&lt;/code&gt; seconds to &lt;code&gt;~0.3&lt;/code&gt; seconds:&lt;/strong&gt; Across Karl's multimodal test suite, swapping prompted &lt;code&gt;gemini-3.5-flash-lite&lt;/code&gt; JSON for &lt;code&gt;gemini-decision-1&lt;/code&gt; cut median routing latency from &lt;code&gt;2.2&lt;/code&gt; seconds down to &lt;code&gt;0.3&lt;/code&gt; seconds.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The threshold rules you write in code matter over 40x more than how you word the prompt&lt;/strong&gt;. Changing how his router acted on the probability scores cut compute spend by &lt;code&gt;28%&lt;/code&gt;, whereas rewording the prompt moved it by less than &lt;code&gt;1%&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Don't treat &lt;code&gt;0.50&lt;/code&gt; as a pass:&lt;/strong&gt; (But seriously, why would you?) Because buggy Python still looks syntactically correct, Karl found that accepting anything above a &lt;code&gt;0.50&lt;/code&gt; pass threshold let &lt;code&gt;60%&lt;/code&gt; of wrong drafts slip through. Raising the threshold to &lt;code&gt;0.80&lt;/code&gt; dropped wrong drafts accepted to &lt;code&gt;5%&lt;/code&gt; (while keeping &lt;code&gt;87%&lt;/code&gt; of good drafts), and &lt;code&gt;0.90&lt;/code&gt; pushed false passes down to &lt;code&gt;0%&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mistake costs are asymmetric:&lt;/strong&gt; Falsely waving through broken code wrecks your loop's reliability, whereas escalating a borderline check to a deeper critic costs fractions of a cent.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  From Two Phases to Three: Tier 1, Tier 1.5, and Tier 2
&lt;/h2&gt;

&lt;p&gt;Now we know that &lt;code&gt;gemini-decision-1&lt;/code&gt; can act as a super-fast filter. It's the perfect missing piece for evolving my two-phase harness rubric into a &lt;strong&gt;three-stage verification funnel&lt;/strong&gt; by slotting it right in the middle as &lt;strong&gt;Tier 1.5&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;We previously saw that a &lt;code&gt;0.90&lt;/code&gt; threshold eliminates false passes. But Karl's data shows that with a threshold of &lt;code&gt;0.90&lt;/code&gt; about 40% of true passes would also be rejected. And this is fine... We can simply say that anything that lands between near-certain failure (&lt;code&gt;&amp;lt;= 0.20&lt;/code&gt;) and near-certain pass (&lt;code&gt;&amp;gt;= 0.90&lt;/code&gt;) goes into a &lt;strong&gt;grey zone&lt;/strong&gt;. These aren't rejected; they're simply escalated to &lt;strong&gt;Tier 2&lt;/strong&gt; - our existing semantic critic - for a closer look. This way, clear passes finish in a fraction of a second, obvious omissions &lt;em&gt;fail fast&lt;/em&gt; without waking Tier 2, and anything in the grey area gets the full reasoning treatment.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvjytxntydn9prpof6253.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvjytxntydn9prpof6253.jpg" alt="Three-stage verification funnel" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Category Tagging: Controlling Tier 1.5 Authority
&lt;/h4&gt;

&lt;p&gt;Not every assertion in a rubric carries the same risk, so Tier 1.5 shouldn't have the same authority on every row. Checking whether &lt;code&gt;pytest&lt;/code&gt; passed doesn't need an AI at all; checking whether &lt;code&gt;README.md&lt;/code&gt; mentions a new CLI flag is safe for a fast prefill model to sign off on the spot; but checking for a subtle security flaw or race condition still deserves a deep reasoning critic.&lt;/p&gt;

&lt;p&gt;To encode that distinction into my Python runner (&lt;code&gt;eval_rubric.py&lt;/code&gt;), I added lightweight inline tags to the &lt;code&gt;B1&lt;/code&gt;–&lt;code&gt;Bn&lt;/code&gt; IDs in my rubric table (e.g. &lt;code&gt;`[det]`&lt;/code&gt;, &lt;code&gt;`[docs]`&lt;/code&gt;, &lt;code&gt;`[arch]`&lt;/code&gt;, &lt;code&gt;`[security]`&lt;/code&gt;). Each tag tells Tier 1.5 how much authority it gets:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;[det]&lt;/code&gt; — Deterministic (Skip Tier 1.5):&lt;/strong&gt; Already proven by Tier 1's local shell exit codes (&lt;code&gt;make check&lt;/code&gt;). Skipped completely so we never burn an API call asking a model to guess whether &lt;code&gt;pytest&lt;/code&gt; passed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;[docs]&lt;/code&gt;, &lt;code&gt;[mech]&lt;/code&gt;, &lt;code&gt;[ui]&lt;/code&gt; — Surface &amp;amp; Routine (Tier 1.5 Can Pass):&lt;/strong&gt; Low-risk checks that can be verified directly from the diff or target files (untagged rows also default here). If &lt;code&gt;gemini-decision-1&lt;/code&gt; scores &lt;code&gt;&amp;gt;= 0.90&lt;/code&gt; with high confidence and no truncated files, it &lt;strong&gt;passes immediately&lt;/strong&gt; — no Tier 2 needed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;[arch]&lt;/code&gt;, &lt;code&gt;[security]&lt;/code&gt; — Deep Logic &amp;amp; Safety (Provisional Pass Only):&lt;/strong&gt; Because &lt;code&gt;gemini-decision-1&lt;/code&gt; uses zero thinking tokens and has no file-browsing tools, it never gets the final word on architecture, concurrency, or security. It can still &lt;strong&gt;fail fast&lt;/strong&gt; if an implementation is obviously missing, but a &lt;code&gt;&amp;gt;= 0.90&lt;/code&gt; score earns a &lt;strong&gt;provisional pass&lt;/strong&gt; (&lt;code&gt;PROVISIONAL_ARCH_PASS&lt;/code&gt;) — deferring Tier 2 until everything else is green so you only run one final sign-off instead of re-running Tier 2 on every intermediate loop pass.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Smarter Stall Detection with &lt;code&gt;ratchet_score&lt;/code&gt;
&lt;/h4&gt;

&lt;p&gt;One unexpected bonus made the harness loop smarter, not just faster. Every autonomous coding loop needs clear stopping rules so it doesn't spin forever burning tokens. In &lt;a href="https://dev.to/gde/loop-engineering-in-the-harness-autonomous-self-correcting-systems-part-2-155e"&gt;Part 2&lt;/a&gt;, I called my stopping rules the &lt;strong&gt;Circuit Breaker Trio&lt;/strong&gt;: stop when &lt;code&gt;100%&lt;/code&gt; of checks pass, stop after a max budget of &lt;code&gt;4–5&lt;/code&gt; passes, or stop if the loop stalls for &lt;code&gt;2&lt;/code&gt; consecutive passes without improving. With plain binary pass/fail counts, that stall detector was clumsy — if a fix genuinely pushed an assertion from &lt;code&gt;0.25&lt;/code&gt; to &lt;code&gt;0.82&lt;/code&gt;, a binary counter still read &lt;code&gt;0&lt;/code&gt; passes and threatened a false stall.&lt;/p&gt;

&lt;p&gt;With &lt;code&gt;gemini-decision-1&lt;/code&gt;, &lt;code&gt;eval_rubric.py&lt;/code&gt; computes a continuous &lt;strong&gt;&lt;code&gt;ratchet_score&lt;/code&gt;&lt;/strong&gt; — the mean &lt;code&gt;P(yes)&lt;/code&gt; across all evaluated assertions (&lt;code&gt;0.25 -&amp;gt; 0.62 -&amp;gt; 0.84 -&amp;gt; 0.96&lt;/code&gt;). Now the loop recognises genuine forward momentum while catching silent regressions immediately.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsc9afh8sduka6ifutx4m.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsc9afh8sduka6ifutx4m.gif" alt="Smarter stall detection: binary false stall vs continuous ratchet_score progress" width="720" height="405"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Putting It to the Test: Live PR Experiments
&lt;/h2&gt;

&lt;p&gt;Time for some experiments... I ran my &lt;code&gt;eval_rubric.py&lt;/code&gt; against two real merged pull requests from my &lt;a href="https://github.com/derailed-dash/gemini-review-action" rel="noopener noreferrer"&gt;&lt;code&gt;derailed-dash/gemini-review-action&lt;/code&gt;&lt;/a&gt; repository (introduced in &lt;a href="https://dev.to/gde/automated-github-code-reviews-using-google-gemini-update-enterprise-ready-multimodal-and-1phi"&gt;Automated GitHub Code Reviews Using Google Gemini (Part 2)&lt;/a&gt;).&lt;/p&gt;

&lt;h4&gt;
  
  
  Experiment 1: Tightly Scoped Fix
&lt;/h4&gt;

&lt;p&gt;PR #71 was a focused fix for automated GitHub issue triage: filtering selected labels against the repository's allowlist before calling the GitHub API so the bot can never invent or duplicate labels. It touched just two files (&lt;code&gt;gemini_issue_triage.py&lt;/code&gt; and &lt;code&gt;tests/test_issue_triage.py&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;I gave &lt;code&gt;eval_rubric.py&lt;/code&gt; a compact four-item rubric covering every category:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;B1 [det]&lt;/code&gt;:&lt;/strong&gt; Unit tests (&lt;code&gt;pytest&lt;/code&gt;) pass.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;B2 [mech]&lt;/code&gt;:&lt;/strong&gt; &lt;code&gt;tests/test_issue_triage.py&lt;/code&gt; covers label allowlist filtering and deduplication.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;B3 [arch]&lt;/code&gt;:&lt;/strong&gt; Issue triage deduplicates and filters selected labels against &lt;code&gt;available_labels&lt;/code&gt; before calling the GitHub API.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;B4 [docs]&lt;/code&gt;:&lt;/strong&gt; The PR diff updates &lt;code&gt;AGENTS.md&lt;/code&gt; or &lt;code&gt;README.md&lt;/code&gt; to document the allowlist rule.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then I ran &lt;code&gt;eval_rubric.py&lt;/code&gt; against PR #71's diff:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;uv run ~/.gemini/config/skills/tiered-rubric-loop/scripts/eval_rubric.py \
  --repo-root ./gemini-review-action \
  --spec notes/pr71-rubric.md \
  --git-range &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;base&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;..&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;head&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; \
  --targets-only
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here is the scorecard returned by &lt;code&gt;gemini-decision-1&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fe2z5y8j0ylix0bj8stm6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fe2z5y8j0ylix0bj8stm6.png" alt="Experiment 1 PR #71 Tier 1.5 evaluation scorecard" width="800" height="344"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can see that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;B2&lt;/code&gt; cleared immediately (&lt;code&gt;0.97&lt;/code&gt; &lt;code&gt;PASS&lt;/code&gt;)&lt;/strong&gt; — no Tier 2 subagent needed for test coverage verification.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;B3&lt;/code&gt; earned &lt;code&gt;PROVISIONAL_ARCH_PASS&lt;/code&gt; (&lt;code&gt;0.96&lt;/code&gt;)&lt;/strong&gt; — queued cleanly for one final &lt;code&gt;[arch]&lt;/code&gt; check.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;B4&lt;/code&gt; triggered &lt;code&gt;FAIL_FAST&lt;/code&gt; (&lt;code&gt;0.17&lt;/code&gt;, &lt;code&gt;0.83&lt;/code&gt; confidence)&lt;/strong&gt; — &lt;code&gt;gemini-decision-1&lt;/code&gt; spotted that PR #71 omitted documentation updates, and rejected it directly in roughly a second without waking Tier 2!&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Experiment 2: Stress-Testing a Large 14-File PR
&lt;/h4&gt;

&lt;p&gt;PR #71 was clean and focused — just two files, easily fitting inside the context window. Next, I wanted to stress-test what happens when a PR gets big and messy.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;gemini-decision-1&lt;/code&gt; has a hard 256K-token context ceiling shared across the input payload and all questions (plus a &lt;code&gt;100 MB&lt;/code&gt; inline payload cap, &lt;code&gt;50 MB&lt;/code&gt; for PDFs). To stay fast and comfortably inside those limits, &lt;code&gt;eval_rubric.py&lt;/code&gt; trims any single file over &lt;code&gt;48K&lt;/code&gt; characters or &lt;code&gt;git diff&lt;/code&gt; over &lt;code&gt;60K&lt;/code&gt; characters — and automatically refuses to trust a Tier 1.5 &lt;code&gt;PASS&lt;/code&gt; on any assertion touching a trimmed file.&lt;/p&gt;

&lt;p&gt;My PR #72 added SVG-to-PNG rasterisation and a streaming fallback for connection resets, touching &lt;strong&gt;&lt;code&gt;14&lt;/code&gt; files&lt;/strong&gt; across Python modules, large test suites (&lt;code&gt;tests/test_pr_review.py&lt;/code&gt;), &lt;code&gt;uv.lock&lt;/code&gt;, and a hefty &lt;code&gt;README.md&lt;/code&gt;. I ran a six-item rubric (&lt;code&gt;B1&lt;/code&gt;–&lt;code&gt;B6&lt;/code&gt;) against it to see whether Tier 1.5 would fail safe once those size caps kicked in:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fskizsr9et98w7fw6i6nb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fskizsr9et98w7fw6i6nb.png" alt="Experiment 2 PR #72 Tier 1.5 evaluation scorecard under truncation limits" width="799" height="461"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;PR #72 exposed the real-world boundaries immediately — and honestly, that is the best validation you could ask for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Strict thresholds hold the line:&lt;/strong&gt; One architectural check (&lt;code&gt;B6&lt;/code&gt;, &lt;code&gt;0.97&lt;/code&gt;) cleared cleanly as a provisional pass, while another (&lt;code&gt;B5&lt;/code&gt;, &lt;code&gt;0.89&lt;/code&gt;) missed our &lt;code&gt;0.90&lt;/code&gt; bar by a single percentage point and escalated straight to Tier 2 instead of guessing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Trimmed or skipped files fail safe:&lt;/strong&gt; Three checks (&lt;code&gt;B2&lt;/code&gt;, &lt;code&gt;B3&lt;/code&gt;, and &lt;code&gt;B4&lt;/code&gt;) depended on files that were either trimmed by our size caps (&lt;code&gt;README.md&lt;/code&gt;, a large test suite, and the &lt;code&gt;14&lt;/code&gt;-file diff) or skipped by design (&lt;code&gt;uv.lock&lt;/code&gt;). Rather than hallucinating a pass over incomplete evidence, Tier 1.5 automatically escalated all three to Tier 2.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Still fast and sub-penny at &lt;code&gt;80K&lt;/code&gt; tokens:&lt;/strong&gt; Even on a messy &lt;code&gt;14&lt;/code&gt;-file PR (&lt;code&gt;80,093&lt;/code&gt; input tokens), Tier 1.5 finished in roughly &lt;strong&gt;&lt;code&gt;2.1&lt;/code&gt; seconds&lt;/strong&gt; for &lt;strong&gt;&lt;code&gt;$0.008&lt;/code&gt;&lt;/strong&gt; with &lt;code&gt;0&lt;/code&gt; output tokens.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What Difference Did Tier 1.5 Actually Make?
&lt;/h2&gt;

&lt;p&gt;The contrast with my original two-tier loop is massive!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;On focused slices like PR #71, Tier 1.5 eliminates wasted critic runs:&lt;/strong&gt; A two-tier loop would have woken a &lt;code&gt;10–20&lt;/code&gt; second Tier 2 subagent on Pass 1 just to discover &lt;code&gt;B4&lt;/code&gt; (docs) was missing, then woken it &lt;em&gt;again&lt;/em&gt; on Pass 2 to re-check everything. With Tier 1.5, Pass 1 failed fast in &lt;strong&gt;&lt;code&gt;~1.0&lt;/code&gt; second for &lt;code&gt;$0.0024&lt;/code&gt;&lt;/strong&gt; with zero Tier 2 subagents woken, &lt;code&gt;B2&lt;/code&gt; passed terminally, and &lt;code&gt;B3&lt;/code&gt; deferred as provisional so Tier 2 only needs to run &lt;strong&gt;once&lt;/strong&gt; at the very end.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On oversized PRs like PR #72, Tier 1.5 fails safe rather than guessing:&lt;/strong&gt; Spending &lt;code&gt;~2.1&lt;/code&gt; seconds (&lt;code&gt;$0.008&lt;/code&gt;), Tier 1.5 cleared &lt;code&gt;B6&lt;/code&gt; provisionally and escalated &lt;code&gt;B2&lt;/code&gt;–&lt;code&gt;B5&lt;/code&gt; to Tier 2 once truncation caps tripped — proving that the biggest speedup comes when you keep implementation slices small and target files focused.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sub-penny screening with zero output tokens:&lt;/strong&gt; Live runs cost &lt;strong&gt;&lt;code&gt;$0.0024&lt;/code&gt;–&lt;code&gt;$0.0080&lt;/code&gt;&lt;/strong&gt; with &lt;code&gt;0&lt;/code&gt; output or thinking tokens, keeping my reasoning budget strictly for genuine grey zones and one final &lt;code&gt;[arch]&lt;/code&gt; sign-off.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Smarter stall detection:&lt;/strong&gt; Continuous &lt;code&gt;ratchet_score&lt;/code&gt; progress stops the Circuit Breaker Trio from false-stalling when an assertion climbs from &lt;code&gt;0.25&lt;/code&gt; to &lt;code&gt;0.82&lt;/code&gt;, and flags regressions immediately.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy5uwknh1n7re1g6o1dh4.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy5uwknh1n7re1g6o1dh4.gif" alt="3-pass loop race: Two-Tier loop vs Three-Tier loop with Tier 1.5" width="720" height="390"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Honest Trade-Offs, API Quirks, and Current Limitations
&lt;/h4&gt;

&lt;p&gt;Adding Tier 1.5 is not magic, and treating &lt;code&gt;gemini-decision-1&lt;/code&gt; like a miniature reasoning model will bite you. Keep these gotchas and current preview limits in mind:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Know which checks still need step-by-step reasoning:&lt;/strong&gt; Because &lt;code&gt;gemini-decision-1&lt;/code&gt; answers in a single pass without working through a problem step by step (no thinking tokens), it cannot reliably trace multi-file logic, spot subtle race conditions, or audit auth and injection bugs. Keep those &lt;code&gt;[arch]&lt;/code&gt; and &lt;code&gt;[security]&lt;/code&gt; checks provisional and always let Tier 2 have the final say.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Watch a few subtle API quirks:&lt;/strong&gt; The model &lt;strong&gt;never sees your question dictionary keys&lt;/strong&gt; (so always put the full, self-contained question inside &lt;code&gt;instructions&lt;/code&gt;), &lt;code&gt;noul&lt;/code&gt; scores are clamped to &lt;code&gt;0.01&lt;/code&gt;–&lt;code&gt;0.99&lt;/code&gt; (any threshold above &lt;code&gt;0.99&lt;/code&gt; will never match), and safety-filter blocks fail the whole call with HTTP &lt;code&gt;400&lt;/code&gt; rather than returning partial answers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Platform availability (Developer API only today):&lt;/strong&gt; &lt;code&gt;gemini-decision-1&lt;/code&gt; currently runs only on the Gemini Developer API (&lt;code&gt;v1beta&lt;/code&gt;), with support for &lt;strong&gt;Gemini Platform&lt;/strong&gt; &lt;em&gt;(formerly Vertex AI)&lt;/em&gt; coming soon. Until it lands on Google Cloud, it requires an AI Studio &lt;code&gt;GEMINI_API_KEY&lt;/code&gt; rather than keyless Workload Identity Federation (WIF) / ADC.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No Context Caching or Batch API yet (rarely a dealbreaker):&lt;/strong&gt; Separate from the platform split, &lt;code&gt;gemini-decision-1&lt;/code&gt; itself does not yet support Context Caching, the Batch API, or Flex/Priority inference. That means repeated input across successive loop passes is billed in full — though at &lt;code&gt;$0.10&lt;/code&gt; per million input tokens (and with all your rubric questions sharing a single pass), it is rarely a problem in practice, especially if you only attach the files relevant to your assertions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep each rubric row focused on one clear check:&lt;/strong&gt; Don't bundle &lt;em&gt;"updates the CLI, adds unit tests, and updates &lt;code&gt;README.md&lt;/code&gt;"&lt;/em&gt; into a single yes/no question. With one big "monolithic question", if two parts pass and one fails, the score lands right in the fuzzy grey zone. Split them into three separate, independent rows instead (they all run in the same single API call anyway!) and name the exact target file for each one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Match image resolution to the check:&lt;/strong&gt; For coarse visual or layout checks, &lt;code&gt;resolution="low"&lt;/code&gt; cuts image tokens by &lt;strong&gt;&lt;code&gt;4x&lt;/code&gt;&lt;/strong&gt; (&lt;code&gt;266&lt;/code&gt; vs &lt;code&gt;1064&lt;/code&gt;, as Romin Irani showed in &lt;a href="https://medium.com/google-cloud/getting-started-with-the-gemini-decisions-api-in-python-d2b40093034f" rel="noopener noreferrer"&gt;&lt;em&gt;Getting Started with the Gemini Decisions API in Python&lt;/em&gt;&lt;/a&gt;) with &lt;code&gt;&amp;gt;98%&lt;/code&gt; confidence. For readable diagram labels and typical UI screenshots, &lt;code&gt;medium&lt;/code&gt; is usually plenty — and still cuts image tokens by &lt;strong&gt;&lt;code&gt;2x&lt;/code&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Packaged as a Portable Skill You Can Download Today
&lt;/h2&gt;

&lt;p&gt;Once proved, I packaged the entire workflow into a portable agent skill called &lt;strong&gt;&lt;code&gt;tiered-rubric-loop&lt;/code&gt;&lt;/strong&gt; in my public &lt;a href="https://github.com/derailed-dash/dazbo-agent-skills" rel="noopener noreferrer"&gt;&lt;code&gt;derailed-dash/dazbo-agent-skills&lt;/code&gt;&lt;/a&gt; repository. &lt;em&gt;(If you find it useful, please do drop a star ⭐ on the repo — it really helps other builders find it!)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8yjc2qm8fm0yi9cjquqr.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8yjc2qm8fm0yi9cjquqr.jpg" alt="Dazbo presenting the tiered-rubric-loop portable agent skill" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Installing it into Antigravity or any compatible agent harness takes one command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx skills add https://github.com/derailed-dash/dazbo-agent-skills --skill tiered-rubric-loop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once installed (with &lt;code&gt;GEMINI_API_KEY&lt;/code&gt; in your environment — and if it is missing, the skill falls back cleanly to Tier 1 → Tier 2), you do not have to run any scripts by hand. Just prompt your agent in plain English:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Use &lt;code&gt;tiered-rubric-loop&lt;/code&gt; to build this feature. If there isn't a rubric in &lt;code&gt;SPEC.md&lt;/code&gt; yet, draft a rubric checklist with me first, then loop until everything passes."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Or on an existing feature branch before opening a PR:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Run &lt;code&gt;tiered-rubric-loop&lt;/code&gt; on my branch and fix anything that fails."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Behind the scenes, the skill handles the whole loop automatically: it finds &lt;code&gt;docs/SPEC.md&lt;/code&gt;, &lt;code&gt;SPEC.md&lt;/code&gt;, &lt;code&gt;LOOPS.md&lt;/code&gt;, or &lt;code&gt;RUBRIC.md&lt;/code&gt; (including &lt;code&gt;docs/RUBRIC.md&lt;/code&gt; and &lt;code&gt;harness/RUBRIC.md&lt;/code&gt; — or agrees a lightweight checklist with you inline), runs Tier 1 (&lt;code&gt;make check&lt;/code&gt;), calls &lt;code&gt;eval_rubric.py&lt;/code&gt; for Tier 1.5 screening, wakes a fresh read-only Tier 2 subagent only for grey zones and final &lt;code&gt;[arch]&lt;/code&gt; sign-off, and tracks &lt;code&gt;ratchet_score&lt;/code&gt; until the Circuit Breaker Trio stops the loop.&lt;/p&gt;

&lt;p&gt;If you ever &lt;em&gt;do&lt;/em&gt; want to run Tier 1.5 standalone in a terminal or CI job, &lt;code&gt;eval_rubric.py&lt;/code&gt; also works directly from the command line — supporting &lt;code&gt;--targets-only&lt;/code&gt;, &lt;code&gt;--base main&lt;/code&gt;, &lt;code&gt;--image&lt;/code&gt; / &lt;code&gt;--pdf&lt;/code&gt; for multimodal checks, and &lt;code&gt;--dry-run --json&lt;/code&gt; for offline validation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapping Up
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;gemini-decision-1&lt;/code&gt; model is insanely fast, super cheap and a game-changer for certain scenarios. Here I've wired it into my standard harness rubric.&lt;/p&gt;

&lt;p&gt;Adding &lt;strong&gt;Tier 1.5&lt;/strong&gt; between deterministic Tier 1 and my agentic Tier 2 critic took my existing disciplined loop rubric and made it &lt;strong&gt;much faster, much cheaper, and backed by a far stronger continuous ratchet&lt;/strong&gt;. For less than a penny a pass, &lt;code&gt;gemini-decision-1&lt;/code&gt; clears routine checks on the spot, flags obvious omissions in a second, tracks real &lt;code&gt;ratchet_score&lt;/code&gt; progress across every pass, and reserves my reasoning budget strictly for genuine grey zones and architectural judgement.&lt;/p&gt;

&lt;p&gt;Give &lt;a href="https://github.com/derailed-dash/dazbo-agent-skills/tree/main/skills/tiered-rubric-loop" rel="noopener noreferrer"&gt;&lt;code&gt;tiered-rubric-loop&lt;/code&gt;&lt;/a&gt; a spin on your next branch. Your repo will thank you for it!&lt;/p&gt;

&lt;h2&gt;
  
  
  Before You Go
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Please share&lt;/strong&gt; 📢 this with anyone that you think will be interested. It might help them, and it really helps me!&lt;/li&gt;
&lt;li&gt;Please &lt;strong&gt;drop some reactions&lt;/strong&gt; ❤️ 🦄 🔥 (you can pick more than one!) and &lt;strong&gt;bookmark&lt;/strong&gt; 🔖 this post!&lt;/li&gt;
&lt;li&gt;Please &lt;strong&gt;leave a comment&lt;/strong&gt; 💬. Interaction is good!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add a star&lt;/strong&gt; ⭐ on my repos!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Follow&lt;/strong&gt; 👉 me here on Dev.to, so you don’t miss my content.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  References and Useful Links
&lt;/h2&gt;

&lt;h4&gt;
  
  
  Gemini Decisions API &amp;amp; Routing Research
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://blog.google/innovation-and-ai/technology/developers-tools/gemini-decisions-api/?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Gemini Decisions API: Fast, calibrated multimodal decisions (Google DeepMind Blog)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://aistudio.google.com/docs/decisions-api?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Decisions API Official Documentation&lt;/a&gt; &amp;amp; &lt;a href="https://aistudio.google.com/docs/models/gemini-decision-1?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Gemini Decision 1 Model Page&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://aistudio.google.com/docs/pricing?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco#gemini-decision" rel="noopener noreferrer"&gt;Gemini API Pricing&lt;/a&gt; &amp;amp; &lt;a href="https://aistudio.google.com/docs/rate-limits?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco#gemini-decision" rel="noopener noreferrer"&gt;Rate Limits&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://codelabs.developers.google.com/getting-started-with-gemini-decisions-api?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco#0" rel="noopener noreferrer"&gt;Getting Started with Gemini Decisions API (Google Codelab)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://aistudio.google.com/apps/f6cbef57-8bad-443a-813f-4d4c8f9750af?fullscreenApplet=true&amp;amp;utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Decisions Playground (Google AI Studio)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://medium.com/google-cloud/routing-models-with-the-gemini-decisions-api-6c6a0a043aef" rel="noopener noreferrer"&gt;Routing models with the Gemini Decisions API by Karl Weinmeister&lt;/a&gt; &amp;amp; &lt;a href="https://medium.com/google-cloud/how-llm-routing-strategies-compare-7ea3d03514e3" rel="noopener noreferrer"&gt;How LLM routing strategies compare&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/kweinmeister/gemini-decision-router" rel="noopener noreferrer"&gt;&lt;code&gt;kweinmeister/gemini-decision-router&lt;/code&gt; on GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://medium.com/google-cloud/getting-started-with-the-gemini-decisions-api-in-python-d2b40093034f" rel="noopener noreferrer"&gt;Getting Started with the Gemini Decisions API in Python by Romin Irani&lt;/a&gt; &amp;amp; &lt;a href="https://github.com/rominirani/gcp-gemini-decisions-hybrid-gateway" rel="noopener noreferrer"&gt;&lt;code&gt;rominirani/gcp-gemini-decisions-hybrid-gateway&lt;/code&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Dazbo's Harness Series &amp;amp; Repositories
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/derailed-dash/dazbo-agent-skills" rel="noopener noreferrer"&gt;&lt;code&gt;derailed-dash/dazbo-agent-skills&lt;/code&gt; (&lt;code&gt;tiered-rubric-loop&lt;/code&gt; Skill)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/derailed-dash/gemini-review-action" rel="noopener noreferrer"&gt;&lt;code&gt;derailed-dash/gemini-review-action&lt;/code&gt; (PR Review &amp;amp; Issue Triage Action)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/gde/from-vibing-chaos-to-reliable-agents-the-what-why-and-how-of-harness-engineering-4ba0"&gt;From Vibing Chaos to Reliable Agents: The What, Why, and How of Harness Engineering (Part 1)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/gde/loop-engineering-in-the-harness-autonomous-self-correcting-systems-part-2-155e"&gt;Loop Engineering in the Harness: Autonomous, Self-Correcting Systems (Part 2)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/gde/spec-driven-development-for-the-win-disposable-code-living-blueprints-and-building-like-a-boss-2bnn"&gt;Spec-Driven Development For-the-Win: Disposable Code, Living Blueprints, and Building Like a Boss (Part 3)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/gde/inner-loops-in-practice-fresh-contexts-output-discipline-and-day-1-loops-416d"&gt;Inner Loops in Practice: Fresh Contexts, Output Discipline, and Day-1 Loops (Part 4)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/gde/automated-github-code-reviews-using-google-gemini-update-enterprise-ready-multimodal-and-1phi"&gt;Automated GitHub Code Reviews Using Google Gemini Update: Enterprise-Ready, Multimodal, and Battle-Hardened (Part 2)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Dazbo Links
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://medium.com/@dazbo" rel="noopener noreferrer"&gt;Dazbo on Medium&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://medium.com/@dazbo/dazbos-technical-writing-engineering-catalogue-agentic-ai-google-cloud-architecture-and-cd21558dde32" rel="noopener noreferrer"&gt;Dazbo's Article Index&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://darrenlester.net" rel="noopener noreferrer"&gt;Dazbo's Portfolio&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>gemini</category>
      <category>ai</category>
      <category>agents</category>
      <category>python</category>
    </item>
    <item>
      <title>Harness Engineering: Building Efficient Loops, and How to Implement</title>
      <dc:creator>Darren "Dazbo" Lester</dc:creator>
      <pubDate>Sun, 29 Nov 2026 11:25:47 +0000</pubDate>
      <link>https://dev.to/gde/inner-loops-in-practice-fresh-contexts-output-discipline-and-day-1-loops-416d</link>
      <guid>https://dev.to/gde/inner-loops-in-practice-fresh-contexts-output-discipline-and-day-1-loops-416d</guid>
      <description>&lt;p&gt;&lt;em&gt;Part 4 of the series "Beyond Vibe Coding: The Engineering Blueprint for Reliable AI Agents"&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;h4&gt;
  
  
  🗺️ The Series Roadmap: Beyond Vibe Coding
&lt;/h4&gt;

&lt;p&gt;Agentic software development is drowning in fragmented buzzwords: &lt;em&gt;Harness Engineering, Context Engineering, Loop Engineering, Spec-Driven Development, Inner Loops, and Outer Meta-Loops&lt;/em&gt;. Are they competing frameworks? Redundant prompt techniques? Or interlocking parts of a single machine?&lt;/p&gt;

&lt;p&gt;This five-part series unifies these concepts into one cohesive architectural blueprint for building production software with AI without writing code manually:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Part 1: &lt;a href="https://dev.to/gde/from-vibing-chaos-to-reliable-agents-the-what-why-and-how-of-harness-engineering-4ba0"&gt;From Vibing Chaos to Reliable Agents: The What, Why, and How of Harness Engineering&lt;/a&gt;&lt;/strong&gt;
We diagnose the hangover of vibe coding, unpack the paradigm shift of &lt;em&gt;shifting developer interventions left&lt;/em&gt;, establish our bedrock formula (&lt;strong&gt;Agent = Model + Harness&lt;/strong&gt;), explore the motorsport analogy, and deconstruct the deterministic components that make up a production developer environment.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Part 2: &lt;a href="https://dev.to/gde/loop-engineering-in-the-harness-autonomous-self-correcting-systems-part-2-155e"&gt;Loop Engineering in the Harness: Autonomous, Self-Correcting Systems&lt;/a&gt;&lt;/strong&gt;
We fire up the dynamic runtime engine of the harness: deconstructing the core loop components, establishing hybrid evaluation rubrics (deterministic tests + LLM goal fidelity + tool trajectory verification), and applying the Ratchet Principle.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Part 3: &lt;a href="https://dev.to/gde/spec-driven-development-for-the-win-disposable-code-living-blueprints-and-building-like-a-boss-2bnn"&gt;Spec-Driven Development For-the-Win: Disposable Code, Living Blueprints, and Building Like a Boss&lt;/a&gt;&lt;/strong&gt;
We explore Spec-Driven Development (where code is disposable and specifications are the single source of truth), master Google Antigravity's unified harness and interactive slash commands (&lt;code&gt;/grill-me&lt;/code&gt;, &lt;code&gt;/plan&lt;/code&gt;, &lt;code&gt;/goal&lt;/code&gt;, &lt;code&gt;/boost&lt;/code&gt;, &lt;code&gt;/learn&lt;/code&gt;), and combine formal specs on disk with autonomous tactical workflows in your session.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Part 4: Inner Loops in Practice: Fresh Contexts, Output Discipline, and Day-1 Loops (This Article)&lt;/strong&gt;
We go under the hood of an inner execution loop to see why looping actually runs faster and cheaper than single-pass vibing (fresh subagent contexts, &lt;code&gt;LIVING_MEMORY.md&lt;/code&gt;, and strict output discipline), then wire day-one loops into any repository — ordered by setup effort — using Antigravity slash commands, &lt;code&gt;loopy&lt;/code&gt;, and declarative Markdown with tiered rubrics.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Part 5: *Completing the AI Harness: Headless CI Loops, ADK Graphs, and Self-Improving Harnesses (Coming Soon)&lt;/strong&gt;*
We scale up to unattended headless execution (Antigravity CLI, Python SDK, Remote Agent) and custom Google ADK &lt;code&gt;LoopAgent&lt;/code&gt; / ADK 2.0 &lt;code&gt;Workflow&lt;/code&gt; graphs, close the outer meta-loop with self-improving harnesses (&lt;code&gt;EXPERIENCE.md&lt;/code&gt;), and tie every concept together in a Monday-morning repo checklist.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Howdy friends, and welcome back to our &lt;em&gt;Beyond Vibe Coding&lt;/em&gt; series!&lt;/p&gt;

&lt;p&gt;In &lt;a href="https://dev.to/gde/from-vibing-chaos-to-reliable-agents-the-what-why-and-how-of-harness-engineering-4ba0"&gt;Part 1&lt;/a&gt;, we engineered the deterministic race car chassis around the model (&lt;strong&gt;Agent = Model + Harness&lt;/strong&gt;). In &lt;a href="https://dev.to/gde/loop-engineering-in-the-harness-autonomous-self-correcting-systems-part-2-155e"&gt;Part 2&lt;/a&gt;, we fired up the powertrain — the autonomous execution loop backed by binary rubrics, tool trajectory checks, and the Ratchet Principle. And in &lt;a href="https://dev.to/gde/spec-driven-development-for-the-win-disposable-code-living-blueprints-and-building-like-a-boss-2bnn"&gt;Part 3&lt;/a&gt;, we decoupled &lt;em&gt;what&lt;/em&gt; we are building from &lt;em&gt;how&lt;/em&gt; we build it with &lt;strong&gt;Spec-Driven Development (SDD)&lt;/strong&gt;, making living Markdown specifications our permanent intellectual property and treating generated code as disposable.&lt;/p&gt;

&lt;p&gt;After seeing our side-by-side &lt;em&gt;Cosmic Conquest&lt;/em&gt; workbench in &lt;a href="https://dev.to/gde/loop-engineering-in-the-harness-autonomous-self-correcting-systems-part-2-155e"&gt;Part 2&lt;/a&gt;, two very practical questions always come up next:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Why wasn't our Part 2 loop slower and more expensive&lt;/strong&gt; than a single vibe prompt?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How do we wire inner loops into any existing repository today&lt;/strong&gt; without building a bespoke workbench every time?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;One of the greatest strengths of harness engineering is that &lt;strong&gt;loop engineering is an architectural pattern, not a rigid implementation&lt;/strong&gt;. In this post, we'll look inside our loop engineering iterations, and then walk through the day-one mechanisms you can drop into any repo in under ten minutes. &lt;em&gt;(In Part 5, we'll step up to headless CI/CD pipelines, Google ADK graphs, and outer meta-loops that evolve the harness itself.)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Let's dive in.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Looping Beats Single-Pass Vibing
&lt;/h2&gt;

&lt;p&gt;Before we look at the tooling options, let's solve a paradox that has certainly surprised a few when they see my benchmark for the first time.&lt;/p&gt;

&lt;p&gt;When people hear &lt;em&gt;"multi-turn autonomous loop with a multi-point rubric"&lt;/em&gt;, they naturally assume it must be slower and burn far more tokens than a single prompt. Yet in our &lt;a href="https://github.com/derailed-dash/harness-engineering-demo" rel="noopener noreferrer"&gt;Part 2 &lt;em&gt;Cosmic Conquest&lt;/em&gt; head-to-head benchmark&lt;/a&gt;, the exact opposite happened: the harnessed loop ran &lt;strong&gt;3–4x faster&lt;/strong&gt;, consumed &lt;strong&gt;~80% fewer total tokens&lt;/strong&gt; (with &lt;strong&gt;~15x fewer output tokens&lt;/strong&gt;), cost &lt;strong&gt;~85% less&lt;/strong&gt;, and was the &lt;em&gt;only&lt;/em&gt; track that produced a playable game!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;How can an entire loop be faster and cheaper than a single unharnessed pass?&lt;/em&gt; It comes down to how we design the loop to work. If you simply let an agent loop endlessly inside one sprawling chat thread, your token usage explodes, the model loses focus, and an unconstrained command can trash your workspace. Keeping an inner execution loop fast, cheap, and reliable comes down to three mechanics:&lt;/p&gt;

&lt;h4&gt;
  
  
  1. Clean Context With Each Iteration
&lt;/h4&gt;

&lt;p&gt;In a single-thread chat loop, every failed code draft, lint warning, and 200-line stack trace stays bolted onto the conversation history. Input tokens grow quadratically, and as failed attempts pile up, the model's attention degrades into familiar failure modes:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fj95k5mmola7oc0ra1qjf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fj95k5mmola7oc0ra1qjf.png" alt="Fergus buried under single-thread chat bloat" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Going in Circles:&lt;/strong&gt; By Turn 4, the model retries a fix that failed on Turn 1 because the original error is buried under thousands of tokens of log noise.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Broken Edits &amp;amp; Syntax Regression:&lt;/strong&gt; The model confuses old code drafts in the chat transcript with the actual files on disk.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Instruction Drift:&lt;/strong&gt; Your standing rules, coding standards, and acceptance criteria get drowned out by pages of raw terminal output.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The fix is simple: &lt;strong&gt;give every iteration a clean slate.&lt;/strong&gt; Delegate each loop pass to a fresh, short-lived subagent with a clean context window containing only three things:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fr61ivq80txtbyggsgfg2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fr61ivq80txtbyggsgfg2.png" alt="Delegating each loop iteration to a clean-slate subagent" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Target Spec Slice:&lt;/strong&gt; The specific requirement and acceptance criteria from &lt;code&gt;SPEC.md&lt;/code&gt; or &lt;code&gt;tasks/plan.md&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Current Workspace Files on Disk:&lt;/strong&gt; The actual source files right now, with zero stale drafts from earlier turns.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Latest Failure Receipt:&lt;/strong&gt; A compact summary of what broke on the previous pass.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The subagent makes its edit, runs the checks, records a short receipt, and exits. Its chat history is discarded immediately, leaving the parent orchestrator completely clean to check the result and decide whether to finish or spin up the next pass.&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Keep a Ledger
&lt;/h4&gt;

&lt;p&gt;If each subagent starts with a clean slate, how does Turn 3 avoid repeating Turn 1's mistake? &lt;strong&gt;By reading a compact structured ledger on disk&lt;/strong&gt; instead of 20,000 tokens of raw tracebacks.&lt;/p&gt;

&lt;p&gt;I call mine &lt;code&gt;LIVING_MEMORY.md&lt;/code&gt;, but you can use whatever you like.&lt;/p&gt;

&lt;p&gt;Each failed turn appends roughly 200 tokens of distilled signal: what changed, what failed, the root cause, an explicit &lt;strong&gt;"Do NOT Repeat"&lt;/strong&gt; guardrail, and the next hypothesis. Something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;# Living Memory: Iteration Ledger
&lt;/span&gt;
&lt;span class="gu"&gt;## Turn 1: UserSchema Migration (FAILED)
&lt;/span&gt;
&lt;span class="k"&gt;- &lt;/span&gt;&lt;span class="gs"&gt;**Changes Made:**&lt;/span&gt; &lt;span class="sb"&gt;`app/schemas/user.py`&lt;/span&gt; (lines 12–48) — replaced &lt;span class="sb"&gt;`class Config`&lt;/span&gt; 
  with &lt;span class="sb"&gt;`model_config = ConfigDict(from_attributes=True)`&lt;/span&gt;.
&lt;span class="k"&gt;- &lt;/span&gt;&lt;span class="gs"&gt;**Verifier Output:**&lt;/span&gt;
  &lt;span class="k"&gt;- &lt;/span&gt;&lt;span class="sb"&gt;`uv run pytest tests/test_user.py`&lt;/span&gt;: 16 passed, 2 failed.
  &lt;span class="k"&gt;- &lt;/span&gt;&lt;span class="gs"&gt;**Error:**&lt;/span&gt; &lt;span class="sb"&gt;`PydanticUserError: '@validator' is deprecated and no longer 
&lt;/span&gt;    supports 'each_item=True' in v2 (app/schemas/user.py:34)&lt;span class="sb"&gt;`.
&lt;/span&gt;&lt;span class="k"&gt;- &lt;/span&gt;&lt;span class="gs"&gt;**Root Cause:**&lt;/span&gt; Left legacy Pydantic v1 
  &lt;span class="sb"&gt;`@validator('roles', each_item=True)`&lt;/span&gt; decorator in place.
&lt;span class="k"&gt;- &lt;/span&gt;&lt;span class="gs"&gt;**Do NOT Repeat:**&lt;/span&gt; Do not use &lt;span class="sb"&gt;`@validator`&lt;/span&gt; in Pydantic v2 models.

&lt;span class="gu"&gt;## Turn 2: UserSchema Migration (FAILED)
&lt;/span&gt;
&lt;span class="k"&gt;- &lt;/span&gt;&lt;span class="gs"&gt;**Changes Made:**&lt;/span&gt; &lt;span class="sb"&gt;`app/schemas/user.py`&lt;/span&gt; (lines 34–58) — migrated validators
  to &lt;span class="sb"&gt;`@field_validator('email', 'roles')`&lt;/span&gt;.
&lt;span class="k"&gt;- &lt;/span&gt;&lt;span class="gs"&gt;**Verifier Output:**&lt;/span&gt;
  &lt;span class="k"&gt;- &lt;/span&gt;&lt;span class="sb"&gt;`uv run pytest tests/test_user.py`&lt;/span&gt;: 17 passed, 1 failed 
    (&lt;span class="sb"&gt;`tests/test_user.py::test_invalid_email_error_code`&lt;/span&gt;).
  &lt;span class="k"&gt;- &lt;/span&gt;&lt;span class="gs"&gt;**Error:**&lt;/span&gt; &lt;span class="sb"&gt;`AssertionError: assert 'value_error' == 'invalid_email_format' 
&lt;/span&gt;    (where 'value_error' = exc_info.value.errors()[0]['type'])&lt;span class="sb"&gt;`.
&lt;/span&gt;  &lt;span class="k"&gt;- &lt;/span&gt;&lt;span class="sb"&gt;`uv run ruff check .`&lt;/span&gt;: 0 errors.
&lt;span class="k"&gt;- &lt;/span&gt;&lt;span class="gs"&gt;**Rubric Delta:**&lt;/span&gt; 13 / 14 checks passed 
  (Failed Check 1.2: custom validation errors must preserve API error code
  &lt;span class="sb"&gt;`invalid_email_format`&lt;/span&gt;).
&lt;span class="k"&gt;- &lt;/span&gt;&lt;span class="gs"&gt;**Root Cause:**&lt;/span&gt; Raising plain &lt;span class="sb"&gt;`ValueError("Invalid email")`&lt;/span&gt; in 
  Pydantic v2 sets error &lt;span class="sb"&gt;`type`&lt;/span&gt; to &lt;span class="sb"&gt;`'value_error'`&lt;/span&gt;, breaking the 
  v1 API contract expected by &lt;span class="sb"&gt;`test_invalid_email_error_code`&lt;/span&gt;.
&lt;span class="k"&gt;- &lt;/span&gt;&lt;span class="gs"&gt;**Next Hypothesis (Turn 3):**&lt;/span&gt; Raise 
  &lt;span class="sb"&gt;`PydanticCustomError('invalid_email_format', 'Invalid email address')`&lt;/span&gt; 
  from &lt;span class="sb"&gt;`pydantic_core`&lt;/span&gt; inside &lt;span class="sb"&gt;`validate_email`&lt;/span&gt;.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When Turn 3 boots up, it reads twenty lines of crisp root-cause signal, fixes the exact bug, and moves on. Token usage stays flat across five or more iterations.&lt;/p&gt;

&lt;h4&gt;
  
  
  3. Strict Output Discipline (~15–20x Output Token Reduction)
&lt;/h4&gt;

&lt;p&gt;Keeping &lt;em&gt;input&lt;/em&gt; context slim is only half the story. &lt;strong&gt;Output tokens are the biggest driver of both how long a loop takes and how much it costs.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fku62qswqpxo9ix0i1tz1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fku62qswqpxo9ix0i1tz1.png" alt="Strict Output Discipline: keeping code on disk and returning concise turn receipts" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I learned this the hard way while tuning our &lt;a href="https://github.com/derailed-dash/harness-engineering-demo" rel="noopener noreferrer"&gt;Part 2 evaluation workbench&lt;/a&gt;. Without explicit formatting rules, the agent defaulted to pasting entire source files back into the chat on &lt;em&gt;every single turn&lt;/em&gt; — burning ~16,000 output tokens on one run! Adding strict &lt;strong&gt;Output Discipline&lt;/strong&gt; rules to the harness slashed output tokens by nearly 20x:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Keep Code in Files, Not in Chat:&lt;/strong&gt; Write all source and test files directly to disk via workspace tools. Explicitly forbid dumping full source files into chat replies.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cap Turn Summaries at 150–250 Words:&lt;/strong&gt; Require every pass to reply with a brief summary covering what it tackled, the root cause of any failure, and which files and tests it updated.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Read &amp;amp; Fix Only What Failed:&lt;/strong&gt; Because the code lives on disk, the next subagent never needs old chat transcripts to see what changed — it reads &lt;code&gt;LIVING_MEMORY.md&lt;/code&gt;, inspects only the affected files, and fixes them.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Implementing the Loop
&lt;/h2&gt;

&lt;p&gt;Now we understand the mechanics and how to keep our loop efficinet, let's look at how we actually wire a loop into any new or existing repository today. I'll show approaches ordered from lowest setup time and effort to highest, with zero custom Python plumbing required. Each mechanism works cleanly on its own, and because they operate at different layers, you can combine them whenever it helps.&lt;/p&gt;

&lt;h4&gt;
  
  
  Mechanism 1: Agy Slash Commands &amp;amp; Orchestrator Mode
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Effort:&lt;/strong&gt; 0 mins — Built-in&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt; Immediate interactive high-velocity feature development, deep adversarial review, and parallel multi-file engineering inside Google Antigravity.&lt;/p&gt;

&lt;p&gt;Conversational agents are conditioned to be polite: they finish one subtask, pause, and ask &lt;em&gt;"Would you like me to continue with the next step?"&lt;/em&gt; As we introduced in &lt;a href="https://dev.to/gde/spec-driven-development-for-the-win-disposable-code-living-blueprints-and-building-like-a-boss-2bnn"&gt;Part 3&lt;/a&gt;, Antigravity's native slash commands remove that friction right out of the box while giving you distinct execution topologies on demand:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;/goal&lt;/code&gt; (Hands-Off Autonomous Execution Loop):&lt;/strong&gt; Prefixing a task — or a saved loop recipe — with &lt;code&gt;/goal&lt;/code&gt; puts Antigravity into persistent loop mode, iterating across edits and test runs without stopping after every step to ask permission. It still respects your sandbox and approval boundaries: any unsandboxed command you haven't authorised pauses cleanly for your sign-off.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;/boost&lt;/code&gt; (Going Deeper on One Hard Problem):&lt;/strong&gt; Invoking &lt;code&gt;/boost&lt;/code&gt; routes a tricky feature or bug through Antigravity's deep-reasoning pipeline — automatically exploring multiple perspectives, stress-testing edge cases, and running adversarial verification checks to defeat the &lt;em&gt;Sycophantic Yes-Agent&lt;/em&gt; before returning.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;/swarm&lt;/code&gt; (Going Wider Across Big Multi-File Work):&lt;/strong&gt; Where &lt;code&gt;/boost&lt;/code&gt; goes &lt;em&gt;deeper&lt;/em&gt; on one hard problem, &lt;code&gt;/swarm&lt;/code&gt; goes &lt;em&gt;wider&lt;/em&gt;. It spins up a coordinator, parallel worker agents operating inside isolated Git worktrees (so they never step on each other's edits), and dedicated verifiers collaborating peer-to-peer via live &lt;code&gt;@mention&lt;/code&gt; channels.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Orchestrator Mode (Model Routing Inside the Harness):&lt;/strong&gt; Remember a fundamental harness principle: &lt;strong&gt;a model cannot swap itself out!&lt;/strong&gt; Model routing lives in the harness. Toggling Antigravity's &lt;strong&gt;Orchestrator&lt;/strong&gt; mode dynamically pairs frontier reasoning (&lt;code&gt;Gemini 4 Carbon&lt;/code&gt; or &lt;code&gt;Gemini 4 Neon&lt;/code&gt;) for planning and architecture review with fast, low-cost execution (&lt;code&gt;Gemini 4 Hydrogen&lt;/code&gt;) for parallel slices inside a single workflow.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/boost implement the OAuth2 token refresh flow from specs/auth.md and verify it against RUBRIC.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Mechanism 2: Off-the-Shelf Skill Loops
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Effort:&lt;/strong&gt;  1-2 minutes with &lt;code&gt;loopy&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt; Standardising repeatable engineering and maintenance tasks, auditing loop safety before you run, pulling ready-made loops from a community catalogue, and building a shared &lt;code&gt;LOOPS.md&lt;/code&gt; for your team.&lt;/p&gt;

&lt;p&gt;What if you want specialised loops — cleaning up tech debt, speeding up a sluggish test suite, verifying a fresh &lt;code&gt;git clone&lt;/code&gt;, or running a &lt;em&gt;Devil's Advocate&lt;/em&gt; critique — without hand-crafting the loop rules yourself?&lt;/p&gt;

&lt;p&gt;Install the open-source &lt;a href="https://github.com/Forward-Future/loopy/tree/main/skills/loopy" rel="noopener noreferrer"&gt;&lt;code&gt;loopy&lt;/code&gt; skill&lt;/a&gt; directly into your harness:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx skills add https://github.com/Forward-Future/loopy --skill loopy -g -y
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once installed, &lt;code&gt;loopy&lt;/code&gt; covers the full loop lifecycle:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pull &amp;amp; Adapt from The Loop Library:&lt;/strong&gt; Ask your agent: &lt;em&gt;"Use loopy to find a loop for speeding up our pytest suite and adapt it to our repo."&lt;/em&gt; It fetches the nearest published pattern from &lt;a href="https://signals.forwardfuture.com/loop-library/" rel="noopener noreferrer"&gt;The Loop Library&lt;/a&gt; and tailors the verification command to your &lt;code&gt;pyproject.toml&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Craft a Custom Loop via Short Q&amp;amp;A:&lt;/strong&gt; Tell your agent: &lt;em&gt;"I want a loop that migrates our legacy endpoints to Pydantic v2. Use loopy to help me design it."&lt;/em&gt; &lt;code&gt;loopy&lt;/code&gt; interviews you one question at a time — what "done" looks like, what files are in or out of scope, what test verifies each pass, and when to stop or escalate — and generates a ready-to-run loop recipe.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run &lt;code&gt;Loop Doctor&lt;/code&gt; Before You Launch:&lt;/strong&gt; &lt;code&gt;loopy&lt;/code&gt; includes a pre-flight &lt;strong&gt;Loop Doctor&lt;/strong&gt; audit that reviews any loop definition for weak verification checks, missing stopping conditions, or overly broad permissions &lt;em&gt;before&lt;/em&gt; you unleash it on your repository.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run &lt;code&gt;Debrief&lt;/code&gt; After a Run:&lt;/strong&gt; Once a loop finishes, &lt;code&gt;loopy&lt;/code&gt;'s &lt;strong&gt;Debrief&lt;/strong&gt; workflow inspects the completed evidence receipts to diagnose where turns were wasted — feeding directly into our &lt;em&gt;Loop Bug vs Harness Bug&lt;/em&gt; diagnostics in Part 5.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Save Team Loops in &lt;code&gt;LOOPS.md&lt;/code&gt;:&lt;/strong&gt; Once a loop works cleanly, ask &lt;code&gt;loopy&lt;/code&gt; to save it into a version-controlled &lt;code&gt;LOOPS.md&lt;/code&gt; catalogue in your repo root:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;# Project Loops (LOOPS.md)
&lt;/span&gt;
&lt;span class="gu"&gt;## Endpoint Pydantic v2 Migration Loop
&lt;/span&gt;
Migrates one legacy FastAPI route per pass to strict Pydantic v2 models until 
all routes are converted or progress stalls.

Prompt:
&lt;span class="ge"&gt;&amp;gt; Inspect `app/routers/` and select one unconverted endpoint. 
&lt;/span&gt;  Replace raw dict payloads with strict Pydantic v2 &lt;span class="sb"&gt;`BaseModel`&lt;/span&gt; schemas. 
  After each change, run &lt;span class="sb"&gt;`uv run pytest`&lt;/span&gt;, &lt;span class="sb"&gt;`uv run ruff check .`&lt;/span&gt;, and &lt;span class="sb"&gt;`uv run pyright`&lt;/span&gt;. 
  Keep the change only if all checks pass; otherwise revert and record the blocker in 
  &lt;span class="sb"&gt;`LIVING_MEMORY.md`&lt;/span&gt;. Stop when all routers use &lt;span class="sb"&gt;`BaseModel`&lt;/span&gt;, after 10 endpoints, or if 2 
  consecutive passes fail to convert a route. Ask before altering public URL paths.

&lt;span class="gu"&gt;## Test Suite Speedup Loop
&lt;/span&gt;
Profiles and optimises the slowest pytest tests one at a time without reducing coverage.

Prompt:
&lt;span class="ge"&gt;&amp;gt; Run `uv run pytest --durations=5` and pick the slowest test not yet listed in 
&lt;/span&gt;  &lt;span class="sb"&gt;`LIVING_MEMORY.md`&lt;/span&gt;. Refactor fixture scope or mock expensive I/O to reduce runtime. 
  Keep the change only if &lt;span class="sb"&gt;`uv run pytest`&lt;/span&gt; passes with identical coverage and 
  wall-clock time improves by at least 15%; otherwise revert and log the attempt. 
  Stop when no test exceeds 200ms, after 5 passes, or after 2 consecutive stalls.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Any engineer on your team can now trigger a saved loop simply by asking: &lt;em&gt;"Loopy, run the Endpoint Pydantic v2 Migration Loop"&lt;/em&gt; — or even without the skill installed, &lt;em&gt;"Run the Endpoint Pydantic v2 Migration Loop from &lt;code&gt;LOOPS.md&lt;/code&gt;."&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Mechanism 3: Pure Declarative Markdown
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Effort:&lt;/strong&gt; 5-10 minutes with custom Markdown files&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Best for:&lt;/strong&gt; Full tool-agnostic control in &lt;em&gt;any&lt;/em&gt; AI coding tool (e.g. Google Antigravity, Claude Code, Cursor, GitHub Copilot) with custom standing loop protocols and tiered verification gates.&lt;/p&gt;

&lt;p&gt;You don't need to install a single package to create an autonomous loop. Because modern coding agents natively read workspace context files and have access to sandboxed terminal tools, you can wire a complete &lt;strong&gt;Observe → Act → Verify → Record&lt;/strong&gt; loop using pure Markdown.&lt;/p&gt;

&lt;p&gt;You simply drop a standing &lt;strong&gt;Autonomous Loop Protocol&lt;/strong&gt; into your project's root rule file — &lt;code&gt;GEMINI.md&lt;/code&gt; or &lt;code&gt;AGENTS.md&lt;/code&gt;. You can either include your binary pass/fail checks inline or, as a clean best practice for larger projects, keep them in a separate &lt;code&gt;RUBRIC.md&lt;/code&gt; file so your main loop file stays lean.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;# Autonomous Execution Loop Protocol (in GEMINI.md / AGENTS.md)
&lt;/span&gt;
Whenever asked to implement a feature or fix a bug from &lt;span class="sb"&gt;`specs/`&lt;/span&gt; or &lt;span class="sb"&gt;`tasks/plan.md`&lt;/span&gt;, 
you MUST execute in a strict self-correcting loop:

1. &lt;span class="gs"&gt;**Fresh Context per Iteration:**&lt;/span&gt; If you can spawn subagents, 
   delegate each loop iteration to a new, short-lived subagent so 
   every pass starts with a clean context window.
2. &lt;span class="gs"&gt;**Observe &amp;amp; Restate Goal:**&lt;/span&gt; Read the target task and restate 
   the exact acceptance criteria at the start of the turn to prevent 
   goal drift. Read &lt;span class="sb"&gt;`LIVING_MEMORY.md`&lt;/span&gt; (if present) to see what failed 
   in prior attempts.
3. &lt;span class="gs"&gt;**Act (TDD First):**&lt;/span&gt; Write or update the failing unit test in &lt;span class="sb"&gt;`tests/`&lt;/span&gt; 
   first, then implement the minimal modular code change.
4. &lt;span class="gs"&gt;**Verify (Offline Deterministic Gate + Binary Rubric):**&lt;/span&gt;
   &lt;span class="k"&gt;- &lt;/span&gt;Run &lt;span class="sb"&gt;`uv run pytest`&lt;/span&gt;
   &lt;span class="k"&gt;- &lt;/span&gt;Run &lt;span class="sb"&gt;`uv run codespell -s`&lt;/span&gt;, &lt;span class="sb"&gt;`uv run ruff check --fix .`&lt;/span&gt;, 
     and &lt;span class="sb"&gt;`uv run pyright`&lt;/span&gt;
   &lt;span class="k"&gt;- &lt;/span&gt;Score the output against every binary check in &lt;span class="sb"&gt;`RUBRIC.md`&lt;/span&gt; 
     using an independent clean-slate Critic.
5. &lt;span class="gs"&gt;**Record &amp;amp; Iterate:**&lt;/span&gt;
   &lt;span class="k"&gt;- &lt;/span&gt;If ANY test, static check, or rubric assertion fails, 
     append the turn number, failed check IDs, root cause, 
     "Do NOT Repeat" note, and next hypothesis to &lt;span class="sb"&gt;`LIVING_MEMORY.md`&lt;/span&gt;.
   &lt;span class="k"&gt;- &lt;/span&gt;Do NOT ask the human for permission to fix test or lint failures.
     Immediately spin up the next iteration and remediate.
6. &lt;span class="gs"&gt;**Output Discipline (No Inline Code Dumps):**&lt;/span&gt;
   &lt;span class="k"&gt;- &lt;/span&gt;Write all source and test files directly to the workspace. 
     Never dump full source files into chat replies.
   &lt;span class="k"&gt;- &lt;/span&gt;Reply on every pass with a 150–250 word summary covering what 
     was tackled, the root cause of any failure, and which files 
     and tests were updated.
7. &lt;span class="gs"&gt;**Circuit Breakers (Stop / Escalate):**&lt;/span&gt;
   &lt;span class="k"&gt;- &lt;/span&gt;&lt;span class="gs"&gt;**Clean Exit:**&lt;/span&gt; Stop and present a concise summary ONLY 
     when &lt;span class="sb"&gt;`pytest`&lt;/span&gt;, &lt;span class="sb"&gt;`codespell`&lt;/span&gt;, &lt;span class="sb"&gt;`ruff`&lt;/span&gt;, &lt;span class="sb"&gt;`pyright`&lt;/span&gt;, and 
     100% of &lt;span class="sb"&gt;`RUBRIC.md`&lt;/span&gt; checks pass.
   &lt;span class="k"&gt;- &lt;/span&gt;&lt;span class="gs"&gt;**Stall / Cap Escalation:**&lt;/span&gt; If the rubric score fails to improve 
     for 3 consecutive attempts, or if you reach 5 iterations, 
     HALT immediately and escalate to the human with your diagnostic log.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Even in tools without subagent spawning, persisting each failed turn to &lt;code&gt;LIVING_MEMORY.md&lt;/code&gt; lets you clear or &lt;code&gt;/compact&lt;/code&gt; your chat thread mid-run without losing working memory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scaling Your Rubric Into a Tiered Verification Funnel:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
In &lt;a href="https://dev.to/gde/loop-engineering-in-the-harness-autonomous-self-correcting-systems-part-2-155e"&gt;Part 2&lt;/a&gt;, we split validation into two halves: fast deterministic checks (&lt;code&gt;pytest&lt;/code&gt;, &lt;code&gt;ruff&lt;/code&gt;) followed by a clean-slate semantic Critic agent. In day-to-day production, waking a heavyweight Critic subagent on &lt;em&gt;every&lt;/em&gt; minor check can still feel sluggish.&lt;/p&gt;

&lt;p&gt;You can scale that exact &lt;code&gt;RUBRIC.md&lt;/code&gt; pattern into a &lt;strong&gt;tiered verification funnel&lt;/strong&gt; using my open-source &lt;a href="https://github.com/derailed-dash/dazbo-agent-skills/tree/main/skills/tiered-rubric-loop" rel="noopener noreferrer"&gt;&lt;code&gt;tiered-rubric-loop&lt;/code&gt; skill&lt;/a&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Tier 1 — Mechanical Gate (Zero Token Cost):&lt;/strong&gt; &lt;code&gt;pytest&lt;/code&gt;, &lt;code&gt;codespell&lt;/code&gt;, &lt;code&gt;ruff&lt;/code&gt;, and &lt;code&gt;pyright&lt;/code&gt; run offline in seconds. If anything fails here, the loop short-circuits immediately without spending a single model token on semantic review.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tier 1.5 — Fast Calibrated Screening (Gemini Decisions API):&lt;/strong&gt; Once Tier 1 passes, straightforward semantic assertions (e.g. &lt;em&gt;"Does every new public function include a docstring?"&lt;/em&gt; or &lt;em&gt;"Are all error messages actionable?"&lt;/em&gt;) are screened in milliseconds by &lt;code&gt;gemini-decision-1&lt;/code&gt; — Google's calibrated Decisions API, which outputs a pass/fail probability with &lt;strong&gt;zero output tokens&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tier 2 — Clean-Slate Critic Subagent (Exceptions &amp;amp; Critical Architecture Only):&lt;/strong&gt; A full, independent Critic subagent wakes &lt;em&gt;only&lt;/em&gt; for borderline grey-zone scores from Tier 1.5 or critical architectural invariants like security boundaries and concurrency. &lt;em&gt;(We'll unpack the engineering and live benchmarks behind this funnel in an upcoming companion post, Using the Gemini Decisions API to Speed Up Our Evaluation Rubric.)&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;💡 Is a Single Rubric Pass Enough?&lt;/strong&gt;&lt;br&gt;
After &lt;a href="https://dev.to/gde/loop-engineering-in-the-harness-autonomous-self-correcting-systems-part-2-155e"&gt;Part 2&lt;/a&gt;, several readers rightly asked whether passing a rubric &lt;em&gt;once&lt;/em&gt; is enough. It depends on what you are testing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic code gates (&lt;code&gt;pytest&lt;/code&gt;, &lt;code&gt;ruff&lt;/code&gt;, &lt;code&gt;pyright&lt;/code&gt;):&lt;/strong&gt; One pass is definitive — code either passes the test suite or it doesn't.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Semantic LLM-as-a-Judge checks (&lt;code&gt;RUBRIC.md&lt;/code&gt;):&lt;/strong&gt; Never let the Builder mark its own homework (&lt;em&gt;the Sycophantic Yes-Agent&lt;/em&gt;), and never use fuzzy 1-to-5 scores — force strict binary assertions graded by an independent, clean-slate Critic.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;When the system you are building is itself an agent, prompt, or skill:&lt;/strong&gt; One lucky pass tells you almost nothing because the system under test is non-deterministic. Require multi-trial consecutive passes (e.g. 3 out of 3 runs) before declaring victory.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Wrapping Up Part 4: Ready for Unattended Scale
&lt;/h2&gt;

&lt;p&gt;With fresh subagent contexts, &lt;code&gt;LIVING_MEMORY.md&lt;/code&gt;, strict output discipline, and these interactive loop mechanisms in place, you can wire reliable, self-correcting inner loops into any repository in ten minutes flat — without writing a single line of bespoke orchestration code.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;But what happens when nobody is sitting at the IDE?&lt;/em&gt; How do you run that exact same workspace harness headlessly in CI/CD, enforce deterministic Python stop hooks with the Antigravity SDK, build custom multi-agent harnesses in Google ADK 2.0, and close the &lt;strong&gt;outer meta-loop&lt;/strong&gt; so your harness upgrades itself across tasks?&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;Continue to *Part 5: Completing the AI Harness: Headless CI Loops, ADK Graphs, and Self-Improving Harnesses (Coming Soon)&lt;/strong&gt;*&lt;/p&gt;

&lt;h2&gt;
  
  
  Before You Go
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Please share&lt;/strong&gt; 📢 this with anyone that you think will be interested. It might help them, and it really helps me!&lt;/li&gt;
&lt;li&gt;Please &lt;strong&gt;drop some reactions&lt;/strong&gt; ❤️ 🦄 🔥 (you can pick more than one!) and &lt;strong&gt;bookmark&lt;/strong&gt; 🔖 this post!&lt;/li&gt;
&lt;li&gt;Please &lt;strong&gt;leave a comment&lt;/strong&gt; 💬. Interaction is good!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add a star&lt;/strong&gt; ⭐ on my repos!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Follow&lt;/strong&gt; 👉 me here on Dev.to, so you don’t miss my content.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  References and Useful Links
&lt;/h2&gt;

&lt;h4&gt;
  
  
  Practical Inner Loop Tooling
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://harness-engineering.darrenlester.net" rel="noopener noreferrer"&gt;Interactive Presentation Deck: From Vibing Chaos to Reliable Agents (Live Slides)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/derailed-dash/harness-engineering-demo" rel="noopener noreferrer"&gt;Harness Engineering Demo Repository (Side-by-Side ADK Workbench) on GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/derailed-dash/dazbo-agent-skills/tree/main/skills/tiered-rubric-loop" rel="noopener noreferrer"&gt;&lt;code&gt;tiered-rubric-loop&lt;/code&gt; Skill (Tiered Deterministic + Gemini Decisions API + Critic Verification)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://signals.forwardfuture.com/loop-library/" rel="noopener noreferrer"&gt;The Loop Library&lt;/a&gt; &amp;amp; &lt;a href="https://github.com/Forward-Future/loopy/tree/main/skills/loopy" rel="noopener noreferrer"&gt;&lt;code&gt;loopy&lt;/code&gt; Skill&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Dazbo's Related Articles
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/gde/from-vibing-chaos-to-reliable-agents-the-what-why-and-how-of-harness-engineering-4ba0"&gt;&lt;em&gt;From Vibing Chaos to Reliable Agents: The What, Why, and How of Harness Engineering (Part 1)&lt;/em&gt; by Dazbo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/gde/loop-engineering-in-the-harness-autonomous-self-correcting-systems-part-2-155e"&gt;&lt;em&gt;Loop Engineering in the Harness: Autonomous, Self-Correcting Systems (Part 2)&lt;/em&gt; by Dazbo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/gde/spec-driven-development-for-the-win-disposable-code-living-blueprints-and-building-like-a-boss-2bnn"&gt;&lt;em&gt;Spec-Driven Development For-the-Win: Disposable Code, Living Blueprints, and Building Like a Boss (Part 3)&lt;/em&gt; by Dazbo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/gde/dialling-our-agents-to-11-agent-skills-you-need-to-be-using-2o2k"&gt;&lt;em&gt;Dialling Our Agents to 11: Agent Skills You Need to be Using!&lt;/em&gt; by Dazbo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/gde/skills-sprawl-when-too-much-of-a-good-thing-confuses-your-ai-agent-4nij"&gt;&lt;em&gt;Skills Sprawl: When Too Much of a Good Thing Confuses Your AI Agent&lt;/em&gt; by Dazbo&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Dazbo Links
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://medium.com/@dazbo" rel="noopener noreferrer"&gt;Dazbo's Articles on Medium&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://darrenlester.net" rel="noopener noreferrer"&gt;Dazbo's Portfolio&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>harnessengineering</category>
      <category>loopengineering</category>
      <category>agenticai</category>
      <category>googleantigravity</category>
    </item>
    <item>
      <title>GPUs and TPUs: Choosing the Right Hardware for Your AI</title>
      <dc:creator>Darren "Dazbo" Lester</dc:creator>
      <pubDate>Sat, 28 Nov 2026 15:57:18 +0000</pubDate>
      <link>https://dev.to/gde/accelerating-workloads-in-google-cloud-gpus-tpus-and-choosing-the-right-hardware-5cp3</link>
      <guid>https://dev.to/gde/accelerating-workloads-in-google-cloud-gpus-tpus-and-choosing-the-right-hardware-5cp3</guid>
      <description>&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;AI is everywhere. (&lt;em&gt;Who knew?&lt;/em&gt;) Huge leaps in generative AI capability have been made possible by modern &lt;strong&gt;hardware accelerators&lt;/strong&gt;. At the same time, the demand to do more and more with AI is &lt;em&gt;driving&lt;/em&gt; the rapid evolution of that very silicon.&lt;/p&gt;

&lt;p&gt;But what exactly is a hardware accelerator? These days, pretty much everyone has heard about GPUs. (NVIDIA, anyone?) &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjvi38jde3qyxpk5subxy.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjvi38jde3qyxpk5subxy.jpg" alt="Jensen - Back Again" width="340" height="379"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And most developers know that AI runs well on &lt;strong&gt;GPUs&lt;/strong&gt;. &lt;em&gt;But why?&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;Not so many people know that Google has a purpose-built, ultra-efficient alternative: &lt;strong&gt;TPUs&lt;/strong&gt;. What are they, and how do they actually differ under the hood?&lt;/p&gt;

&lt;p&gt;Choosing the right accelerator isn't about chasing the biggest benchmark numbers. It's about matching your workload to the right silicon. Get it wrong, and you can waste a &lt;em&gt;lot&lt;/em&gt; of money.&lt;/p&gt;

&lt;p&gt;So today, I'm going to walk through a plain-English guide to AI hardware accelerators in Google Cloud. We'll cover:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Why We Need Accelerators&lt;/strong&gt;: The 2013 speech-recognition bottleneck that birthed Google's custom TPU, and why modern frontier models turned AI into a massive supercomputing problem.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GPUs vs TPUs in Plain English&lt;/strong&gt;: How GPUs juggle thousands of parallel threads, how TPUs pump numbers through a grid like a heartbeat, and a simple mental model for matching your workload to the right chip.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The NVIDIA GPU Portfolio&lt;/strong&gt;: Practical guidance on Google Cloud's GPU options — from affordable, scale-to-zero L4 and RTX PRO 6000 GPUs on Cloud Run up to rack-scale GB200 NVL72 supercomputers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The TPU Family Tree &amp;amp; The v8 Bifurcation&lt;/strong&gt;: A decade of Google's custom silicon, what you can realistically rent today, and why Google split its eighth-generation TPU into two distinct chips — &lt;strong&gt;TPU 8t&lt;/strong&gt; for training and &lt;strong&gt;TPU 8i&lt;/strong&gt; for real-time agentic inference.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What Is a Hardware Accelerator Anyway?
&lt;/h2&gt;

&lt;p&gt;You can think of a regular &lt;strong&gt;CPU&lt;/strong&gt; as a Swiss Army knife — a handful of smart, flexible cores built to juggle general-purpose logic, operating systems, databases, and web apps. A &lt;strong&gt;hardware accelerator&lt;/strong&gt; (such as a GPU or TPU) is the opposite: specialist hardware built to tear through narrow kinds of heavy maths, and to do so orders of magnitude faster and more power-efficiently than a CPU ever could.&lt;/p&gt;

&lt;p&gt;To see just how hard CPUs can hit a wall in the real world, rewind to 2013. Google's infrastructure engineers confronted a worrying calculation: if every Android user spent just three minutes a day using voice search (the newly launched &lt;em&gt;"OK Google"&lt;/em&gt; speech recognition), running the deep neural networks to transcribe all that audio would force Google to literally double its entire global data centre footprint. General-purpose CPUs simply could not keep pace with this tsunami of matrix arithmetic.&lt;/p&gt;

&lt;p&gt;Rather than embarking on a multitrillion-dollar data centre construction spree, a small, dedicated engineering team designed, fabricated, and deployed the first custom Tensor Processing Unit (TPU v1) in just 15 months. Operating as a modest 40W accelerator dedicated purely to inference, that original chip delivered a 10× performance-per-watt advantage over contemporary hardware and quietly solved Google's voice crisis.&lt;/p&gt;

&lt;h4&gt;
  
  
  Aside: Training vs Inference
&lt;/h4&gt;

&lt;p&gt;Before we go further, it is worth separating the two halves of any AI model lifecycle, because they push silicon in completely different directions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Training&lt;/strong&gt; is teaching the model — crunching massive amounts of data across huge batches to repeatedly update billions of parameters. It is all about raw throughput and keeping thousands of chips &lt;em&gt;fed&lt;/em&gt; in lockstep.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inference&lt;/strong&gt; is actually using that trained model to do stuff for users. Like answering a prompt, transcribing speech, generating a video, or driving an agent loop. Here, responsiveness (latency), memory bandwidth, and cost per request rule the day.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  What HPC Actually Is (and Why AI Inherited It)
&lt;/h4&gt;

&lt;p&gt;Fast-forward a decade or so from Google's 2013 voice crisis, and we are facing an even bigger compute crunch.&lt;/p&gt;

&lt;p&gt;The explosion of massive &lt;strong&gt;Large Language Models (LLMs)&lt;/strong&gt;, &lt;strong&gt;multimodal reasoning agents&lt;/strong&gt;, and &lt;strong&gt;generative world models&lt;/strong&gt; (such as &lt;a href="https://labs.google/fx/projectgenie?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Google DeepMind's Genie&lt;/a&gt;) has permanently outstripped Moore's Law. More importantly, it has forced a major shift: &lt;strong&gt;the complete convergence of Artificial Intelligence and High-Performance Computing (HPC).&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It is easy to lump &lt;strong&gt;hardware accelerators&lt;/strong&gt; and &lt;strong&gt;High-Performance Computing (HPC)&lt;/strong&gt; into the same bucket, so let's draw a clear line between them — they actually sit at different layers. An &lt;strong&gt;accelerator&lt;/strong&gt; is a specialised chip inside a machine: running an LLM on a single L4 GPU in Cloud Run is &lt;em&gt;accelerated computing&lt;/em&gt;, not HPC. &lt;strong&gt;HPC&lt;/strong&gt;, on the other hand, is a system-level discipline — aggregating &lt;em&gt;clusters&lt;/em&gt; of machines (historically mostly CPUs, now increasingly packed with accelerators) over ultra-fast interconnects to solve mathematical problems far too massive for any single server.&lt;/p&gt;

&lt;p&gt;Historically, HPC and AI lived in separate worlds. HPC tackled stuff like... weather forecasting, climate simulations, genomics, molecular dynamics, drug discovery, protein folding, computational fluid dynamics, and financial Monte Carlo risk analysis.&lt;/p&gt;

&lt;p&gt;In practice, supercomputing engineers divide these workloads into two distinct flavours based on how nodes communicate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Loosely Coupled&lt;/strong&gt;: Often dubbed &lt;em&gt;embarrassingly parallel&lt;/em&gt; by computer scientists because the work requires virtually zero coordination. Independent batch tasks run concurrently across hundreds of machines without needing to talk to one another (e.g. rendering video frames, parametric sweeps, or Monte Carlo simulations). If one node takes a bit longer, nobody else cares.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tightly Coupled&lt;/strong&gt;: Massive interdependent calculations split across dozens or thousands of nodes, requiring microsecond-level network latency, high-bandwidth interconnects, and synchronised shared memory. Here, nodes must constantly exchange partial calculation results before any machine can move to the next step. A single slow node or congested network switch halts the entire supercomputer.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F65d1eudqysdinq7jqr83.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F65d1eudqysdinq7jqr83.jpg" alt="Loosely Coupled vs Tightly Coupled HPC Workloads" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;And this is the punchline for modern cloud architecture: modern AI has split into two of the most demanding infrastructure challenges in computing history:&lt;/em&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;At the cluster level&lt;/strong&gt;: Model training and massive multi-node inference are the largest, most demanding &lt;strong&gt;tightly coupled&lt;/strong&gt; HPC workloads on Earth. When you train a trillion-parameter model or route tokens across a cluster, every accelerator must synchronously exchange data every few milliseconds. If your inter-node fabric stutters, thousands of expensive accelerators grind to a halt, sitting completely idle while waiting for the slowest node to catch up. &lt;em&gt;That's costly!&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;At the global level&lt;/strong&gt;: Serving autonomous agentic loops, real-time bidirectional voice, and multimodal reasoning across millions of concurrent users forms a massive &lt;strong&gt;planet-scale inference challenge&lt;/strong&gt;. Here, every millisecond of latency and every penny of energy efficiency determines whether your AI business model is commercially viable or financially ruinous.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In the Google Cloud ecosystem, we are blessed — and occasionally paralysed — by choice. Google Cloud offers what is arguably the most versatile accelerator portfolio in the industry: spanning the latest NVIDIA Blackwell architectures (HGX B200 and GB200 NVL72) and cost-effective L4/RTX GPUs, through to custom-silicon powerhouses like Trillium (TPU v6e), Ironwood (TPU v7), and the groundbreaking eighth-generation TPU architecture (TPU 8t and TPU 8i).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fopqhluv34ww1dosy870q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fopqhluv34ww1dosy870q.png" alt="The Architect's Dilemma: Navigating Compute Choice Paralysis" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here's the thing: choosing the right accelerator is rarely as simple as staring at raw teraFLOPS or comparing hourly virtual machine rates on a console pricing sheet. Navigating the real-world trade-offs — between raw memory speed, networking bottlenecks, software maturity, and your monthly cloud bill — means cutting through the vendor marketing and seeing how these chips actually behave when real code hits production.&lt;/p&gt;

&lt;p&gt;Whether you are scaling training across thousands of interconnected nodes, serving low-latency interactive agent loops, or fine-tuning open-source models for enterprise production, this guide provides a ground-level breakdown of Google Cloud's accelerator options.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(Whilst I'm writing this, Terminator is on TV! So, a quick disclaimer: if you skip this guide, you might just save humanity by preventing the accidental emergence of Skynet. But if you've got real-world workloads to build and you'd rather not waste months wrestling with mismatched hardware, then dive in.)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fn5c989loatlq10p92xr5.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fn5c989loatlq10p92xr5.jpg" alt="Skynet" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Two Philosophies of Acceleration: GPUs vs TPUs
&lt;/h2&gt;

&lt;p&gt;At the heart of modern accelerated computing lie two fundamentally distinct philosophies of hardware design. While both Graphics Processing Units (GPUs) and Tensor Processing Units (TPUs) excel at accelerating parallel computations, they approach the physics of silicon and data movement from completely opposite angles.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fz1b7k41a4v0419fwgkqf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fz1b7k41a4v0419fwgkqf.png" alt="Systolic Array and Memory Hierarchy Architecture" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  What is a Tensor and Why Accelerate It?
&lt;/h4&gt;

&lt;p&gt;Before comparing silicon architectures, let's establish why we need "tensor acceleration" in the first place. &lt;/p&gt;

&lt;p&gt;In machine learning, people love fancy mathematical terms, but let's demystify it immediately: &lt;strong&gt;a tensor is simply a multi-dimensional array of numbers&lt;/strong&gt;. If you've ever written code with basic arrays, lists or matrices, you already know what a tensor is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;0D (Scalar)&lt;/strong&gt;: A single number (e.g. a learning rate).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;1D (Vector)&lt;/strong&gt;: A flat array or list of numbers (e.g. a token embedding).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;2D (Matrix)&lt;/strong&gt;: A grid of rows and columns (e.g. a layer's weight table).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;3D or 4D Array&lt;/strong&gt;: Stacking those 2D tables across sequence lengths, attention heads, and batch dimensions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's it. Whenever you hear the word "tensor", just think "multi-dimensional array".&lt;/p&gt;

&lt;p&gt;Deep neural networks spend upwards of 95% of their execution time performing dense linear algebra — specifically, multiplying massive matrices of weights and activations together and adding an offset (&lt;code&gt;A × B + C&lt;/code&gt;, formally known as General Matrix Multiply, or &lt;strong&gt;GEMM&lt;/strong&gt;). Running this through traditional scalar or vector instructions requires billions of separate load, multiply, and write-back cycles across memory buses. &lt;strong&gt;Tensor acceleration&lt;/strong&gt; simply means designing physical execution units capable of computing entire blocks of matrix arithmetic simultaneously in hardware.&lt;/p&gt;

&lt;p&gt;The fundamental architectural divide lies in how NVIDIA and Google approached this challenge:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;NVIDIA's Evolution&lt;/strong&gt;: Began with a massively parallel graphics architecture and progressively layered specialised &lt;strong&gt;Tensor Cores&lt;/strong&gt; into its existing Streaming Multiprocessors.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Google's Clean Slate&lt;/strong&gt;: Designed the TPU from a blank canvas as a dedicated Application-Specific Integrated Circuit (ASIC) engineered entirely around streaming matrix multiplications.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  The GPU Philosophy
&lt;/h4&gt;

&lt;p&gt;GPUs evolved from rendering 3D in video games into massively parallel, general-purpose computing platforms. Modern NVIDIA architectures execute work using &lt;strong&gt;Single Instruction, Multiple Threads (SIMT)&lt;/strong&gt; organised across dozens of &lt;strong&gt;Streaming Multiprocessors (SMs)&lt;/strong&gt; — the fundamental compute engines containing the GPU's arithmetic logic units (ALUs), register files, and warp schedulers.&lt;/p&gt;

&lt;p&gt;Within each SM, threads are scheduled and dispatched in lockstep groups of 32 (a fixed number across every NVIDIA generation — the engineering "sweet spot" balancing memory bus alignment with scheduler silicon overhead), termed &lt;strong&gt;warps&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ff6dipy0zhs2zom9gl3aj.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ff6dipy0zhs2zom9gl3aj.gif" alt="Engage Warp 32: Concurrency Hiding Memory Latency" width="400" height="170"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Because fetching data from off-chip High Bandwidth Memory (HBM) takes hundreds of clock cycles, the GPU "hides" this memory latency through sheer concurrency: the moment Warp A issues a memory request and stalls, the hardware scheduler instantly context-switches to Warp B or Warp C in a single cycle. To feed this firehose of concurrent execution, an intricate hierarchy of on-chip register files, L1 caches, unified shared memory (SRAM), and an expansive L2 cache keeps frequently accessed data and instructions right next to the arithmetic units, avoiding costly round-trips to distant memory.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3puzqb33a4gvwgv71nq0.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3puzqb33a4gvwgv71nq0.gif" alt="GPU Warp Scheduling: Hiding Off-Chip Memory Latency Through Zero-Overhead Concurrency" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Core Strength&lt;/strong&gt;: &lt;strong&gt;Algorithmic Versatility and Dynamic Branching&lt;/strong&gt;. Because modern GPUs can track execution state and branch divergence down to individual threads, they handle irregular control paths with remarkable resilience. If your algorithm requires dynamic recursion, graph traversal, sparse matrix indexing, or frequent &lt;code&gt;if/else&lt;/code&gt; conditions, the GPU adapts on the fly. Furthermore, NVIDIA's mature &lt;strong&gt;CUDA&lt;/strong&gt; software ecosystem provides decades of battle-tested libraries for everything from linear algebra and deep learning to physics simulations and video processing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Silicon Tax&lt;/strong&gt;: This versatility comes with a cost. A considerable fraction of the SM's silicon real estate and electrical power is consumed not by floating-point arithmetic units, but by control machinery: instruction decoders, warp schedulers (yeah — that's really a thing!), branch prediction logic, and cache-coherence protocols. Furthermore, when thousands of concurrently active threads require extensive local variables, &lt;strong&gt;register pressure&lt;/strong&gt; quickly mounts. If an algorithm exhausts the physical register file, the compiler is forced to spill variables into off-chip high-latency memory, causing execution pipelines to stall.&lt;/p&gt;

&lt;h4&gt;
  
  
  The TPU Philosophy
&lt;/h4&gt;

&lt;p&gt;Google approached accelerator design from the opposite end of the spectrum. Rather than building a flexible, general-purpose parallel processor and layering tensor acceleration on top, Google designed the TPU as an &lt;strong&gt;Application-Specific Integrated Circuit (ASIC)&lt;/strong&gt; engineered with singular focus: executing large-scale matrix multiplications (&lt;code&gt;A × B + C&lt;/code&gt;) with maximum throughput and electrical efficiency.&lt;/p&gt;

&lt;p&gt;Rather than relying on instruction fetching, out-of-order execution, and transparent hardware caches for every floating-point operation, the TPU's compute heart — the &lt;strong&gt;TensorCore&lt;/strong&gt; — is built around a &lt;strong&gt;Systolic Array&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The term &lt;em&gt;systolic&lt;/em&gt; comes from medical biology. Systole: the rhythmic contraction of the heart pumping pulses of blood. &lt;/p&gt;

&lt;p&gt;In computing, it means data pulses rhythmically through a grid of processors with each clock tick, advancing step-by-step to neighbouring cells rather than making round trips back to memory after every single calculation. In a systolic Matrix Multiply Unit (MXU):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Weights&lt;/strong&gt; (the model's parameters) are pre-loaded directly into a two-dimensional grid of arithmetic cells — tiny units designed to do one thing: multiply two numbers and add to a running total (a &lt;em&gt;multiply-accumulate&lt;/em&gt;, or MAC, operation).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inputs&lt;/strong&gt; (activations) stream steadily into the array from the left, while running totals flow rhythmically downwards.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Neighbour-to-neighbour passing&lt;/strong&gt;: Every clock tick, each cell multiplies its input by its weight, adds it to the sum coming from above, and passes the result directly to its neighbour below — with no round-trips to registers or memory caches required.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Continuous output&lt;/strong&gt;: The finished calculations stream out smoothly from the bottom of the grid.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;As detailed in Google DeepMind's &lt;a href="https://jax-ml.github.io/scaling-book/tpus/" rel="noopener noreferrer"&gt;How to Think About TPUs&lt;/a&gt; (Jacob Austin et al., 2025), a modern TPU TensorCore consists of three tightly coupled components:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Matrix Multiply Unit (MXU)&lt;/strong&gt;: The computational engine. Historically configured as a 128 × 128 systolic array, Google expanded the MXU to 256 × 256 in Trillium (TPU v6e), quadrupling the raw matrix operations completed per clock cycle.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Vector Processing Unit (VPU)&lt;/strong&gt;: A dedicated &lt;strong&gt;Single Instruction, Multiple Data (SIMD)&lt;/strong&gt; vector processor. While the MXU focuses purely on 2D matrix contractions, the VPU applies a single mathematical instruction across an entire 1D vector of numbers in parallel — handling non-linear activation functions, layer normalisation, vector additions, and mathematical reductions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vector Memory (VMEM)&lt;/strong&gt;: A high-speed, on-chip SRAM scratchpad located directly adjacent to the compute units (e.g. 128 MB on TPU v5e, expanding significantly in newer chips). Unlike a CPU or GPU cache that relies on reactive hardware circuits to guess what data to keep, VMEM is &lt;strong&gt;software-managed&lt;/strong&gt;. Because deep learning matrix calculations follow predictable patterns, the compiler orchestrates asynchronous Direct Memory Access (DMA) transfers in advance — streaming the next block of weights into VMEM while current calculations execute. This eliminates costly hardware cache misses and frees up silicon space that would otherwise be wasted on cache controllers.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By eliminating the need for complex instruction decoders, dynamic warp schedulers, cache coherence protocols, and massive register files, the TPU dedicates nearly all of its silicon surface and power budget directly to matrix arithmetic.&lt;/p&gt;

&lt;h4&gt;
  
  
  The Roofline
&lt;/h4&gt;

&lt;p&gt;We can use experience and &lt;em&gt;gut feel&lt;/em&gt; to anticipate which hardware accelerator is most suitable for a given workload. But there's a much more precise way to do it...&lt;/p&gt;

&lt;p&gt;The suitability of a GPU versus a TPU is fundamentally governed by the &lt;strong&gt;Roofline Model&lt;/strong&gt; — named after the distinctive roof-like profile of its graph, originally devised by computer scientists at UC Berkeley (including David Patterson, co-designer of Google's original TPU). The model compares an algorithm's &lt;em&gt;Operational Intensity&lt;/em&gt; — the number of &lt;strong&gt;FLOPs (floating-point operations, such as multiplications and additions)&lt;/strong&gt; performed per byte of data transferred from off-chip memory — against the hardware's peak compute capacity and memory bandwidth.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Operational Intensity&lt;/strong&gt; = Total Floating-Point Operations (FLOPs) ÷ Total Bytes Transferred from Memory (Bytes)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9tqodoz9ke0pplbaiiio.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9tqodoz9ke0pplbaiiio.png" alt="Arithmetic Roofline Model for AI Accelerators" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Compute-Bound Regimes (Large Batches, Pre-training, Prefill)&lt;/strong&gt;: When calculating matrix multiplications on large prompt sequences or during pre-training with large batch sizes, operational intensity is extremely high. Data loaded into the systolic array or Tensor Cores is reused hundreds of times. In this regime, the sheer matrix density and energy efficiency of the TPU's MXUs deliver exceptional price-performance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Memory-Bound Regimes (Interactive Chat, Single-Token Streaming, Small Batches)&lt;/strong&gt;: When generating a response one word at a time for an individual chatbot user, the chip has to sweep through billions of parameters in memory just to predict the very next token. Here, operational intensity drops through the floor (&amp;lt; 1 FLOP/Byte). The chip isn't waiting on compute; it's waiting on memory bandwidth, leaving expensive matrix engines largely idle.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;The Turning Point: The Hardware "Knee"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;On the roofline graph, the point where the sloped memory line meets the flat compute ceiling is called the &lt;strong&gt;knee&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;In plain terms, the knee is your economic break-even point: it represents the minimum amount of calculation you must perform on each byte of data to keep the chip's arithmetic units 100% busy:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Core Problem&lt;/strong&gt;: Accelerator compute power has grown exponentially, but off-chip memory bandwidth has not kept pace. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Economic Consequence&lt;/strong&gt;: If your workload sits to the left of the knee (such as generating one token at a time for an individual chatbot user), your expensive tensor cores spend most of their time waiting for data to travel from memory. You are paying full price for silicon that is barely breaking a sweat. To get your money's worth, techniques like request batching, speculative decoding, and prompt caching are essential to push your workload rightward onto the flat, efficient roof.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;How We Measure: Profiling Operational Intensity in Practice&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In practice, we don't guess where a workload sits against the knee. We measure it directly using dedicated hardware profiling tools:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;On NVIDIA GPUs (NVIDIA Nsight)&lt;/strong&gt;: Profiling tools like Nsight Compute generate native Roofline charts directly from hardware counters, showing whether your kernels are bottlenecked by GPU memory transfers or compute execution during forward and backward passes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On Cloud TPUs (Cloud TPU Profiler &amp;amp; TensorBoard)&lt;/strong&gt;: Integrated into &lt;strong&gt;Gemini Platform&lt;/strong&gt; (the artist formerly known as Vertex AI) Workbench notebooks, Gemini Platform TensorBoard, and standard TPU VMs, the Cloud TPU Profiler reports &lt;strong&gt;systolic array utilisation&lt;/strong&gt; and &lt;strong&gt;memory bandwidth saturation&lt;/strong&gt;, immediately pinpointing whether a bottleneck is compute, memory, or host-CPU bound.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Mapping Workloads to Deployment Targets
&lt;/h4&gt;

&lt;p&gt;Once you identify where your workload sits relative to the hardware knee, selecting the right accelerator and runtime becomes a logical deduction rather than guesswork:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Workload &amp;amp; Character&lt;/th&gt;
&lt;th&gt;Operational Intensity Profile&lt;/th&gt;
&lt;th&gt;Limiting Factor&lt;/th&gt;
&lt;th&gt;Recommended Accelerator&lt;/th&gt;
&lt;th&gt;Ideal Deployment Target&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Foundation Pre-training &amp;amp; Continuous Fine-Tuning&lt;/strong&gt; (e.g. Llama 3.3 70B, Gemma 3 27B)&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Very High&lt;/strong&gt; (heavy compute reuse)&lt;/td&gt;
&lt;td&gt;Peak Matrix FLOPS &amp;amp; Interconnect Bandwidth&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Cloud TPU 8t / Trillium (v6e)&lt;/strong&gt; or &lt;strong&gt;NVIDIA Blackwell B200 / A3 Ultra&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;GKE Enterprise&lt;/strong&gt; (using Dynamic Workload Scheduler &amp;amp; Kueue) or &lt;strong&gt;TPU Pod Slices&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;High-Concurrency Production Inference&lt;/strong&gt; (Heavy batching, 100+ concurrent requests, e.g. Gemma 3 12B)&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;High&lt;/strong&gt; (batch-saturated)&lt;/td&gt;
&lt;td&gt;Matrix throughput &amp;amp; KV-cache memory&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Cloud TPU v6e (Trillium)&lt;/strong&gt; or &lt;strong&gt;NVIDIA H100 / L4&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Gemini Platform Endpoints&lt;/strong&gt; or &lt;strong&gt;GKE with vLLM / Triton Server&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Agentic Loops &amp;amp; Fleets of Stateful Agents&lt;/strong&gt; (Decode-heavy, interactive tool-use, high idle time)&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Very Low&lt;/strong&gt; (memory-bound inference; compute-idle execution)&lt;/td&gt;
&lt;td&gt;HBM Bandwidth, TTFT, and Agent Workspace Over-subscription&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Cloud TPU 8i&lt;/strong&gt; or &lt;strong&gt;NVIDIA H200 / B200&lt;/strong&gt; (for model inference)&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Gemini Platform Endpoints&lt;/strong&gt; or &lt;strong&gt;GKE (with Agent Substrate &amp;amp; GKE Sandbox)&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Event-Driven &amp;amp; Microservice Inference&lt;/strong&gt; (Lightweight models: Gemma 3 1B/4B, Whisper, embeddings, multimodal/video)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Low to Medium&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Cold-start latency, scale-to-zero cost&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;NVIDIA L4 (G2) or RTX PRO 6000 (G4)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Cloud Run (Serverless GPUs)&lt;/strong&gt; or &lt;strong&gt;GKE Autopilot (with KEDA)&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Non-Standard &amp;amp; Dynamic Control Flow&lt;/strong&gt; (Graph Neural Networks, RL with physics simulators, dynamic trees)&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Highly Divergent&lt;/strong&gt; (unpredictable branching)&lt;/td&gt;
&lt;td&gt;SIMT thread branch divergence, random memory access&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;NVIDIA GPUs (A3, A4, G4)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Compute Engine (GCE VMs)&lt;/strong&gt; or &lt;strong&gt;GKE GPU Node Pools&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h4&gt;
  
  
  Not All Accelerator Types Plug into Every Runtime
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://cloud.google.com/run/docs/configuring/services/gpu?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Cloud Run&lt;/a&gt;&lt;/strong&gt; offers brilliant scale-to-zero economics for lightweight microservices, supporting &lt;strong&gt;NVIDIA L4&lt;/strong&gt; (24 GB VRAM) and &lt;strong&gt;NVIDIA RTX PRO 6000&lt;/strong&gt; (96 GB GDDR7, added in April 2026) GPUs — it has &lt;strong&gt;no TPU support&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TPUs&lt;/strong&gt; are fundamentally clustered, orchestrator-driven accelerators. They must be provisioned on &lt;strong&gt;Compute Engine (TPU VMs)&lt;/strong&gt;, &lt;strong&gt;&lt;a href="https://cloud.google.com/kubernetes-engine/docs/concepts/tpus?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;GKE&lt;/a&gt;&lt;/strong&gt; (standard or Autopilot node pools), or the &lt;strong&gt;Gemini Platform&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fleets of Autonomous AI Agents&lt;/strong&gt;: When designing agentic systems, separate the &lt;em&gt;thinking&lt;/em&gt; from the &lt;em&gt;doing&lt;/em&gt;. Model inference belongs on high-throughput accelerator endpoints (GPUs or TPUs). The agents themselves — who spend over 90% of their life cycle idle while waiting on human input or tool APIs — are ideal candidates for &lt;strong&gt;&lt;a href="https://cloud.google.com/blog/products/containers-kubernetes/agent-substrate-available-on-gke?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Agent Substrate on GKE&lt;/a&gt;&lt;/strong&gt;. By snapshotting and suspending idle agents in under 500 ms and running them inside zero-trust microVM sandboxes (&lt;a href="https://cloud.google.com/kubernetes-engine/docs/concepts/sandbox-overview?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;GKE Agent Sandbox&lt;/a&gt;), you can achieve 30×+ higher agent density per worker node without burning expensive 24/7 compute.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To make an informed design decision, you need to understand both sides of this silicon spectrum. Because NVIDIA GPUs represent the foundational baseline for modern deep learning and remain the default industry standard against which all alternative accelerators are measured, we begin our hardware deep dive by examining Google Cloud's extensive GPU portfolio.&lt;/p&gt;

&lt;h2&gt;
  
  
  Google Cloud (NVIDIA) GPU Lineup
&lt;/h2&gt;

&lt;p&gt;Google Cloud maintains a premier partnership with NVIDIA, offering an extensive portfolio of Accelerator-Optimised virtual machine families. Rather than getting bogged down in transistor counts and silicon dies, it's far more practical to evaluate these machines on three criteria: &lt;strong&gt;generational evolution, target workload fit, and hourly economics&lt;/strong&gt;.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Machine Family&lt;/th&gt;
&lt;th&gt;Accelerator &amp;amp; Architecture&lt;/th&gt;
&lt;th&gt;Generation &amp;amp; Evolution&lt;/th&gt;
&lt;th&gt;Memory per GPU&lt;/th&gt;
&lt;th&gt;Best-Suited Workloads&lt;/th&gt;
&lt;th&gt;Indicative Hourly Cost (On-Demand)*&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;G2&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;NVIDIA L4&lt;/strong&gt; (Ada Lovelace)&lt;/td&gt;
&lt;td&gt;Inference workhorse (replaces T4)&lt;/td&gt;
&lt;td&gt;24 GB GDDR6 (72W)&lt;/td&gt;
&lt;td&gt;Cost-effective inference, audio/video pipelines, embeddings, &lt;strong&gt;Cloud Run scale-to-zero&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;~$0.71 / GPU / hr&lt;/strong&gt; (&lt;code&gt;g2-standard-4&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;G4&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;NVIDIA RTX PRO 6000&lt;/strong&gt; (Blackwell)&lt;/td&gt;
&lt;td&gt;Workstation &amp;amp; media powerhouse&lt;/td&gt;
&lt;td&gt;96 GB GDDR7&lt;/td&gt;
&lt;td&gt;Generative video/diffusion, 3D rendering, spatial compute, multimodal inference, &lt;strong&gt;Cloud Run scale-to-zero&lt;/strong&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;~$4.50 / GPU / hr&lt;/strong&gt; (&lt;code&gt;g4-standard-48&lt;/code&gt;; fractional slices from ~$1.52/hr)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;A2&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;NVIDIA A100&lt;/strong&gt; (Ampere)&lt;/td&gt;
&lt;td&gt;Established baseline (phased out for new capacity)&lt;/td&gt;
&lt;td&gt;40 GB / 80 GB HBM2e&lt;/td&gt;
&lt;td&gt;Legacy deep learning, FP64 scientific simulations (CFD, molecular dynamics)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;~$3.67 (40 GB) – $5.07 (80 GB) / GPU / hr&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;A3 / A3 Mega&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;NVIDIA H100 SXM&lt;/strong&gt; (Hopper)&lt;/td&gt;
&lt;td&gt;Enterprise standard for distributed training&lt;/td&gt;
&lt;td&gt;80 GB HBM3&lt;/td&gt;
&lt;td&gt;Distributed LLM pre-training &amp;amp; fine-tuning (&amp;lt; 70B), high-throughput serving&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;~$11.06 – $11.68 / GPU / hr&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;A3 Ultra&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;NVIDIA H200 SXM&lt;/strong&gt; (Hopper)&lt;/td&gt;
&lt;td&gt;Memory-expanded Hopper (1.8× memory leap)&lt;/td&gt;
&lt;td&gt;141 GB HBM3e&lt;/td&gt;
&lt;td&gt;Large foundation model training, long context windows, memory-heavy Mixture-of-Experts (MoE) inference&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;~$10.60 / GPU / hr&lt;/strong&gt; (Flex-start ~$5.30)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;A4&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;NVIDIA HGX B200&lt;/strong&gt; (Blackwell)&lt;/td&gt;
&lt;td&gt;Next-gen dense training &amp;amp; inference&lt;/td&gt;
&lt;td&gt;180 GB HBM3e&lt;/td&gt;
&lt;td&gt;Massive frontier LLM training, dense multi-GPU serving, native FP4 execution&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;~$16.11 – $18.53 / GPU / hr&lt;/strong&gt; (Spot ~$8.06; typically reserved / Flex-start)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;A4X&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;NVIDIA GB200 NVL72&lt;/strong&gt; (Blackwell)&lt;/td&gt;
&lt;td&gt;Rack-scale supercomputer (replaces multi-node clusters)&lt;/td&gt;
&lt;td&gt;192 GB HBM3e (Superchip)&lt;/td&gt;
&lt;td&gt;Exascale pre-training (&amp;gt; 100B MoE), trillion-parameter frontier reasoning models&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Full rack enterprise / bespoke&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;(Note: Indicative Google Cloud &lt;code&gt;us-central1&lt;/code&gt; on-demand bundled VM rates divided by GPU count, excluding committed use discounts. See official &lt;a href="https://cloud.google.com/compute/gpus-pricing?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Compute Engine GPU Pricing&lt;/a&gt; for live rates.)&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Aligning GPUs to Workload Archetypes
&lt;/h4&gt;

&lt;p&gt;To cut through the hardware matrix, we can group Google Cloud's GPU instances into three clear operational tiers:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. The Inference &amp;amp; Scale-to-Zero Workhorses (G-Series)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Not every workload warrants a multimillion-dollar cluster. For everyday production inference, the &lt;strong&gt;G-Series&lt;/strong&gt; delivers exceptional price-performance:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;G2 (NVIDIA L4)&lt;/strong&gt;: Drawing just 72 watts, the L4 is Google Cloud's most cost-effective inference engine. It is ideal for serving medium-sized open models (such as Gemma 3 12B or Mistral 7B), embedding generation, and Whisper audio transcription. Alongside the RTX PRO 6000, the L4 is natively supported on &lt;strong&gt;Cloud Run&lt;/strong&gt;, enabling serverless, scale-to-zero model hosting where infrastructure costs drop to literally $0 when traffic ceases.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;G4 (NVIDIA RTX PRO 6000)&lt;/strong&gt;: The step up when the L4's 24 GB isn't enough. With 96 GB of VRAM and serious graphics muscle alongside AI compute, it is a natural fit for larger multimodal models, image and video generation, digital twins, and 3D rendering. Since April 2026, it has also joined the L4 on &lt;strong&gt;Cloud Run&lt;/strong&gt;, bringing 96 GB GPUs to serverless, scale-to-zero containers.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. The Distributed Training &amp;amp; Enterprise Baseline (A3 Series: NVIDIA Hopper)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;A3 family&lt;/strong&gt; (powered by NVIDIA's &lt;strong&gt;Hopper&lt;/strong&gt; architecture) is the enterprise standard for training foundation models and serving high-concurrency LLMs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A3 &amp;amp; A3 Mega (H100)&lt;/strong&gt;: Powered by 80 GB H100 GPUs, these are the workhorses for distributed fine-tuning and pre-training models up to ~70 billion parameters. Where A3 Mega stands out is networking: Google's custom &lt;strong&gt;Titanium&lt;/strong&gt; network cards let GPUs stream training updates straight between each other's memory across nodes, bypassing OS overhead so multi-node clusters stay busy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A3 Ultra (H200)&lt;/strong&gt;: As models and context windows grew, 80 GB per GPU quickly became cramped — especially for long-context inference and Mixture-of-Experts (MoE) routing (where models dispatch each token to specialised sub-networks across GPUs). Jumping to 141 GB of memory per GPU with much faster inter-node networking lets you fit massive models onto far fewer machines, slashing those costly cross-node synchronisation stalls.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;3. The Frontier &amp;amp; Rack-Scale Apex (A4 &amp;amp; A4X Series: NVIDIA Blackwell)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For organisations operating at the technological frontier, NVIDIA's &lt;strong&gt;Blackwell&lt;/strong&gt; architecture rethinks how multi-GPU clusters communicate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A4 (HGX B200)&lt;/strong&gt;: Packing 180 GB of HBM3e and 1.8 TB/s NVLink 5 bandwidth per GPU, the A4 introduces native &lt;strong&gt;FP4 (4-bit floating point)&lt;/strong&gt; execution. By halving memory requirements and doubling arithmetic throughput compared to FP8, it delivers up to 2.25× the training throughput of previous-generation Hopper (A3/H100) instances.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A4X (GB200 NVL72)&lt;/strong&gt;: Rather than wiring separate servers together over traditional networks, the NVL72 packs 72 Blackwell GPUs (paired with 36 Grace CPUs) into a single liquid-cooled rack connected by a direct copper NVLink backbone. The result? All 72 GPUs behave like &lt;strong&gt;one giant, unified accelerator&lt;/strong&gt; pooling nearly 14 TB of high-speed memory — wiping out the cross-server network lag that historically choked massive MoE and trillion-parameter models.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The TPU Family Tree &amp;amp; The Eighth-Generation Bifurcation
&lt;/h2&gt;

&lt;p&gt;While GPUs have pushed the limits of general-purpose parallel compute, Google's TPU evolution has followed an aggressive, decade-long trajectory of architectural specialisation and optical fabric innovation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcnsu46o8z7klyeww76fm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcnsu46o8z7klyeww76fm.png" alt="A Decade of TPU Silicon Scaling: Exponential Performance Evolution 2015-2026" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Plotted on a logarithmic scale, Google's TPU silicon shows a remarkable exponential climb: roughly a &lt;strong&gt;280× leap in peak floating-point compute&lt;/strong&gt; in under a decade, from TPU v2 in 2017 to the eighth-generation TPU 8t and 8i.&lt;/p&gt;

&lt;p&gt;At first glance on the logarithmic chart, TPU v2 (45 TFLOPs of bfloat16) might appear to take a step backwards from TPU v1 (92 TOPS of INT8). In reality, we must not confuse &lt;strong&gt;integer operations per second (TOPS)&lt;/strong&gt; with &lt;strong&gt;floating-point operations per second (TFLOPs)&lt;/strong&gt; — this transition reflects one of the most important milestones in AI hardware: &lt;strong&gt;moving from simple integer inference to full model training&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;TPU v1 (2015)&lt;/strong&gt; was an inference-only ASIC custom-built to solve the &lt;em&gt;"OK Google"&lt;/em&gt; voice search crisis we met in the introduction. Because it only needed to run already-trained models, Google built a giant 8-bit integer engine (92 TOPS INT8). It was lightning-fast at simple whole-number maths, but it could not perform floating-point arithmetic or train neural networks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TPU v2 (2017)&lt;/strong&gt; crossed the frontier into model training. Teaching a neural network requires calculating delicate fractional adjustments (floating-point arithmetic). Because handling floating-point numbers takes far more silicon real estate per calculation than simple integers, the nominal operation count started at 45 TFLOPs, but TPU v2 unlocked distributed training at cloud scale by introducing &lt;strong&gt;bfloat16&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once that floating-point hurdle was cleared, TPU floating-point scaling exploded. As shown in the linear-scale inset in the top-right corner, what looks like a steady climb on a logarithmic axis is actually a dramatic &lt;strong&gt;exponential hockey stick&lt;/strong&gt; — rocketing nearly 280× from 45 TFLOPs (bfloat16) on TPU v2 to 10.1 PFLOPs (FP4) on TPU 8i and 12.6 PFLOPs (FP4) on TPU 8t.&lt;/p&gt;

&lt;h4&gt;
  
  
  TPU Generations
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fitjd873388r6p2mnforf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fitjd873388r6p2mnforf.png" alt="Google Cloud TPU Evolution Timeline 2015-2026" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;TPU v2 &amp;amp; v3 (2018–2020)&lt;/strong&gt;: Unlocked cloud-scale model training with Google's custom &lt;strong&gt;bfloat16&lt;/strong&gt; number format (halving memory usage without losing training stability), and introduced direct-to-chip liquid cooling in v3 to tame the heat.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TPU v4 (2022)&lt;/strong&gt;: Introduced &lt;strong&gt;Optical Circuit Switches (OCS)&lt;/strong&gt; — tiny mirrors that dynamically rewire optical links between racks across up to 4,096 chips. If a node or link degrades during a month-long training run, the cluster routes around it in milliseconds instead of crashing the job.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TPU v5e ("Lite", 2023)&lt;/strong&gt;: Google's first cost-optimised TPU — designed for affordable inference and mid-scale fine-tuning of open-source models at standout price-performance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TPU v5p ("Performance", 2023)&lt;/strong&gt;: The heavy-duty sibling built to train Google's flagship Gemini models, scaling to nearly 9,000 chips in a single pod with more than double the compute of TPU v4.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Trillium / TPU v6e (2024)&lt;/strong&gt;: A huge generational leap — doubling memory and chip-to-chip bandwidth while expanding to massive 256 × 256 systolic arrays, delivering &lt;strong&gt;4.7× the peak compute&lt;/strong&gt; of v5e with &lt;strong&gt;67% better energy efficiency&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ironwood / TPU v7 (2025)&lt;/strong&gt;: Google's ultra-dense seventh-generation superpod, adding native FP8 support and 192 GB of high-speed memory per chip across up to 9,216 liquid-cooled chips to power models like Gemini 3.8 and AlphaFold 3.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  What Can You Actually Run Today? A Real-World Availability Guide
&lt;/h4&gt;

&lt;p&gt;When reading hardware roadmaps, it is tempting to jump straight to the newest silicon. But &lt;strong&gt;silicon capability must be balanced against regional quota availability, provisioning models, and raw economics&lt;/strong&gt;. Always consult Google's official &lt;a href="https://docs.cloud.google.com/compute/docs/regions-zones/tpu-regions-zones?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;TPU regions and zones&lt;/a&gt; and &lt;a href="https://cloud.google.com/tpu/pricing?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Cloud TPU pricing&lt;/a&gt; pages to verify live topologies and rates before committing to architectural designs.&lt;/p&gt;

&lt;p&gt;Here is how Google's TPU portfolio shakes out in real-world production today (indicative US on-demand rates):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Deprecated Legacy (TPU v2 &amp;amp; v3)&lt;/strong&gt;: These early chips are effectively retired. They relied on Google's outdated "TPU Node" architecture (where your application ran on a separate CPU host that streamed data over internal gRPC networks to a remote TPU). Modern workloads should never target v2 or v3; they have been completely superseded.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Classical Supercomputer: TPU v4&lt;/strong&gt;: As Google's first large-scale Optical Circuit Switch (OCS) architecture, TPU v4 remains active in major hubs like &lt;code&gt;us-central2&lt;/code&gt;. However, at roughly &lt;strong&gt;$3.22 per chip-hour&lt;/strong&gt;, it is largely reserved for established training pipelines and academic research clusters. Newer deployments typically leap straight to v5p or v6e.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Budget Workhorse: TPU v5e (Cloud TPU v5 Lite)&lt;/strong&gt;: At roughly &lt;strong&gt;$1.20 per chip-hour&lt;/strong&gt; (dropping to $0.60 on Spot or Dynamic Workload Scheduler), v5e is Google's most accessible budget accelerator across &lt;strong&gt;North America and Europe&lt;/strong&gt; (note that v5e is not listed in Asia-Pacific or South America in the standard &lt;a href="https://cloud.google.com/tpu/docs/regions-zones?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;TPU regions and zones&lt;/a&gt; matrix — teams needing APAC or South American residency should target &lt;strong&gt;Trillium v6e&lt;/strong&gt;, which offers zones in Tokyo &lt;code&gt;asia-northeast1&lt;/code&gt; and Santiago &lt;code&gt;southamerica-west1&lt;/code&gt;). Where regionally available, v5e remains a go-to choice for fine-tuning 7B to 32B open-weight models, generating high-volume embeddings, or serving cost-sensitive inference without quota bottlenecks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Production Sweet Spot: TPU v6e (Trillium)&lt;/strong&gt;: Delivering a 4.7× compute leap over v5e with its massive 256 × 256 MXU, Trillium is the current enterprise sweet spot. At roughly &lt;strong&gt;$2.70 per chip-hour&lt;/strong&gt;, its performance-per-dollar beats almost everything else on the market for modern LLM serving (via vLLM or JetStream) and mid-to-large-scale training.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Frontier Supercomputers (TPU v5p, v7 Ironwood, &amp;amp; TPU 8t/8i)&lt;/strong&gt;: Built for multi-thousand-chip pre-training runs (like Gemini 3.8). These top-tier accelerators command premium rates (from &lt;strong&gt;$4.20/chip-hour&lt;/strong&gt; on v5p up to &lt;strong&gt;$12.00/chip-hour&lt;/strong&gt; on Ironwood), operate in specialised, high-density &lt;a href="https://docs.cloud.google.com/compute/docs/regions-zones/ai-zones?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;AI zones&lt;/a&gt; (such as &lt;code&gt;us-central1-ai1a&lt;/code&gt; or &lt;code&gt;us-east5&lt;/code&gt; engineered specifically for liquid-cooled supercomputing clusters), and typically require formal capacity reservations. They are computational powerhouses, but they are not the silicon you spin up for quick ad-hoc testing.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  TPU v8: Two Purpose-Built Chips
&lt;/h4&gt;

&lt;p&gt;Announced in April 2026, the &lt;strong&gt;eighth-generation TPU&lt;/strong&gt; represents the most radical architectural evolution in Google's custom silicon history. &lt;/p&gt;

&lt;p&gt;Recognising that the hardware demands of frontier pre-training and real-time agentic serving have fundamentally diverged, Google abandoned the "one-size-fits-all" chip design and split the v8 generation into two distinct, purpose-built processors: &lt;strong&gt;TPU 8t&lt;/strong&gt; and &lt;strong&gt;TPU 8i&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxtrwn2bluxjvfxxiv4yv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxtrwn2bluxjvfxxiv4yv.png" alt="Google Cloud TPU v8 Bifurcated Silicon Architecture" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. TPU 8t (The Training Powerhouse)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Remember the Roofline Model from earlier? Training massive foundation models with huge batches sits squarely on the &lt;strong&gt;compute-bound roof&lt;/strong&gt; — each weight loaded from memory is reused thousands of times, so local memory speed isn't your main bottleneck. Instead, your biggest enemy is raw throughput and time: how many weeks (and dollars) it takes to finish a run without thousands of chips stalling while waiting on each other over the network:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Planetary-Scale Cluster Scaling&lt;/strong&gt;: TPU 8t is built to scale into superpods of up to &lt;strong&gt;9,600 chips&lt;/strong&gt; linked by Google's custom optical network fabric. Rather than suffering network degradation across traditional data centre switches, the cluster behaves as a single, coordinated supercomputer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Native FP4 Speed &amp;amp; Efficiency&lt;/strong&gt;: By working with compact 4-bit numbers (&lt;strong&gt;FP4&lt;/strong&gt;) instead of 8-bit (FP8), TPU 8t delivers &lt;strong&gt;~12.6 PFLOPs of peak compute&lt;/strong&gt; per chip alongside &lt;strong&gt;216 GB of high-speed memory&lt;/strong&gt;. Smaller weights mean you can fit bigger models and larger batches onto fewer chips while roughly doubling arithmetic throughput — finishing month-long training runs much faster and cutting the cloud bill.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Target Workloads&lt;/strong&gt;: Large foundation pre-training, massive continuous fine-tuning runs, and training recommendation systems with multi-terabyte embedding tables.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;2. TPU 8i (The Agentic Inference Engine)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Interactive inference and agentic loops live on the opposite side of the Roofline — stuck on the &lt;strong&gt;memory-bound slope&lt;/strong&gt;. Models no longer just answer one-off questions; they maintain long conversational histories, reason across multi-step chains of thought, and repeatedly call external tools. In this regime, raw arithmetic isn't the bottleneck — TPU 8i deliberately trades away a slice of peak compute to prioritise memory capacity and bandwidth, because your real enemy here is &lt;strong&gt;memory latency&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Keeping Active Context Close to the Compute&lt;/strong&gt;: Every time an agent decides its next step, it has to re-read its conversation history and working context (the Key-Value cache) from memory. TPU 8i tackles this with &lt;strong&gt;384 MB of on-chip SRAM&lt;/strong&gt; plus &lt;strong&gt;288 GB of high-bandwidth memory&lt;/strong&gt;, keeping hot context right next to the compute units instead of waiting on slow memory trips.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Faster Time-to-First-Token (TTFT)&lt;/strong&gt;: Nobody wants to stare at a blinking cursor for several seconds before a model starts answering. Keeping active context on-chip cuts that initial wait right down, making interactive chat and multi-step tool calls feel snappy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Target Workloads&lt;/strong&gt;: Multi-step autonomous agent loops, long-context document reasoning, high-throughput interactive APIs, and real-time world-model simulations where thousands of parallel decision paths are evaluated on the fly.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Wrapping Up
&lt;/h2&gt;

&lt;p&gt;Understanding what is happening under the hood — why GPUs excel at dynamic branching and latency hiding, why TPU systolic arrays crush dense matrix maths, and how the Roofline Model maps your workload to silicon — gives you the mental model to avoid expensive hardware mismatches.&lt;/p&gt;

&lt;p&gt;In practice, it comes down to three habits: figure out whether your workload is &lt;strong&gt;compute-bound&lt;/strong&gt; or &lt;strong&gt;memory-bound&lt;/strong&gt;, check real-world regional availability and pricing rather than chasing the newest spec sheet, and start with the simplest runtime that fits (whether that's a scale-to-zero L4 on Cloud Run, a Trillium slice on GKE, or a dedicated training cluster). Get that match right, and your models run faster while your cloud bill stays sane.&lt;/p&gt;

&lt;h4&gt;
  
  
  Join the TPU Community
&lt;/h4&gt;

&lt;p&gt;This article was originally written for the &lt;strong&gt;&lt;a href="https://wearecommunity.io/communities/tpucommunity" rel="noopener noreferrer"&gt;TPU Community&lt;/a&gt;&lt;/strong&gt; — an open, developer-led collective of ML engineers, systems designers, and cloud practitioners building on hardware accelerators. Whether you want to learn the basics, chat with fellow enthusiasts, fine-tune open models, benchmark TPU serving throughput, or wrangle multi-node clusters, come and say hello!&lt;/p&gt;

&lt;h2&gt;
  
  
  Before You Go
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Please share&lt;/strong&gt; 📢 this with anyone that you think will be interested. It might help them, and it really helps me!&lt;/li&gt;
&lt;li&gt;Please &lt;strong&gt;drop some reactions&lt;/strong&gt; ❤️ 🦄 🔥 (you can pick more than one!) and &lt;strong&gt;bookmark&lt;/strong&gt; 🔖 this post!&lt;/li&gt;
&lt;li&gt;Please &lt;strong&gt;leave a comment&lt;/strong&gt; 💬. Interaction is good!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add a star&lt;/strong&gt; ⭐ on my repos!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Follow&lt;/strong&gt; 👉 me here on Dev.to, so you don’t miss my content.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  References and Useful Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://wearecommunity.io/communities/tpucommunity" rel="noopener noreferrer"&gt;TPU Community on WeAreCommunity&lt;/a&gt; — Open, developer-led community for TPU practitioners, benchmarks, and accelerator architecture discussions.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Google &amp;amp; Hardware Documentation
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://docs.cloud.google.com/tpu/docs/intro-to-tpu?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Introduction to Cloud TPU&lt;/a&gt; — Official Google Cloud architectural guide and MXU optimisation best practices.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.cloud.google.com/tpu/docs/system-architecture-tpu-vm?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;System Architecture: TPU VMs and Pods&lt;/a&gt; — Detailed hardware topology, host VM pairing, and networking configurations.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://cloud.google.com/compute/docs/accelerator-optimized-machines?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Compute Engine Accelerator-Optimized Machine Family&lt;/a&gt; — Complete specifications for A2, A3, A4, and A4X GPU instances.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://cloud.google.com/compute/docs/gpus?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Google Cloud GPU Machine Types&lt;/a&gt; — Regional availability and technical specifications for NVIDIA GPUs.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://cloud.google.com/compute/gpus-pricing?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Compute Engine GPU Pricing&lt;/a&gt; — Official regional on-demand, Spot, Flex-start, and CUD pricing for NVIDIA GPUs on Google Cloud.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://cloud.google.com/tpu/pricing?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Cloud TPU Pricing&lt;/a&gt; — Official per-chip-hour pricing across Cloud TPU v4, v5e, v5p, v6e (Trillium), and Ironwood.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.cloud.google.com/compute/docs/regions-zones/gpu-regions-zones?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;GPU Regions and Zones&lt;/a&gt; — Availability zone distribution across NVIDIA L4, A100, H100, H200, and B200 instances.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.cloud.google.com/compute/docs/regions-zones/tpu-regions-zones?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;TPU Regions and Zones&lt;/a&gt; — Availability zones, slice sizes, and topologies for Cloud TPU v4, v5e, v5p, and v6e (Trillium).&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.cloud.google.com/compute/docs/regions-zones/ai-zones?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Google Cloud AI Zones&lt;/a&gt; — Specialised high-density data centre zones optimised for liquid-cooled AI supercomputing clusters.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://cloud.google.com/kubernetes-engine/docs/concepts/tpus?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;About TPUs in Google Kubernetes Engine (GKE)&lt;/a&gt; — Provisioning and orchestrating TPU slices in containerised clusters.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://cloud.google.com/kubernetes-engine/docs/concepts/gpus?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;About GPUs in Google Kubernetes Engine (GKE)&lt;/a&gt; — Best practices for running GPU workloads on GKE.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://blog.google/innovation-and-ai/infrastructure-and-cloud/google-cloud/eighth-generation-tpu-agentic-era/?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Eighth-Generation TPU: Two Chips for the Agentic Era&lt;/a&gt; — Official Google announcement detailing the architectural bifurcation of TPU 8t and TPU 8i.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://cloud.google.com/blog/products/compute/tpu-8t-and-tpu-8i-technical-deep-dive?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;TPU 8t and TPU 8i Technical Deep Dive&lt;/a&gt; — In-depth exploration of Virgo fabrics, SRAM scaling, and Boardfly routing.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/watch?v=0kAGRnboXvg&amp;amp;utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Cloud TPUs Overview Video&lt;/a&gt; — Qwiklabs / Google Cloud overview detailing the 2013 origins and TPU evolution.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://jax-ml.github.io/scaling-book/tpus/" rel="noopener noreferrer"&gt;How to Think About TPUs — JAX Scaling Book&lt;/a&gt; — Austin, Douglas, Frostig et al. (Google DeepMind, 2025). The definitive academic and architectural guide to TPU hardware, systolic arrays, and roofline scaling.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Dazbo Links
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://medium.com/@dazbo" rel="noopener noreferrer"&gt;Dazbo's Articles on Medium&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://darrenlester.net" rel="noopener noreferrer"&gt;Dazbo's Portfolio&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>googlecloud</category>
      <category>agenticai</category>
      <category>tpu</category>
      <category>gpu</category>
    </item>
    <item>
      <title>How I Made a Voice Clone in Minutes, Using Google Antigravity, Gemini 3.8 Flash TTS and My Harness</title>
      <dc:creator>Darren "Dazbo" Lester</dc:creator>
      <pubDate>Sun, 08 Nov 2026 11:56:59 +0000</pubDate>
      <link>https://dev.to/gde/how-i-made-a-voice-clone-in-minutes-using-google-antigravity-gemini-38-flash-tts-and-my-harness-10j3</link>
      <guid>https://dev.to/gde/how-i-made-a-voice-clone-in-minutes-using-google-antigravity-gemini-38-flash-tts-and-my-harness-10j3</guid>
      <description>&lt;p&gt;&lt;em&gt;Leveraging my Harness: Spec-Driven Development, TDD, and Self-Correcting Loops in Action&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Howdy friends! Have you ever wanted to clone your own voice so you can generate expressive narration for presentations and demos, create audio versions of your blogs, or even co-host multi-speaker AI podcasts? Or maybe you just fancy having deep-fake phone calls with family members!&lt;/p&gt;

&lt;p&gt;I certainly have! Honestly, I don't love recording voiceovers — mostly because fluffing a line and having to go back and correct your mistakes is a pain.&lt;/p&gt;

&lt;p&gt;In this post, I'll show you how I used &lt;strong&gt;Google Antigravity&lt;/strong&gt; and my reusable agent harness to build &lt;a href="https://github.com/derailed-dash/voice-replication" rel="noopener noreferrer"&gt;&lt;code&gt;voice-replication&lt;/code&gt;&lt;/a&gt; — an open-source Python application that clones your voice and generates expressive single- and multi-speaker speech with &lt;strong&gt;Gemini 3.8 Flash TTS&lt;/strong&gt;. And if you want to clone your own voice (or script multi-speaker dialogues) without writing any code yourself, you can simply clone the repo, record two short WAV clips, and run the steps we'll walk through below!&lt;/p&gt;

&lt;p&gt;Google first introduced custom voices and voice cloning in its "Chirp 3" Text-to-Speech (TTS) model back in 2025 — but it wasn't accessible to most of us, as it required getting onto a dedicated enterprise allowlist. Then, in September 2026, Google brought &lt;a href="https://aistudio.google.com/docs/voice-replication?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Voice Replication&lt;/a&gt; and &lt;a href="https://aistudio.google.com/docs/voice-design?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Voice Design&lt;/a&gt; to the masses with &lt;strong&gt;Gemini 3.8 Flash TTS&lt;/strong&gt; (&lt;code&gt;gemini-3.8-flash-tts&lt;/code&gt;). Now &lt;strong&gt;anyone can clone their own voice&lt;/strong&gt;, create custom vocal personas from a prompt, and add rich style guidance and inline vocal expressions like whispering, laughing, sighing, and pausing.&lt;/p&gt;

&lt;p&gt;Today I decided to give this a try. And because I've been doing quite a few blogs and talks about &lt;strong&gt;Harness Engineering&lt;/strong&gt; lately, I decided to put this into practice. So, the goal today was to build a clean voice cloning application from scratch, using &lt;strong&gt;Google Antigravity&lt;/strong&gt;, and leveraging my existing coding harness. The application will:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Quickly and easily clone a supplied voice, handling audio normalisation and mandatory consent checks&lt;/li&gt;
&lt;li&gt;Persist and manage my voice clones in Google Cloud&lt;/li&gt;
&lt;li&gt;Provide a simple interface for generating expressive monologue and multi-speaker dialogue from text in my voice&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So, grab your coffee and your cat and let's see how to go from nothing to a fully tested, documented and public-repo-ready application in one hour!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fg9li6qbgglev0i1m4vm6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fg9li6qbgglev0i1m4vm6.png" alt="Settling in with coffee and the cats to build with Google Antigravity" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Build a Whole Application Around a Couple of API Calls?
&lt;/h2&gt;

&lt;p&gt;At first glance, calling the Gemini API's &lt;code&gt;/v1beta/voices&lt;/code&gt; endpoint is pretty simple. You send two audio clips to &lt;code&gt;client.voices.create()&lt;/code&gt; — a reference recording of your voice and a recording of you reciting a mandatory consent statement — and you get back a voice identifier (&lt;code&gt;voice_...&lt;/code&gt;) that you can pass to &lt;code&gt;client.interactions.create()&lt;/code&gt; using &lt;code&gt;gemini-3.8-flash-tts&lt;/code&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Wait — if it's that simple, why build a whole CLI and storage layer around it?"&lt;/em&gt;&lt;br&gt;
&lt;em&gt;"Partly for convenience... and mostly to give my agent harness a proper workout!"&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let's be honest: if you only want a one-off voice clone, a 20-line Python script is probably enough. (Interestingly, although the docs mention an interactive Voice Replication experience in Google AI Studio, that option wasn't actually showing up in the AI Studio UI for me in the UK.) My main motivation for building a full CLI around all this was to test how quickly my &lt;strong&gt;Google Antigravity&lt;/strong&gt; harness could turn a loose idea into a well-engineered, tested tool.&lt;/p&gt;

&lt;p&gt;That said, wrapping the raw API in a proper CLI also solves a few everyday annoyances:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Automatic audio conversion&lt;/strong&gt;: For best results, Google recommends &lt;strong&gt;24kHz, mono, 16-bit PCM WAV&lt;/strong&gt; audio and a &lt;strong&gt;10 to 30 second&lt;/strong&gt; reference clip. Meanwhile, your phone or desktop recorder probably spits out 48kHz stereo &lt;code&gt;.m4a&lt;/code&gt; or &lt;code&gt;.mp3&lt;/code&gt; files. Having the CLI automatically convert and check your clips via &lt;code&gt;ffmpeg&lt;/code&gt; saves manual conversion steps.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Consent sanity checking&lt;/strong&gt;: To prevent unauthorised voice cloning, you must record a verbatim consent phrase (&lt;code&gt;"I am the owner of this voice and I consent to Google using this voice to create a synthetic voice model."&lt;/code&gt;). Sure, if you upload the wrong file or fluff a word, the Voices endpoint will just reject it — hardly the end of the world! — but checking it first with &lt;code&gt;gemini-3.5-transcribe&lt;/code&gt; tells you &lt;em&gt;exactly&lt;/em&gt; which words didn't match, and gave us another fun Gemini API integration to play with.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Voice persistence and TTL expiry&lt;/strong&gt;: When you create a stateful voice (&lt;code&gt;store=True&lt;/code&gt;), Google automatically persists it inside the Google Cloud project tied to your &lt;code&gt;GEMINI_API_KEY&lt;/code&gt; with a &lt;strong&gt;1-year retention TTL&lt;/strong&gt; (or &lt;strong&gt;7 days&lt;/strong&gt; if you use a stateless &lt;code&gt;voicekey_...&lt;/code&gt; token with &lt;code&gt;store=False&lt;/code&gt;). Adding an &lt;em&gt;optional&lt;/em&gt; Google Cloud Storage backup alongside your local &lt;code&gt;voices.json&lt;/code&gt; catalogue means archiving your master WAV clips — or refreshing an expired voice a year from now from another machine — won't be a PITA.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Expressive multi-speaker scripting&lt;/strong&gt;: Gemini 3.8 Flash TTS supports turn-level style instructions (&lt;code&gt;speech_metadata.style&lt;/code&gt; — e.g. &lt;code&gt;"whispering"&lt;/code&gt; or &lt;code&gt;"excited"&lt;/code&gt;) and inline vocal tags like &lt;code&gt;&amp;lt;laugh&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;sigh&amp;gt;&lt;/code&gt;, and &lt;code&gt;&amp;lt;short pause&amp;gt;&lt;/code&gt;. Typing raw JSON payloads by hand gets old fast; feeding a clean Markdown monologue or YAML dialogue script into a CLI is much nicer.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Best of all, because the entire workflow is wrapped behind simple &lt;code&gt;make&lt;/code&gt; targets (including &lt;code&gt;make design&lt;/code&gt; if you also want to generate brand-new synthetic voices from a text prompt), you can clone &lt;a href="https://github.com/derailed-dash/voice-replication" rel="noopener noreferrer"&gt;&lt;code&gt;derailed-dash/voice-replication&lt;/code&gt;&lt;/a&gt; and use it out of the box without touching a line of Python.&lt;/p&gt;

&lt;h2&gt;
  
  
  Starting with a Reusable Harness: &lt;code&gt;GEMINI.md&lt;/code&gt;, Skills, MCPs, and Plugins
&lt;/h2&gt;

&lt;p&gt;Before I even typed my first prompt, Antigravity already knew &lt;em&gt;how&lt;/em&gt; I build software. Why? Because of my reusable &lt;code&gt;~/.gemini&lt;/code&gt; harness.&lt;/p&gt;

&lt;p&gt;As I covered in &lt;a href="https://dev.to/gde/from-vibing-chaos-to-reliable-agents-the-what-why-and-how-of-harness-engineering-4ba0"&gt;From Vibing Chaos to Reliable Agents: The What, Why, and How of Harness Engineering&lt;/a&gt;, separating &lt;strong&gt;Context (&lt;em&gt;HOW&lt;/em&gt;)&lt;/strong&gt; from &lt;strong&gt;Specification (&lt;em&gt;WHAT&lt;/em&gt;)&lt;/strong&gt; is the foundation for getting consistent, production-grade output from an AI coding agent. Instead of repeating my coding standards in every prompt, my global harness combines a &lt;code&gt;GEMINI.md&lt;/code&gt; engineering constitution with plugins, skills, and MCP servers across every repository I open:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Modern Python &amp;amp; &lt;code&gt;uv&lt;/code&gt;&lt;/strong&gt;: Enforces Python 3.13, &lt;code&gt;uv&lt;/code&gt; environment management, and modern type hinting.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Latest GA Gemini Models via the Interactions API&lt;/strong&gt;: Mandates current models and never falls back to legacy &lt;code&gt;generateContent&lt;/code&gt; endpoints.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Plugins, On-Demand Skills, &amp;amp; Live MCP Servers&lt;/strong&gt;: Pairs bundled plugins (&lt;code&gt;gemini-api&lt;/code&gt;, &lt;code&gt;google-cloud-developer&lt;/code&gt;) and live documentation MCPs (&lt;code&gt;gemini-api-docs&lt;/code&gt;, &lt;code&gt;developer-knowledge&lt;/code&gt;) with curated skills.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Self-Documenting &lt;code&gt;Makefile&lt;/code&gt; &amp;amp; &lt;code&gt;.env.template&lt;/code&gt; Hygiene&lt;/strong&gt;: Every repo gets a &lt;code&gt;Makefile&lt;/code&gt;, a sanitised &lt;code&gt;.env.template&lt;/code&gt;, and rules to ensure nothing sensitive ever gets pushed to GitHub.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spec-Driven Development, TDD, &amp;amp; Self-Correcting Loops&lt;/strong&gt;: Every non-trivial feature starts with &lt;code&gt;SPEC.md&lt;/code&gt;, &lt;code&gt;TODO.md&lt;/code&gt;, and &lt;code&gt;LOOPS.md&lt;/code&gt;, ensuring our harness verifies each iteration both deterministically and semantically.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Interactive Discovery: Using &lt;code&gt;/grill-me&lt;/code&gt; Before Writing a Line of Code
&lt;/h2&gt;

&lt;p&gt;I kicked off the session with a single prompt using the &lt;code&gt;/grill-me&lt;/code&gt; slash command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/grill-me I want to build a project for managing my personal voice replication,
using gemini flash tts, and the guidance here:
https://aistudio.google.com/docs/voice-replication.
I want to persist my voice clone in my GCP project.
We will use Python. I can provide audio clips, and the mandatory recorded statement.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Instead of immediately hallucinating half-baked Python files, Antigravity followed my harness protocol:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Activated Relevant Skills&lt;/strong&gt;: It read &lt;code&gt;gemini-api-dev&lt;/code&gt;, &lt;code&gt;google-cloud-storage-bucket-architect&lt;/code&gt;, &lt;code&gt;google-cloud-storage-basics&lt;/code&gt;, and &lt;code&gt;retrieving-developer-knowledge&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Queried Live Upstream Docs via MCP&lt;/strong&gt;: It pulled the current documentation for &lt;a href="https://aistudio.google.com/docs/voice-replication?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Voice Replication&lt;/a&gt;, &lt;a href="https://aistudio.google.com/docs/speech-generation?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Speech Generation&lt;/a&gt;, &lt;a href="https://aistudio.google.com/docs/voice-design?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Voice Design&lt;/a&gt;, and &lt;a href="https://aistudio.google.com/docs/transcribe?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Audio Transcription&lt;/a&gt; from the Gemini API Docs MCP server, and checked &lt;a href="https://docs.cloud.google.com/storage/docs/storage-classes?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Cloud Storage Classes&lt;/a&gt;, &lt;a href="https://docs.cloud.google.com/storage/docs/autoclass?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Autoclass&lt;/a&gt;, and &lt;a href="https://cloud.google.com/storage/pricing?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Pricing&lt;/a&gt; via the Developer Knowledge MCP server.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Conducted a Structured Design Interview&lt;/strong&gt;: Using multiple-choice questions, it interviewed me across several architectural trade-offs to lock in concrete design decisions.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The resulting solution — fully generated by Gemini Argon inside Antigravity — looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fckq8l5i68jhbegj5879m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fckq8l5i68jhbegj5879m.png" alt="Components for the Personal Voice Replication and Expressive TTS Manager" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Locking the Blueprint: &lt;code&gt;SPEC.md&lt;/code&gt;, &lt;code&gt;TODO.md&lt;/code&gt;, and &lt;code&gt;LOOPS.md&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Once the &lt;code&gt;/grill-me&lt;/code&gt; interview wrapped up, Antigravity activated my &lt;code&gt;spec-driven-development&lt;/code&gt;, &lt;code&gt;planning-and-task-breakdown&lt;/code&gt;, &lt;code&gt;agent-aware-cli&lt;/code&gt;, and &lt;a href="https://github.com/Forward-Future/loopy/tree/main/skills/loopy" rel="noopener noreferrer"&gt;&lt;code&gt;loopy&lt;/code&gt;&lt;/a&gt; skills to generate the project's specification artefacts on disk &lt;em&gt;before&lt;/em&gt; writing any code:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;SPEC.md&lt;/code&gt;&lt;/strong&gt;: Captured the system architecture, Gemini 3.8 TTS &amp;amp; Gemini 3.5 Transcribe API contracts, the &lt;code&gt;ffmpeg&lt;/code&gt; 24kHz mono WAV pipeline, the hybrid GCS Coldline/Standard persistence design, the CLI command table, explicit operational boundaries (&lt;code&gt;Always Do&lt;/code&gt; / &lt;code&gt;Ask First&lt;/code&gt; / &lt;code&gt;Never Do&lt;/code&gt;), and the complete two-tier verification rubric.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;tasks/plan.md&lt;/code&gt; &amp;amp; &lt;code&gt;TODO.md&lt;/code&gt;&lt;/strong&gt;: Decomposed the build into eight independently testable vertical slices with clear verification commands and phase checkpoints.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;LOOPS.md&lt;/code&gt;&lt;/strong&gt;: Saved the self-correcting &lt;strong&gt;TDD Vertical Slice Loop&lt;/strong&gt; prompt and its binary acceptance rubric, so the loop can be re-run at any time.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As I wrote in &lt;a href="https://dev.to/gde/spec-driven-development-for-the-win-disposable-code-living-blueprints-and-building-like-a-boss-2bnn"&gt;Spec-Driven Development For-the-Win: Disposable Code, Living Blueprints, and Building Like a Boss&lt;/a&gt;, &lt;strong&gt;code is disposable; the specification is what matters&lt;/strong&gt;. Pausing at a hard-stop approval gate to review &lt;code&gt;SPEC.md&lt;/code&gt; and &lt;code&gt;LOOPS.md&lt;/code&gt; took two minutes — and meant that when I typed &lt;code&gt;y&lt;/code&gt; to start building, the agent had zero ambiguity left to guess about.&lt;/p&gt;

&lt;h2&gt;
  
  
  Executing with Loopy + TDD: Red, Green, Refactor
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fofzgpfc1qrsdkrzqaies.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fofzgpfc1qrsdkrzqaies.png" alt="The Loopy + TDD Vertical Slice Loop" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With the spec approved, Antigravity activated &lt;a href="https://github.com/Forward-Future/loopy/tree/main/skills/loopy" rel="noopener noreferrer"&gt;&lt;code&gt;loopy&lt;/code&gt;&lt;/a&gt; and &lt;code&gt;test-driven-development&lt;/code&gt; and executed each vertical slice in &lt;code&gt;TODO.md&lt;/code&gt; following our loop cycle: &lt;strong&gt;&lt;code&gt;Observe -&amp;gt; Choose -&amp;gt; Act -&amp;gt; Verify -&amp;gt; Record&lt;/code&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If you read &lt;a href="https://dev.to/gde/loop-engineering-in-the-harness-autonomous-self-correcting-systems-part-2-155e"&gt;Loop Engineering in the Harness: Autonomous, Self-Correcting Systems&lt;/a&gt;, you will recognise the mechanics immediately:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Red Phase First&lt;/strong&gt;: For every slice, Antigravity wrote the failing &lt;code&gt;pytest&lt;/code&gt; test file in &lt;code&gt;tests/&lt;/code&gt; &lt;em&gt;first&lt;/em&gt; and ran &lt;code&gt;uv run pytest&lt;/code&gt; to prove it failed for the right reason.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Iteration Discipline (The One-Change Rule)&lt;/strong&gt;: Each pass implemented a single semantic slice (or fixed one behavioural bug) before re-verifying. If a check failed, the agent knew &lt;em&gt;exactly&lt;/em&gt; which change caused the issue — whereas purely mechanical linting or formatting fixes could be batched together.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fast, Offline Testing&lt;/strong&gt;: Audio tests run against real &lt;code&gt;ffmpeg&lt;/code&gt; using tiny generated test clips, while Gemini API and Cloud Storage calls use injected fakes — so the entire 38-test suite runs offline in about 3 seconds and with 0 API cost.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Two-Tier Verification: Mechanical Short-Circuiting + Stateless Semantic Critic
&lt;/h2&gt;

&lt;p&gt;Left to its own devices, an agent will happily write some questionable code, quietly violate your architectural rules, and declare victory. Why? Because the same agent that wrote the code is &lt;strong&gt;grading its own homework inside a polluted context window&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;To fix this — and avoid burning tokens on AI code reviews when basic tests or linters are still failing — my harness checks the work in two stages: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Run the fast, free, deterministic tests first.&lt;/li&gt;
&lt;li&gt;Only bring in a separate "Critic" agent once the basics pass.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Tier 1: The Deterministic Mechanical Gate
&lt;/h3&gt;

&lt;p&gt;After every slice, Antigravity runs &lt;code&gt;make check&lt;/code&gt;, which executes four deterministic tools in sequence:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;uv run codespell -s          &lt;span class="c"&gt;# catch spelling mistakes in code and docs&lt;/span&gt;
uv run ruff check --fix .    &lt;span class="c"&gt;# lint and auto-fix formatting issues&lt;/span&gt;
uv run pyright               &lt;span class="c"&gt;# static type checking&lt;/span&gt;
uv run pytest -m &lt;span class="s2"&gt;"not live"&lt;/span&gt;  &lt;span class="c"&gt;# run fast offline unit tests (skip live cloud calls in the inner loop)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If any Tier 1 check fails — a single typo caught by &lt;code&gt;codespell&lt;/code&gt;, an unused import in &lt;code&gt;ruff&lt;/code&gt;, a type mismatch in &lt;code&gt;pyright&lt;/code&gt;, or tests failing — the loop &lt;strong&gt;short-circuits immediately&lt;/strong&gt; and fixes the mechanical defect before any LLM review is attempted.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tier 2: The Stateless Semantic Critic
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmx37o921vaihliznvozr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmx37o921vaihliznvozr.png" alt="A Stateless Critic Subagent Auditing the Builder Agent's Code" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once all slices pass Tier 1, the loop spawns a &lt;strong&gt;fresh, stateless &lt;code&gt;research&lt;/code&gt; subagent&lt;/strong&gt; with zero builder conversation history. That critic reads the codebase cold and grades it against the numbered binary assertions codified in &lt;code&gt;SPEC.md&lt;/code&gt; and &lt;code&gt;LOOPS.md&lt;/code&gt;:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Rubric ID&lt;/th&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;Binary Assertion&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;&lt;code&gt;B1&lt;/code&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Modern Python 3.13 &amp;amp; Docstrings&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Every &lt;code&gt;.py&lt;/code&gt; file in &lt;code&gt;src/&lt;/code&gt; and &lt;code&gt;tests/&lt;/code&gt; has a top-of-module docstring and uses built-in types.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;&lt;code&gt;B2&lt;/code&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Latest Gemini Models &amp;amp; Interactions API&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Uses &lt;code&gt;gemini-3.8-flash-tts&lt;/code&gt; and &lt;code&gt;gemini-3.5-transcribe&lt;/code&gt; via &lt;code&gt;google-genai&lt;/code&gt; (&lt;code&gt;client.voices.*&lt;/code&gt; and &lt;code&gt;client.interactions.create&lt;/code&gt;), with zero &lt;code&gt;generateContent&lt;/code&gt; calls.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;&lt;code&gt;B3&lt;/code&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Audio Pre-Flight &amp;amp; Duration Guard&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Normalises input audio via &lt;code&gt;ffmpeg&lt;/code&gt; to 24kHz, mono, 16-bit PCM WAV and strictly enforces the 10s to 30s reference duration window.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;&lt;code&gt;B4&lt;/code&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;GCS Storage-Class-Aware Persistence&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Defaults the bucket to &lt;code&gt;COLDLINE&lt;/code&gt; for WAV clips and overrides &lt;code&gt;voices.json&lt;/code&gt; to &lt;code&gt;STANDARD&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;&lt;code&gt;B5&lt;/code&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Human &amp;amp; Agent-Friendly CLI&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Outputs formatted Rich tables for humans, &lt;code&gt;--json&lt;/code&gt; for AI agents, &lt;code&gt;--dry-run&lt;/code&gt; for safe previews, and clear fix hints on errors.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;&lt;code&gt;B6&lt;/code&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Documentation &amp;amp; Visual Standards&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Core docs (&lt;code&gt;README.md&lt;/code&gt;, &lt;code&gt;docs/*.md&lt;/code&gt;, &lt;code&gt;deployment/README.md&lt;/code&gt;) created with architecture diagram and links to official Google docs.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;&lt;code&gt;B7&lt;/code&gt;&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Security &amp;amp; Public-Repo Hygiene&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;.gitignore&lt;/code&gt; excludes &lt;code&gt;.env&lt;/code&gt;, &lt;code&gt;data/&lt;/code&gt;, &lt;code&gt;output/&lt;/code&gt;, and audio files; zero project/bucket IDs hardcoded outside &lt;code&gt;.env&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;When the stateless Critic finishes its audit and returns &lt;strong&gt;&lt;code&gt;7 / 7 PASS (100%)&lt;/code&gt;&lt;/strong&gt;, &lt;code&gt;loopy&lt;/code&gt; writes the final evidence receipt to &lt;code&gt;.cache/loops/last_receipt.md&lt;/code&gt; and prints the run summary right in chat:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Loopy — TDD Vertical Slice Loop
========================================
Stop reason : target_met (7 vertical slices completed)

Iter  Before  After   Delta   Kept  Summary
1     0/11    11/11   +11     yes   Config &amp;amp; Pydantic models (config.py, models.py, test_models.py)
2     11/17   17/17   +6      yes   FFmpeg 24kHz mono WAV normaliser &amp;amp; validator (audio.py, test_audio.py)
3     17/22   22/22   +5      yes   Consent phrase registry &amp;amp; gemini-3.5-transcribe gate (consent.py, test_consent.py)
4     22/28   28/28   +6      yes   Gemini Voices CRUD &amp;amp; TTS synthesis client (client.py, test_client.py)
5     28/32   32/32   +4      yes   Local catalogue &amp;amp; GCS Coldline/Standard sync (storage.py, test_storage.py)
6     32/38   38/38   +6      yes   Agent-Aware Rich/Typer CLI &amp;amp; examples (cli.py, test_cli.py, examples/)
7     6/7     7/7     +1      yes   Core docs, PNG architecture diagram &amp;amp; Tier 2 Stateless Semantic Critic audit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Well, this is pretty cool to see. Especially since I didn't write any of the rubrics or looping instructions by hand for this project. And this output appeared literally minutes after kicking off the build!&lt;/p&gt;

&lt;h2&gt;
  
  
  Developer Experience: A Self-Documenting &lt;code&gt;Makefile&lt;/code&gt; and Agent-Aware CLI
&lt;/h2&gt;

&lt;p&gt;Because my &lt;code&gt;GEMINI.md&lt;/code&gt; harness pairs the &lt;code&gt;agent-aware-cli&lt;/code&gt; skill with a self-documenting &lt;code&gt;Makefile&lt;/code&gt; that pulls its configuration dynamically from &lt;code&gt;.env.template&lt;/code&gt; and &lt;code&gt;.env&lt;/code&gt;, running the application is effortless whether you are a human in a terminal or an AI agent invoking tools.&lt;/p&gt;

&lt;p&gt;Typing &lt;code&gt;make&lt;/code&gt; (or &lt;code&gt;make help&lt;/code&gt;) prints every verification gate and application workflow alongside the active &lt;code&gt;.env&lt;/code&gt; configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Usage:
  make &amp;lt;target&amp;gt; [VARIABLE=value ...]

Development &amp;amp; Verification Gates
  install             Create/sync virtual environment and install dependencies via uv
  lint                Run deterministic static checks (codespell, ruff, pyright)
  fix                 Auto-fix formatting and lint issues via ruff and check spelling
  test                Run offline unit test suite with pytest and coverage
  check               Run full Tier 1 verification gate (codespell + ruff + pyright + pytest)

Audio Pre-Flight &amp;amp; Voice Lifecycle
  prep-audio          Normalise reference &amp;amp; consent clips to 24kHz mono WAV and verify consent
  create              Create a stateful replicated voice (store=True, 1-year TTL)
  design              Create a custom synthetic voice from a text prompt
  list / inspect      List or inspect voices in the local catalogue (data/voices.json)
  refresh / delete    Renew a voice's 1-year TTL from master WAVs or delete a voice

Speech &amp;amp; Dialogue Synthesis
  speak               Synthesise single-speaker audio (FILE=monologue.md)
  dialogue            Synthesise multi-speaker dialogue from YAML (SCRIPT=dialogue.yaml)

Google Cloud Storage (GCS) Backup &amp;amp; Recovery
  gcs-preflight       Display read-only gcloud pre-flight verification commands
  gcs-init            Provision regional GCS backup bucket
  sync-push / pull    Sync voices.json and audio WAVs with GCS
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Solution Code Snippets
&lt;/h2&gt;

&lt;p&gt;Let's take a quick peek under the hood at some of the code behind &lt;code&gt;make create&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Verifying the Mandatory Consent Recording (&lt;code&gt;consent.py&lt;/code&gt;)
&lt;/h3&gt;

&lt;p&gt;The function &lt;code&gt;verify_consent_audio()&lt;/code&gt; sends the normalised consent WAV to &lt;code&gt;gemini-3.5-transcribe&lt;/code&gt; via the Gemini Interactions API (&lt;code&gt;client.interactions.create&lt;/code&gt;) to verify that the spoken words match Google's mandatory consent statement before we ever call the Voices endpoint:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;verify_consent_audio&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;audio_path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Any&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;language_code&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;str&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"en-GB"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;str&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"gemini-3.5-transcribe"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;threshold&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;float&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="no"&gt;DEFAULT_SIMILARITY_THRESHOLD&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nc"&gt;ConsentCheckResult&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="s2"&gt;"""Transcribe `audio_path` with `gemini-3.5-transcribe` and verify consent wording."""&lt;/span&gt;
    &lt;span class="n"&gt;expected_phrase&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;get_consent_phrase&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;language_code&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;audio_b64&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;base64&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;b64encode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;audio_path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read_bytes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;decode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"utf-8"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;bcp47_hint&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"en-GB"&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;language_code&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;"en"&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="n"&gt;language_code&lt;/span&gt;
    &lt;span class="n"&gt;interaction&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;interactions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nb"&gt;input&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;
            &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="s2"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"audio"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;"data"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;audio_b64&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;"mime_type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"audio/wav"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;generation_config&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"transcription_config"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="s2"&gt;"language_codes"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;bcp47_hint&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;transcript&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;getattr&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;interaction&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"output_text"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;similarity&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;compute_phrase_similarity&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;expected_phrase&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;transcript&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nc"&gt;ConsentCheckResult&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;passed&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;similarity&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="n"&gt;threshold&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;language_code&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;language_code&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;expected_phrase&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;expected_phrase&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;transcript&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;transcript&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;similarity&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;similarity&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;audio_path&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;audio_path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Creating &amp;amp; Persisting the Cloned Voice (&lt;code&gt;client.py&lt;/code&gt;)
&lt;/h3&gt;

&lt;p&gt;Before looking at our wrapper method, it's worth pausing to see &lt;strong&gt;just how trivial the underlying Gemini API call actually is&lt;/strong&gt;. Once you have your two WAV files (&lt;code&gt;source.wav&lt;/code&gt; and &lt;code&gt;consent.wav&lt;/code&gt;), creating a persistent voice clone on Google's servers takes barely a dozen lines of Python:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;google&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;genai&lt;/span&gt;

&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;genai&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Client&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;http_options&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"api_version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"v1beta"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;voices&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;store&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;voice&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="s2"&gt;"model"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"gemini-3.8-flash-tts"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"replicated"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"display_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Dazbo Primary"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"replicated"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"source_audio"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"mime_type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"audio/wav"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"data"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;source_b64&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s2"&gt;"consent_audio"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"mime_type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"audio/wav"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"data"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;consent_b64&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# e.g. voice_... (stored in your GCP project for 1 year!)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's literally it! Passing &lt;strong&gt;&lt;code&gt;store=True&lt;/code&gt;&lt;/strong&gt; tells the Gemini API to persist the cloned voice inside the Google Cloud project associated with your &lt;code&gt;GEMINI_API_KEY&lt;/code&gt; for a full year (and automatically makes it show up in Google AI Studio) — no database or storage bucket required.&lt;/p&gt;

&lt;p&gt;In &lt;code&gt;client.py&lt;/code&gt;, our &lt;code&gt;create_replicated_voice()&lt;/code&gt; method simply wraps that exact &lt;code&gt;self.client.voices.create()&lt;/code&gt; call and returns a typed &lt;code&gt;VoiceRecord&lt;/code&gt; model (which calculates the 1-year TTL expiry countdown and gets saved to our local &lt;code&gt;data/voices.json&lt;/code&gt; catalogue so we can refer to the voice by a friendly alias like &lt;code&gt;dazbo&lt;/code&gt; instead of pasting raw &lt;code&gt;voice_...&lt;/code&gt; strings everywhere):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;create_replicated_voice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;alias&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;display_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;source_wav_path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;consent_wav_path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;store&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;bool&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;str&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"gemini-3.8-flash-tts"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;default_style&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;str&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;language_code&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;str&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"en-GB"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nc"&gt;VoiceRecord&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="s2"&gt;"""Create a stateful (`store=True`) or stateless (`store=False`) replicated voice."""&lt;/span&gt;
    &lt;span class="n"&gt;source_b64&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;base64&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;b64encode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;source_wav_path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read_bytes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;decode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"utf-8"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;consent_b64&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;base64&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;b64encode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;consent_wav_path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read_bytes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;decode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"utf-8"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;voice_payload&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kt"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Any&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="s2"&gt;"model"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"replicated"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"replicated"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"source_audio"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"mime_type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"audio/wav"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"data"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;source_b64&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s2"&gt;"consent_audio"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"mime_type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"audio/wav"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"data"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;consent_b64&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;store&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;voice_payload&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"display_name"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;display_name&lt;/span&gt;

    &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;voices&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;store&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;store&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;voice&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;voice_payload&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nc"&gt;VoiceRecord&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;alias&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;alias&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;display_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;display_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;voice_type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nc"&gt;VoiceType&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;REPLICATED&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;storage_mode&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nc"&gt;StorageMode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;STATEFUL&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;store&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="nc"&gt;StorageMode&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;STATELESS&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;voice_id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;getattr&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;voice_key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;getattr&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"key"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;default_style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;default_style&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;language_code&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;language_code&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;source_audio_path&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kt"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;source_wav_path&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;consent_audio_path&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="kt"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;consent_wav_path&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Taking It for a Spin!
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu3w8970mlaufs1dx03mx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu3w8970mlaufs1dx03mx.png" alt="Taking the Voice Replication CLI and AI Studio Integration for a Spin" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  A Quick Note on Dependencies (No GCS Bucket Required!)
&lt;/h3&gt;

&lt;p&gt;If you look at &lt;code&gt;.env.template&lt;/code&gt; or &lt;code&gt;Makefile&lt;/code&gt; in &lt;a href="https://github.com/derailed-dash/voice-replication" rel="noopener noreferrer"&gt;&lt;code&gt;derailed-dash/voice-replication&lt;/code&gt;&lt;/a&gt;, you'll notice variables like &lt;code&gt;GCP_PROJECT_ID&lt;/code&gt; and &lt;code&gt;GCS_BUCKET_NAME&lt;/code&gt; alongside targets like &lt;code&gt;make gcs-init&lt;/code&gt; and &lt;code&gt;make sync-push&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If you just want to do some quick voice cloning and speech generation, &lt;strong&gt;you can ignore the Google Cloud Storage bucket and &lt;code&gt;gcloud&lt;/code&gt; setup completely&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Only the &lt;code&gt;GEMINI_API_KEY&lt;/code&gt; is required&lt;/strong&gt;: To run &lt;code&gt;make prep-audio&lt;/code&gt;, &lt;code&gt;make create&lt;/code&gt;, &lt;code&gt;make speak&lt;/code&gt;, and &lt;code&gt;make dialogue&lt;/code&gt;, all you need locally are &lt;code&gt;uv&lt;/code&gt;, &lt;code&gt;ffmpeg&lt;/code&gt;, and a &lt;strong&gt;&lt;code&gt;GEMINI_API_KEY&lt;/code&gt;&lt;/strong&gt; in your &lt;code&gt;.env&lt;/code&gt; file (created in &lt;a href="https://aistudio.google.com/apikey?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Google AI Studio&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Paid Quota Tier 1&lt;/strong&gt;: One small catch to be aware of — Gemini Voice Replication (&lt;code&gt;gemini-3.8-flash-tts&lt;/code&gt;) requires &lt;strong&gt;Paid Quota Tier 1 or higher&lt;/strong&gt;. That simply means the Google Cloud project behind your AI Studio API key must have a Cloud Billing account linked (if your key is on the unbilled Free Tier, &lt;code&gt;/v1beta/voices&lt;/code&gt; will return &lt;code&gt;403 PERMISSION_DENIED&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cloud Storage is 100% optional&lt;/strong&gt;: Because &lt;code&gt;make create&lt;/code&gt; passes &lt;code&gt;store=True&lt;/code&gt;, the Gemini API &lt;em&gt;already&lt;/em&gt; persists your cloned voice server-side in your Google Cloud project, while &lt;code&gt;voice-rep&lt;/code&gt; saves your alias and &lt;code&gt;voice_...&lt;/code&gt; ID locally in &lt;code&gt;data/voices.json&lt;/code&gt;. The &lt;code&gt;google-cloud-storage&lt;/code&gt; client is only ever touched if you explicitly run &lt;code&gt;make gcs-init&lt;/code&gt; or &lt;code&gt;make sync-push&lt;/code&gt; to back up your master &lt;code&gt;.wav&lt;/code&gt; files to Coldline storage.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  1: Cloning My Voice
&lt;/h3&gt;

&lt;p&gt;To create a persistent cloned voice via the Gemini API's &lt;code&gt;/v1beta/voices&lt;/code&gt; endpoint (&lt;code&gt;client.voices.create()&lt;/code&gt;), we first need two short recordings:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A Reference Audio Clip (10 to 30 seconds)&lt;/strong&gt;: Around 20 to 25 seconds of natural, expressive conversational speech so Gemini can capture your natural cadence, pitch variation, and warmth.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Mandatory Consent Clip&lt;/strong&gt;: A clear recording of the same voice reciting this exact consent phrase: &lt;code&gt;"I am the owner of this voice and I consent to Google using this voice to create a synthetic voice model."&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I recorded these short clips using &lt;a href="https://www.audacityteam.org/" rel="noopener noreferrer"&gt;Audacity&lt;/a&gt; (the free, open-source audio editor) and exported them as standard 16-bit WAV files.&lt;/p&gt;

&lt;p&gt;Now I ran these commands to prepare, create, and (optionally) back up my &lt;code&gt;dazbo&lt;/code&gt; voice:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;make prep-audio &lt;span class="nv"&gt;ALIAS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;dazbo &lt;span class="nv"&gt;SOURCE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;data/raw/dazbo_ref.wav &lt;span class="nv"&gt;CONSENT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;data/raw/dazbo_consent.wav
make create &lt;span class="nv"&gt;ALIAS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;dazbo &lt;span class="nv"&gt;DISPLAY_NAME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"Dazbo Primary"&lt;/span&gt;
make sync-push  &lt;span class="c"&gt;# optional: backs up master WAVs and voices.json to GCS&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;make prep-audio&lt;/code&gt; resamples each recording as required and sends the consent clip to &lt;code&gt;gemini-3.5-transcribe&lt;/code&gt;, verifying a 100% word match against the mandatory statement.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;make create&lt;/code&gt; sends the reference and consent WAVs to &lt;code&gt;client.voices.create()&lt;/code&gt; (&lt;code&gt;store=True&lt;/code&gt;), which creates the persistent cloned voice in our Google Cloud project and saves the returned &lt;code&gt;voice_...&lt;/code&gt; ID to our local &lt;code&gt;voices.json&lt;/code&gt; catalogue under the alias &lt;code&gt;dazbo&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;make sync-push&lt;/code&gt; &lt;em&gt;(optional)&lt;/em&gt; backs up the local &lt;code&gt;voices.json&lt;/code&gt; catalogue and normalised WAV files to Google Cloud Storage if you've configured a backup bucket.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2: Text-to-Speech
&lt;/h3&gt;

&lt;p&gt;To prove the voice works as expected, I tested it against a short Markdown monologue script (&lt;code&gt;examples/monologue.md&lt;/code&gt;):&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Well howdy. You're not listening to Dazbo. You're listening to his voice clone, created using gemini-3.8-flash-tts. In a few minutes, you can create your own voice clone. Enjoy!"&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;
&lt;/blockquote&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;make speak &lt;span class="nv"&gt;ALIAS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;dazbo &lt;span class="nv"&gt;FILE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;examples/monologue.md &lt;span class="nv"&gt;OUT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;output/monologue.mp3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Within a few seconds, &lt;code&gt;output/monologue.mp3&lt;/code&gt; was sitting in &lt;code&gt;output/&lt;/code&gt;. Here is the full flow in action — running the &lt;code&gt;make&lt;/code&gt; commands and playing back the synthesised voice clone:&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/2C-UQWglvxw" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;em&gt;THIS IS SO COOL!&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3: Cloning a Second Voice &amp;amp; Demoing a Two-Person Story — The Great Pie Heist
&lt;/h3&gt;

&lt;p&gt;Once the single-voice demo was proven, my wife Kate wanted to try it too. We recorded her reference and consent clips, ran the exact same &lt;code&gt;make prep-audio&lt;/code&gt; and &lt;code&gt;make create ALIAS=kate DISPLAY_NAME="Kate Primary"&lt;/code&gt; commands, and decided to test building a two-person conversation with our cloned voices in a single Interactions API call.&lt;/p&gt;

&lt;p&gt;Remember at the start of this article when I told you to grab your coffee and your cat? Well, we have two cats: &lt;strong&gt;Leia&lt;/strong&gt; (aka &lt;strong&gt;Laylay&lt;/strong&gt;) and &lt;strong&gt;Mycroft&lt;/strong&gt; (aka &lt;strong&gt;Mikey&lt;/strong&gt;).&lt;/p&gt;

&lt;p&gt;I asked Antigravity to create a 2-minute dialogue script about our kitties, in the required &lt;code&gt;yaml&lt;/code&gt; format. It created this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;gemini-3.8-flash-tts&lt;/span&gt;
&lt;span class="na"&gt;speakers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;Dazbo&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;dazbo&lt;/span&gt;
  &lt;span class="na"&gt;Kate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;kate&lt;/span&gt;
&lt;span class="na"&gt;turns&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;speaker&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Dazbo&lt;/span&gt;
    &lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Honestly, Kate, I think we need to stage a full-scale intervention. I went into the kitchen five minutes ago to grab a coffee, and the crime scene on the counter was just tragic."&lt;/span&gt;
    &lt;span class="na"&gt;style&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"deadpan, amused British storyteller"&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;speaker&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Kate&lt;/span&gt;
    &lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Oh no. Don't tell me. The steak and ale pie?"&lt;/span&gt;
    &lt;span class="na"&gt;style&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"knowing, slightly exasperated but amused"&lt;/span&gt;
  &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;speaker&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Dazbo&lt;/span&gt;
    &lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Reduced to a mere crust, my love. And right next to the tin — not even attempting to flee the scene, mind you — was Laylay. Fast asleep, with flaky pastry crumbs dusted all over her whiskers."&lt;/span&gt;
    &lt;span class="na"&gt;style&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"expressive, conversational, slightly dramatic"&lt;/span&gt;

&lt;span class="c1"&gt;# ... you get the idea! (Full 14-turn script in the repo)
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And then I ran this single command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;make dialogue &lt;span class="nv"&gt;SCRIPT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;data/scripts/laylay_and_mikey.yaml &lt;span class="nv"&gt;OUT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;output/laylay_and_mikey.mp3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;About ten seconds later, the &lt;code&gt;mp3&lt;/code&gt; file popped out. Check it out!&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/zYMSKLJCLKU" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  4: Using Our Cloned Voices Directly in Google AI Studio
&lt;/h3&gt;

&lt;p&gt;That immediately begged the next question: &lt;em&gt;"Now that we've created these voices, can I use them in the Google AI Studio web UI?"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The answer is &lt;strong&gt;yes&lt;/strong&gt;! Remember earlier when I mentioned that the option to &lt;em&gt;create&lt;/em&gt; a cloned voice wasn't showing up in the Google AI Studio UI for me in the UK? Well, because &lt;code&gt;make create&lt;/code&gt; registers voices via the API with &lt;strong&gt;&lt;code&gt;store=True&lt;/code&gt;&lt;/strong&gt;, those voices are saved directly into the Google Cloud project's &lt;strong&gt;Gemini Voices catalogue&lt;/strong&gt; — which means they immediately show up ready to use inside Google AI Studio anyway!&lt;/p&gt;

&lt;p&gt;It's as easy as 1-2-3!&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open &lt;a href="https://aistudio.google.com/generate-speech?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;&lt;code&gt;https://aistudio.google.com/generate-speech&lt;/code&gt;&lt;/a&gt; and &lt;strong&gt;select the GCP project&lt;/strong&gt; where the voices were created.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;&lt;code&gt;+ Create new dialog&lt;/code&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pick Your Cloned Voices under Speaker Settings&lt;/strong&gt;: In the right-hand &lt;strong&gt;Run settings&lt;/strong&gt; panel under &lt;strong&gt;Speaker settings&lt;/strong&gt; (or by clicking the speaker pill on any speech block), open the voice selector. Right at the very top under &lt;strong&gt;Custom voices&lt;/strong&gt; — above all the built-in voices (&lt;code&gt;Bodi&lt;/code&gt;, &lt;code&gt;Lumi&lt;/code&gt;, &lt;code&gt;Sola&lt;/code&gt;, &lt;code&gt;Koda&lt;/code&gt;) — sit &lt;strong&gt;&lt;code&gt;Dazbo Primary&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;Kate Primary&lt;/code&gt;&lt;/strong&gt;!&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fso2lq2sd9k05p0vtuhqf.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fso2lq2sd9k05p0vtuhqf.jpg" alt="Two-Speaker Dialogue Editor in Google AI Studio with Dazbo Primary and Kate Primary" width="800" height="455"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That means we get the best of both worlds: a low-effort, type-and-go local CLI (&lt;code&gt;make speak&lt;/code&gt;, &lt;code&gt;make dialogue&lt;/code&gt;, etc.) for scripted stories, plus Google's native web experience in Google AI Studio whenever we just want to type a quick prompt and hit &lt;strong&gt;Run&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapping Up: Come for the Voice Clones, Stay for the Harness
&lt;/h2&gt;

&lt;p&gt;Building &lt;a href="https://github.com/derailed-dash/voice-replication" rel="noopener noreferrer"&gt;&lt;code&gt;voice-replication&lt;/code&gt;&lt;/a&gt; in a single sitting proved two things for me.&lt;/p&gt;

&lt;p&gt;First, &lt;strong&gt;every layer of the Google Antigravity harness paid for itself&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Global Context (&lt;code&gt;~/.gemini/GEMINI.md&lt;/code&gt; + Skills + MCPs)&lt;/strong&gt; supplied the reusable engineering standards and live Google documentation before I even typed a prompt.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Interactive Discovery (&lt;code&gt;/grill-me&lt;/code&gt; + &lt;code&gt;SPEC.md&lt;/code&gt;)&lt;/strong&gt; resolved the audio normalisation, consent transcription, and Cloud Storage class trade-offs before a line of code was written.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Self-Correcting Execution (&lt;code&gt;LOOPS.md&lt;/code&gt; + TDD + Tier 1 &amp;amp; Tier 2 Gates)&lt;/strong&gt; drove every vertical slice through &lt;code&gt;Red -&amp;gt; Green -&amp;gt; Refactor&lt;/code&gt;, short-circuiting mechanical errors at $0 cost before a stateless Critic verified the rubric.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Second, &lt;strong&gt;you don't need to write any code to try this yourself&lt;/strong&gt;. If you want to clone your own voice, script multi-speaker podcasts, or unlock your custom voices inside Google AI Studio:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Clone the repo&lt;/strong&gt;: Grab &lt;a href="https://github.com/derailed-dash/voice-replication" rel="noopener noreferrer"&gt;&lt;code&gt;derailed-dash/voice-replication&lt;/code&gt;&lt;/a&gt; on GitHub (and drop it a star ⭐ while you're there!).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Record two short clips&lt;/strong&gt;: Record 20 seconds of natural speech and the mandatory consent sentence.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run two commands&lt;/strong&gt;: Run &lt;code&gt;make prep-audio&lt;/code&gt; and &lt;code&gt;make create&lt;/code&gt; — and within a couple of minutes, your voice clone will be ready for both terminal scripting (&lt;code&gt;make speak&lt;/code&gt;, &lt;code&gt;make dialogue&lt;/code&gt;) and the Google AI Studio UI!&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Give it a spin, and let me know in the comments what you end up building (or which family members and pets you end up scripting dialogues about)!&lt;/p&gt;

&lt;h2&gt;
  
  
  Before You Go
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Please share&lt;/strong&gt; 📢 this with anyone that you think will be interested. It might help them, and it really helps me!&lt;/li&gt;
&lt;li&gt;Please &lt;strong&gt;drop some reactions&lt;/strong&gt; ❤️ 🦄 🔥 (you can pick more than one!) and &lt;strong&gt;bookmark&lt;/strong&gt; 🔖 this post!&lt;/li&gt;
&lt;li&gt;Please &lt;strong&gt;leave a comment&lt;/strong&gt; 💬. Interaction is good!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add a star&lt;/strong&gt; ⭐ on my repos!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Follow&lt;/strong&gt; 👉 me here on Dev.to, so you don’t miss my content.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  References and Useful Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/derailed-dash/voice-replication" rel="noopener noreferrer"&gt;Source Code Repository — &lt;code&gt;derailed-dash/voice-replication&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://aistudio.google.com/docs/voice-replication?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Gemini API — Voice Replication Guide&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://aistudio.google.com/docs/speech-generation?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Gemini API — Speech Generation (TTS) Guide&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://aistudio.google.com/docs/voice-design?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Gemini API — Voice Design Guide&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://aistudio.google.com/docs/transcribe?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Gemini API — Audio Transcription (&lt;code&gt;gemini-3.5-transcribe&lt;/code&gt;)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.cloud.google.com/storage/docs/storage-classes?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Google Cloud Storage — Storage Classes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://signals.forwardfuture.com/loop-library/" rel="noopener noreferrer"&gt;The Loop Library&lt;/a&gt; &amp;amp; &lt;a href="https://github.com/Forward-Future/loopy/tree/main/skills/loopy" rel="noopener noreferrer"&gt;&lt;code&gt;loopy&lt;/code&gt; Skill&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/gde/from-vibing-chaos-to-reliable-agents-the-what-why-and-how-of-harness-engineering-4ba0"&gt;From Vibing Chaos to Reliable Agents: The What, Why, and How of Harness Engineering (Part 1)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/gde/loop-engineering-in-the-harness-autonomous-self-correcting-systems-part-2-155e"&gt;Loop Engineering in the Harness: Autonomous, Self-Correcting Systems (Part 2)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/gde/spec-driven-development-for-the-win-disposable-code-living-blueprints-and-building-like-a-boss-2bnn"&gt;Spec-Driven Development For-the-Win: Disposable Code, Living Blueprints, and Building Like a Boss (Part 3)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/gde/skills-sprawl-when-too-much-of-a-good-thing-confuses-your-ai-agent-4nij"&gt;Skills Sprawl: When Too Much of a Good Thing Confuses Your AI Agent&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/gde/meet-the-antigravity-extension-gemini-code-assist-on-steroids-in-whatever-ide-you-love-4p1n"&gt;Meet the Antigravity Extension: Gemini Code Assist on Steroids, in Whatever IDE You Love&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://darrenlester.net" rel="noopener noreferrer"&gt;Dazbo's Portfolio&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>googlecloud</category>
      <category>agenticai</category>
      <category>voicecloning</category>
      <category>gemini</category>
    </item>
    <item>
      <title>Supercharging the Gemini App with Custom MCP Connectors, Skills, and Live GitHub Access</title>
      <dc:creator>Darren "Dazbo" Lester</dc:creator>
      <pubDate>Wed, 04 Nov 2026 02:38:15 +0000</pubDate>
      <link>https://dev.to/gde/supercharging-the-gemini-app-with-custom-mcp-connectors-skills-and-live-github-access-5ccn</link>
      <guid>https://dev.to/gde/supercharging-the-gemini-app-with-custom-mcp-connectors-skills-and-live-github-access-5ccn</guid>
      <description>&lt;p&gt;Howdy friends! If you spend as much time playing with Google’s AI ecosystem as I do, you’re probably jumping between different Google tools frequently. Each tool plays a distinct role in your workflow.&lt;/p&gt;

&lt;p&gt;For me, almost all of my serious work — whether creating applications, building sites, or writing blogs — happens inside &lt;strong&gt;Google Antigravity&lt;/strong&gt;. Empowered with context, skills, and MCP servers, Agy is the agentic harness that knows my expectations, rules, and all of my GitHub repos — including my &lt;code&gt;dazbo-content&lt;/code&gt; writing persona. It's basically my agentic ghost writer!&lt;/p&gt;

&lt;p&gt;But I also use the &lt;strong&gt;Gemini Web App&lt;/strong&gt; (&lt;code&gt;gemini.google.com&lt;/code&gt;) and mobile app as my everyday Swiss Army knife. Whether I'm proofreading a LinkedIn post, planning flights, knocking up a video, or asking Gemini to airbrush a rogue pizza box out of a photo, the Gemini App is always ready in a browser tab.&lt;/p&gt;

&lt;p&gt;There was just one friction point: my GitHub context was not available to the Gemini App. My writing persona, reusable skills, and project docs live inside my public and private GitHub repositories. I wanted the Gemini App to have on-demand access to &lt;em&gt;all&lt;/em&gt; these repos across &lt;em&gt;every&lt;/em&gt; conversation, without manually copy-pasting files like a caveman.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Hang on, Dazbo — doesn’t the Gemini app already have a built-in GitHub connector?”&lt;/p&gt;

&lt;p&gt;“It does indeed.”&lt;/p&gt;

&lt;p&gt;“So you just toggled it on and went to the pub?”&lt;/p&gt;

&lt;p&gt;“If only it were that simple.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;As I quickly discovered, the out-of-the-box GitHub connector in the Gemini web app is not quite what you think it is. Fortunately, Google has added a couple of powerhouse customisation features to the Gemini app: &lt;strong&gt;Custom Model Context Protocol (MCP) Connectors&lt;/strong&gt; and persistent &lt;strong&gt;Skills&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In this article, I’ll disambiguate where the Gemini App fits alongside Google AI Studio and Antigravity, tour the pre-made connectors, see why the native GitHub connector falls short, and walk step-by-step through wiring up GitHub’s managed remote MCP server.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wait — Which Tool Should I Use?
&lt;/h2&gt;

&lt;p&gt;Google drops a lot of products with overlapping capabilities, and their branding can be &lt;em&gt;so much fun&lt;/em&gt; to keep up with. Here is how I use these tools in my own workflows:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8k1052w3bkz1vu3elyhb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8k1052w3bkz1vu3elyhb.png" alt="Google AI Tools Ecosystem" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  1. &lt;a href="https://antigravity.google/?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Google Antigravity&lt;/a&gt; (Antigravity Extension for Your Favourite IDE, Antigravity IDE, &amp;amp; Antigravity CLI)
&lt;/h3&gt;

&lt;p&gt;Antigravity is Google’s agentic development harness. It’s my daily driver for anything I do that is worthy of its own Git repo. This even includes writing blogs and whitepapers.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Google AI Studio (&lt;a href="https://aistudio.google.com?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;aistudio.google.com&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;If you haven’t looked closely at &lt;strong&gt;Google AI Studio&lt;/strong&gt; lately, you might still think of it purely as a prompt playground where you tweak temperature sliders and grab a &lt;code&gt;GEMINI_API_KEY&lt;/code&gt;. It still does that; but here's what else you can do with it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;From the &lt;strong&gt;Playground&lt;/strong&gt;, explore the latest Google models — such as Gemini Argon, Gemini Omni, Nano Banana, TTS, Lyria, Live Translate, and Gemma — and toggle grounding with Google Search or Google Maps.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fp48hqc6stnx2swndm64y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fp48hqc6stnx2swndm64y.png" alt="Model selection in the Playground" width="800" height="660"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Configure models in the UI and open ready-to-execute code snippets in one click. This screenshot shows how easy it is to obtain the code for low-latency real-time audio conversation using &lt;code&gt;gemini-3.8-live&lt;/code&gt;, or open it directly in &lt;a href="https://colab.research.google.com/?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Google Colab&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmpr2fcm1r5be8kl734vq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmpr2fcm1r5be8kl734vq.png" alt="Code snippets from AI Studio" width="800" height="639"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://aistudio.google.com/apps?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;&lt;strong&gt;Build&lt;/strong&gt;&lt;/a&gt; new applications from a prompt.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx5tct1wctcf6fbze99ql.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx5tct1wctcf6fbze99ql.png" alt="Build with AI Studio" width="799" height="345"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Explore the &lt;a href="https://aistudio.google.com/apps?source=showcase&amp;amp;showcaseTag=featured&amp;amp;utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;&lt;strong&gt;Gallery&lt;/strong&gt;&lt;/a&gt; of pre-built agents and applications to use as-is, or &lt;em&gt;remix&lt;/em&gt; into your own apps.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9thrdxv29qbd0aj43hsv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9thrdxv29qbd0aj43hsv.png" alt="Gallery in AI Studio" width="800" height="457"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use the &lt;a href="https://aistudio.google.com/usage?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;&lt;strong&gt;Dashboard&lt;/strong&gt;&lt;/a&gt; to manage API keys, link Google Cloud projects, view model usage, or set hard monthly spend limits.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpl3dczhtjh70h119yzw6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpl3dczhtjh70h119yzw6.png" alt="AI Studio Dashboard" width="798" height="262"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;One-Click &lt;em&gt;Cloud Run&lt;/em&gt; Publishing, GitHub Sync &amp;amp; Direct Export to Antigravity:&lt;/strong&gt; &lt;em&gt;(Tip: If you open a showcase app from the &lt;strong&gt;Gallery&lt;/strong&gt;, it initially opens in read-only mode — click &lt;strong&gt;Remix&lt;/strong&gt; in the top-right corner first to create your own editable copy!)&lt;/em&gt; Once you own the app, click &lt;strong&gt;Publish&lt;/strong&gt; in the top-right header to deploy it straight to Google serverless &lt;strong&gt;Cloud Run&lt;/strong&gt;. And what if that prototype needs serious engineering — maybe an automated test suite? Switch to the &lt;strong&gt;&lt;code&gt;&amp;lt;&amp;gt; Code&lt;/code&gt;&lt;/strong&gt; tab and click &lt;strong&gt;Export&lt;/strong&gt; in the top-right corner to &lt;strong&gt;Push to GitHub&lt;/strong&gt; or click &lt;strong&gt;Export to Antigravity&lt;/strong&gt; to open it directly in &lt;strong&gt;Google Antigravity&lt;/strong&gt;!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1eooh2gks4y8pjay3y6w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F1eooh2gks4y8pjay3y6w.png" alt="Export to Antigravity" width="799" height="438"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So clearly, AI Studio is an amazing way to rapidly build and deploy an application from scratch. But it’s also great for creating a prototype or seeding a project before working on it in Antigravity.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. The Gemini App (&lt;a href="https://gemini.google.com?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;gemini.google.com&lt;/a&gt;) &amp;amp; Mobile App
&lt;/h3&gt;

&lt;p&gt;This is your web-based conversational AI assistant and research workspace. It has no access to your local file system or tools.&lt;/p&gt;

&lt;p&gt;Alongside text chats, you can have real-time voice and live camera/screen-sharing video conversations with your assistant, plus:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Multimodal image, audio &amp;amp; video creation, and in-place editing.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Integration with Google &lt;strong&gt;Gemini Notebook&lt;/strong&gt; (formerly NotebookLM).&lt;/li&gt;
&lt;li&gt;Integration with the &lt;strong&gt;Deep Research Agent&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Integration with &lt;strong&gt;Canvas&lt;/strong&gt;: A side-by-side workspace for co-writing documents and slide decks (with inline tone/length sliders and one-click export to Google Docs or Slides), transforming notes into infographics, quizzes, or Audio Overviews, and live-previewing interactive HTML/React apps and 3D visualisations (or exporting Python scripts to Google Colab).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fl952qjmjttjwf0aous56.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fl952qjmjttjwf0aous56.png" alt="Gemini App" width="800" height="529"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://gemini.google.com/scheduled?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;&lt;strong&gt;Scheduled Actions&lt;/strong&gt;&lt;/a&gt;: Built-in background automation that runs one-off or recurring prompts on a schedule — such as a daily morning tech briefing or weekly project summary.&lt;/li&gt;
&lt;li&gt;Persistent &lt;strong&gt;Skills&lt;/strong&gt;: Install skills into the Gemini App and invoke them explicitly with &lt;code&gt;@&lt;/code&gt; or &lt;code&gt;/&lt;/code&gt;, or implicitly by letting Gemini activate matching skills automatically. Because these use the open &lt;code&gt;SKILL.md&lt;/code&gt; standard, you can share the exact same skill folders with &lt;strong&gt;Google Antigravity&lt;/strong&gt; (or any other coding agent).&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://gemini.google.com/customize/connectors?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;&lt;strong&gt;Connected Apps / Connectors&lt;/strong&gt;&lt;/a&gt;: Links your assistant to first-party Google services (Google Workspace, Gemini Notebook, YouTube Music), over 40 partner integrations (Canva, Adobe, Dropbox, Shopify, monday.com), and custom Model Context Protocol (MCP) servers.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In my own day-to-day workflow, it’s my favourite tool for anything that doesn’t warrant a full IDE workspace, doesn’t need local tools, or doesn’t require a local Git repo. For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Chatting through ideas out loud with Gemini Live on my phone&lt;/li&gt;
&lt;li&gt;Kicking off some Deep Research, perhaps before persisting in a Gemini Notebook&lt;/li&gt;
&lt;li&gt;Proofreading a LinkedIn post&lt;/li&gt;
&lt;li&gt;Building a quick 3D visualisation in Canvas&lt;/li&gt;
&lt;li&gt;Checking on a recent Google product rebrand (yeah — I have to do this a lot)&lt;/li&gt;
&lt;li&gt;Creating photos and videos&lt;/li&gt;
&lt;li&gt;Comparing flight options&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  A Quick Tour of Pre-Made Connectors in the Gemini App
&lt;/h2&gt;

&lt;p&gt;Head to &lt;strong&gt;Settings&lt;/strong&gt; → &lt;strong&gt;Connectors&lt;/strong&gt; to open the &lt;strong&gt;Connected apps&lt;/strong&gt; hub, where Google groups customisations into &lt;strong&gt;Connectors&lt;/strong&gt; and &lt;strong&gt;Skills&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Footn3fer6vb0vx3revoc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Footn3fer6vb0vx3revoc.png" alt="Connectors in the Gemini App" width="800" height="528"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First, take a look at some of the integrations available out of the box:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Google Workspace:&lt;/strong&gt; Read, write, and automate across your Google apps. Draft emails in Gmail, create Google Docs or Sheets, and schedule Calendar events.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Canva:&lt;/strong&gt; Connects to your Canva workspace so you can search your existing Canva folders and designs, generate new presentations or social graphics with your &lt;strong&gt;Brand Kit&lt;/strong&gt;, tweak existing templates, resize assets across channels, and export directly to &lt;code&gt;.pptx&lt;/code&gt;, &lt;code&gt;.pdf&lt;/code&gt;, &lt;code&gt;.png&lt;/code&gt;, or &lt;code&gt;.mp4&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Picsart:&lt;/strong&gt; Connects to Picsart’s creative pipeline, unlocking deterministic utilities that raw generative models don’t natively handle — such as true background removal (to &lt;code&gt;.png&lt;/code&gt; or &lt;code&gt;.webp&lt;/code&gt;), vectorisation for scalable logos and icons, and access to many third-party creative models (like Flux, Ideogram, Recraft, Kling, Runway, and ElevenLabs) right inside your Gemini chat.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Wispr:&lt;/strong&gt; Connect to your Wispr Flow desktop meeting recorder. Let Gemini search your recorded meeting transcripts, scratchpad notes, and action items by participant or date — so you can ask &lt;em&gt;“What did I commit to in yesterday’s architecture sync?”&lt;/em&gt; without ever inviting a creepy third-party recording bot into your calls.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;em&gt;“Import code from public or private repositories, and ask questions about it.”&lt;/em&gt; (More on this shortly!)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why I Want GitHub Access in Every Gemini Conversation
&lt;/h2&gt;

&lt;p&gt;Everything I build and write in Antigravity lives in GitHub. Not just code and applications, but my article drafts, and presentations too. I keep much of my AI configuration, harness and writing persona in a private GitHub repo.&lt;/p&gt;

&lt;p&gt;So when I’m in the Gemini App or on my phone, I want to say things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;“Proofread this LinkedIn post using my &lt;code&gt;dazbo-content&lt;/code&gt; style guide.”&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;“Review this Medium draft against my style guide rules.”&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;“Which public repos have I updated this month?”&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;“How did I structure the ADK evaluation loop in &lt;code&gt;harness-engineering-demo&lt;/code&gt;?”&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why the Out-of-the-Box GitHub Connector Is No Good
&lt;/h2&gt;

&lt;p&gt;When you see &lt;strong&gt;GitHub&lt;/strong&gt; in the &lt;strong&gt;Installed&lt;/strong&gt; list, you might assume enabling it gives Gemini tool access to query your GitHub repos on demand. It doesn’t!&lt;/p&gt;

&lt;p&gt;It’s &lt;strong&gt;not&lt;/strong&gt; an agentic tool integration. It is a manual &lt;strong&gt;static context importer&lt;/strong&gt; attached to the &lt;strong&gt;&lt;code&gt;+&lt;/code&gt;&lt;/strong&gt; button in the chat bar (&lt;strong&gt;&lt;code&gt;+&lt;/code&gt;&lt;/strong&gt; → &lt;strong&gt;More uploads&lt;/strong&gt; → &lt;strong&gt;Import code&lt;/strong&gt;). It has some limitations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Manual Per-Chat Uploads:&lt;/strong&gt; You must paste a repo URL into a single chat. Start a new chat tomorrow? Import it again.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero Cross-Repo Discovery:&lt;/strong&gt; Gemini cannot list your repos or search for files across your account.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No Live Git Intelligence:&lt;/strong&gt; It only ingests a static file snapshot — no commits, PRs, Actions runs, or issues.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Single-Repo Tunnel Vision:&lt;/strong&gt; Mid-conversation, it cannot hop to another repo to check a config file or skill.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0zkc99bsasviqgua7xuh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0zkc99bsasviqgua7xuh.png" alt="GitHub Connector vs Custom MCP Server" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Enter the GitHub Remote MCP Server
&lt;/h2&gt;

&lt;p&gt;To get on-demand agentic access across all of our repositories in &lt;em&gt;every&lt;/em&gt; chat, we can use &lt;strong&gt;GitHub’s managed remote MCP server&lt;/strong&gt; (&lt;code&gt;https://api.githubcopilot.com/mcp/&lt;/code&gt;) configured as a &lt;strong&gt;Custom Connector&lt;/strong&gt;. This server exposes GitHub's capabilities to any AI agent, such as the Gemini App.&lt;/p&gt;

&lt;p&gt;Better still, GitHub lets us control which toolsets are exposed — and whether Gemini has &lt;strong&gt;read-write&lt;/strong&gt; or strictly &lt;strong&gt;read-only&lt;/strong&gt; access — simply via the URL path:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Default Toolset — Read-Only (&lt;code&gt;https://api.githubcopilot.com/mcp/readonly&lt;/code&gt;):&lt;/strong&gt; &lt;em&gt;(Recommended)&lt;/em&gt; Safe cross-repo exploration, reading private files/skills, code search, and PR/commit analysis with zero mutation risk.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Default Toolset — Read/Write (&lt;code&gt;https://api.githubcopilot.com/mcp/&lt;/code&gt;):&lt;/strong&gt; Workflows where you also want Gemini to create issues, branches, or PRs directly from chat.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I use &lt;code&gt;https://api.githubcopilot.com/mcp/readonly&lt;/code&gt; so Gemini can read &lt;em&gt;anything&lt;/em&gt; across my public and private repos without any risk of a stray prompt pushing a commit or closing an issue.&lt;/p&gt;

&lt;h2&gt;
  
  
  How OAuth 2.0 Works Between Gemini and GitHub
&lt;/h2&gt;

&lt;p&gt;Because both the Gemini App and the GitHub MCP server live in the cloud, we don’t want to paste our Personal Access Token (PAT) into our chat. Instead, the Gemini App authenticates with GitHub on your behalf using standard &lt;strong&gt;OAuth 2.0&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In a typical OAuth setup between an AI client (like Gemini) and a service provider (like GitHub), there are three pieces of configuration:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Client ID &amp;amp; Client Secret:&lt;/strong&gt; Obtained by registering an &lt;strong&gt;OAuth App&lt;/strong&gt; in your GitHub Developer Settings. This gives your Gemini connector its own dedicated identity and lets you revoke access at any time with a single click.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Authorization Callback (Redirect) URI:&lt;/strong&gt; The exact URL inside the client application where GitHub is allowed to send you back (along with a temporary authorisation code) after you click &lt;strong&gt;Authorize&lt;/strong&gt;. For security, GitHub strictly validates that the redirect URI requested during login matches the callback URL registered on your GitHub OAuth App.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To set this up, keep &lt;strong&gt;Gemini&lt;/strong&gt; and &lt;strong&gt;GitHub&lt;/strong&gt; open in two browser tabs: start in the Gemini App to copy the Redirect URI, paste it into GitHub to register your OAuth App, and then copy the resulting Client ID and Secret back into Gemini.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step-by-Step: Adding the Custom GitHub MCP Connector
&lt;/h2&gt;

&lt;p&gt;Let’s wire it up. We’ll create a dedicated OAuth App in GitHub specifically for our Gemini connector.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Open the Custom MCP Modal in Gemini and Grab the Redirect URI
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Go to &lt;strong&gt;Settings&lt;/strong&gt; → &lt;strong&gt;Connectors&lt;/strong&gt; (&lt;a href="https://gemini.google.com/customize/connectors?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;gemini.google.com/customize/connectors&lt;/a&gt;) and click &lt;strong&gt;&lt;code&gt;+ Custom&lt;/code&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Paste &lt;code&gt;https://api.githubcopilot.com/mcp/readonly&lt;/code&gt; into &lt;strong&gt;MCP server URL&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Additional settings&lt;/strong&gt; → &lt;strong&gt;Show more&lt;/strong&gt;, then click &lt;strong&gt;Copy redirect URI&lt;/strong&gt; underneath &lt;strong&gt;Client ID&lt;/strong&gt; and &lt;strong&gt;Client secret&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fq53gp68fw4hzcprcq2k3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fq53gp68fw4hzcprcq2k3.png" alt="Connect custom MCP Server in Gemini App" width="800" height="549"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This will generate a unique callback URI bound to your Google User ID:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://oauth-redirect.googleusercontent.com/r/user_bound_custom-mcp-&amp;lt;YOUR_GOOGLE_USER_ID&amp;gt;-api_githubcopilot_com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Step 2: Register Your Dedicated OAuth App in GitHub
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;In GitHub, go to &lt;strong&gt;Settings&lt;/strong&gt; → &lt;strong&gt;Developer settings&lt;/strong&gt; → &lt;strong&gt;OAuth Apps&lt;/strong&gt; (&lt;a href="https://github.com/settings/developers" rel="noopener noreferrer"&gt;github.com/settings/developers&lt;/a&gt;) and click &lt;strong&gt;New OAuth App&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Set &lt;strong&gt;Application name&lt;/strong&gt; to &lt;code&gt;Gemini MCP Connector&lt;/code&gt; and &lt;strong&gt;Homepage URL&lt;/strong&gt; to &lt;code&gt;https://gemini.google.com&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Paste the exact &lt;code&gt;https://oauth-redirect.googleusercontent.com/r/user_bound_custom-mcp-...&lt;/code&gt; URI into &lt;strong&gt;Authorization callback URL&lt;/strong&gt; and click &lt;strong&gt;Register application&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Copy your &lt;strong&gt;Client ID&lt;/strong&gt;, and click &lt;strong&gt;Generate a new client secret&lt;/strong&gt; to copy your &lt;strong&gt;Client Secret&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Be sure to &lt;strong&gt;Save&lt;/strong&gt; (or Update) the App in GitHub.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Step 3: Complete the OAuth Handshake in Gemini
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Return to the &lt;strong&gt;Connect to an MCP server&lt;/strong&gt; dialog in Gemini, paste your &lt;strong&gt;Client ID&lt;/strong&gt; and &lt;strong&gt;Client Secret&lt;/strong&gt;, and click &lt;strong&gt;Next&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Authorize&lt;/strong&gt; in the GitHub OAuth popup.&lt;/li&gt;
&lt;li&gt;Accept the privacy policy.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw515bj0zh9hkpdzody95.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw515bj0zh9hkpdzody95.png" alt="Authorize Custom GitHub MCP Server" width="800" height="475"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally, click &lt;strong&gt;Connect&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Once redirected back, &lt;strong&gt;GitHub MCP Server&lt;/strong&gt; appears under &lt;strong&gt;Custom apps&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw9actpsgheai6bwrpna9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw9actpsgheai6bwrpna9.png" alt="Custom GitHub MCP Server connected" width="800" height="442"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing It Live: Querying Repositories and Loading My Persona
&lt;/h2&gt;

&lt;p&gt;In a new Gemini chat, ask a question that needs GitHub access, or tag &lt;strong&gt;&lt;code&gt;@GitHub MCP Server&lt;/code&gt;&lt;/strong&gt; from the &lt;code&gt;@&lt;/code&gt; menu. For example, when I ran &lt;em&gt;List my public GitHub repos please&lt;/em&gt;, Gemini queried the live MCP server and rendered a table of all 33 of my public repositories:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fd9nznielsprhg74foqcg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fd9nznielsprhg74foqcg.png" alt="Asking Gemini App to list my repos" width="800" height="593"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then I can ask something like: &lt;em&gt;“Load my &lt;code&gt;seo-audit&lt;/code&gt; skill from my &lt;code&gt;dazbo-config&lt;/code&gt; repo.”&lt;/em&gt; Gemini loads the skill from my private repo and lets me know we're ready to use it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F842n5fz21wrhi49i2xup.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F842n5fz21wrhi49i2xup.png" alt="Perform SEO audit using a skill from Gemini App" width="800" height="743"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Easy peasy!&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapping Up
&lt;/h2&gt;

&lt;p&gt;Antigravity, AI Studio and the Gemini App are all Google AI tools, but they serve different purposes in my daily workflows.&lt;/p&gt;

&lt;p&gt;By wiring &lt;strong&gt;GitHub’s managed remote MCP server&lt;/strong&gt; into the Gemini App’s &lt;strong&gt;Custom Connectors&lt;/strong&gt; and pairing it with persistent &lt;strong&gt;Gemini Skills&lt;/strong&gt;, &lt;code&gt;gemini.google.com&lt;/code&gt; evolves from an isolated chat tab into a context-aware workspace. It is connected to my public and private repos, personal docs, and my own style guides and codified persona.&lt;/p&gt;

&lt;p&gt;Give it a go, and let me know in the comments what custom MCP servers and skills you are wiring into your Gemini App!&lt;/p&gt;

&lt;h2&gt;
  
  
  Before You Go
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Please share&lt;/strong&gt; 📢 this with anyone that you think will be interested. It might help them, and it really helps me!&lt;/li&gt;
&lt;li&gt;Please &lt;strong&gt;drop some reactions&lt;/strong&gt; ❤️ 🦄 🔥 (you can pick more than one!) and &lt;strong&gt;bookmark&lt;/strong&gt; 🔖 this post!&lt;/li&gt;
&lt;li&gt;Please &lt;strong&gt;leave a comment&lt;/strong&gt; 💬. Interaction is good!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add a star&lt;/strong&gt; ⭐ on my repos!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Follow&lt;/strong&gt; 👉 me here on Dev.to, so you don’t miss my content.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  References and Useful Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://gemini.google.com/customize/connectors?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Gemini Web App — Connected Apps&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://gemini.google.com/customize/skills?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Gemini Web App — Persistent Skills&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.cloud.google.com/gemini/enterprise/docs/connectors/custom-mcp-server/set-up-custom-mcp-server?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Google Cloud Docs: Set Up a Custom MCP Server Connector&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.github.com/en/copilot/how-tos/provide-context/use-mcp/use-the-github-mcp-server" rel="noopener noreferrer"&gt;GitHub Docs: Using the GitHub Remote MCP Server&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ai.google.dev/gemini-api/docs/ai-studio-quickstart?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Google AI Studio Quickstart&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ai.google.dev/gemini-api/docs/aistudio-build-mode?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Google AI Studio Build Mode&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://ai.google.dev/gemini-api/docs/logs-datasets?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Google AI Studio — Logs and Datasets&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://antigravity.google/docs/sdk/overview?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Google Antigravity Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/gde/dialling-our-agents-to-11-my-favourite-mcp-servers-3hbm"&gt;Dialling Our Agents to 11: My Favourite MCP Servers&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/gde/dialling-our-agents-to-11-agent-skills-you-need-to-be-using-2o2k"&gt;Dialling Our Agents to 11: Agent Skills You Need to be Using!&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://medium.com/google-cloud/skills-sprawl-when-too-much-of-a-good-thing-bloats-your-ai-agent-167f907e9dc2" rel="noopener noreferrer"&gt;Skills Sprawl: When Too Much of a Good Thing Confuses Your AI Agent&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://medium.com/google-cloud/meet-the-antigravity-extension-gemini-code-assist-on-steroids-33367e5a037c" rel="noopener noreferrer"&gt;Meet the Antigravity Extension: Gemini Code Assist on Steroids&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dazbo.co.uk" rel="noopener noreferrer"&gt;Dazbo’s Portfolio&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>mcpserver</category>
      <category>gemini</category>
      <category>googleaistudio</category>
      <category>github</category>
    </item>
    <item>
      <title>Spec-Driven Development For-the-Win: Disposable Code, Living Blueprints, and Building Like a Boss</title>
      <dc:creator>Darren "Dazbo" Lester</dc:creator>
      <pubDate>Tue, 20 Oct 2026 10:28:53 +0000</pubDate>
      <link>https://dev.to/gde/spec-driven-development-for-the-win-disposable-code-living-blueprints-and-building-like-a-boss-2bnn</link>
      <guid>https://dev.to/gde/spec-driven-development-for-the-win-disposable-code-living-blueprints-and-building-like-a-boss-2bnn</guid>
      <description>&lt;p&gt;&lt;em&gt;Part 3 of the series "Beyond Vibe Coding: The Engineering Blueprint for Reliable AI Agents"&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;h3&gt;
  
  
  🗺️ The Series Roadmap: Beyond Vibe Coding
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Agentic software development is drowning in fragmented buzzwords: Harness Engineering, Loop Engineering, Context Engineering, Spec-Driven Development, Evaluators, and Sandboxes. Are they competing frameworks? Redundant prompt techniques? Or something fundamentally new?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This five-part series unifies these concepts into one cohesive architectural blueprint for building production software with AI without writing code manually:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Part 1:&lt;/strong&gt; &lt;a href="https://dev.to/gde/from-vibing-chaos-to-reliable-agents-the-what-why-and-how-of-harness-engineering-4ba0"&gt;&lt;strong&gt;From Vibing Chaos to Reliable Agents: The What, Why, and How of Harness Engineering&lt;/strong&gt;&lt;/a&gt;
We diagnose the hangover of vibe coding, unpack the paradigm shift of &lt;em&gt;shifting developer interventions left&lt;/em&gt;, establish our bedrock formula (&lt;strong&gt;Agent = Model + Harness&lt;/strong&gt;), explore the Lewis Hamilton motorsport analogy, and deconstruct the deterministic components that make up a production developer environment.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Part 2:&lt;/strong&gt; &lt;a href="https://dev.to/gde/loop-engineering-in-the-harness-autonomous-self-correcting-systems-part-2-155e"&gt;&lt;strong&gt;Loop Engineering in the Harness: Autonomous, Self-Correcting Systems&lt;/strong&gt;&lt;/a&gt;
We fire up the dynamic runtime engine of the harness: deconstructing the core loop components, establishing hybrid evaluation rubrics (deterministic tests + LLM goal fidelity + tool trajectory verification), and applying the Ratchet Principle.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Part 3: Spec-Driven Development For-the-Win: Disposable Code, Living Blueprints, and Building Like a Boss (This Article)&lt;/strong&gt;
We explore Spec-Driven Development (where code is disposable and specifications are the single source of truth), master Google Antigravity's unified harness and interactive slash commands (&lt;code&gt;/grill-me&lt;/code&gt;, &lt;code&gt;/plan&lt;/code&gt;, &lt;code&gt;/goal&lt;/code&gt;, &lt;code&gt;/boost&lt;/code&gt;, &lt;code&gt;/learn&lt;/code&gt;), and combine formal specs on disk with autonomous tactical workflows in your session.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Part 4: Inner Loops in Practice: Fresh Contexts, Output Discipline, and Day-1 Loops (Coming Soon)&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Part 4:&lt;/strong&gt; &lt;a href="https://dev.to/gde/inner-loops-in-practice-fresh-contexts-output-discipline-and-day-1-loops-416d"&gt;&lt;strong&gt;Inner Loops in Practice: Fresh Contexts, Output Discipline, and Day-1 Loops&lt;/strong&gt;&lt;/a&gt;
We go under the hood of an inner execution loop to see why looping runs faster and cheaper than single-pass vibing (fresh subagent contexts, &lt;code&gt;LIVING_MEMORY.md&lt;/code&gt;, and strict output discipline), then wire day-one loops into any repository using declarative Markdown, tiered rubrics, &lt;code&gt;loopy&lt;/code&gt;, and Antigravity slash commands.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Part 5: Completing the AI Harness: Headless CI Loops, ADK Graphs, and Self-Improving Harnesses (Coming Soon)&lt;/strong&gt;
We scale up to unattended headless execution (Antigravity CLI, Python SDK, Remote Agent) and custom Google ADK &lt;code&gt;LoopAgent&lt;/code&gt; / ADK 2.0 &lt;code&gt;Workflow&lt;/code&gt; graphs, close the outer meta-loop with self-improving harnesses (&lt;code&gt;EXPERIENCE.md&lt;/code&gt;), and tie every concept together in a Monday-morning repo checklist.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Fuel for the Engine: Replacing Vibes with Verified Intent
&lt;/h2&gt;

&lt;p&gt;In &lt;a href="https://dev.to/gde/from-vibing-chaos-to-reliable-agents-the-what-why-and-how-of-harness-engineering-4ba0"&gt;Part 1&lt;/a&gt;, we used the race car analogy for the agentic harness and built the deterministic chassis. In &lt;a href="https://dev.to/gde/loop-engineering-in-the-harness-autonomous-self-correcting-systems-part-2-155e"&gt;Part 2&lt;/a&gt;, we built the powertrain: the autonomous execution loop, hybrid evaluation rubrics, and the Ratchet Principle.&lt;/p&gt;

&lt;p&gt;Crucially, in Part 2 we established a foundational architectural discipline: &lt;strong&gt;decoupling reusable engineering guardrails from the task specification.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We centralised the "how we build" — coding standards, test-driven development mandates, security constraints, and automated linting rules — into persistent workspace context (&lt;code&gt;GEMINI.md&lt;/code&gt;, &lt;code&gt;AGENTS.md&lt;/code&gt;) and Agent Skills. That gave our loop its invariant engineering discipline.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;So what fuels the loop? What defines "what we build"?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8vnuypxfye8k95nom15m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8vnuypxfye8k95nom15m.png" alt="Fuelling the Developer Harness" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you pair rigorous engineering guardrails with vague, casual chat prompts and hand-waving, you won't get quality software. You'll get AI slop at 50 tokens a second.&lt;/p&gt;

&lt;p&gt;This is where &lt;strong&gt;Spec-Driven Development (SDD)&lt;/strong&gt; enters the frame. As Google Developer Advocate Lee Boonstra brilliantly captured in her whitepaper &lt;a href="https://www.kaggle.com/whitepaper-spec-driven-production-grade-development-in-the-age-of-vibe-coding?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;&lt;em&gt;Spec-Driven Production Grade Development in the Age of Vibe Coding&lt;/em&gt;&lt;/a&gt;, formalising the task into a structured, testable specification transforms a slop generator into a precision instrument.&lt;/p&gt;

&lt;p&gt;It also unlocks a fundamental architectural shift: &lt;strong&gt;code is disposable, but specifications are the permanent source of truth.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3nmjjilfcw60khgnsy03.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3nmjjilfcw60khgnsy03.png" alt="The Architectural Shift: Permanent Living Specifications vs Disposable Generated Code" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Because your engineering context, linters, and evaluation rubrics already govern quality, the generated source code is merely an ephemeral byproduct. If business requirements change or an implementation runs down an architectural blind alley, you don't spend days manually untangling spaghetti code. Your standing guardrails stay untouched; you sharpen the task specification, and let your harness regenerate a clean solution from first principles.&lt;/p&gt;

&lt;p&gt;In &lt;a href="https://arxiv.org/abs/2602.08111" rel="noopener noreferrer"&gt;&lt;em&gt;Spec-Driven Development for Agentic Software Engineering: Harnessing Human-Agent Teamwork&lt;/em&gt;&lt;/a&gt;, researchers demonstrated that unconstrained conversational agents inevitably suffer from &lt;strong&gt;compounding specification drift&lt;/strong&gt; — a phenomenon where tiny misunderstandings compound across successive turns. Without a fixed specification, it is virtually guaranteed that the final output will drift away from your architectural intent.&lt;/p&gt;

&lt;p&gt;SDD eliminates this drift by introducing immutable contract checkpoints at every phase, keeping the agent firmly on the rails instead of letting it wander off into the weeds.&lt;/p&gt;

&lt;p&gt;For years, the industry swung between two dysfunctional extremes: either spending months drafting bloated, upfront documentation that was obsolete before deployment, or weaponising a poor understanding of "agile" to jump straight into code with zero planning.&lt;/p&gt;

&lt;p&gt;SDD finally closes that gap. Iterating on a half-page specification with an AI partner takes five minutes. The harness then builds and verifies the code in the sandbox in ninety seconds. You inspect working software, get instant empirical feedback, update the contract, and loop. It delivers the deep architectural rigour that enterprises require, at the blistering feedback cadence that agile was always supposed to deliver.&lt;/p&gt;

&lt;p&gt;In other words, &lt;strong&gt;SDD plus an agent takes genuine agile principles to their logical conclusion&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The SDD Lifecycle as a Continuous Loop
&lt;/h2&gt;

&lt;p&gt;In an agentic workflow, clear documentation isn't cumbersome ceremony — &lt;strong&gt;it is a superpower&lt;/strong&gt;. Spec-Driven Development is emphatically not a rigid, 200-page document that gathers dust in an enterprise SharePoint graveyard. It is a continuous, living lifecycle that evolves in near real-time alongside the codebase.&lt;/p&gt;

&lt;p&gt;Let's take a look at the SDD lifecycle:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw5rzd7or5j94h5xoeqd9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw5rzd7or5j94h5xoeqd9.png" alt="SDD Lifecycle" width="688" height="684"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Don't let the formal diagram labels fool you into thinking this is a return to heavyweight waterfall processes. In an agentic workflow, &lt;strong&gt;Steps 1, 2, and 3 happen collaboratively in minutes&lt;/strong&gt; — often in a single conversational exchange — to produce that concise living blueprint:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Scope &amp;amp; Edge Discovery (The WHAT):&lt;/strong&gt; A quick dialogue pinning down user intent, non-goals, and boundary conditions. No 50-page PRD; just conversational clarity on what's in scope and what's out.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Interface Contracts &amp;amp; Boundaries (The HOW):&lt;/strong&gt; Nailing down the API shape, schema constraints, and Operational Boundaries (&lt;em&gt;Always Do&lt;/em&gt;, &lt;em&gt;Ask First&lt;/em&gt;, &lt;em&gt;Never Do&lt;/em&gt;) before authoring implementation code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Acceptance Criteria &amp;amp; Test Scenarios (The PROOF):&lt;/strong&gt; Declaring how success will be proven — a few lines of Gherkin or a failing test stub — giving the agent an unambiguous finish line.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automated Code Generation:&lt;/strong&gt; The agent consumes the living specification within the sandboxed harness, generating implementation code constrained strictly by the contracts and boundaries agreed in steps 1 to 3.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Testing &amp;amp; Continuous Validation:&lt;/strong&gt; Automated test runners execute unit, integration, and static analysis suites directly against the test specification. Simple code defects are patched by Part 2's inner execution loop, while discovered requirement gaps loop straight back to refine the living spec.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Concrete Artifact: A Production Spec Blueprint (&lt;code&gt;tasks/plan.md&lt;/code&gt;)
&lt;/h2&gt;

&lt;p&gt;What does a real specification look like when fed into an agentic harness?&lt;/p&gt;

&lt;p&gt;It should not be an informal prompt. It is a structured, version-controlled markdown artifact living directly in your repository.&lt;/p&gt;

&lt;p&gt;Here is a &lt;strong&gt;reference blueprint of a production &lt;code&gt;tasks/plan.md&lt;/code&gt; specification&lt;/strong&gt; for a cloud service (in this case, an audit event logger backed by Cloud Spanner):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;# Implementation Spec: Cloud Spanner Audit Event Logger
&lt;/span&gt;
&lt;span class="gu"&gt;## 1. Architectural Scope &amp;amp; Contracts
&lt;/span&gt;
&lt;span class="k"&gt;- &lt;/span&gt;&lt;span class="gs"&gt;**Component:**&lt;/span&gt; &lt;span class="sb"&gt;`AuditEventLogger`&lt;/span&gt; service in &lt;span class="sb"&gt;`services/audit_logger.py`&lt;/span&gt;
&lt;span class="k"&gt;- &lt;/span&gt;&lt;span class="gs"&gt;**Persistence:**&lt;/span&gt; Cloud Spanner table &lt;span class="sb"&gt;`audit_events`&lt;/span&gt; (Schema: &lt;span class="sb"&gt;`event_id STRING(36)`&lt;/span&gt;, &lt;span class="sb"&gt;`timestamp TIMESTAMP`&lt;/span&gt;, &lt;span class="sb"&gt;`actor STRING(128)`&lt;/span&gt;, &lt;span class="sb"&gt;`action STRING(64)`&lt;/span&gt;, &lt;span class="sb"&gt;`payload JSON`&lt;/span&gt;)
&lt;span class="k"&gt;- &lt;/span&gt;&lt;span class="gs"&gt;**Transport:**&lt;/span&gt; Async gRPC client via &lt;span class="sb"&gt;`google-cloud-spanner`&lt;/span&gt; Python SDK

&lt;span class="gu"&gt;## 2. Three-Tier Operational Boundaries
&lt;/span&gt;
&lt;span class="gu"&gt;### Always Do
&lt;/span&gt;
&lt;span class="k"&gt;- &lt;/span&gt;Enforce strict typing on all method signatures using PEP 585 standard types.
&lt;span class="k"&gt;- &lt;/span&gt;Ensure all database writes use Spanner Mutation batches (&lt;span class="sb"&gt;`spanner.insert_or_update`&lt;/span&gt;) rather than ad-hoc DML statements.
&lt;span class="k"&gt;- &lt;/span&gt;Run &lt;span class="sb"&gt;`uvx ruff check --fix .`&lt;/span&gt; and &lt;span class="sb"&gt;`uvx codespell -s`&lt;/span&gt; after any file modification.
&lt;span class="k"&gt;- &lt;/span&gt;Practice TDD: author failing test in &lt;span class="sb"&gt;`tests/test_audit_logger.py`&lt;/span&gt; before touching service code.

&lt;span class="gu"&gt;### Ask First (Human Verification Required)
&lt;/span&gt;
&lt;span class="k"&gt;- &lt;/span&gt;Adding any new third-party Python dependency to &lt;span class="sb"&gt;`pyproject.toml`&lt;/span&gt;.
&lt;span class="k"&gt;- &lt;/span&gt;Modifying Spanner DDL or altering table schemas.
&lt;span class="k"&gt;- &lt;/span&gt;Proposing changes to the shared gRPC authentication interceptor.

&lt;span class="gu"&gt;### Never Do
&lt;/span&gt;
&lt;span class="k"&gt;- &lt;/span&gt;Never hardcode service account keys, project IDs, or credentials; rely strictly on Application Default Credentials (ADC).
&lt;span class="k"&gt;- &lt;/span&gt;Never execute inline &lt;span class="sb"&gt;`python -c`&lt;/span&gt; snippets in terminal sessions.
&lt;span class="k"&gt;- &lt;/span&gt;Never catch generic &lt;span class="sb"&gt;`Exception`&lt;/span&gt; without re-raising or logging with structured traceback.

&lt;span class="gu"&gt;## 3. Phased Vertical Decomposition
&lt;/span&gt;
&lt;span class="k"&gt;- &lt;/span&gt;[ ] &lt;span class="gs"&gt;**Phase 1: Domain Models &amp;amp; Test Scaffolding**&lt;/span&gt;
  &lt;span class="k"&gt;- &lt;/span&gt;Define &lt;span class="sb"&gt;`AuditEvent`&lt;/span&gt; Pydantic / dataclass model in &lt;span class="sb"&gt;`models/audit.py`&lt;/span&gt;.
  &lt;span class="k"&gt;- &lt;/span&gt;Author unit test mocking Spanner database client in &lt;span class="sb"&gt;`tests/test_audit_logger.py`&lt;/span&gt;.
  &lt;span class="k"&gt;- &lt;/span&gt;*Verification:* &lt;span class="sb"&gt;`uv run pytest tests/test_audit_logger.py`&lt;/span&gt; runs and fails with &lt;span class="sb"&gt;`NotImplementedError`&lt;/span&gt;.

&lt;span class="k"&gt;- &lt;/span&gt;[ ] &lt;span class="gs"&gt;**Phase 2: Service Implementation &amp;amp; Batch Mutations**&lt;/span&gt;
  &lt;span class="k"&gt;- &lt;/span&gt;Implement &lt;span class="sb"&gt;`log_event()`&lt;/span&gt; and &lt;span class="sb"&gt;`log_batch()`&lt;/span&gt; methods in &lt;span class="sb"&gt;`services/audit_logger.py`&lt;/span&gt;.
  &lt;span class="k"&gt;- &lt;/span&gt;Implement transient backoff retry logic for &lt;span class="sb"&gt;`Aborted`&lt;/span&gt; and &lt;span class="sb"&gt;`DeadlineExceeded`&lt;/span&gt; Spanner errors.
  &lt;span class="k"&gt;- &lt;/span&gt;*Verification:* &lt;span class="sb"&gt;`uv run pytest tests/test_audit_logger.py`&lt;/span&gt; passes 100%.

&lt;span class="k"&gt;- &lt;/span&gt;[ ] &lt;span class="gs"&gt;**Phase 3: Static Analysis &amp;amp; Hygiene**&lt;/span&gt;
  &lt;span class="k"&gt;- &lt;/span&gt;Execute static analysis and spellcheck suite.
  &lt;span class="k"&gt;- &lt;/span&gt;*Verification:* Zero warnings from &lt;span class="sb"&gt;`ruff`&lt;/span&gt; and &lt;span class="sb"&gt;`codespell`&lt;/span&gt;.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice the power of the &lt;strong&gt;operational boundaries&lt;/strong&gt; (&lt;em&gt;Always Do&lt;/em&gt;, &lt;em&gt;Ask First&lt;/em&gt;, &lt;em&gt;Never Do&lt;/em&gt;). This is where harness engineering neutralises the wild unpredictability of vibe coding. The agent knows exactly where it has autonomous authority (writing tests, formatting code) and where it must yield control to the human conductor (modifying schemas, adding dependencies).&lt;/p&gt;

&lt;h3&gt;
  
  
  What vs How: The Two Layers of a Living Specification
&lt;/h3&gt;

&lt;p&gt;Now, is a single technical plan like our Spanner blueprint the only way to frame a specification? Definitely not.&lt;/p&gt;

&lt;p&gt;In production engineering, specifications often operate across two complementary layers:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The Functional Specification (&lt;code&gt;spec.md&lt;/code&gt; — The "WHAT" &amp;amp; "WHY"):&lt;/strong&gt; User-centric and technology-agnostic. It defines the business goals, persona expectations, explicit non-goals (what the agent must &lt;em&gt;not&lt;/em&gt; build, preventing scope creep), and verifiable acceptance criteria. It deliberately avoids mentioning specific Python classes, database drivers, or file paths.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Technical Implementation Plan (&lt;code&gt;plan.md&lt;/code&gt; — The "HOW"):&lt;/strong&gt; Codebase-aware and execution-focused. It translates the functional spec into concrete file impact maps (which files to create, edit, or delete), data schemas, library dependencies with explicit versions, and ordered task checklists.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Our Spanner example above is a &lt;strong&gt;compact technical execution plan&lt;/strong&gt; — bundling architectural scope, operational boundaries, and phased vertical slices into a single actionable file for the loop.&lt;/p&gt;

&lt;p&gt;The Three-Tier Boundaries (&lt;em&gt;Always Do&lt;/em&gt;, &lt;em&gt;Ask First&lt;/em&gt;, &lt;em&gt;Never Do&lt;/em&gt;) represent a key operational pattern within that plan: they govern the agent's blast radius and autonomy envelope. As we'll explore in the next section, these boundaries can live directly inside a task plan, or be codified globally as a non-negotiable project constitution.&lt;/p&gt;

&lt;h3&gt;
  
  
  Spec Anatomy: Token Physics and Behaviour-Driven Contracts
&lt;/h3&gt;

&lt;p&gt;When crafting a specification, two practical disciplines make the difference between an agent that drifts and one that executes with surgical precision:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Token Physics &amp;amp; Formatting Science (The Hybrid Markdown + YAML Rule):&lt;/strong&gt; Large language models do not interpret abstract data structures; they process tokenised text. In recent agent compilation research (such as the &lt;em&gt;SkCC&lt;/em&gt; study highlighted in Lee Boonstra's whitepaper), LLM agents suffered up to a &lt;strong&gt;40% performance drop&lt;/strong&gt; when fed generic, unoptimised Markdown documents. For Gemini models, the sweet spot is &lt;strong&gt;Hybrid Markdown + Conditional YAML&lt;/strong&gt;. Use clean Markdown headers (&lt;code&gt;#&lt;/code&gt;, &lt;code&gt;##&lt;/code&gt;) to anchor broad system context and global narrative instructions. Meanwhile, render structured configuration, data contracts, and entity schemas (especially with nesting depth &amp;gt; 3) in &lt;strong&gt;flat, compact YAML&lt;/strong&gt; rather than verbose JSON or XML. YAML achieves significantly higher parsing accuracy for deep configurations while eliminating the heavy "reasoning format tax" of JSON closing brackets and quotes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Behaviour-Driven Development (BDD) with Gherkin:&lt;/strong&gt; Vibe prompts describe vague wishes (&lt;em&gt;"make a friendly booking system"&lt;/em&gt;). A production-grade spec describes verifiable state transitions. Wrapping acceptance criteria in declarative Gherkin syntax (&lt;code&gt;Given / When / Then&lt;/code&gt;) forces the model into a deterministic &lt;strong&gt;State → Action → Outcome&lt;/strong&gt; sequence:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight gherkin"&gt;&lt;code&gt;Scenario: Booking a table with active dietary preferences
  Given a customer with dietary preference "gluten-free" recorded in session
  When they request a reservation for 2 guests on Friday at 19:00
  Then verify table availability via the Cloud SQL reservation tool
  And confirm the booking, returning a structured reservation ID
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;(Side note: even standard Markdown engines natively support &lt;code&gt;gherkin&lt;/code&gt; syntax highlighting out of the box — proving just how universally recognised this format already is! Not Medium, of course!)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;By providing explicit preconditions, the exact tool to trigger, and the expected outcome, you remove all ambiguity. The agent doesn't need to guess your intent; it simply fulfils the contract.&lt;/p&gt;

&lt;h2&gt;
  
  
  Practical Tooling for Spec-Driven Development
&lt;/h2&gt;

&lt;p&gt;You don't have to invent your own specification formats or build bespoke SDD tooling from scratch. The agentic engineering community has converged on several robust frameworks, each suited to different developer workflows.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fasatnvlqz37s1i8fhtg9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fasatnvlqz37s1i8fhtg9.png" alt="SDD frameworks" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  1. The &lt;code&gt;spec-driven-development&lt;/code&gt; Skill
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;What it is:&lt;/strong&gt; An open-source Agent Skill (created by Addy Osmani) that enforces specification discipline as an autonomous conversational workflow loaded directly into your agent's context.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How you use it:&lt;/strong&gt; Installed in your workspace (&lt;code&gt;.agents/skills/&lt;/code&gt;) or global configuration (&lt;code&gt;~/.gemini/config/skills/&lt;/code&gt;), you trigger it conversationally at the start of any feature (e.g. &lt;em&gt;"Use spec-driven development to scaffold the audit logger"&lt;/em&gt;). The agent enforces a strict 5-stage sequence (&lt;em&gt;Scope Check → Specify → Plan → Tasks → Implement&lt;/em&gt;), pausing at each gate to surface its technical assumptions:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ASSUMPTIONS I'M MAKING:
1. Target runtime is Python 3.13 managed via uv.
2. Data persistence uses Cloud Spanner with dialect GoogleSQL.
3. Authentication relies on Google Cloud ADC / IAM principal tokens.
-&amp;gt; Confirm or correct before proceeding.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;What it outputs:&lt;/strong&gt; A single, consolidated &lt;code&gt;tasks/plan.md&lt;/code&gt; file committed to your repository — exactly like our Spanner blueprint above — featuring architectural contracts, Three-Tier Boundaries (&lt;em&gt;Always Do&lt;/em&gt;, &lt;em&gt;Ask First&lt;/em&gt;, &lt;em&gt;Never Do&lt;/em&gt;), and an ordered checklist of test-verifiable tasks.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. GitHub's &lt;a href="https://github.com/github/spec-kit" rel="noopener noreferrer"&gt;&lt;code&gt;spec-kit&lt;/code&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;What it is:&lt;/strong&gt; An open-source CLI toolkit and prompt harness created by GitHub that standardises specification-first software development through dedicated commands, project-level constitutions, and multi-file dossiers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How you use it:&lt;/strong&gt; Executed via CLI or interactive slash commands (&lt;code&gt;/speckit.specify&lt;/code&gt; → &lt;code&gt;/speckit.clarify&lt;/code&gt; → &lt;code&gt;/speckit.plan&lt;/code&gt; → &lt;code&gt;/speckit.tasks&lt;/code&gt; → &lt;code&gt;/speckit.implement&lt;/code&gt;). You run each step as an explicit command in your terminal or IDE, validating proposed designs against a non-negotiable Project Constitution (&lt;code&gt;.specify/memory/constitution.md&lt;/code&gt;). It also includes independent, lightweight workflows for &lt;strong&gt;Bug Fixing&lt;/strong&gt; (&lt;code&gt;assess&lt;/code&gt; → &lt;code&gt;fix&lt;/code&gt; → &lt;code&gt;test&lt;/code&gt;) and &lt;strong&gt;Idea Assessment&lt;/strong&gt; (&lt;code&gt;intake&lt;/code&gt; → &lt;code&gt;define&lt;/code&gt; → &lt;code&gt;decide&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What it outputs:&lt;/strong&gt; A modular, version-controlled dossier under &lt;code&gt;specs/&amp;lt;feature-branch&amp;gt;/&lt;/code&gt; containing separated files: &lt;code&gt;spec.md&lt;/code&gt; (the user-facing WHAT), &lt;code&gt;plan.md&lt;/code&gt; and &lt;code&gt;data-model.md&lt;/code&gt; (the technical HOW), &lt;code&gt;research.md&lt;/code&gt; (library versions and decisions), and &lt;code&gt;tasks.md&lt;/code&gt; (an atomic execution checklist).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Google's Conductor Extension
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;What it is:&lt;/strong&gt; An AI-native extension and visual workspace assistant from Google that guides developers through context gathering, specification authoring, and test generation directly inside their editor.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How you use it:&lt;/strong&gt; As announced on the &lt;a href="https://developers.googleblog.com/evolving-spec-driven-development-conductor-now-supports-antigravity/?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Google Developers Blog&lt;/a&gt;, Conductor now natively supports Antigravity. It lives directly inside your editor sidebar: initiating a structured context-gathering flow, clarifying ambiguous requirements, and validating test coverage before unlocking code generation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What it outputs:&lt;/strong&gt; An established set of structured, version-controlled Markdown files — specifically &lt;code&gt;product.md&lt;/code&gt; (vision and scope), &lt;code&gt;tech-stack.md&lt;/code&gt; (dependencies and architecture), &lt;code&gt;spec.md&lt;/code&gt; (contracts and acceptance criteria), and &lt;code&gt;plan.md&lt;/code&gt; (task execution). Just like any other SDD framework, these files are committed to the repo and loaded straight into Antigravity's context window as the permanent source of truth.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Google Antigravity: The Unified Developer Harness
&lt;/h2&gt;

&lt;p&gt;Where does all of this come together in practice?&lt;/p&gt;

&lt;p&gt;Up to this point, we have talked about harness components conceptually: hierarchical context rules, MCP servers, sandboxed environments, evaluation rubrics, and living specifications. But developers need a concrete runtime to orchestrate all these moving parts into a cohesive workflow.&lt;/p&gt;

&lt;p&gt;In the Google ecosystem, that orchestrator is &lt;a href="https://antigravity.google/?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;&lt;strong&gt;Google Antigravity&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Antigravity is not another chat assistant bolted into the sidebar of an editor. It is an &lt;strong&gt;AI-native developer harness engine&lt;/strong&gt; built from the ground up around the &lt;strong&gt;Plan → Do → Verify&lt;/strong&gt; engineering cycle. Rather than expecting a single model prompt to handle everything in one turn, Antigravity operationalises harness discipline: actively coordinating the engineering environment around the model, managing context, enforcing boundaries, and verifying outcomes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Inside the Harness: What the Engine Coordinates
&lt;/h3&gt;

&lt;p&gt;Don't mistake Antigravity for a passive chat assistant that merely answers questions and suggests snippets. A true developer harness actively coordinates the engineering environment around the model:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Automatic Rule &amp;amp; Policy Enforcement (No Copy-Pasting Prompts):&lt;/strong&gt; Rather than expecting you to copy-paste prompts or manually configure system instructions, Antigravity natively discovers and binds hierarchical rule files (&lt;code&gt;~/.gemini/GEMINI.md&lt;/code&gt;, &lt;code&gt;workspace/.agents/rules/&lt;/code&gt;, and &lt;code&gt;workspace/GEMINI.md&lt;/code&gt; — which is completely interchangeable with &lt;code&gt;workspace/AGENTS.md&lt;/code&gt; depending on your team's conventions). It ensures your coding standards, package policies, and architectural requirements are deterministically bound to every model invocation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;First-Class Agent Skills &amp;amp; MCP Orchestration:&lt;/strong&gt; Antigravity was built from the ground up for progressive disclosure. It tracks installed skills via lightweight metadata headers, dynamically expanding full instruction sets and schemas only when relevant tasks are triggered. Once declared in your configuration, it natively handles tool registration, schema discovery, and execution against both local and remote MCP servers (such as &lt;code&gt;developer-knowledge&lt;/code&gt; and Cloud Logging).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Isolated Sandboxing with Blast-Radius Control:&lt;/strong&gt; Commands executed by Antigravity run inside an isolated sandbox by default. The agent has full read/write access to your workspace, but network access and modifications to host-level operating system files require explicit privilege elevation. This gives the agent freedom to compile, test, and refactor code rapidly without placing the developer's workstation at risk.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Subagent Spawning &amp;amp; Context Isolation:&lt;/strong&gt; Long-running development tasks often require diverse capabilities. When an agent needs to survey documentation across twenty web pages or perform an in-depth accessibility audit, Antigravity can spawn isolated subagents (like dedicated research or browser agents). The subagent executes its bounded task, returns a synthesised result to the parent orchestrator, and terminates — keeping the primary context window lean and focused.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Subagent-Driven Development (Task Implementers &amp;amp; Reviewers):&lt;/strong&gt; Beyond ad-hoc research, structured SDD harnesses split implementation across specialised subagent personas. Rather than cluttering the primary conversation with thousands of lines of intermediate compiler output and syntax churn, Antigravity can dispatch each task to an isolated &lt;strong&gt;Task Implementer&lt;/strong&gt; subagent with a pristine context window. Once implementation completes, an independent &lt;strong&gt;Task Reviewer&lt;/strong&gt; subagent evaluates the code against the specification contract, passing only a clean verification receipt back to the primary orchestrator.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  One Core Harness Across Five Developer Surfaces
&lt;/h3&gt;

&lt;p&gt;Now, where does this harness live?&lt;/p&gt;

&lt;p&gt;Crucially, &lt;strong&gt;Google Antigravity delivers this identical harness engine across four developer surfaces, alongside a programmatic Python SDK&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;Antigravity App&lt;/strong&gt; (formerly Antigravity 2.0) — a dedicated desktop application designed for intent-based building, allowing you to direct autonomous agents, review visual artifacts, and orchestrate projects without having to worry about the underlying code.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;Antigravity IDE&lt;/strong&gt; — a standalone, AI-first code editor (built on VS Code) for developers who want a complete coding workspace with intelligent tab completions, inline refactoring, and in-editor sidebar assistance.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;Antigravity Extension&lt;/strong&gt; — brings the complete harness directly into your existing editor of choice (VS Code, JetBrains, Visual Studio, or Zed) so you don't have to abandon your familiar tools.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;Antigravity CLI&lt;/strong&gt; — a full Terminal User Interface (TUI) for developers who live in the command line or remote SSH sessions, and want the interactive harness experience in their terminal.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;Antigravity SDK&lt;/strong&gt; — a Python library for programmatic orchestration, headless automation, scripted workflows, and custom multi-agent systems.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Across all these surfaces and tools, the underlying configuration engine, context rules (&lt;code&gt;~/.gemini/&lt;/code&gt; and &lt;code&gt;workspace/.agents/&lt;/code&gt;), MCP servers, and sandboxed execution runtimes are completely identical.&lt;/p&gt;

&lt;p&gt;This addresses one of the biggest roadblocks in enterprise adoption: &lt;strong&gt;the IDE lock-in barrier&lt;/strong&gt;. As I explored in &lt;a href="https://dev.to/gde/meet-the-antigravity-extension-gemini-code-assist-on-steroids-in-whatever-ide-you-love-4p1n"&gt;&lt;em&gt;Meet the Antigravity Extension: Gemini Code Assist on Steroids, in Whatever IDE You Love&lt;/em&gt;&lt;/a&gt;, tens of millions of developers — and enterprise security policies — will not simply abandon their favourite IDEs overnight. By packaging the entire unified harness into an extension for VS Code, JetBrains, and beyond, Google ensures teams get full harness intelligence without having to abandon their existing toolchains.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6opemxbleck2wnd1vxtc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6opemxbleck2wnd1vxtc.png" alt="Antigravity Surfaces and Commands" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Supercharged Harness Workflows (Slash Commands)
&lt;/h2&gt;

&lt;p&gt;Antigravity provides a number of "slash" commands out-of-the-box. Rather than typing out long prompt instructions, you can trigger key harness behaviours directly using these commands:&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;/grill-me&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;The antidote to underspecified requirements. Instead of accepting a vague prompt and guessing how to implement it, Antigravity initiates a structured, one-question-at-a-time interview to stress-test your thinking, interrogate boundary conditions, and resolve ambiguities &lt;em&gt;before&lt;/em&gt; a single file is modified.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Real-world prompt:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/grill-me on the Spanner schema and backoff retry behaviour in tasks/plan.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;code&gt;/plan&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Switches the agent into dedicated planning mode. Rather than immediately modifying files, Antigravity surveys the codebase, maps out dependencies, and presents a structured implementation plan with verification steps for your review and sign-off before execution begins.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Real-world prompt:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/plan refactor services/audit_logger.py to use async batch mutations with zero breaking changes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;code&gt;/goal&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Initiates an autonomous execution loop for long-running tasks. Rather than pausing after every step to ask for input, the agent works through the task list, diagnoses test failures, handles retries, and yields control only when the objective is fully achieved and verified.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Real-world prompt:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/goal implement Phase 2 of tasks/plan.md, fix any failing pytest assertions, and ensure ruff passes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;code&gt;/boost&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Transforms a single model session into a coordinated team of subagents executing tasks or adversarial reviews in parallel. In loop engineering, &lt;code&gt;/boost&lt;/code&gt; is the easiest way to implement &lt;strong&gt;decoupled multi-agent verification&lt;/strong&gt; — pairing a builder subagent with an independent critic subagent so a single model instance never marks its own homework.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Real-world prompt:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/boost run an adversarial security and race-condition review of our Spanner transaction handler
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;code&gt;/learn&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;The mechanical realisation of the Ratchet Principle! When you guide or correct an agent during an interactive session, running &lt;code&gt;/learn&lt;/code&gt; extracts the operational lesson and crystallises it directly into your workspace rules. The lesson is immediately persisted to disk so future sessions never repeat the mistake.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Real-world prompt:&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/learn always wrap Spanner Mutation writes in exponential backoff when catching Aborted errors
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Slash Commands Alone vs. Formal SDD
&lt;/h2&gt;

&lt;p&gt;At this point, I know what you might be thinking:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Hold on, Dazbo. If Antigravity already gives me &lt;code&gt;/plan&lt;/code&gt; and &lt;code&gt;/goal&lt;/code&gt; out of the box, why do I need formal SDD skills like Conductor, &lt;code&gt;spec-kit&lt;/code&gt;, or the &lt;code&gt;spec-driven-development&lt;/code&gt; skill? Isn't that just extra ceremony?"&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Great question. Here's the thing: it comes down to the trade-offs between &lt;strong&gt;tactical session planning&lt;/strong&gt; and &lt;strong&gt;long-term architectural governance&lt;/strong&gt;:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;Native Slash Commands Alone (&lt;code&gt;/plan&lt;/code&gt;, &lt;code&gt;/goal&lt;/code&gt;)&lt;/th&gt;
&lt;th&gt;Formal SDD Skills &amp;amp; Plugins (Conductor, &lt;code&gt;spec-kit&lt;/code&gt;, &lt;code&gt;spec-driven-development&lt;/code&gt;)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Setup &amp;amp; Friction&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Zero friction.&lt;/strong&gt; Built natively into Antigravity; available instantly with no configuration.&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Moderate ceremony.&lt;/strong&gt; Requires installing the tool and walking through the guided discovery interview (though the framework scaffolds the files and folders for you).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Persistence &amp;amp; State&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Ephemeral.&lt;/strong&gt; Plans and goal states live in the active conversation thread; they risk being lost during context compression or when starting a fresh session.&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Version-Controlled.&lt;/strong&gt; Formal specs, task checklists, and ADRs live as permanent Markdown/YAML files in the Git repo (&lt;code&gt;specs/&lt;/code&gt;, &lt;code&gt;tasks/&lt;/code&gt;).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Scope Enforcement&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Conversational.&lt;/strong&gt; The model plans dynamically, but doesn't strictly enforce pre-implementation gates or boundary contracts.&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Machine-Gated.&lt;/strong&gt; Enforces strict Phase 0 scope analysis, surface assumption checks, and Three-Tier Boundaries (&lt;em&gt;Always Do&lt;/em&gt;, &lt;em&gt;Ask First&lt;/em&gt;, &lt;em&gt;Never Do&lt;/em&gt;).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Token Overhead&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Low.&lt;/strong&gt; Directly targets the immediate task at hand without multi-phase document generation.&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Higher upfront.&lt;/strong&gt; Consumes tokens generating formal contracts and schemas before writing code.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Best Used For&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Tactical features, targeted refactors, rapid bug fixes, single-session development.&lt;/td&gt;
&lt;td&gt;System architectures, multi-agent systems, cross-team projects, mission-critical services.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  An Enterprise Option: Combining SDD with Tactical Slash Commands
&lt;/h3&gt;

&lt;p&gt;You don't always need both. For everyday feature slices, targeted refactors, or rapid bug fixes, Antigravity's native slash commands (&lt;code&gt;/plan&lt;/code&gt; and &lt;code&gt;/goal&lt;/code&gt;) provide plenty of structure with zero setup overhead. Conversely, for architectural reviews, a standalone SDD dossier alone might be all your team requires.&lt;/p&gt;

&lt;p&gt;However, when you are tackling large, multi-component enterprise initiatives, &lt;strong&gt;nesting these layers into a hybrid workflow is a powerful option&lt;/strong&gt;. You can use formal SDD as the macro-architectural envelope on disk, and Antigravity's native slash commands as the micro-execution engine in the session.&lt;/p&gt;

&lt;p&gt;Here is an example four-phase hybrid pattern you can adopt when orchestrating complex features:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Phase 1 — Macro Architecture (The Outer Spec via Formal SDD / Conductor / &lt;code&gt;spec-kit&lt;/code&gt;):&lt;/strong&gt; Before generating any implementation code, establish the enduring system blueprint on disk. Define machine-readable API contracts, data schemas, test stubs, and the operational boundary rules (&lt;code&gt;specs/api_contract.md&lt;/code&gt;, &lt;code&gt;tasks/plan.md&lt;/code&gt;). Because these are committed to version control, they survive across sessions, branches, and team members.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Phase 2 — Specification Stress-Testing (&lt;code&gt;/grill-me&lt;/code&gt;):&lt;/strong&gt; Once the initial specification is drafted, invoke &lt;code&gt;/grill-me&lt;/code&gt; against the spec file. Antigravity acts as a relentless, sceptical peer reviewer. It interrogates boundary conditions, probes error handling paths, questions concurrency models, and surfaces hidden assumptions &lt;em&gt;before&lt;/em&gt; signing off on the architecture.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Phase 3 — Autonomous Tactical Execution (&lt;code&gt;/plan&lt;/code&gt; + &lt;code&gt;/goal&lt;/code&gt; + &lt;code&gt;/boost&lt;/code&gt;):&lt;/strong&gt; With the formal spec locked, feed a single vertical slice from your task plan into &lt;code&gt;/goal&lt;/code&gt; (or &lt;code&gt;/boost&lt;/code&gt; for separated Builder/Critic verification). Antigravity's autonomous workbench takes over, executing the &lt;strong&gt;tactical inner execution loop we built in Part 2&lt;/strong&gt;: it uses &lt;code&gt;/plan&lt;/code&gt; to map out immediate file edits, executes changes inside the sandbox, validates against deterministic linters and semantic rubrics, and loops autonomously until every gate is green.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Phase 4 — Hardening the Harness (&lt;code&gt;/learn&lt;/code&gt;):&lt;/strong&gt; When the agent encounters an unexpected runtime quirk or discovers a project-specific constraint during the &lt;code&gt;/goal&lt;/code&gt; execution loop (such as a subtle gRPC serialisation rule or sandbox path issue), invoke &lt;code&gt;/learn&lt;/code&gt;. Antigravity extracts that operational lesson and crystallises it directly into &lt;code&gt;workspace/.agents/rules/&lt;/code&gt; or your root rule file (&lt;code&gt;GEMINI.md&lt;/code&gt; / &lt;code&gt;AGENTS.md&lt;/code&gt;). The ratchet clicks; the harness hardens; and the entire team permanently benefits from the discovery.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Sustainable Team Engineering: Defeating Approval Fatigue
&lt;/h3&gt;

&lt;p&gt;Adopting Spec-Driven Development doesn't just change how you interact with an AI model — it fundamentally alters team engineering culture.&lt;/p&gt;

&lt;p&gt;When teams first adopt automated coding assistants, they often fall into a trap known as &lt;strong&gt;review theatre&lt;/strong&gt;. Developers find themselves staring at a 1,200-line diff generated in three seconds, trying to manually verify every line of syntax. Developer experience studies consistently highlight that frequent AI tool users suffer significant cognitive burnout when trapped in manual code reviews. &lt;strong&gt;Eyeball inspection simply does not scale to agentic velocity.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fe52jtn3fvl65gy2p86om.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fe52jtn3fvl65gy2p86om.png" alt="Review fatigue" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;SDD breaks this cycle by establishing a clean division of responsibility:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Humans review the intent and the contracts:&lt;/strong&gt; You evaluate the architectural trade-offs, the boundary constraints, and the acceptance test scenarios.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The harness verifies the code:&lt;/strong&gt; Linters, sandboxed test suites, and evaluation rubrics verify the disposable implementation syntax.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By shifting human review from syntax nitpicking to spec and contract design, engineering teams eliminate approval fatigue while maintaining rigorous production quality. If the contracts and test scenarios are sound, and the automated verification suite passes in the sandbox, you can merge with confidence.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary &amp;amp; What's Next: Scaling the Harness
&lt;/h2&gt;

&lt;p&gt;We have now brought together our deterministic chassis (&lt;a href="https://dev.to/gde/from-vibing-chaos-to-reliable-agents-the-what-why-and-how-of-harness-engineering-4ba0"&gt;Part 1&lt;/a&gt;) and our autonomous loop engine (&lt;a href="https://dev.to/gde/loop-engineering-in-the-harness-autonomous-self-correcting-systems-part-2-155e"&gt;Part 2&lt;/a&gt;), fuelled by living specifications committed directly to the workspace (&lt;strong&gt;Part 3&lt;/strong&gt;) and orchestrated through &lt;strong&gt;Google Antigravity&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;But how do you introduce loop engineering into any existing repository in under five minutes? How do you prevent multi-turn loops from collapsing under context bloat? And what happens when you put a recursive meta-loop around the harness itself?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In &lt;strong&gt;Part 4 (The Finale)&lt;/strong&gt;, we take our harness to the next level:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Anatomy of an Iteration:&lt;/strong&gt; How sandboxed environments, ephemeral subagents, and &lt;code&gt;LIVING_MEMORY.md&lt;/code&gt; filter out noise and beat attention dilution.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Practical Ways to Wire Loops into Any Project (And How to Combine Them):&lt;/strong&gt; From zero-code Markdown rules (&lt;code&gt;GEMINI.md&lt;/code&gt; + &lt;code&gt;RUBRIC.md&lt;/code&gt;) and &lt;code&gt;loopy&lt;/code&gt; (&lt;code&gt;LOOPS.md&lt;/code&gt;) to &lt;code&gt;/goal&lt;/code&gt; and programmatic &lt;strong&gt;Google ADK 2 graphs&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Google Research's Harness² (&lt;em&gt;Harness-Squared&lt;/em&gt;):&lt;/strong&gt; Recursive agent harnessing (&lt;code&gt;Propose&lt;/code&gt; → &lt;code&gt;Probe&lt;/code&gt; → &lt;code&gt;Compose&lt;/code&gt;) that optimises the editable components of your harness across tasks without retraining a single model weight.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enterprise Production Pillars on Google Cloud:&lt;/strong&gt; Bridging your local developer harness to cloud-scale production.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 &lt;strong&gt;Continue to Part 4: Scaling the Harness: Practical Loop Patterns, ADK 2 Graphs, Recursive Harness², and Enterprise Production (Coming Soon)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;See you in the finale!&lt;/p&gt;




&lt;h2&gt;
  
  
  Before You Go
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Please share&lt;/strong&gt; 📢 this with anyone that you think will be interested. It might help them, and it really helps me!&lt;/li&gt;
&lt;li&gt;Please &lt;strong&gt;give me loads of claps&lt;/strong&gt;! 👏 (Just hold down the clap button.)&lt;/li&gt;
&lt;li&gt;Please &lt;strong&gt;leave a comment&lt;/strong&gt; 💬. Interaction is good!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add a star&lt;/strong&gt; ⭐ on my repos!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Follow&lt;/strong&gt; 👉 and &lt;strong&gt;subscribe&lt;/strong&gt; 🔔, so you don't miss my content.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  References and Useful Links
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Spec-Driven Development
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://codelabs.developers.google.com/sdd-adk-antigravity?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Spec-Driven ADK Agent Development with Antigravity and Spec-kit | Google Codelabs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://codelabs.developers.google.com/codelabs/getting-started-with-spec-driven-development-in-antigravity?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Getting started with Spec Driven Development in Antigravity | Google Codelabs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://codelabs.developers.google.com/sdd-agy-cli?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Spec-Driven Development with Antigravity CLI — Structured Agent Workflows with Skills and MCP | Google Codelabs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developers.googleblog.com/evolving-spec-driven-development-conductor-now-supports-antigravity/?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;&lt;em&gt;Evolving Spec-Driven Development: Conductor Now Supports Antigravity&lt;/em&gt; | Google Developers Blog&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.kaggle.com/whitepaper-spec-driven-production-grade-development-in-the-age-of-vibe-coding?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;&lt;em&gt;Spec-Driven Production Grade Development in the Age of Vibe Coding&lt;/em&gt; by Lee Boonstra (Google)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://arxiv.org/abs/2602.08111" rel="noopener noreferrer"&gt;&lt;em&gt;Spec-Driven Development for Agentic Software Engineering: Harnessing Human-Agent Teamwork&lt;/em&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/github/spec-kit" rel="noopener noreferrer"&gt;&lt;code&gt;github/spec-kit&lt;/code&gt;: Toolkit to help you get started with Spec-Driven Development&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/addyosmani/agent-skills/tree/main/skills/spec-driven-development" rel="noopener noreferrer"&gt;&lt;code&gt;spec-driven-development&lt;/code&gt; skill by Addy Osmani&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Google Antigravity &amp;amp; Ecosystem
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://antigravity.google/docs/home/?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Google Antigravity Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://antigravity.google/blog/introducing-google-antigravity?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Introducing Google Antigravity | Google Antigravity Blog&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://medium.com/google-cloud/the-ai-native-developer-experience-part-2-harness-engineering-with-google-antigravity-7fb72dab243f" rel="noopener noreferrer"&gt;&lt;em&gt;The AI-Native Developer Experience, Part 2: Harness Engineering with Google Antigravity&lt;/em&gt; by Jaroslav Pantsjoha&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Dazbo's Related Articles
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/gde/from-vibing-chaos-to-reliable-agents-the-what-why-and-how-of-harness-engineering-4ba0"&gt;&lt;em&gt;From Vibing Chaos to Reliable Agents: The What, Why, and How of Harness Engineering (Part 1)&lt;/em&gt; by Dazbo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/gde/loop-engineering-in-the-harness-autonomous-self-correcting-systems-part-2-155e"&gt;&lt;em&gt;Loop Engineering in the Harness: Autonomous, Self-Correcting Systems (Part 2)&lt;/em&gt; by Dazbo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/gde/meet-the-antigravity-extension-gemini-code-assist-on-steroids-in-whatever-ide-you-love-4p1n"&gt;&lt;em&gt;Meet the Antigravity Extension: Gemini Code Assist on Steroids, in Whatever IDE You Love&lt;/em&gt; by Dazbo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/gde/dialling-our-agents-to-11-agent-skills-you-need-to-be-using-2o2k"&gt;&lt;em&gt;Dialling Our Agents to 11: Agent Skills You Need to be Using!&lt;/em&gt; by Dazbo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dazbo.co.uk" rel="noopener noreferrer"&gt;Dazbo's Portfolio&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>generativeaitools</category>
      <category>googlegemini</category>
      <category>specdrivendevelopmen</category>
      <category>harnessengineering</category>
    </item>
    <item>
      <title>Automated GitHub Code Reviews Using Google Gemini Update: Enterprise-Ready, Multimodal, and Battle-Hardened</title>
      <dc:creator>Darren "Dazbo" Lester</dc:creator>
      <pubDate>Mon, 19 Oct 2026 05:34:22 +0000</pubDate>
      <link>https://dev.to/gde/automated-github-code-reviews-using-google-gemini-update-enterprise-ready-multimodal-and-1phi</link>
      <guid>https://dev.to/gde/automated-github-code-reviews-using-google-gemini-update-enterprise-ready-multimodal-and-1phi</guid>
      <description>&lt;p&gt;You are in &lt;strong&gt;Part 2&lt;/strong&gt; of the series &lt;strong&gt;&lt;em&gt;"Automated GitHub Code Reviews Using Google Gemini"&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;h3&gt;
  
  
  🗺️ Series Navigation
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Part 1:&lt;/strong&gt; &lt;a href="https://dev.to/gde/automated-github-code-reviews-using-google-gemini-4l0f"&gt;&lt;strong&gt;Automated GitHub Code Reviews Using Google Gemini&lt;/strong&gt;&lt;/a&gt; — Why I built a super-fast, native composite GitHub Action to replace Google's sunsetted &lt;code&gt;run-gemini-cli&lt;/code&gt; and Gemini Code Assist integrations, and how to get up and running in three minutes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Part 2: Enterprise-Ready AI Code Reviews &amp;amp; Issue Triage with Google Gemini (This Article)&lt;/strong&gt; — How the action evolved from a fast weekend replacement into an enterprise-grade, multimodal code review and triage engine — featuring Gemini 3.8 Flash, visual PR diffing, bounded dynamic context selection, Gemini Enterprise Agent Platform billing attribution, supply-chain hardening, and battle-tested production fixes.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Back for the Update!
&lt;/h2&gt;

&lt;p&gt;Howdy friends, and welcome back!&lt;/p&gt;

&lt;p&gt;When I published &lt;a href="https://dev.to/gde/automated-github-code-reviews-using-google-gemini-4l0f"&gt;Part 1&lt;/a&gt; back in July, I had a very specific itch to scratch. Google had just turned off the lights on both &lt;code&gt;run-gemini-cli&lt;/code&gt; and the consumer Gemini Code Assist GitHub integration as part of the transition to the &lt;a href="https://antigravity.google/?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Google Antigravity suite&lt;/a&gt;. And consequently, my automated agentic pull request reviews stopped working. Sad times.&lt;/p&gt;

&lt;p&gt;So, I rolled up my sleeves...&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7njx54u5exan9znvcmwy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7njx54u5exan9znvcmwy.png" alt="Darren: Sleeves rolled up, ready to review code" width="800" height="1198"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(Okay, that's actually an attempt at using AI to put me in a Don Johnson outfit.)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;... And built a drop-in replacement: the &lt;a href="https://github.com/derailed-dash/gemini-review-action" rel="noopener noreferrer"&gt;&lt;strong&gt;Gemini PR Review &amp;amp; Triage Action&lt;/strong&gt;&lt;/a&gt; (also available directly on the &lt;a href="https://github.com/marketplace/actions/dazbo-s-gemini-code-review-issue-triage" rel="noopener noreferrer"&gt;GitHub Marketplace&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Since launching Part 1, something awesome happened. Not only did I start dogfooding the action heavily across every single repository I maintain, but developers in the community started adopting it — and &lt;strong&gt;it is now actively running in production inside at least one enterprise organisation&lt;/strong&gt;!&lt;/p&gt;

&lt;p&gt;A massive shoutout here goes to my fellow Google Developer Expert (GDE), &lt;a href="https://github.com/SaschaHeyer" rel="noopener noreferrer"&gt;&lt;strong&gt;Sascha Heyer&lt;/strong&gt;&lt;/a&gt;. Sascha rolled the action out across real production repositories, battle-tested it against enterprise edge cases, and contributed a phenomenal series of pull requests — from real-dollar cost estimation and Gemini Enterprise Agent Platform billing labels to automated review thread resolution, per-file content caps, competing bot filtering, and supply-chain lockfile hardening.&lt;/p&gt;

&lt;p&gt;Through dozens of releases (taking us from &lt;code&gt;v1.4&lt;/code&gt; all the way to &lt;code&gt;v1.8.3&lt;/code&gt;), this collaboration has transformed the tool from a "fast drop-in replacement" into what I genuinely believe is the &lt;strong&gt;de facto Google Gemini-based code reviewer and issue triager for GitHub&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Even better: it is &lt;strong&gt;100% free and open-source&lt;/strong&gt;. There are no SaaS subscriptions and no per-seat licensing fees. You simply bring your own Gemini API key or Google Cloud project, and you pay only for the raw tokens you consume — which, thanks to our built-in context caching, typically works out to &lt;strong&gt;$0.02 to $0.04 per review&lt;/strong&gt;!&lt;/p&gt;

&lt;p&gt;In this post, I'm going to:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Recap the What, the Why, and the Unique Selling Points (USPs)&lt;/strong&gt; for anyone new to the party.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Share the complete current feature list&lt;/strong&gt; so you can see everything the action packs under the bonnet today.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deep-dive into the major new features, architectural upgrades, and battle-hardened bug fixes&lt;/strong&gt; we've shipped since Part 1 — including why this solution is now thoroughly &lt;strong&gt;enterprise-ready&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Grab a piña colada (or a strong coffee), and let's dive in!&lt;/p&gt;




&lt;h2&gt;
  
  
  Recap: The What, The Why, and The USPs
&lt;/h2&gt;

&lt;p&gt;If you missed &lt;a href="https://dev.to/gde/automated-github-code-reviews-using-google-gemini-4l0f"&gt;Part 1&lt;/a&gt;, here is the sixty-second elevator pitch on why automated AI code reviews in CI/CD are such a game-changer — and why this specific action hits different.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F55qnkoz6h3sanox4lv7u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F55qnkoz6h3sanox4lv7u.png" alt="Automated Code Review Pipeline with Gemini AI" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The Problem with Traditional (and Local AI) Code Reviews
&lt;/h3&gt;

&lt;p&gt;In a traditional workflow, you open a Pull Request and wait hours (or days) for a human colleague to context-switch away from their own work and review your code. When they finally get to it, human reviews are notoriously variable: some reviewers rubber-stamp a 500-line diff with "LGTM", while others bikeshed variable names and miss a glaring SQL injection vulnerability.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"Ah,"&lt;/em&gt; you might say, &lt;em&gt;"but I already use an AI coding assistant in my IDE!"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Me too! I live in Google Antigravity every day. But relying solely on your local IDE agent to review the code it just helped you write introduces a massive blind spot: &lt;strong&gt;Session Bias&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. The "Clean Slate" Advantage
&lt;/h3&gt;

&lt;p&gt;When you pair-programme with an AI assistant in your IDE, that agent accumulates your entire conversational history. It knows what you tried, why you took a shortcut, and what compromises you made to get the tests passing. Because it understands your &lt;em&gt;intent&lt;/em&gt; so well, it frequently forgives subtle regressions, missing edge cases, or architectural drift.&lt;/p&gt;

&lt;p&gt;By running our Gemini code reviewer inside a &lt;strong&gt;GitHub Action on every Pull Request&lt;/strong&gt;, the reviewer starts with a &lt;strong&gt;completely clean slate&lt;/strong&gt;. It has zero knowledge of your local chat history or how much you struggled with a module. It objectively evaluates the raw git diff against your repository's codebase context and coding standards. Time and time again, this stateless reviewer catches bugs, security gaps, and documentation discrepancies that my local IDE session glossed right over!&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Blazing Speed: Native Composite Action + Astral's &lt;code&gt;uv&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Legacy actions (like the old &lt;code&gt;run-gemini-cli&lt;/code&gt;) built or pulled hefty Docker containers on every single run, or used sluggish &lt;code&gt;pip install&lt;/code&gt; steps that burned through GitHub Actions runner minutes before a single token was ever sent to Gemini.&lt;/p&gt;

&lt;p&gt;I architected &lt;code&gt;gemini-review-action&lt;/code&gt; as a &lt;strong&gt;native Composite Action&lt;/strong&gt; powered by Astral's blazingly fast &lt;strong&gt;&lt;code&gt;uv&lt;/code&gt;&lt;/strong&gt; package manager. There are no Docker container builds and no slow dependency resolution phases. The environment boots in a couple of seconds and posts line-specific review feedback almost immediately.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Deep Context + 90% Cost Savings via Gemini Context Caching
&lt;/h3&gt;

&lt;p&gt;Most basic AI review scripts only feed the raw &lt;code&gt;git diff&lt;/code&gt; to the model. Without knowing what the rest of your repository looks like, an LLM can't tell if a change breaks an interface defined in another module or violates your project's architectural patterns.&lt;/p&gt;

&lt;p&gt;Our action features a &lt;strong&gt;Hybrid Codebase Context Engine&lt;/strong&gt; paired with &lt;strong&gt;Stateless Gemini Context Caching&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For repositories under 1.5 MB of text, it loads the &lt;strong&gt;entire codebase&lt;/strong&gt; into context (&lt;em&gt;Full Context Mode&lt;/em&gt;).&lt;/li&gt;
&lt;li&gt;For massive repositories and monorepos over 1.5 MB, it switches to &lt;em&gt;Sparse Context Mode&lt;/em&gt;, feeding the full directory tree, core manifests/documentation (&lt;code&gt;README.md&lt;/code&gt;, &lt;code&gt;ARCHITECTURE.md&lt;/code&gt;, &lt;code&gt;AGENTS.md&lt;/code&gt;, &lt;code&gt;pyproject.toml&lt;/code&gt;, etc.), and dynamically selecting the most relevant sister modules.&lt;/li&gt;
&lt;li&gt;Whenever repository context exceeds ~32k tokens (about 100K characters), the action provisions an ephemeral, server-side &lt;strong&gt;Gemini Context Cache&lt;/strong&gt; (&lt;code&gt;CachedContent&lt;/code&gt;). Subsequent PR pushes and multi-turn tool calls reuse that cache handle automatically — delivering a &lt;strong&gt;90% discount on cached input tokens&lt;/strong&gt; without requiring any local runner disk persistence. &lt;em&gt;(Enterprise DLP Note: On Gemini Enterprise Agent Platform, the cache is strictly tenant-isolated within your Google Cloud project and region, bounded by an automatic 1-hour TTL, and fully covered by Google Cloud's zero-training enterprise data governance commitments.)&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  The Complete Feature Matrix (What's in the Box Today)
&lt;/h2&gt;

&lt;p&gt;Before we unpack the new engineering deep-dives, here is the complete summary of what &lt;strong&gt;Dazbo's Gemini PR Review &amp;amp; Triage Action (currently at version &lt;code&gt;1.8.3&lt;/code&gt;)&lt;/strong&gt; gives you right out of the box:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkw7zy0dl6omp19z0jsy3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkw7zy0dl6omp19z0jsy3.png" alt="Gemini PR Review &amp;amp; Triage Features Overview" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Core Review &amp;amp; Triage Capabilities
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AI-Powered Pull Request Reviews&lt;/strong&gt;: Constructive, severity-graded (&lt;code&gt;🔴&lt;/code&gt; Critical, &lt;code&gt;🟠&lt;/code&gt; High, &lt;code&gt;🟡&lt;/code&gt; Medium, &lt;code&gt;🟢&lt;/code&gt; Low), line-specific inline feedback powered by the latest Gemini Flash model (currently &lt;strong&gt;&lt;code&gt;gemini-3.8-flash&lt;/code&gt;&lt;/strong&gt;) by default.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One-Click Interactive Suggestions&lt;/strong&gt;: Formats exact code fixes inside native GitHub &lt;code&gt;suggestion&lt;/code&gt; blocks so developers can commit fixes directly in the GitHub UI with a single click.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-Axis Quality Framework&lt;/strong&gt;: Evaluates every PR systematically across five core engineering axes: &lt;em&gt;Correctness &amp;amp; Verification&lt;/em&gt;, &lt;em&gt;Readability &amp;amp; Simplicity&lt;/em&gt;, &lt;em&gt;Architecture &amp;amp; System Design&lt;/em&gt;, &lt;em&gt;Security &amp;amp; Data Hardening&lt;/em&gt;, and &lt;em&gt;Performance &amp;amp; Efficiency&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Holistic Documentation &amp;amp; Blog Review&lt;/strong&gt;: Evaluates Markdown documentation, READMEs, ADRs, and technical articles alongside source code for accuracy and completeness.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automated Issue Triage&lt;/strong&gt;: Dynamically classifies, prioritises, and applies repository labels to incoming or reopened GitHub issues based on issue descriptions, discussion comments, and attached screenshots.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On-Demand &lt;code&gt;/gemini-review&lt;/code&gt; Trigger&lt;/strong&gt;: Re-trigger reviews at any time via PR comments, protected by strict &lt;code&gt;OWNER&lt;/code&gt;, &lt;code&gt;MEMBER&lt;/code&gt;, and &lt;code&gt;COLLABORATOR&lt;/code&gt; authorisation guards so random internet strangers can't drain your API quota.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Multimodal &amp;amp; Context Intelligence
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Multimodal Context &amp;amp; Visual PR Diffing&lt;/strong&gt;: Automatically extracts local images and PDFs referenced in Markdown files, and performs &lt;strong&gt;side-by-side visual PR diffing&lt;/strong&gt; (&lt;code&gt;base_sha&lt;/code&gt; vs &lt;code&gt;head_sha&lt;/code&gt;) whenever images (&lt;code&gt;.png&lt;/code&gt;, &lt;code&gt;.jpg&lt;/code&gt;, &lt;code&gt;.webp&lt;/code&gt;, &lt;code&gt;.gif&lt;/code&gt;, &lt;code&gt;.svg&lt;/code&gt;) are modified in a PR.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multimodal Issue Triage (Remote Screenshots)&lt;/strong&gt;: Automatically extracts and securely fetches remote screenshots embedded in GitHub issues (including private repo &lt;code&gt;user-attachments&lt;/code&gt;) so Gemini can visually inspect UI bug reports and stack-trace screenshots.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic Image Downscaling&lt;/strong&gt;: Automatically resizes large images (&amp;gt;600 KB) down to a maximum of 300 KB before sending to Gemini, protecting your token budget and keeping latency low while passing SVGs and PDFs through lossless.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hybrid Codebase Context &amp;amp; Bounded Dynamic Selection&lt;/strong&gt;: Seamless switching between Full Context Mode and Sparse Context Mode, using proximity/import heuristics and a 4-tier architectural selector to pick the best sister files in large monorepos.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Per-File Content Truncation &amp;amp; Token Budget Safeguards&lt;/strong&gt;: Caps individual massive files (like generated OpenAPI schemas) at 128 KB and runs preflight token checks so a single huge file never crashes your review.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Google Developer Knowledge MCP Integration&lt;/strong&gt;: Queries official, live Google documentation (for Google Cloud, Gemini, Firebase, Android, etc.) via Model Context Protocol (MCP) during the review (automatically activated when the Developer Knowledge API is enabled on your API key or GCP project).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On-Demand Agent Skills Registry&lt;/strong&gt;: Dynamically discovers and loads relevant coding standards from &lt;code&gt;.agents/skills/&lt;/code&gt;. And a curated set of starter skills for Google Cloud, ADK, and Gemini APIs are already bundled.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Conversational Memory &amp;amp; Workflow Automation
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;PR Comment &amp;amp; Discussion Thread History&lt;/strong&gt;: Retrieves prior inline review threads and PR comments across commits. Follows an opinionated resolution matrix: celebrates resolved items (&lt;code&gt;### ✅ Resolved Items from Prior Reviews&lt;/code&gt;), respects developer deferrals and architectural justifications, and re-flags silently ignored issues.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Auto-Resolving Addressed GitHub Threads&lt;/strong&gt;: Optionally resolves GitHub review conversation threads automatically (&lt;code&gt;resolve_addressed_threads: 'true'&lt;/code&gt;) once Gemini verifies the fix, unblocking &lt;em&gt;"Require conversation resolution before merging"&lt;/em&gt; branch protection rules.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Competing Bot Author Exclusion&lt;/strong&gt;: Filter out comments from secondary bots (&lt;code&gt;exclude_comment_authors: 'claude[bot]'&lt;/code&gt;) so your Gemini review remains genuinely independent and you don't pay input tokens to process another bot's prose.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Smart Inline-Suggestion Commit Skipping&lt;/strong&gt;: Automatically detects commits generated by clicking "Commit suggestion" in the GitHub UI and skips redundant re-reviews (&lt;code&gt;skip_inline_suggestions: 'true'&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Customisation, FinOps &amp;amp; Enterprise Security
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Zero-Config Agentic Installation Skill&lt;/strong&gt;: Equip your IDE agent via &lt;code&gt;npx skills add derailed-dash/gemini-review-action -y -g --skill install-gemini-code-review-action&lt;/code&gt;, then simply ask it to &lt;em&gt;"Set up Gemini review in this repo"&lt;/em&gt; — your agent handles configuration preferences, template generation, and secret setup guidance automatically.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Extending vs Replacing Guardrails&lt;/strong&gt;: Easily append organisation- or team-specific rules via &lt;code&gt;.github/review-instruction-additions.md&lt;/code&gt; or the &lt;code&gt;custom_instructions&lt;/code&gt; workflow input without losing the built-in quality framework — or you can override the entire prompt via &lt;code&gt;.github/commands/gemini-review.toml&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Configurable Personas &amp;amp; Locales&lt;/strong&gt;: Choose your reviewer's language (&lt;code&gt;English (UK)&lt;/code&gt; by default) and personality (&lt;code&gt;straight&lt;/code&gt;, &lt;code&gt;dazbo&lt;/code&gt;, &lt;code&gt;palpatine&lt;/code&gt;, or &lt;code&gt;rick&lt;/code&gt;). Careful now... Palpatine is &lt;em&gt;not very forgiving.&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4hx4meiyu3m9ouoczb8l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4hx4meiyu3m9ouoczb8l.png" alt="Vader reviewing code: " width="800" height="534"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Reasoning &amp;amp; Thinking Budget Control&lt;/strong&gt;: Defaults to &lt;strong&gt;dynamic thinking&lt;/strong&gt; (the recommended out-of-the-box setting for PR reviews, letting Gemini scale reasoning to match diff complexity). You can also clamp &lt;code&gt;thinking_level&lt;/code&gt; (&lt;code&gt;low&lt;/code&gt;, &lt;code&gt;medium&lt;/code&gt;, &lt;code&gt;high&lt;/code&gt;, or an exact integer token budget) for predictable FinOps cost ceilings, or set it to &lt;code&gt;'off'&lt;/code&gt; to make Issue Triage blazing fast and ultra-cheap.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tokenomics &amp;amp; Dollar Cost Telemetry&lt;/strong&gt;: Appends a collapsible table to every review breaking down uncached input, cached input, comment history, thinking tokens, output tokens, and the estimated dollar cost.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enterprise Keyless Authentication (WIF)&lt;/strong&gt;: Full support for Google Cloud &lt;strong&gt;Workload Identity Federation (WIF)&lt;/strong&gt; and Application Default Credentials (ADC) via Gemini Enterprise Agent Platform (formerly Vertex AI) — zero long-lived API keys required!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gemini Enterprise Agent Platform Billing Labels&lt;/strong&gt;: Automatically tags Enterprise Agent Platform requests with &lt;code&gt;component&lt;/code&gt; and &lt;code&gt;repo&lt;/code&gt; (plus custom &lt;code&gt;billing_labels&lt;/code&gt; like &lt;code&gt;team=platform,cost_centre=engineering&lt;/code&gt;) for granular FinOps chargeback in BigQuery billing exports.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Supply-Chain &amp;amp; Runtime Hardening&lt;/strong&gt;: Enforces immutable dependency lockfiles (&lt;code&gt;uv run --locked&lt;/code&gt;), SHA-pinned internal actions, path-traversal containment, and automatic fork PR skipping.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Enterprise-Ready by Design: Security, Governance, and FinOps
&lt;/h2&gt;

&lt;p&gt;When hobbyists pick a GitHub Action, they just want to paste an API key into a secret and see comments appear on their PR. When enterprise platform and security teams evaluate a GitHub Action, they ask a very different set of questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;"How do we authenticate without storing static, long-lived API keys across 200 repositories?"&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;"How do we attribute AI spend back to specific business units, teams, and repositories in our Cloud Billing export?"&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;"What stops a malicious dependency drift or an untrusted fork PR from exfiltrating credentials?"&lt;/em&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These aren't theoretical questions — this reviewer is already deployed in production at an enterprise organisation, and many of the capabilities below were forged directly from real-world enterprise governance requirements. Let's look at the key pillars.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkabi0xt0mqwyi22gfy0x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkabi0xt0mqwyi22gfy0x.png" alt="Enterprise Governance: Keyless WIF &amp;amp; FinOps Attribution" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Keyless Enterprise Auth with Workload Identity Federation (WIF)
&lt;/h3&gt;

&lt;p&gt;Static API keys (&lt;code&gt;GEMINI_API_KEY&lt;/code&gt;) are great for quick personal setups. But in an enterprise environment, long-lived credentials stored in GitHub Secrets are a compliance headache. Somebody has to rotate them, audit them, and worry about them leaking.&lt;/p&gt;

&lt;p&gt;Because our action is built on the modern &lt;code&gt;google-genai&lt;/code&gt; SDK, it natively supports &lt;strong&gt;Google Cloud Workload Identity Federation (WIF)&lt;/strong&gt; with &lt;strong&gt;Application Default Credentials (ADC)&lt;/strong&gt; with Gemini Enterprise Agent Platform (formerly Vertex AI).&lt;/p&gt;

&lt;p&gt;Instead of generating a static key, your GitHub Actions runner requests a short-lived OIDC token from GitHub and exchanges it via &lt;code&gt;google-github-actions/auth&lt;/code&gt; for an ephemeral Google Cloud access token scoped to a specific Service Account:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;review&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;
    &lt;span class="na"&gt;permissions&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;contents&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;read&lt;/span&gt;
      &lt;span class="na"&gt;pull-requests&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;write&lt;/span&gt;
      &lt;span class="na"&gt;id-token&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;write&lt;/span&gt; &lt;span class="c1"&gt;# Required for WIF OIDC token exchange&lt;/span&gt;

    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Checkout repository&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v6&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;ref&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ github.event.pull_request.head.sha || format('refs/pull/{0}/head', github.event.issue.number) }}&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Authenticate to Google Cloud via WIF&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;google-github-actions/auth@v2&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;workload_identity_provider&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;projects/123456789012/locations/global/workloadIdentityPools/${{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;secrets.WIF_POOL_ID&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}/providers/${{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;secrets.WIF_PROVIDER_ID&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}'&lt;/span&gt;
          &lt;span class="na"&gt;service_account&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;${{&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;secrets.GCP_SERVICE_ACCOUNT&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;}}'&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Run Gemini Review Action&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;derailed-dash/gemini-review-action@v1&lt;/span&gt;
        &lt;span class="na"&gt;env&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;GOOGLE_GENAI_USE_VERTEXAI&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;True"&lt;/span&gt;
          &lt;span class="na"&gt;GOOGLE_CLOUD_PROJECT&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;my-enterprise-project-id"&lt;/span&gt;
          &lt;span class="na"&gt;GOOGLE_CLOUD_LOCATION&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;global"&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;github_token&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.GITHUB_TOKEN }}&lt;/span&gt;
          &lt;span class="na"&gt;gemini_model&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;gemini-3.8-flash'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why this matters for the enterprise:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Zero static secrets&lt;/strong&gt;: Credentials live for minutes and expire automatically when the job finishes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;IAM &amp;amp; VPC-SC Governance&lt;/strong&gt;: All Gemini API calls route through your Google Cloud project, meaning they respect your organisation's IAM policies, data residency regions, Cloud Audit Logs, and VPC Service Controls.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. FinOps Transparency: Real Dollar Cost Estimation &amp;amp; Gemini Enterprise Agent Platform Billing Labels
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;ROI is paramount.&lt;/strong&gt; If a solution costs too much or you can't measure what it costs, it's bad architecture.&lt;/p&gt;

&lt;p&gt;In Part 1, our telemetry block reported raw token counts. That was useful, but as fellow GDE &lt;strong&gt;Sascha Heyer&lt;/strong&gt; rightly pointed out when he contributed PR #33, developers and engineering leaders don't pay their cloud bills in tokens — they pay in dollars!&lt;/p&gt;

&lt;p&gt;We upgraded the telemetry engine (&lt;code&gt;gemini_review/pricing.py&lt;/code&gt;) to calculate and print the &lt;strong&gt;estimated dollar cost&lt;/strong&gt; on every single review, broken down by uncached input, cached input (at the 90% discount rate), thinking/reasoning tokens, and response output tokens:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8kx802hk6thpzkhbd5pp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8kx802hk6thpzkhbd5pp.png" alt="Automated PR Review Output with Dollar Cost Telemetry" width="752" height="863"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Notice a couple of deliberate engineering choices here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No Silent Guessing&lt;/strong&gt;: If you configure an experimental or future model that isn't in our pricing table yet, the action reports the token counts and omits the dollar figure rather than borrowing another model's rate. A missing number is obvious; a wrong number is dangerous.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Time-Boxed Introductory Rates&lt;/strong&gt;: Models like &lt;code&gt;gemini-3.8-flash&lt;/code&gt; have promotional introductory pricing ($0.75 / $3.75 per 1M tokens through &lt;code&gt;2026-12-31&lt;/code&gt;, reverting to $1.50 / $7.50 afterwards). We encoded the promotional expiry dates directly into the pricing engine data structures, and the review footnote explicitly states which rate was applied. And if your enterprise has negotiated custom flat rates or uses Batch/Flex tiers, you can override the table via &lt;code&gt;GEMINI_RATE_INPUT&lt;/code&gt; and &lt;code&gt;GEMINI_RATE_OUTPUT&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Answering the FinOps Question at Scale: Cloud Billing Labels (&lt;code&gt;billing_labels&lt;/code&gt;)
&lt;/h4&gt;

&lt;p&gt;Knowing that PR #42 cost $0.03 is great for a developer. But a Head of Platform Engineering needs to answer a different question: &lt;strong&gt;"What did AI code reviews cost across our 150 repositories this month, broken down by engineering team?"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You shouldn't have to scrape GitHub PR comments to answer a FinOps question. So we added native &lt;strong&gt;Gemini Enterprise Agent Platform Billing Labels&lt;/strong&gt; (&lt;code&gt;gemini_review/billing_labels.py&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;Whenever you run on Gemini Enterprise Agent Platform (Vertex AI), the action automatically attaches sanitised GCP billing labels to every &lt;code&gt;generate_content&lt;/code&gt; request:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;component: gemini-review-action&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;repo: owner_repo&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even better, you can pass custom chargeback dimensions via the &lt;code&gt;billing_labels&lt;/code&gt; workflow input:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Run Gemini Review Action&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;derailed-dash/gemini-review-action@v1&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;github_token&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.GITHUB_TOKEN }}&lt;/span&gt;
          &lt;span class="na"&gt;billing_labels&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;team=platform,cost_centre=engineering,env=ci'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;(Pro-Tip: We deliberately did &lt;strong&gt;not&lt;/strong&gt; make the PR number a default label, because high-cardinality labels turn your BigQuery billing export into a noisy mess. And if you're using a Google AI Studio API key instead of Gemini Enterprise Agent Platform, the action cleanly omits the &lt;code&gt;labels&lt;/code&gt; parameter.)&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Supply-Chain Security &amp;amp; Fork PR Hardening
&lt;/h3&gt;

&lt;p&gt;A code review action holds &lt;code&gt;pull-requests: write&lt;/code&gt; permissions and runs against untrusted PR branches. If you aren't careful, that's a prime target for supply-chain attacks. Here is how we locked it down:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Enforced Lockfiles (&lt;code&gt;uv run --locked&lt;/code&gt;)&lt;/strong&gt;: Previously, running &lt;code&gt;uv run --project&lt;/code&gt; would silently resolve and rewrite &lt;code&gt;uv.lock&lt;/code&gt; at runtime if &lt;code&gt;pyproject.toml&lt;/code&gt; drifted. That meant even if an enterprise consumer pinned our action to an immutable 40-character Git commit SHA, a transitive PyPI dependency could theoretically change at runtime. So we enforced &lt;code&gt;uv run --locked&lt;/code&gt; and pinned all nested setup actions (&lt;code&gt;actions/setup-python&lt;/code&gt; and &lt;code&gt;astral-sh/setup-uv&lt;/code&gt;) to exact commit SHAs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Untrusted Fork PR Safeguards&lt;/strong&gt;: By default, GitHub strips repository secrets from fork PRs to prevent untrusted contributors from accessing API keys. If an action tries to run automatically on a fork without secrets, it crashes with an authentication error and paints the contributor's PR with an ugly red &lt;code&gt;❌&lt;/code&gt;. Our starter workflows solve this gracefully:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Clean skips on forks&lt;/strong&gt;: The workflow guards automatic runs (&lt;code&gt;github.event.pull_request.head.repo.full_name == github.repository&lt;/code&gt;), quietly skipping external forks so CI status checks stay green.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Maintainer on-demand trigger&lt;/strong&gt;: Once a repository maintainer (&lt;code&gt;OWNER&lt;/code&gt;, &lt;code&gt;MEMBER&lt;/code&gt;, &lt;code&gt;COLLABORATOR&lt;/code&gt;) inspects the fork code, they can safely trigger Gemini by typing &lt;code&gt;/gemini-review&lt;/code&gt; in a PR comment — which runs under their authenticated context with full access to secrets.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Path Traversal Containment&lt;/strong&gt;: Every file path, Markdown image link, and skill reference loaded by the action is strictly validated against the workspace root. An attacker cannot craft a malicious Markdown link like &lt;code&gt;![diagram](../../../../etc/passwd)&lt;/code&gt; or a custom instruction path to trick the runner into reading files outside the repository.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Major Feature Deep-Dives Since Part 1
&lt;/h2&gt;

&lt;p&gt;Now let's get into the really fun stuff! Here are the major architectural features we've engineered since publishing Part 1.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Multimodal Context Inspection, Visual PR Diffing &amp;amp; Screenshot Triage
&lt;/h3&gt;

&lt;p&gt;Until recently, AI code reviewers had a massive blind spot: &lt;strong&gt;they were completely blind to anything that wasn't plain text.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you updated an architecture diagram in &lt;code&gt;docs/architecture.png&lt;/code&gt;, tweaked a UI component screenshot, attached a PDF specification, or opened a GitHub Issue with a screenshot of a broken button, a text-only reviewer saw nothing.&lt;/p&gt;

&lt;p&gt;In our solution, we've unlocked Gemini's native multimodal superpowers across three distinct workflows:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7cg81xohnivkb7p99jh9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7cg81xohnivkb7p99jh9.png" alt="Multimodal Context &amp;amp; Visual PR Diffing Engine" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  A. Automatic Markdown Image &amp;amp; PDF Resolution
&lt;/h4&gt;

&lt;p&gt;Whenever a Markdown file (&lt;code&gt;README.md&lt;/code&gt;, &lt;code&gt;DESIGN.md&lt;/code&gt;, &lt;code&gt;ARCHITECTURE.md&lt;/code&gt;, or a blog post!) is included in the review context or modified in a PR diff, we scan the document for standard Markdown and HTML image references. We resolve the paths relative to the Markdown file, verify containment inside the repo, and attach the visual assets directly to the Gemini request. Now, when Gemini reviews your documentation updates, it actually &lt;strong&gt;looks at your architecture diagrams&lt;/strong&gt; to verify that the diagram matches your code and prose!&lt;/p&gt;

&lt;h4&gt;
  
  
  B. Side-by-Side Visual PR Diffing
&lt;/h4&gt;

&lt;p&gt;What happens when a PR modifies an existing architecture diagram, UI component snapshot, or application icon?&lt;/p&gt;

&lt;p&gt;Most AI reviewers either ignore modified images completely or summarise them in separate, isolated passes — which completely loses subtle visual regressions.&lt;/p&gt;

&lt;p&gt;Instead, our action retrieves &lt;strong&gt;both the "before" and "after" versions&lt;/strong&gt; of any modified graphic and passes them side-by-side into a single Gemini turn. Because both images sit together in the same multimodal attention window, Gemini performs direct visual diffing — spotting accidentally cropped text, resolution degradation, broken UI alignment, or missing arrows in an updated architecture diagram!&lt;/p&gt;

&lt;h4&gt;
  
  
  C. Multimodal Issue Triage for Remote Screenshots
&lt;/h4&gt;

&lt;p&gt;When users report bugs in GitHub Issues, they love pasting screenshots directly into the issue editor (which GitHub hosts at extensionless URLs like &lt;code&gt;https://github.com/user-attachments/assets/&amp;lt;uuid&amp;gt;&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;We upgraded our triage to extract remote HTTPS image URLs from both the issue body and discussion comments:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Safe Token Handling&lt;/strong&gt;: Images in private repositories require GitHub credentials to view. The downloader attaches your &lt;code&gt;GITHUB_TOKEN&lt;/code&gt; only to trusted GitHub domains — and strips it immediately if a link redirects to an external site.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Attack-Proof Downloads&lt;/strong&gt;: Because issue descriptions are untrusted user input, we block risky URLs (like internal network IPs or cloud metadata endpoints), cap downloads at 20 MB, and fall back cleanly to text triage if an image is missing or unreachable.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  D. Deterministic Image Downscaling (Saving Your Token Budget!)
&lt;/h4&gt;

&lt;p&gt;Here's a classic "gotcha" from production: high-resolution screenshots and uncompressed PNGs can easily top several megabytes each. Shoving dozens of multi-megabyte images into a review prompt is a recipe for pain. Review request latency can spike towards GitHub Action timeout thresholds, you risk slamming into API request limits, and you waste tokens on pixels that add no extra value to the review.&lt;/p&gt;

&lt;p&gt;To fix this, we added automated, deterministic downscaling using &lt;strong&gt;Pillow&lt;/strong&gt;. Any image (&lt;code&gt;.png&lt;/code&gt;, &lt;code&gt;.jpg&lt;/code&gt;, &lt;code&gt;.webp&lt;/code&gt;, &lt;code&gt;.gif&lt;/code&gt;) larger than &lt;strong&gt;600 KB&lt;/strong&gt; is compressed to a much smaller file size. Cool, right?&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Upgraded Default Model (&lt;code&gt;gemini-3.8-flash&lt;/code&gt;) &amp;amp; Thinking Budget Controls
&lt;/h3&gt;

&lt;p&gt;When I wrote Part 1, our default model was &lt;code&gt;gemini-3.6-flash&lt;/code&gt;. Since then, we upgraded through &lt;code&gt;gemini-3.7-flash&lt;/code&gt; and now default to &lt;strong&gt;&lt;code&gt;gemini-3.8-flash&lt;/code&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;We also introduced granular &lt;strong&gt;Reasoning &amp;amp; Thinking Budget Control&lt;/strong&gt; via the &lt;code&gt;thinking_level&lt;/code&gt; input:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Run Gemini Review Action&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;derailed-dash/gemini-review-action@v1&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;gemini_api_key&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.GEMINI_API_KEY }}&lt;/span&gt;
          &lt;span class="na"&gt;github_token&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.GITHUB_TOKEN }}&lt;/span&gt;
          &lt;span class="na"&gt;thinking_level&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;low'&lt;/span&gt; &lt;span class="c1"&gt;# Options: low, medium, high, off, or integer budget (e.g. 2048)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;How thinking budgets work:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Dynamic by Default (Recommended for PRs)&lt;/strong&gt;: When omitted, Gemini runs in dynamic mode, automatically allocating reasoning tokens based on the complexity of your diff.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;FinOps Token Budget Limits (e.g. &lt;code&gt;low&lt;/code&gt; or &lt;code&gt;medium&lt;/code&gt;)&lt;/strong&gt;: Because thinking tokens are billed at the higher &lt;strong&gt;output token rate&lt;/strong&gt;, cost-conscious teams can cap the maximum reasoning headroom to ensure predictable per-review spending on massive diffs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Blazing Fast Issue Triage (&lt;code&gt;thinking_level: 'off'&lt;/code&gt;)&lt;/strong&gt;: When running in triage mode (&lt;code&gt;command: 'triage'&lt;/code&gt;), the model only needs to classify an issue and pick labels. Deep reasoning is complete overkill here. Setting &lt;code&gt;thinking_level: 'off'&lt;/code&gt; forces &lt;code&gt;thinking_budget=0&lt;/code&gt;, slashing triage latency to near-instant and cutting triage costs to fractions of a cent!&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Smarter Sparse Mode: Bounded Dynamic Context Selection
&lt;/h3&gt;

&lt;p&gt;In Part 1, when a repository exceeded 1.5 MB (&lt;em&gt;Sparse Context Mode&lt;/em&gt;), the action attached the directory tree and static core files (&lt;code&gt;README.md&lt;/code&gt;, &lt;code&gt;pyproject.toml&lt;/code&gt;, etc.), and left it at that.&lt;/p&gt;

&lt;p&gt;But what if your PR modifies, say, &lt;code&gt;src/payments/stripe_webhook.py&lt;/code&gt; inside a 50 MB monorepo, but you also have relevant additional files in the repo, like &lt;code&gt;src/payments/models.py&lt;/code&gt; and &lt;code&gt;tests/payments/test_stripe.py&lt;/code&gt;?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqu96fp08zr3xzw2o7r0o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqu96fp08zr3xzw2o7r0o.png" alt="Monorepo Context &amp;amp; Self-Healing Engine" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To solve this, we introduced &lt;strong&gt;Bounded Dynamic Context Selection&lt;/strong&gt; (&lt;code&gt;gemini_review/context.py&lt;/code&gt; and &lt;code&gt;gemini_review/repo.py&lt;/code&gt;):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Prioritised Rule Files &amp;amp; Core Context Budget Cap (&lt;code&gt;max_core_context_bytes&lt;/code&gt;)&lt;/strong&gt;: In Sparse Mode, the action loads your core project documents. But what if a repository has a 2 MB &lt;code&gt;README.md&lt;/code&gt; or dozens of markdown files? To prevent bulky documentation from blowing your token budget before code is even evaluated, we cap total core context at &lt;strong&gt;500 KB&lt;/strong&gt; and enforce strict intake ordering:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Agent rules take precedence&lt;/strong&gt;: Coding instructions and team guidelines (&lt;code&gt;AGENTS.md&lt;/code&gt;, &lt;code&gt;GEMINI.md&lt;/code&gt;, &lt;code&gt;CLAUDE.md&lt;/code&gt;, &lt;code&gt;.cursorrules&lt;/code&gt;) are prioritised at the very front of the queue so the reviewer always respects your project's rules.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Manifests &amp;amp; architecture next&lt;/strong&gt;: Core build manifests (&lt;code&gt;pyproject.toml&lt;/code&gt;, &lt;code&gt;package.json&lt;/code&gt;, &lt;code&gt;go.mod&lt;/code&gt;) and root docs (&lt;code&gt;README.md&lt;/code&gt;, &lt;code&gt;ARCHITECTURE.md&lt;/code&gt;) fill the remaining budget up to the 500 KB ceiling.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Two-Stage Dynamic Sister Context Selection&lt;/strong&gt;: In a 10,000-file monorepo, feeding every file path to an LLM wastes massive tokens before the review even starts. So we built a two-stage funnel:

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Stage 1 (Deterministic Ranking)&lt;/strong&gt;: A Python ranker parses the PR diff for &lt;code&gt;import&lt;/code&gt; statements, directory proximity, and sister test/implementation filenames to bound the candidate pool to the top 500 files (&lt;code&gt;max_candidate_files&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stage 2 (4-Tier Architectural Selection)&lt;/strong&gt;: A fast, structured call to Gemini picks up to &lt;strong&gt;8 of the highest-value sister files&lt;/strong&gt; from that pool across four architectural tiers: &lt;em&gt;Tier 1&lt;/em&gt; (direct import dependencies and base classes), &lt;em&gt;Tier 2&lt;/em&gt; (sister unit tests, fixtures, and schemas), &lt;em&gt;Tier 3&lt;/em&gt; (domain precedents in sibling modules), and &lt;em&gt;Tier 4&lt;/em&gt; (shared utilities and configuration helpers).&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Static Override (&lt;code&gt;extra_context_files&lt;/code&gt;)&lt;/strong&gt;: If you already know specific files you &lt;em&gt;always&lt;/em&gt; want attached alongside every review, you can pass &lt;code&gt;extra_context_files: 'src/core/security.py,docs/api-spec.pdf'&lt;/code&gt; and bypass the dynamic selector call entirely!&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  4. Extending Guardrails vs Replacing Prompts + Curated Skills Synchroniser
&lt;/h3&gt;

&lt;p&gt;Originally, if you wanted to add a single team rule — like &lt;em&gt;"All SQL queries must use parameterised inputs"&lt;/em&gt; — you had to copy the entire &lt;code&gt;.github/commands/gemini-review.toml&lt;/code&gt; file into your repo. The problem? As soon as you forked the base prompt into your repo, you missed out on all the upstream prompt engineering improvements we shipped in later versions (like our &lt;strong&gt;5-Axis Quality Evaluation Framework&lt;/strong&gt;)!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5curkf3mcx43o0wnqdg8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5curkf3mcx43o0wnqdg8.png" alt="AI Code Reviewer: Upgraded Intelligence Architecture with Skills &amp;amp; MCP" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The answer is to cleanly separate &lt;strong&gt;extending&lt;/strong&gt; instructions from &lt;strong&gt;replacing&lt;/strong&gt; them:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Extend (Recommended)&lt;/strong&gt;: Simply drop a Markdown file at &lt;code&gt;.github/review-instruction-additions.md&lt;/code&gt; in your repo, or pass inline rules via the &lt;code&gt;custom_instructions&lt;/code&gt; workflow input:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;      &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;custom_instructions&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
          &lt;span class="s"&gt;- Ensure all database queries use parameterised inputs.&lt;/span&gt;
          &lt;span class="s"&gt;- Verify that new API endpoints include Pydantic request validation.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;The action keeps the full built-in 5-axis quality rubric, persona overlays, and schema rules, and cleanly appends your custom guardrails!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Equip Custom Agent Skills (&lt;code&gt;.agents/skills/&lt;/code&gt;)&lt;/strong&gt;: Beyond simple markdown rules, you can mount full Agent Skills directly into your repository. The action automatically discovers skills placed in &lt;code&gt;.agents/skills/&lt;/code&gt; — whether they are custom coding guidelines, security checks, or official skills from the &lt;code&gt;google/skills&lt;/code&gt; catalog — and equips Gemini to enforce those exact domain practices during reviews.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bundled One-Command Installer Skill&lt;/strong&gt;: I had already created an agent skill called &lt;code&gt;install-gemini-code-review-action&lt;/code&gt;, in my &lt;a href="https://github.com/derailed-dash/dazbo-agent-skills" rel="noopener noreferrer"&gt;dazbo-agent-skills&lt;/a&gt; repo. Now, we also mirror this skill directly inside our reviewer repo. You can install the skill straight from the action repo:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx skills add derailed-dash/gemini-review-action &lt;span class="nt"&gt;-y&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; &lt;span class="nt"&gt;--skill&lt;/span&gt; install-gemini-code-review-action
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once installed, simply prompt your agent: &lt;strong&gt;"Set up Gemini code review in this repository."&lt;/strong&gt; The agent detects any existing workflows, interviews you on your preferred model, auth method (WIF vs API key), and persona, and generates the workflow files for you!&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Workflow Polish: Auto-Resolving Threads &amp;amp; Filtering Competing Bots
&lt;/h3&gt;

&lt;p&gt;Two of my favourite quality-of-life improvements came directly from real-world friction on busy pull requests:&lt;/p&gt;

&lt;h4&gt;
  
  
  A. Auto-Resolving Addressed Review Threads
&lt;/h4&gt;

&lt;p&gt;When you push a fix to a PR, the action re-examines prior review comments, confirms the issue has been resolved, and marks it fixed.&lt;/p&gt;

&lt;p&gt;However, if your repository enforces GitHub's &lt;strong&gt;"Require conversation resolution before merging"&lt;/strong&gt; rule, someone still has to manually click "Resolve conversation" on every single thread before you can merge — even though the bot already agreed you fixed it!&lt;/p&gt;

&lt;p&gt;With &lt;code&gt;resolve_addressed_threads: 'true'&lt;/code&gt;, the action automatically clicks "Resolve" on its own threads as soon as Gemini verifies the fix. It stays strictly in its lane: it only touches threads the bot created, never touches human comments, and gracefully warns you if your GitHub token needs additional permissions to resolve conversations.&lt;/p&gt;

&lt;h4&gt;
  
  
  B. Excluding Another Bot's Comments (&lt;code&gt;exclude_comment_authors&lt;/code&gt;)
&lt;/h4&gt;

&lt;p&gt;What happens if your team runs &lt;strong&gt;two&lt;/strong&gt; AI reviewers on the same repo (for instance, &lt;code&gt;claude[bot]&lt;/code&gt; alongside &lt;code&gt;gemini-review-action&lt;/code&gt;)?&lt;/p&gt;

&lt;p&gt;Because our action inspects existing PR comments to avoid repeating itself, it was picking up the other bot's review notes too. That meant Gemini ended up reading the other bot's homework and parroting the exact same points! You lost your independent second opinion, and you paid for hundreds of extra prompt tokens just to re-digest the other bot's prose.&lt;/p&gt;

&lt;p&gt;Adding &lt;code&gt;exclude_comment_authors: 'claude[bot]'&lt;/code&gt; filters out specified bots before building the prompt. Human feedback stays intact, and Gemini delivers a genuine, unbiased second opinion.&lt;/p&gt;




&lt;h2&gt;
  
  
  Battle-Hardened in Production: War Stories &amp;amp; Bug Fixes
&lt;/h2&gt;

&lt;p&gt;Here are a few real-world production bugs we hit since Part 1 — and how we engineered permanent fixes for them.&lt;/p&gt;

&lt;h3&gt;
  
  
  War Story 1: The Generated Schema That Blew the Token Budget
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Problem&lt;/strong&gt;: A pull request touching 30 files crashed without posting a review, failing with a token limit error. The culprit? A tiny 4 KB diff buried inside a 2.9 MB auto-generated &lt;code&gt;openapi.json&lt;/code&gt; file. Because our prompt builder attached the entire current content of every modified file alongside its diff, that single generated file consumed the entire Gemini token window on its own!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fix&lt;/strong&gt;: Rather than playing whack-a-mole adding filenames to an ignore list, we capped all attached source files at &lt;strong&gt;128 KB&lt;/strong&gt; with a clean truncation marker (diff patches themselves are never capped). If a massive prompt still approaches the model's budget, the action gracefully sheds peripheral repo context first, ensuring the core diff review always succeeds.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  War Story 2: GitHub's Concurrency Trap (and How Our Bot Caught It)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Problem&lt;/strong&gt;: If a developer pushes three commits in quick succession, you don't want to pay Gemini to review all three. We added a standard GitHub Actions &lt;code&gt;concurrency&lt;/code&gt; block with &lt;code&gt;cancel-in-progress: true&lt;/code&gt; to kill redundant runs. But we hit a snag: whenever someone left an ordinary comment on the PR, GitHub cancelled the running review! Workflow-level concurrency evaluates before the job filters kick in, treating any comment as a new run.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Caught by Our Own Bot&lt;/strong&gt;: We tried tweaking the concurrency key, but when we opened the pull request, &lt;strong&gt;our own Gemini Review Action reviewed it and pointed out our fix created a new race condition in the opposite direction!&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fix&lt;/strong&gt;: Moving &lt;code&gt;concurrency&lt;/code&gt; down to the &lt;strong&gt;job level&lt;/strong&gt; ensures GitHub only cancels runs for actual review triggers on the same PR:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;review&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;concurrency&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;group&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;gemini-review-${{ github.event.pull_request.number || github.event.issue.number }}&lt;/span&gt;
      &lt;span class="na"&gt;cancel-in-progress&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  War Story 3: Making "Commit Suggestion" Actually Work
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Problem&lt;/strong&gt;: Developers love clicking GitHub's &lt;strong&gt;"Commit suggestion"&lt;/strong&gt; button directly from an inline review comment. But LLMs are notorious for trimming leading whitespace or getting multiline replacement ranges slightly wrong — meaning a one-click commit can easily botch your indentation or overwrite the wrong lines.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fix&lt;/strong&gt;: Before posting an inline suggestion, we run a deterministic sanitiser over it. It matches the source file lines, restores stripped indentation, and corrects any off-by-one replacement ranges. When a developer clicks that button, the resulting commit is clean, properly indented, and builds first time.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  War Story 4: Surviving Transient GitHub Outages
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Problem&lt;/strong&gt;: During an incident where the GitHub API threw intermittent &lt;code&gt;503 Service Unavailable&lt;/code&gt; errors, the action successfully generated reviews from Gemini, only to crash when posting them to GitHub. We’d paid for the tokens, but the reviews were lost into the ether.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Fix&lt;/strong&gt;: We wrapped all GitHub comment and review posting in an exponential backoff retry. A review you've already paid for is never thrown away over a temporary API hiccup.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Wrapping Up
&lt;/h2&gt;

&lt;p&gt;Looking back at how far &lt;a href="https://github.com/derailed-dash/gemini-review-action" rel="noopener noreferrer"&gt;&lt;strong&gt;Gemini PR Review &amp;amp; Triage Action&lt;/strong&gt;&lt;/a&gt; has come since that first weekend build in July, I'm genuinely blown away. What started as an emergency lifeboat after the sunsetting of &lt;code&gt;run-gemini-cli&lt;/code&gt; has grown into a comprehensive, multimodal, enterprise-grade engineering harness.&lt;/p&gt;

&lt;p&gt;Whether you're a solo hobbyist who wants Emperor Palpatine or Rick Sanchez roasting your Python diffs for $0.02 a pop, or an Enterprise Cloud Architect rolling out keyless WIF authentication, BigQuery billing attribution, and architectural guardrails across hundreds of corporate repositories — this action is built for you:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7tp30f6fu03eudqgrm7v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7tp30f6fu03eudqgrm7v.png" alt="Rick Sanchez Persona Review Output" width="799" height="573"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Beyond CI/CD: Bringing Gemini Review into Your Agentic Loops
&lt;/h3&gt;

&lt;p&gt;While we designed this action primarily to automate GitHub pull request reviews, the modular architecture we've engineered under &lt;code&gt;gemini_review/&lt;/code&gt; unlocks an exciting new frontier: &lt;strong&gt;inner-loop agent verification&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In my recent deep dive, &lt;a href="https://dev.to/gde/loop-engineering-in-the-harness-autonomous-self-correcting-systems-part-2-155e"&gt;&lt;strong&gt;Loop Engineering in the Harness: Autonomous, Self-Correcting Systems&lt;/strong&gt;&lt;/a&gt;, I explored how reliable agentic architectures rely on tight, deterministic feedback loops (Generate → Verify → Correct → Converge) to eliminate hallucinated code and regressions before human intervention.&lt;/p&gt;

&lt;p&gt;Because &lt;code&gt;gemini_review&lt;/code&gt; is structured as a standalone, lightweight Python package executable via &lt;code&gt;uv&lt;/code&gt;, you don't have to wait for a remote CI push to run it. You can wire the review engine directly into your local development harness as a pre-commit or pre-push verification step. Your local coding agent can execute a local review pass against its own unstaged git diff, parse the structured severity findings, and self-correct regressions with zero session bias — before anyone else ever inspects the code!&lt;/p&gt;

&lt;h2&gt;
  
  
  Install It!
&lt;/h2&gt;

&lt;p&gt;If you haven't tried it yet (or if you installed &lt;code&gt;v1.1&lt;/code&gt; back in July and haven't looked at the new inputs since!), now is the perfect time to upgrade:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Equip your AI agent in seconds&lt;/strong&gt;, then prompt it: &lt;em&gt;"Set up Gemini code review in this repo"&lt;/em&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx skills add derailed-dash/gemini-review-action &lt;span class="nt"&gt;-y&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; &lt;span class="nt"&gt;--skill&lt;/span&gt; install-gemini-code-review-action
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Or grab the starter workflows&lt;/strong&gt; directly from &lt;a href="https://github.com/derailed-dash/gemini-review-action" rel="noopener noreferrer"&gt;derailed-dash/gemini-review-action&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Give the repository a star ⭐ on GitHub&lt;/strong&gt; — it massively helps others discover the project, and it helps me too!&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Let me know in the comments how you get on, what persona you're running in your pipelines, and what features you'd love to see next!&lt;/p&gt;




&lt;h2&gt;
  
  
  Before You Go
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Please share&lt;/strong&gt; 📢 this with anyone that you think will be interested. It might help them, and it really helps me!&lt;/li&gt;
&lt;li&gt;Please &lt;strong&gt;leave a reaction or comment&lt;/strong&gt; 💬. Interaction is good!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add a star&lt;/strong&gt; ⭐ on my repos!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Follow&lt;/strong&gt; 👉 and &lt;strong&gt;subscribe&lt;/strong&gt; 🔔, so you don’t miss my content.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  References and Useful Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/gde/automated-github-code-reviews-using-google-gemini-4l0f"&gt;Part 1: Automated GitHub Code Reviews Using Google Gemini (Dev.to)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://medium.com/google-cloud/automated-github-code-reviewsusing-google-gemini-7b4d027b3092" rel="noopener noreferrer"&gt;Part 1: Automated GitHub Code Reviews Using Google Gemini (Medium)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/derailed-dash/gemini-review-action" rel="noopener noreferrer"&gt;Dazbo’s Gemini PR Review &amp;amp; Triage Action (GitHub Repository)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/marketplace/actions/dazbo-s-gemini-code-review-issue-triage" rel="noopener noreferrer"&gt;Dazbo’s Gemini PR Review &amp;amp; Triage Action (GitHub Marketplace)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/derailed-dash/dazbo-agent-skills" rel="noopener noreferrer"&gt;Dazbo’s Agent Skills Repository (dazbo-agent-skills)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://aistudio.google.com/?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Google AI Studio&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://cloud.google.com/iam/docs/workload-identity-federation-with-deployment-pipelines?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Google Cloud Workload Identity Federation with GitHub Actions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://cloud.google.com/vertex-ai/generative-ai/pricing?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Google Cloud Vertex AI Generative AI Pricing&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://antigravity.google/?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Google Antigravity&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/gde/from-vibing-chaos-to-reliable-agents-the-what-why-and-how-of-harness-engineering-4ba0"&gt;Beyond Vibe Coding: From Vibing Chaos to Reliable Agents — Harness Engineering Part 1&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/gde/loop-engineering-in-the-harness-autonomous-self-correcting-systems-part-2-155e"&gt;Beyond Vibe Coding: Loop Engineering in the Harness — Autonomous, Self-Correcting Systems (Part 2)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dazbo.co.uk/" rel="noopener noreferrer"&gt;Dazbo’s Portfolio&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>githubactions</category>
      <category>pullrequest</category>
      <category>cicdpipeline</category>
      <category>googlegemini</category>
    </item>
    <item>
      <title>Loop Engineering in the Harness: Autonomous, Self-Correcting Systems</title>
      <dc:creator>Darren "Dazbo" Lester</dc:creator>
      <pubDate>Mon, 12 Oct 2026 21:36:09 +0000</pubDate>
      <link>https://dev.to/gde/loop-engineering-in-the-harness-autonomous-self-correcting-systems-part-2-155e</link>
      <guid>https://dev.to/gde/loop-engineering-in-the-harness-autonomous-self-correcting-systems-part-2-155e</guid>
      <description>&lt;p&gt;You are in &lt;strong&gt;Part 2&lt;/strong&gt; of the series &lt;strong&gt;&lt;em&gt;"Beyond Vibe Coding: The Engineering Blueprint for Reliable AI Agents"&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;h3&gt;
  
  
  🗺️ The Series Roadmap: Beyond Vibe Coding
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Agentic software development is drowning in fragmented buzzwords: Harness Engineering, Loop Engineering, Context Engineering, Spec-Driven Development, Evaluators, and Sandboxes. Are they competing frameworks? Redundant prompt techniques? Or something fundamentally new?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This five-part series unifies these concepts into one cohesive architectural blueprint for building production software with AI without writing code manually:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Part 1:&lt;/strong&gt; &lt;a href="https://dev.to/gde/from-vibing-chaos-to-reliable-agents-the-what-why-and-how-of-harness-engineering-4ba0"&gt;&lt;strong&gt;From Vibing Chaos to Reliable Agents: The What, Why, and How of Harness Engineering&lt;/strong&gt;&lt;/a&gt;
We diagnose the hangover of vibe coding, unpack the paradigm shift of &lt;em&gt;shifting developer interventions left&lt;/em&gt;, establish our bedrock formula (&lt;strong&gt;Agent = Model + Harness&lt;/strong&gt;), explore the Lewis Hamilton motorsport analogy, and deconstruct the deterministic components that make up a production developer environment.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Part 2: Loop Engineering in the Harness: Autonomous, Self-Correcting Systems (This Article)&lt;/strong&gt;
We fire up the dynamic runtime engine of the harness: deconstructing the core loop components, establishing hybrid evaluation rubrics (deterministic tests + LLM goal fidelity + tool trajectory verification), and applying the Ratchet Principle.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Part 3:&lt;/strong&gt; &lt;a href="https://dev.to/gde/spec-driven-development-for-the-win-disposable-code-living-blueprints-and-building-like-a-boss-2bnn"&gt;&lt;strong&gt;Spec-Driven Development For-the-Win: Disposable Code, Living Blueprints, and Building Like a Boss&lt;/strong&gt;&lt;/a&gt;
We explore Spec-Driven Development (where code is disposable and specifications are the single source of truth), master Google Antigravity's unified harness and interactive slash commands (&lt;code&gt;/grill-me&lt;/code&gt;, &lt;code&gt;/plan&lt;/code&gt;, &lt;code&gt;/goal&lt;/code&gt;, &lt;code&gt;/boost&lt;/code&gt;, &lt;code&gt;/learn&lt;/code&gt;), and combine formal specs on disk with autonomous tactical workflows in your session.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Part 4:&lt;/strong&gt; &lt;a href="https://dev.to/gde/inner-loops-in-practice-fresh-contexts-output-discipline-and-day-1-loops-416d"&gt;&lt;strong&gt;Inner Loops in Practice: Fresh Contexts, Output Discipline, and Day-1 Loops&lt;/strong&gt;&lt;/a&gt;
We go under the hood of an inner execution loop to see why looping runs faster and cheaper than single-pass vibing (fresh subagent contexts, &lt;code&gt;LIVING_MEMORY.md&lt;/code&gt;, and strict output discipline), then wire day-one loops into any repository using declarative Markdown, tiered rubrics, &lt;code&gt;loopy&lt;/code&gt;, and Antigravity slash commands.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Part 5: Completing the AI Harness: Headless CI Loops, ADK Graphs, and Self-Improving Harnesses (Coming Soon)&lt;/strong&gt;
We scale up to unattended headless execution (Antigravity CLI, Python SDK, Remote Agent) and custom Google ADK &lt;code&gt;LoopAgent&lt;/code&gt; / ADK 2.0 &lt;code&gt;Workflow&lt;/code&gt; graphs, close the outer meta-loop with self-improving harnesses (&lt;code&gt;EXPERIENCE.md&lt;/code&gt;), and tie every concept together in a Monday-morning repo checklist.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  The "Generate and Fix" Trap: Stop Being the Human Correction Loop
&lt;/h2&gt;

&lt;p&gt;Howdy friends, and welcome back!&lt;/p&gt;

&lt;p&gt;In &lt;a href="https://dev.to/gde/from-vibing-chaos-to-reliable-agents-the-what-why-and-how-of-harness-engineering-4ba0"&gt;Part 1&lt;/a&gt;, we established the bedrock formula of modern agentic engineering:&lt;/p&gt;

&lt;p&gt;

&lt;/p&gt;
&lt;div class="katex-element"&gt;
  &lt;span class="katex-display"&gt;&lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord text"&gt;&lt;span class="mord"&gt;Agent&lt;/span&gt;&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mrel"&gt;=&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord text"&gt;&lt;span class="mord"&gt;Model&lt;/span&gt;&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mbin"&gt;+&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord text"&gt;&lt;span class="mord"&gt;Harness&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;


&lt;p&gt;We deconstructed the core deterministic components of the harness: hierarchical context rules (&lt;code&gt;AGENTS.md&lt;/code&gt; / &lt;code&gt;GEMINI.md&lt;/code&gt;), living version-controlled state, curated Model Context Protocol (MCP) tools, on-demand skills, sandboxing, and observability. This is how we engineered the race car chassis.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;But wait... How does the work actually get done?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In simple, naive AI interactions, developers issue a prompt, get some output, and then typically course-correct. Maybe the developer copies the output from the terminal into the chat and asks for a fix.&lt;/p&gt;

&lt;p&gt;Notice what is happening here: we have an &lt;strong&gt;iterative cycle of action, verification, and course-correction&lt;/strong&gt;. You cannot escape it. But in an ad-hoc vibe coding workflow, &lt;strong&gt;you are the loop&lt;/strong&gt;. You act as an exhausted organic clipboard, forcing yourself to micromanage, inspect, and babysit every single turn. If you're doing that, you haven't automated much; you're just paying a subscription to watch a terminal like a nervous ferret.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx0b7bhu5ssxbe7f1mvrz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx0b7bhu5ssxbe7f1mvrz.png" alt="Watching the agent like a nervous ferret" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Loop Engineering&lt;/strong&gt; automates that execution cycle.&lt;/p&gt;

&lt;p&gt;Instead of forcing a human to watch and correct every turn, the loop enables our agent to cycle through action, verification, and course-correction &lt;strong&gt;autonomously within the harness&lt;/strong&gt;. The agent executes the code, runs the automated test suites, evaluates its work against strict rubrics, refines its hypotheses, and makes corrections... On its own!&lt;/p&gt;

&lt;p&gt;Crucially, this does not mean ejecting the human entirely. It means moving from continuous babysitting to strategic governance: &lt;strong&gt;Human-in-the-Loop does NOT mean Human-in-Every-Turn&lt;/strong&gt;. The agent executes the rapid, deterministic feedback cycle autonomously, and only pauses to escalate to the human conductor at &lt;strong&gt;predefined escalation points&lt;/strong&gt; — such as hitting persistent evaluation plateaus, encountering ambiguous requirements, or proposing irreversible, high-risk actions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F97g5hpnm9bcqw6wtnwot.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F97g5hpnm9bcqw6wtnwot.png" alt="The Loop" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;A Crucial Distinction: The Development Workbench, Not Runtime Infrastructure&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When we talk about loop engineering, the goal is not usually to ship autonomous, self-modifying while-loops into a live, customer-facing production application. The value of harness engineering and loop engineering is that it provides a disciplined feedback mechanism during the development phase to &lt;strong&gt;build software that is production-grade&lt;/strong&gt;. The loop is the automated forge where code is hammered, tested, and tempered; what you actually deploy to the cloud is resilient, production-ready software.&lt;/p&gt;

&lt;p&gt;In tokenomics terms, this aligns to so-called &lt;strong&gt;Spec Spend&lt;/strong&gt; (as explored in my upcoming enterprise whitepaper, &lt;em&gt;The Agentic Revolution&lt;/em&gt;). Burning tokens in the developer harness to explore hypotheses, run tests, and self-correct is a &lt;strong&gt;high-value, high-leverage investment&lt;/strong&gt;. Spending a couple of dollars in developer Spec Spend to forge a hardened application prevents catastrophic regressions and uncontrollable costs in production &lt;strong&gt;Run Spend&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Core Components of an Engineered Developer Loop
&lt;/h2&gt;

&lt;p&gt;To move beyond fragile trial-and-error, an engineered agentic loop requires distinct, interconnected components:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhwkl5yfre9dls5ociokg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhwkl5yfre9dls5ociokg.png" alt="Core Components of the Loop" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1 — Goal (The Anchor):&lt;/strong&gt; A clear, unambiguous statement of what the agent must accomplish. In long-running autonomous runs, context compression can cause the model to drift. &lt;strong&gt;A resilient harness restates the core goal on every single iteration&lt;/strong&gt;, keeping the agent firmly anchored to its original objective.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2 — Context (The Environment &amp;amp; Grounding Data):&lt;/strong&gt; Everything the agent knows about the world before taking an action. This context extends far beyond prompt templates; it is the total information environment available to the loop:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Standing Architectural Rules &amp;amp; Guardrails:&lt;/strong&gt; Hierarchical instructions, coding standards, and operational boundaries drawn from &lt;code&gt;GEMINI.md&lt;/code&gt;, &lt;code&gt;AGENTS.md&lt;/code&gt;, and activated Agent Skills.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Workspace Data &amp;amp; Local Fixtures:&lt;/strong&gt; Source code, schema files, seed datasets, sample payloads, and test mocks residing directly in the repository.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dynamic Knowledge &amp;amp; Database State:&lt;/strong&gt; Grounding information retrieved on demand via MCP tools or APIs, such as querying living documentation from (say) Confluence or Google Drive, inspecting issues on GitHub, or introspecting schemas and retrieving data from databases.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;💡 &lt;strong&gt;Decoupling Engineering Guardrails from Application Specs&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A crucial architectural discipline in production harnesses is separating the &lt;strong&gt;Application Goal Specification&lt;/strong&gt; from the &lt;strong&gt;Engineering Discipline&lt;/strong&gt;. Naive prompt engineering often conflates the two, burying feature requirements beneath paragraphs of repetitive coding hygiene instructions. In reality, engineering guardrails (e.g. Python standards, mandating TDD approaches, Pydantic input parameterisation) should be &lt;strong&gt;independent of any single application spec&lt;/strong&gt;. They represent reusable, global, organisation-, domain- or team-level engineering policies.&lt;/p&gt;

&lt;p&gt;Centralising them in persistent workspace configurations (&lt;code&gt;GEMINI.md&lt;/code&gt;, &lt;code&gt;AGENTS.md&lt;/code&gt;) and reusable Agent Skills means you define them once and govern them centrally across all projects. The feature specification stays lean and domain-focused.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;3 — Tools (The Levers):&lt;/strong&gt; The restricted set of actions the agent is permitted to execute, including sandboxed shell commands and MCP server tools. The harness strictly limits tool access to reduce blast radius and limit tool choice paralysis.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4 — Evals (The Objective Judge):&lt;/strong&gt; The scoring mechanisms that evaluate the progress of each iteration. Without automated evals, the agent is flying blind. A robust harness evaluates across three dimensions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic Output Checks:&lt;/strong&gt; Mechanical unit tests, integration suites, and static linters (&lt;code&gt;pytest&lt;/code&gt;, &lt;code&gt;ruff&lt;/code&gt;, &lt;code&gt;codespell&lt;/code&gt;) that verify the compilation, syntax, and functional correctness of the generated artifacts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tool Trajectory &amp;amp; Process Verification:&lt;/strong&gt; Inspecting &lt;em&gt;how&lt;/em&gt; the agent reached the result. Did it invoke only approved tools in the expected sequence? Did it respect tool schemas without hallucinating arguments? Did it avoid thrashing loops or calling forbidden APIs?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Semantic LLM-as-a-Judge Analyses:&lt;/strong&gt; Using models to evaluate the qualitative requirements — crucially including &lt;strong&gt;Goal Fidelity&lt;/strong&gt; (verifying whether the solution actually delivers what was requested) and architectural cleanliness. While semantic autoraters can use rubric scales or qualitative feedback, framing them as &lt;strong&gt;binary &lt;code&gt;yes/no&lt;/code&gt; assertions&lt;/strong&gt; is often a very effective approach to eliminate subjective score drift.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;5 — Memory (Loop History &amp;amp; Scratchpad):&lt;/strong&gt; The structured log of what has been attempted across preceding iterations. The agent records what worked, what failed, and the progression of evaluation scores over time. In a well-engineered harness, this persistent scratchpad prevents the model from repeating known dead-ends or thrashing in circular loops.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6 — Iteration Discipline (The One-Change Rule):&lt;/strong&gt; This is about applying the scientific method to autonomous iteration. This discipline applies specifically to changes evaluated for &lt;strong&gt;semantic value&lt;/strong&gt;. When iterating against semantic autoraters, the loop instructs the agent to &lt;strong&gt;modify one thing at a time&lt;/strong&gt; before re-scoring. If multiple semantic changes are introduced at once, causal observability collapses: if a rubric score drops, the agent cannot tell which alteration caused the regression. Conversely, purely mechanical deterministic fixes (resolving compiler syntax, fixing lint warnings from &lt;code&gt;ruff&lt;/code&gt; or &lt;code&gt;codespell&lt;/code&gt;, and formatting) can and should be batch-remediated in a single turn.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7 — Escalation Protocol (The Safety Valve):&lt;/strong&gt; Explicit operational triggers that halt the loop and request human intervention. For example, if an agent encounters conflicting specifications, hits three consecutive evaluation failures, or proposes an irreversible action (e.g. deleting cloud infrastructure), it must not hallucinate a guess. It must package its findings, present a reasoned recommendation, and yield control to the human conductor.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;8 — Stopping Condition (The Finish Line):&lt;/strong&gt; Clear, programmatic exit criteria that tell the loop when execution is complete. Such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;100% of deterministic checks and semantic rubric assertions passing with zero lint warnings.&lt;/li&gt;
&lt;li&gt;Target state verification: the critique model explicitly certifies that the initial goal has been fully met.&lt;/li&gt;
&lt;li&gt;A convergence plateau where successive iterations produce negligible score improvements.&lt;/li&gt;
&lt;li&gt;Hard circuit breakers, such as reaching a maximum iteration count (e.g. 5 loops) or a predefined token spend limit.&lt;/li&gt;
&lt;/ul&gt;




&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Is It a Loop Bug or a Harness Bug?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When an autonomous agent goes off the rails during development, we often waste days trying to fix the wrong things.&lt;/p&gt;

&lt;p&gt;Use this simple litmus test:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;If you can resolve the issue by refining the prompt, sharpening the goal, updating the rubric, or adjusting the stopping condition → It is a Loop bug.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;If resolving the issue requires changing tool definitions, adjusting sandbox permissions, modifying execution timeouts, or intercepting runtime errors → It is a Harness bug.&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Don't attempt to solve a harness problem by writing a more pleading prompt. Fix the layer that actually broke!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2wl702450gdl9ykkwedg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2wl702450gdl9ykkwedg.png" alt="Loop bug vs harness bug" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The Ratchet Principle: Engineering Continuous Improvement
&lt;/h3&gt;

&lt;p&gt;What happens once you diagnose an edge case or failure that &lt;em&gt;wasn't&lt;/em&gt; caught by your initial harness?&lt;/p&gt;

&lt;p&gt;This brings us to the operational crown jewel of harness engineering: &lt;strong&gt;The Ratchet Principle&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbmkd3fxr8kuyps54f3kw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbmkd3fxr8kuyps54f3kw.png" alt="Ratchet Principle" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When an AI agent stumbles, makes an architectural mistake, or introduces a subtle bug, the amateur response is to re-prompt the model in the chat: &lt;em&gt;"No, don't do that, use the new API method instead."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That is an utter waste of a lesson. The moment that conversation ends, that context evaporates into thin air. In tomorrow's session, on a new branch, or when a teammate runs a similar task, the agent will walk directly into the exact same trap.&lt;/p&gt;

&lt;p&gt;Under the Ratchet Principle:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Whenever an agent makes a mistake, you update the harness, not just the prompt.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Did the agent use an outdated API parameter?&lt;/strong&gt; Update the workspace &lt;code&gt;GEMINI.md&lt;/code&gt; or add an authoritative type schema.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Did the agent forget to handle a specific error code?&lt;/strong&gt; Add a permanent check to the binary evaluation rubric.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Did the agent create an unformatted commit?&lt;/strong&gt; Add a pre-commit hook to your Git harness.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Did the agent struggle with a Google Cloud product?&lt;/strong&gt; Load the corresponding skill from the &lt;code&gt;google-cloud-developer&lt;/code&gt; plugin.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Like a mechanical ratchet, every single failure permanently tightens the system. The harness clicks forward one notch. Once a rule or rubric check is committed to your repository, that specific failure mode is eliminated forever. Over time, your development harness becomes an impenetrable repository of institutional engineering wisdom.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Loops Work: The Power of Feedback
&lt;/h2&gt;

&lt;p&gt;Why go through the effort of building a multi-component loop instead of relying on a single, well-crafted prompt?&lt;/p&gt;

&lt;p&gt;I created an application that demonstrates building an application agentically, and compares &lt;em&gt;with and without&lt;/em&gt; harness and loop, side-by-side.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu31wyplsqe93fpa59d8c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu31wyplsqe93fpa59d8c.png" alt="Side-by-side harness engineering demo" width="800" height="507"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We'll deep-dive into this shortly. But for now, I'll give you the key findings from this application, which align with industry findings. Essentially, if you have a harness with a loop, these are the outcomes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You use &lt;strong&gt;fewer tokens.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;overall time&lt;/strong&gt; to get to a solution is &lt;strong&gt;dramatically reduced&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;human input&lt;/strong&gt; required is &lt;strong&gt;massively reduced&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;overall cost&lt;/strong&gt; to produce the solution is &lt;strong&gt;significantly reduced&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;quality&lt;/strong&gt; of your solution, and its alignment to your requirements, is much better.&lt;/li&gt;
&lt;li&gt;Most importantly — &lt;strong&gt;the solution is more likely to &lt;em&gt;actually work&lt;/em&gt;.&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;TL;DR — single-pass prompting is gambling that an LLM will get dozens of interconnected variables right on the first try.&lt;/p&gt;

&lt;p&gt;In contrast, wrapping the model in an automated loop mirrors the exact rhythm experienced software engineers use every day: propose a targeted change, run the tests and evals, feed the diagnostics straight back into the next turn, and iterate until the solution passes. The loop keeps the model honest, converges on working code dramatically faster, and stops intermediate errors from compounding into an unrecoverable mess.&lt;/p&gt;

&lt;h3&gt;
  
  
  Three Traps to Avoid
&lt;/h3&gt;

&lt;p&gt;However, naive loops without rigorous harness constraints may fall prey to some common &lt;strong&gt;loop traps&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1 — The Premature Exit:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The agent runs superficial tests, assumes everything works because there were no syntax errors, and prematurely declares victory.&lt;br&gt;&lt;br&gt;
&lt;em&gt;Neutralised by: Mandatory TDD gates and non-negotiable passing thresholds on automated test suites.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2 — The Sycophantic Yes-Agent:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We all know that LLMs can be hopelessly sycophantic.&lt;br&gt;&lt;br&gt;
&lt;em&gt;Q: "Do I look good in this shell suit?"&lt;/em&gt;&lt;br&gt;&lt;br&gt;
&lt;em&gt;A: "Why yes, Dazbo! You look so hunky wearing that."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjs7amlxly7y0alilx5cb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjs7amlxly7y0alilx5cb.png" alt="Do I look good in this shell suit?" width="768" height="1231"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When using an LLM to rate the output of a loop, the model easily falls into the same trap — uncritically praising the worker agent's output.&lt;br&gt;&lt;br&gt;
&lt;em&gt;Neutralised by: Structuring evaluations as strict, binary assertions and verifiable code artifacts.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3 — The Bottomless Cash Pit:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An unachievable rubric threshold or a brittle stopping condition traps the agent in a recursive loop, repeatedly modifying the same file and burning through hundred-dollar token budgets without making forward progress. While developer Spec Spend is meant to be exploratory, an unconstrained loop turns healthy investment into an uncontrolled financial bonfire.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkb74pduwgb8op3ndlake.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkb74pduwgb8op3ndlake.png" alt="Uncontrolled token burn" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Neutralised by: Stall detection, plateau convergence checks, and hard iteration circuit breakers.&lt;/em&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  The Hybrid Evaluation Rubric (Deterministic + Semantic)
&lt;/h2&gt;

&lt;p&gt;One of the biggest mistakes teams make when building agent loops is relying on fluffy, subjective evaluation prompts: &lt;em&gt;"Rate the quality of this code on a scale of 1 to 5."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Models are notoriously inconsistent when asked for qualitative ratings; what scores a 4 on Tuesday might score a 2 on Wednesday. In contrast, &lt;strong&gt;binary rubrics&lt;/strong&gt; convert these fluffy judgments into repeatable deterministic results. So let's just turn the evaluations into verifiable &lt;code&gt;yes/no&lt;/code&gt; questions!&lt;/p&gt;

&lt;p&gt;Furthermore, as Google AI leaders like Shubham Saboo have pointed out in &lt;em&gt;Finally, Loop Engineering Explained&lt;/em&gt; when contrasting loops with traditional prompt engineering, reliable loops must &lt;strong&gt;automate what is checkable&lt;/strong&gt; — and that begins with &lt;strong&gt;testing whether the generated output actually achieves the goal that was set&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/ew6gBJNzC5w" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;The goal is not just passing unit tests and being clean of linting errors. We also need to be sure that the solution actually delivers the feature requested.&lt;/p&gt;

&lt;p&gt;For this reason, our evaluation rubric should combine &lt;strong&gt;deterministic checks&lt;/strong&gt; with &lt;strong&gt;semantic checks&lt;/strong&gt;. The semantic checks are executed by a critique agent or LLM-as-a-judge autorater.&lt;/p&gt;

&lt;p&gt;And we must evaluate &lt;strong&gt;tool trajectory&lt;/strong&gt; alongside code execution. You cannot evaluate only the final artifact; the harness must verify &lt;em&gt;how&lt;/em&gt; the agent reached the result. Tool trajectory evaluation operates across two complementary layers:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic Trajectory Evaluation (Mechanical Trace Inspection):&lt;/strong&gt; Code-level validation inspecting the execution trace without using an LLM. Did the agent invoke only authorised tools from its allowlist? Did arguments strictly satisfy JSON parameter schemas? Did it follow mandatory prerequisite ordering (e.g. running the test suite &lt;em&gt;before&lt;/em&gt; attempting to commit code)? Did it stay within maximum tool call budgets rather than entering an unconstrained loop?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Semantic Trajectory Evaluation (Reasoning &amp;amp; Efficiency):&lt;/strong&gt; Evaluated by a critique agent or LLM judge. Did the agent select the &lt;em&gt;most appropriate and efficient&lt;/em&gt; tool for the problem, or did it take an absurdly convoluted detour (e.g. running fifteen individual file-read calls instead of a single targeted grep)? When a tool returned an unexpected error or empty result, did the agent reason soundly about the failure and adapt its strategy, or did it flail repetitively?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;An agent that arrives at a working file after making ten redundant, unapproved tool calls or taking dangerous exploratory detours is an operational failure.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjf5xpj23l770udijg7bq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjf5xpj23l770udijg7bq.png" alt="Two Tier Evaluation Rubrics" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The Anatomy of a Production-Grade Evaluation Rubric
&lt;/h3&gt;

&lt;p&gt;Here is a simple example; a 10-check rubric illustrating how deterministic and semantic checks — across both code and tool trajectories — work together:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;# Evaluation Rubric
&lt;/span&gt;
&lt;span class="gu"&gt;## Part A: Deterministic &amp;amp; Static Checks (Automated via Test Runners, Linters &amp;amp; Trace Inspectors)
&lt;/span&gt;
| ID | Check (1 = True, 0 = False) | Evaluation Method | Result |
|:---|:---|:---|:---:|
| 1.1 | All unit tests in &lt;span class="sb"&gt;`tests`&lt;/span&gt; pass cleanly? | &lt;span class="sb"&gt;`pytest`&lt;/span&gt; runner | [ ] |
| 1.2 | &lt;span class="sb"&gt;`uvx ruff check .`&lt;/span&gt; and &lt;span class="sb"&gt;`uvx codespell`&lt;/span&gt; report zero errors or warnings? | Static analysis CLI | [ ] |
| 1.3 | Function signatures use PEP 585 standard type hints (e.g. &lt;span class="sb"&gt;`list[str]`&lt;/span&gt;, &lt;span class="sb"&gt;`dict[str, Any]`&lt;/span&gt;)? | Linter | [ ] |
| 1.4 | All database queries use parameterised inputs (no raw f-strings or string concatenation)? | Static analysis / AST | [ ] |
| 1.5 | &lt;span class="gs"&gt;**Deterministic Trajectory Conformance:**&lt;/span&gt; Did the agent invoke only authorised tools, satisfy parameter schemas, respect tool call limits, and follow mandatory prerequisite ordering (e.g. test before commit)? | Harness Trace Inspector (Code) | [ ] |

&lt;span class="gu"&gt;## Part B: Semantic Yes/No Analyses (Evaluated via LLM-as-a-Judge / Critique Agent)
&lt;/span&gt;
| ID | Binary Semantic Assertion (1 = True, 0 = False) | Evaluation Method | Result |
|:---|:---|:---|:---:|
| 2.1 | &lt;span class="gs"&gt;**Target State Completion (Goal Fidelity):**&lt;/span&gt; Does the generated solution demonstrably deliver all functional capabilities and explicit deliverables declared in the goal statement, without omitting mandatory acceptance criteria? | Semantic Judge | [ ] |
| 2.2 | &lt;span class="gs"&gt;**Scope Discipline (Anti-Hallucination):**&lt;/span&gt; Does the solution achieve the goal without generating unrequested speculative abstractions, hallucinating unused helper modules, or modifying files outside the agreed boundary? | Semantic Judge | [ ] |
| 2.3 | &lt;span class="gs"&gt;**Trajectory Efficiency &amp;amp; Tool Reasoning:**&lt;/span&gt; Did the agent choose sensible, direct tool pathways to solve the problem rather than taking convoluted detours or repeatedly retrying failed tool strategies without adaptation? | Semantic Judge | [ ] |
| 2.4 | &lt;span class="gs"&gt;**Architectural Integrity &amp;amp; Interface Boundaries:**&lt;/span&gt; Does the code maintain clean boundaries, preventing internal database implementation details or raw connection strings from leaking into public interfaces or caller errors? | Semantic Judge | [ ] |
| 2.5 | &lt;span class="gs"&gt;**Design Rationale &amp;amp; Intent:**&lt;/span&gt; Does the module-level docstring clearly explain the architectural *why* (why this pattern was chosen over alternatives) rather than merely restating what the code does? | Semantic Judge | [ ] |

&lt;span class="gs"&gt;**Passing Criteria:**&lt;/span&gt; 10 / 10 (100% pass required before code can be committed).
&lt;span class="gs"&gt;**Iteration Policy:**&lt;/span&gt; Failures on code, test suites, or sub-optimal tool trajectories feed diagnostic feedback into the next turn for autonomous remediation.
&lt;span class="gs"&gt;**Hard Stop (Human Escalation):**&lt;/span&gt; The harness only aborts and alerts the developer if the agent breaches security boundaries (e.g. unapproved destructive commands), enters an unrecoverable tool thrashing loop, or reaches the maximum iteration limit (5 loops).
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice how this structure enforces discipline across every dimension:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Checks 1.1–1.5&lt;/strong&gt; verify mechanical hygiene (syntax, compilation, test passage, and deterministic tool trajectory allowlists/orderings).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Checks 2.1–2.2&lt;/strong&gt; verify &lt;strong&gt;Goal Fidelity&lt;/strong&gt; — comparing the candidate output directly against the initial user intent. If the agent forgot batch processing or wandered off into speculative refactoring, Check 2.1 or 2.2 drops to 0, and the loop refuses to exit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check 2.3&lt;/strong&gt; verifies semantic tool trajectory efficiency — ensuring the agent didn't burn tokens on irrational intermediate actions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Checks 2.4–2.5&lt;/strong&gt; verify semantic architecture, error safety, and living documentation quality.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By presenting the agent with this exact markdown rubric, the model can self-score its work after every turn. It doesn't wonder whether its output is "good enough"; it knows with precision whether it satisfied the criteria and achieved the goal.&lt;/p&gt;

&lt;h4&gt;
  
  
  No Arbitrary Point Ceiling
&lt;/h4&gt;

&lt;p&gt;While our example shows 10 checks for clear illustration, let's avoid any misconceptions: &lt;strong&gt;an evaluation rubric does not have an arbitrary 10-point ceiling&lt;/strong&gt;. In practice, your rubric can have whatever point total you want. For example, you might also include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Frontend contract checks:&lt;/strong&gt; Verifying TypeScript interface alignment, component contracts, and state store mutations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API wiring verification:&lt;/strong&gt; Confirming route registration, middleware attachment, payload serialisation, and HTTP status code mappings.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Latency bounds:&lt;/strong&gt; Asserting that mock or integration calls stay strictly within defined latency budgets (e.g. 95% in under 250ms).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security invariants:&lt;/strong&gt; Enforcing parameterised queries, sanitised inputs, absence of leaked credentials or stack traces, and zero-trust egress policies.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Side-by-Side Demo: The Harness Engineering Workbench
&lt;/h2&gt;

&lt;p&gt;Theory is cheap. Let's prove it!&lt;/p&gt;

&lt;p&gt;To demonstrate the quantifiable difference between raw vibe coding and disciplined loop engineering, I built an open-source, interactive, split-screen evaluation workbench: the &lt;a href="https://github.com/derailed-dash/harness-engineering-demo" rel="noopener noreferrer"&gt;Harness Engineering Demo&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4yxtl767xywq1u8isyrq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4yxtl767xywq1u8isyrq.png" alt="Harness Engineering Workbench" width="800" height="330"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The workbench pits two autonomous tracks against each other in real time, each running concurrently with the same model. (The demo uses &lt;code&gt;Gemini 3.8-Flash&lt;/code&gt; out-of-the-box, but this is configurable.)&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The Unharnessed Track — Vibe Coding:&lt;/strong&gt; A raw single prompt containing the user specification is dispatched directly to the model. We supply no additional workspace rules or guardrails, and no specialised skills. There is no autonomous loop and no iterative self-healing. We evaluate the output once, at the very end.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Harnessed Track — Loop Engineering:&lt;/strong&gt; An autonomous multi-turn loop executes in an isolated workspace. We provide the &lt;em&gt;same specification prompt&lt;/em&gt; as before. But this time we also provide additional context and guardrails, we equip the agent with relevant skills, and we evaluate each iteration with a 14-point rubric.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;What is the demo actually building?&lt;/em&gt; Well, the specification is for the non-trivial task of building a &lt;em&gt;"Cosmic Trivia &amp;amp; Strategy Conquest Game"&lt;/em&gt;, a full-stack sci-fi game featuring a FastAPI backend, a directed graph of galactic sectors, turn-based combat, dynamic AI trivia generation, and an interactive browser-based star map with real-time HUD metrics and combat dialogues.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Harness: Context, Skills, and Living Memory
&lt;/h3&gt;

&lt;p&gt;Let's start by looking at the supporting &lt;strong&gt;context&lt;/strong&gt; we supply (&lt;code&gt;harness/harness_context.md&lt;/code&gt;). This would typically be part of your global reusable context (e.g. &lt;code&gt;AGENTS.md&lt;/code&gt; or &lt;code&gt;GEMINI.md&lt;/code&gt;) that you use as an engineer, as a team, or even as an organisation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;# Engineering Context &amp;amp; Harness Guardrails
&lt;/span&gt;
&lt;span class="gu"&gt;## Persona &amp;amp; Role
&lt;/span&gt;
You are a Principal Software Engineer and Systems Architect. You produce modular, production-grade, and self-documenting code following strict engineering standards. You practice test-driven development, enforce strict interface contracts, and design systems with clear separation of concerns.

&lt;span class="gu"&gt;## 1. Environment &amp;amp; Coding Standards
&lt;/span&gt;
&lt;span class="k"&gt;- &lt;/span&gt;&lt;span class="gs"&gt;**Python Version**&lt;/span&gt;: Python 3.13 standard.
&lt;span class="k"&gt;- &lt;/span&gt;&lt;span class="gs"&gt;**Type Hinting**&lt;/span&gt;: Strict PEP 585 (use built-in &lt;span class="sb"&gt;`list[str]`&lt;/span&gt;, &lt;span class="sb"&gt;`dict[str, Any]`&lt;/span&gt;, &lt;span class="sb"&gt;`tuple[int, ...]`&lt;/span&gt;, never use deprecated &lt;span class="sb"&gt;`typing.List`&lt;/span&gt; or &lt;span class="sb"&gt;`typing.Dict`&lt;/span&gt;).
&lt;span class="k"&gt;- &lt;/span&gt;&lt;span class="gs"&gt;**Scope Discipline**&lt;/span&gt;: Only create required files specified in the task goal or architecture. Do not generate speculative helper files, hallucinated third-party dependencies, or dead code.

&lt;span class="gu"&gt;## 2. Test-Driven Development (TDD)
&lt;/span&gt;
&lt;span class="k"&gt;- &lt;/span&gt;&lt;span class="gs"&gt;**Mandatory Test Suite**&lt;/span&gt;: Author a comprehensive unit test suite in &lt;span class="sb"&gt;`tests/`&lt;/span&gt; before or alongside implementation covering core domain logic, edge cases, and state transitions.
&lt;span class="k"&gt;- &lt;/span&gt;&lt;span class="gs"&gt;**Verification Gate**&lt;/span&gt;: Verify that all unit tests pass cleanly via &lt;span class="sb"&gt;`pytest`&lt;/span&gt; before declaring any task complete.

&lt;span class="gu"&gt;## 3. Backend Architecture &amp;amp; Security Guardrails
&lt;/span&gt;
&lt;span class="k"&gt;- &lt;/span&gt;&lt;span class="gs"&gt;**Parameterisation**&lt;/span&gt;: All API request bodies and input parameters must use structured Pydantic models with input validation. Never accept raw unvalidated dictionaries or execute dynamic evaluation (&lt;span class="sb"&gt;`eval`&lt;/span&gt;, &lt;span class="sb"&gt;`exec`&lt;/span&gt;).
&lt;span class="k"&gt;- &lt;/span&gt;&lt;span class="gs"&gt;**Error Handling**&lt;/span&gt;: Invalid inputs, illegal state transitions, or domain rule violations must trigger actionable HTTP 400 responses without leaking internal stack traces.
&lt;span class="k"&gt;- &lt;/span&gt;&lt;span class="gs"&gt;**Architectural Integrity**&lt;/span&gt;: Maintain strict modular boundaries. Keep domain logic pure and independent of HTTP transports, database drivers, or UI presentation. Expose REST endpoints with explicit routing.
&lt;span class="k"&gt;- &lt;/span&gt;&lt;span class="gs"&gt;**Documentation**&lt;/span&gt;: Include clear top-of-module docstrings explaining architectural intent and design rationale ('why' over 'what').

&lt;span class="gu"&gt;## 4. Autonomous Harness Workflow &amp;amp; Tooling Protocol
&lt;/span&gt;
&lt;span class="k"&gt;- &lt;/span&gt;&lt;span class="gs"&gt;**On-Demand Skill Discovery &amp;amp; Activation**&lt;/span&gt;: Inspect the &lt;span class="sb"&gt;`&amp;lt;available_skills&amp;gt;`&lt;/span&gt; catalogue in your harness context; when &lt;span class="sb"&gt;`# ACTIVATED ENGINEERING SKILLS`&lt;/span&gt; is already loaded in your context, apply those skills directly without re-activating them.
&lt;span class="k"&gt;- &lt;/span&gt;&lt;span class="gs"&gt;**Initial Turn Synthesis (Iteration 1)**&lt;/span&gt;: Respond directly in Markdown with a concise &lt;span class="gs"&gt;**Architectural &amp;amp; TDD Verification Plan**&lt;/span&gt; (150–250 words) detailing module boundaries, Pydantic request/response schemas, and the core unit test cases (&lt;span class="sb"&gt;`tests/`&lt;/span&gt;), concluding with a single brief (~15-line) Python code block illustrating the core Pydantic request/response contracts (omit full multi-file implementations).
&lt;span class="k"&gt;- &lt;/span&gt;&lt;span class="gs"&gt;**Automated Gate Verification**&lt;/span&gt;: At the end of each iteration turn, your generated deliverables are materialised into the workspace and the harness evaluation gate executes &lt;span class="sb"&gt;`pytest`&lt;/span&gt;, &lt;span class="sb"&gt;`ruff`&lt;/span&gt;, and all mechanical and semantic rubric checks, recording a structured &lt;span class="gs"&gt;**Iteration Evidence Receipt**&lt;/span&gt; in &lt;span class="sb"&gt;`LIVING_MEMORY.md`&lt;/span&gt;.
&lt;span class="k"&gt;- &lt;/span&gt;&lt;span class="gs"&gt;**Targeted Self-Healing from Living Memory (Iteration 2+)**&lt;/span&gt;: When living memory diagnostics from a prior iteration are present in your context, respond directly in Markdown with a concise &lt;span class="gs"&gt;**Self-Healing Remediation Summary**&lt;/span&gt; (100–200 words) citing each failed check ID, its root cause, and the targeted code fix applied.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note how this additional context defines the engineering persona, enforces our coding standards, mandates test-driven development (TDD), describes error handling requirements, captures how we want code documentation written, and establishes the autonomous loop workflow.&lt;/p&gt;

&lt;p&gt;Also, because we want output of each loop to guide the next efficiently, this particular loop instructs the agent &lt;strong&gt;not to dump full multi-file implementations into the conversational stream&lt;/strong&gt;. Instead it asks for a succinct summary of waht went wrong and how we might remediate next time.&lt;/p&gt;

&lt;p&gt;Crucially, this is all &lt;em&gt;reusable, project-agnostic&lt;/em&gt; context rather than context coupled to the application specification.&lt;/p&gt;

&lt;p&gt;Next, observe that the harness has a number of &lt;strong&gt;specialised skills&lt;/strong&gt; available in &lt;code&gt;harness/skills/&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;api-and-interface-design&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;gemini-api-dev&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;test-driven-development&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Rather than hardcoding these skill names into &lt;code&gt;harness_context.md&lt;/code&gt; or pre-loading every skill's full Markdown instructions into the startup prompt, the harness dynamically scans the &lt;code&gt;SKILL.md&lt;/code&gt; YAML frontmatter (&lt;code&gt;name&lt;/code&gt; and &lt;code&gt;description&lt;/code&gt;) in &lt;code&gt;harness/skills/&lt;/code&gt; and injects a lightweight &lt;code&gt;&amp;lt;available_skills&amp;gt;&lt;/code&gt; catalog. The agent inspects this catalog against the specification and invokes &lt;code&gt;activate_skill&lt;/code&gt; on demand to load only the instructions it needs.&lt;/p&gt;

&lt;p&gt;Finally, our harness maintains &lt;strong&gt;living memory&lt;/strong&gt;: a persistent feedback ledger stored at &lt;code&gt;harness/output/LIVING_MEMORY.md&lt;/code&gt;. When an iteration fails, the exact rubric diagnostics, failed check IDs, and remediation hints are recorded to &lt;code&gt;LIVING_MEMORY.md&lt;/code&gt; and reinjected into the next turn's prompt alongside the original specification. This is what enables surgical self-healing rather than blind guessing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Under the Hood: Orchestrating the Loop with Google ADK
&lt;/h3&gt;

&lt;p&gt;To ensure a fair, apples-to-apples comparison, both tracks in the workbench are executed through the &lt;strong&gt;Google Agent Development Kit (&lt;code&gt;google-adk&lt;/code&gt;)&lt;/strong&gt; using &lt;code&gt;Runner&lt;/code&gt; and &lt;code&gt;InMemorySessionService&lt;/code&gt;. This isolates the impact of the &lt;strong&gt;Harness&lt;/strong&gt; rather than comparing different SDK runtimes:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvhrjjt4wrg9qcs1whw25.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvhrjjt4wrg9qcs1whw25.png" alt="Google ADK Harness Architecture" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Track 1 — Unharnessed (&lt;code&gt;app/agents/unharnessed.py&lt;/code&gt;):&lt;/strong&gt; Runs a bare ADK &lt;code&gt;Agent(instruction="", tools=[])&lt;/code&gt; in a single pass. It receives only the raw specification from &lt;code&gt;specs/cosmic_conquest_spec.md&lt;/code&gt; with no persona, no skills, and no verification tools.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Track 2 — Harnessed (&lt;code&gt;app/agents/agent.py&lt;/code&gt; &amp;amp; &lt;code&gt;app/agents/harnessed.py&lt;/code&gt;):&lt;/strong&gt; Separates pure ADK agent definitions (&lt;code&gt;agent.py&lt;/code&gt;, compatible with &lt;code&gt;adk web&lt;/code&gt;, &lt;code&gt;adk run&lt;/code&gt;, and &lt;code&gt;adk eval&lt;/code&gt;) from the SSE runner (&lt;code&gt;harnessed.py&lt;/code&gt;), orchestrating an ADK &lt;code&gt;LoopAgent(max_iterations=5)&lt;/code&gt; composed of two sub-agents operating over shared session state (&lt;code&gt;session.state&lt;/code&gt;):

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Builder &lt;code&gt;LlmAgent&lt;/code&gt; (&lt;code&gt;harnessed_builder_agent&lt;/code&gt;):&lt;/strong&gt; Equipped with our &lt;code&gt;harness_context.md&lt;/code&gt;, the &lt;code&gt;&amp;lt;available_skills&amp;gt;&lt;/code&gt; catalogue, five session-scoped ADK &lt;code&gt;FunctionTool&lt;/code&gt;s (&lt;code&gt;activate_skill&lt;/code&gt;, &lt;code&gt;write_workspace_file&lt;/code&gt;, &lt;code&gt;read_workspace_file&lt;/code&gt;, &lt;code&gt;run_pytest&lt;/code&gt;, &lt;code&gt;run_ruff_check&lt;/code&gt;), and an &lt;code&gt;after_agent_callback&lt;/code&gt; (&lt;code&gt;materialise_builder_output_callback&lt;/code&gt;) that materialises generated files into the isolated workspace. Each tool operates on &lt;code&gt;tool_context.state["workspace_path"]&lt;/code&gt;, injects activated skills into &lt;code&gt;tool_context.state["skills_context"]&lt;/code&gt;, and appends deterministic audit entries to &lt;code&gt;tool_context.state["tool_trajectory"]&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Custom Gate Agent (&lt;code&gt;RubricEvaluationGateAgent(BaseAgent)&lt;/code&gt;):&lt;/strong&gt; A pure evaluation and escalation gate that executes &lt;code&gt;pytest&lt;/code&gt; and &lt;code&gt;ruff&lt;/code&gt;, runs the 14-point rubric evaluator (loading semantic criteria declaratively from &lt;code&gt;harness/RUBRIC.md&lt;/code&gt;), persists diagnostics to &lt;code&gt;LIVING_MEMORY.md&lt;/code&gt;, and yields &lt;code&gt;EventActions(escalate=should_escalate, state_delta=...)&lt;/code&gt;. When &lt;code&gt;escalate=True&lt;/code&gt; is emitted (on a 14/14 pass or plateau), the parent ADK &lt;code&gt;LoopAgent&lt;/code&gt; terminates cleanly; otherwise, the updated &lt;code&gt;living_memory_feedback&lt;/code&gt; state flows automatically into the builder agent's next iteration.&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Programmatic Exit Conditions &amp;amp; Circuit Breakers
&lt;/h3&gt;

&lt;p&gt;In autonomous loop engineering, you must never allow an agent to loop indefinitely or guess when it has finished. The workbench's &lt;code&gt;RubricEvaluationGateAgent&lt;/code&gt; enforces three strict programmatic exit conditions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Target Gate Pass (Clean Exit)&lt;/strong&gt;: To eliminate subjective "good enough" assessments, the workbench implements a rigorous, two-tier 14-point rubric schema. We will exit the loop upon achieving a flawless &lt;strong&gt;14 / 14 (100%)&lt;/strong&gt; rubric score across all deterministic and semantic checks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hard Iteration Cap (Spend Circuit Breaker)&lt;/strong&gt;: A hard limit of &lt;strong&gt;5 iterations&lt;/strong&gt; (&lt;code&gt;MAX_ITERATIONS = 5&lt;/code&gt;). If the agent cannot satisfy all checks within five turns, execution halts immediately to prevent runaway token spend.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Convergence Plateau (Stall Detection)&lt;/strong&gt;: If the rubric score fails to improve across &lt;strong&gt;3 consecutive turns&lt;/strong&gt; (&lt;code&gt;PLATEAU_LIMIT = 3&lt;/code&gt;), the loop aborts early rather than thrashing in circular remediation attempts.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here is the exact production rubric configured in our workbench:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;# Production Evaluation Rubric: Cosmic Conquest
&lt;/span&gt;
&lt;span class="gu"&gt;## Tier 1: Deterministic Mechanical Sensors (8.0 Points)
&lt;/span&gt;
| ID | Category | Check | Evaluation Method |
|:---|:---|:---|:---|
| 1.1 | Deterministic | Unit Tests Passage | &lt;span class="sb"&gt;`pytest`&lt;/span&gt; runner |
| 1.2 | Deterministic | Static Analysis (Ruff) | &lt;span class="sb"&gt;`ruff check .`&lt;/span&gt; |
| 1.3 | Deterministic | PEP 585 Type Hints | AST Inspector (&lt;span class="sb"&gt;`list[str]`&lt;/span&gt;, &lt;span class="sb"&gt;`dict[str, Any]`&lt;/span&gt;) |
| 1.4 | Deterministic | Parameterised Input Safety | AST Inspector (&lt;span class="sb"&gt;`eval()`&lt;/span&gt;, &lt;span class="sb"&gt;`exec()`&lt;/span&gt;) |
| 1.5 | Deterministic | Deterministic Tool Trajectory | Harness Trace Inspector |
| 1.6 | Deterministic | Interactive Frontend Client Structure | HTML &amp;amp; DOM Inspector (&lt;span class="sb"&gt;`#shields`&lt;/span&gt;, &lt;span class="sb"&gt;`#energy`&lt;/span&gt;, combat modal) |
| 1.7 | Deterministic | Frontend Interactive API Wiring | AST / Script Inspector (fetch bindings to &lt;span class="sb"&gt;`/api/game/attack`&lt;/span&gt;, &lt;span class="sb"&gt;`answer`&lt;/span&gt;, &lt;span class="sb"&gt;`state`&lt;/span&gt;) |
| 1.8 | Deterministic | Dynamic API Contract &amp;amp; Progression Topology | Dynamic TestClient Boot (FastAPI startup &amp;amp; valid progression targets) |

&lt;span class="gu"&gt;## Tier 2: Semantic Goal Fidelity &amp;amp; Ergonomics (6.0 Points)
&lt;/span&gt;
| ID | Check | Evaluation Method | Weight |
|:---|:---|:---|:---:|
| 2.1 | Semantic | Target State Completion (Goal Fidelity) | Gemini LLM-as-a-Judge |
| 2.2 | Semantic | Scope Discipline (Anti-Hallucination) | Gemini LLM-as-a-Judge |
| 2.3 | Semantic | Architectural Integrity | Gemini LLM-as-a-Judge |
| 2.4 | Semantic | Error &amp;amp; Remediation Clarity | Gemini LLM-as-a-Judge |
| 2.5 | Semantic | Design Rationale &amp;amp; Intent | Gemini LLM-as-a-Judge |
| 2.6 | Semantic | Progression Ergonomics &amp;amp; Interactivity | Explicit single-action sector card/tile affordance inspector |

Passing Bar: 14 / 14 (Non-negotiable 100% threshold)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The Head-to-Head Verdict
&lt;/h3&gt;

&lt;p&gt;If you run the side-by-side comparison multiple times, you'll find the following:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Unharnessed (Vibing)&lt;/th&gt;
&lt;th&gt;Harnessed Track (Loop)&lt;/th&gt;
&lt;th&gt;Operational Advantage of Harness / Loop&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Execution Duration&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Typically 1.5–2+ minutes&lt;/td&gt;
&lt;td&gt;Typically 23–35s&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;3–4x faster&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Combined Tokens&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Typically 18,000–45,000&lt;/td&gt;
&lt;td&gt;~6,600–6,900 (&lt;code&gt;~900–1,100&lt;/code&gt; out)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;~75–85% fewer tokens (~15x fewer output tokens)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Estimated Cost&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;~$0.010–$0.017&lt;/td&gt;
&lt;td&gt;~$0.0014–$0.0015&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;~85% cheaper (~7–8x lower cost)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Rubric Score&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Between 6–11 / 14 (Always fails)&lt;/td&gt;
&lt;td&gt;14 / 14 (Always passes)&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Reliable 100% success rate&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Functional Outcome&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;❌ Broken / Non-functional&lt;/td&gt;
&lt;td&gt;✅ Fully playable &amp;amp; verified&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Only harnessed code works&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Here are the side-by-side metrics from one run, captured directly from this live evaluation workbench:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F31buroq234mlsc3nn4np.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F31buroq234mlsc3nn4np.png" alt="Harness Workbench Side-by-Side Metrics: Unharnessed (Single Pass) (33,129 tokens, $0.0122, 2:03, 11.0/14.0 FAIL) vs Harnessed Autonomous Loop (24,192 tokens, $0.0066, 0:31, 14.0/14.0 PASS)" width="799" height="299"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can watch a full live demonstration of the solution here:&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/7pKl2SvmPuU" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(You can inspect the full workbench codebase, explore the evaluation engine, or run the live demo locally — and because the ADK &lt;code&gt;LoopAgent&lt;/code&gt;, &lt;code&gt;RubricEvaluationGateAgent&lt;/code&gt;, and &lt;code&gt;FunctionTool&lt;/code&gt; suite in &lt;code&gt;app/agents/&lt;/code&gt; are completely project-agnostic, the repository README includes a 4-step guide for lifting this exact ADK harness blueprint into your own Python projects. Clone the open-source repository at &lt;a href="https://github.com/derailed-dash/harness-engineering-demo" rel="noopener noreferrer"&gt;derailed-dash/harness-engineering-demo&lt;/a&gt;.)&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Unpacking the Results: Why the Harnessed Loop Dominates
&lt;/h3&gt;

&lt;p&gt;These numbers might appear counter-intuitive at first glance. Why would an iterative multi-turn loop be &lt;strong&gt;three to four times faster&lt;/strong&gt; and &lt;strong&gt;~85% cheaper&lt;/strong&gt; than a single-turn prompt?&lt;/p&gt;

&lt;p&gt;Let's break down these results:&lt;/p&gt;

&lt;h4&gt;
  
  
  1. Only the Harnessed Version Actually Works
&lt;/h4&gt;

&lt;p&gt;The most sobering lesson of the comparison is functional: &lt;strong&gt;the vibe-coded solution is almost always non-functional&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;On paper, the unharnessed agent produced a directory of plausible-looking files. It wrote Python classes and generated a colourful HTML file. But when loaded into a browser, the game was completely dead. The sector tiles lacked click event bindings, the combat modal was un-wired, and several FastAPI endpoints failed to resolve dynamic path parameters correctly.&lt;/p&gt;

&lt;p&gt;It typically scores between 6 and 11 out of 14, failing key mechanical checks and progression requirements.&lt;/p&gt;

&lt;p&gt;In contrast, the harnessed agent's code reliably achieves a flawless 14 / 14. Because these checks include interrogating the frontend DOM structure and API bindings, we can be reasonably confident that the resulting game actually plays.&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Much Faster: The Paradox of Disciplined Bursts
&lt;/h4&gt;

&lt;p&gt;Intuition suggests that a single-turn prompt should be faster than an iterative loop. The workbench proves the exact opposite: &lt;strong&gt;the harnessed loop usually finishes in 24 to 35 seconds, whilst the unharnessed run invariably drags on for 1.5 to 2+ minutes.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Why? Two architectural factors work together here:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Disciplined Output vs Speculative Rambling:&lt;/strong&gt; When an unguided model is asked to build a full application in a single pass without constraints, it falls into speculative rambling. It attempts to stream 15,000–17,000+ output tokens in one continuous burst — generating repetitive boilerplate, guessing at auxiliary classes, and second-guessing its own structure mid-stream. The harnessed agent, by contrast, is guided by &lt;code&gt;harness/harness_context.md&lt;/code&gt; and activated skills to operate in compact, high-signal bursts: Turn 1 synthesises a concise &lt;strong&gt;Architectural &amp;amp; TDD Verification Plan&lt;/strong&gt; (&lt;code&gt;~800&lt;/code&gt; output tokens, scoring &lt;code&gt;12.0 / 14.0&lt;/code&gt; out of the gate) while &lt;code&gt;materialise_builder_output_callback&lt;/code&gt; materialises the modular workspace files, and Turn 2 emits a focused &lt;strong&gt;Self-Healing Remediation Summary&lt;/strong&gt; (&lt;code&gt;~240&lt;/code&gt; output tokens) to close the remaining &lt;code&gt;+2.0&lt;/code&gt; gap (&lt;code&gt;12.0 -&amp;gt; 14.0&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Externalised Loop Reasoning (&lt;code&gt;ThinkingLevel.LOW&lt;/code&gt;):&lt;/strong&gt; Rather than burning 30+ seconds per turn in unconstrained internal chain-of-thought pondering (&lt;code&gt;thinking_budget&lt;/code&gt; is deprecated on Gemini 3.x+, so we configure &lt;code&gt;ThinkingConfig(thinking_level=ThinkingLevel.LOW)&lt;/code&gt; on &lt;code&gt;gemini-3.8-flash&lt;/code&gt;), the harnessed builder agent externalises its iterative reasoning into the deterministic ADK &lt;code&gt;LoopAgent&lt;/code&gt;, the &lt;code&gt;RubricEvaluationGateAgent&lt;/code&gt;, and &lt;code&gt;LIVING_MEMORY.md&lt;/code&gt;. On Turn 1, it writes clean, minimal scaffolding and unit tests in seconds. The rubric gate runs locally in milliseconds, highlights any exact delta, and Turn 2 applies a surgical update. Fast generation paired with real compiler, test, and linter feedback consistently beats slow, unverified internal pondering.&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  3. Higher Efficiency: Eliminating Waste and Output Cost
&lt;/h4&gt;

&lt;p&gt;The cost breakdown reveals an equally striking reality: &lt;strong&gt;the loop is typically around one-seventh to one-eighth of the cost (~$0.0015 vs ~$0.011–$0.012+, consuming ~6,600–6,900 tokens vs 26,000–30,000+ tokens) of the unharnessed single prompt&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Without context guardrails, the unharnessed model repeatedly duplicated schema definitions, wrote inline mock trivia data spanning hundreds of lines, and generated unrequested helper utilities that were never imported.&lt;/p&gt;

&lt;p&gt;The harness prevents this bloat in three ways:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;harness_context.md&lt;/code&gt; explicitly enforces architectural boundaries (e.g. modular separation between the game engine and the trivia service).&lt;/li&gt;
&lt;li&gt;The rubric's &lt;strong&gt;Scope Discipline (Check 2.2)&lt;/strong&gt; actively penalises extraneous abstractions. Because the agent knows it will be graded on tight adherence to scope, it writes concise, well-factored code rather than padding its output with defensive speculative fluff.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Context Pruning Across Iterations:&lt;/strong&gt; Rather than carrying the entire raw Turn 1 conversation history into Turn 2, the ADK builder agent prunes prior-turn chat history and receives only the distilled &lt;strong&gt;Iteration Evidence Receipt&lt;/strong&gt; from &lt;code&gt;LIVING_MEMORY.md&lt;/code&gt; (containing the score delta, &lt;code&gt;pytest&lt;/code&gt;/&lt;code&gt;ruff&lt;/code&gt; verification status, active failures, and next-turn remediation targets).&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  4. Resilience To Model Changes
&lt;/h4&gt;

&lt;p&gt;Finally, there is an overarching architectural benefit that transcends any individual run: &lt;strong&gt;resilience against model updates&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;When teams rely on raw vibe coding, their production pipeline is fundamentally fragile. A prompt that works reasonably well on a Tuesday afternoon can suddenly fail on Wednesday when the provider deploys a minor model update, alters default temperature behaviour, or updates safety guardrails. When your only quality assurance is the model's raw generative mood, you have no baseline.&lt;/p&gt;

&lt;p&gt;A robust harness decouples and insulates us from changes to the model. The harness provides the immutable invariant rails: deterministic unit test runners, static analysers, type checkers, and semantic rubric gates. If a newer, smaller, or faster model stumbles on its initial attempt, the harness catches the defect instantly and guides autonomous remediation. You stop relying on model perfection and start relying on systemic verification.&lt;/p&gt;




&lt;h2&gt;
  
  
  Off-the-Shelf Loop Mastery: The Loop Library and the &lt;code&gt;loopy&lt;/code&gt; Skill
&lt;/h2&gt;

&lt;p&gt;Designing an effective developer loop from scratch can initially feel daunting. How do you calibrate the stopping conditions? How do you prevent an agent from running amok while refactoring a legacy codebase?&lt;/p&gt;

&lt;p&gt;The good news is: &lt;strong&gt;you don't have to invent every loop pattern from first principles.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The agentic engineering community has begun codifying battle-tested loops into open-source catalogs. The preeminent reference in this space is &lt;a href="https://signals.forwardfuture.com/loop-library/" rel="noopener noreferrer"&gt;The Loop Library&lt;/a&gt; by Forward Future, accompanied by the open-source &lt;a href="https://github.com/Forward-Future/loopy/tree/main/skills/loopy" rel="noopener noreferrer"&gt;&lt;code&gt;loopy&lt;/code&gt; agent skill&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F309b3eg6wsar4f9p1lc7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F309b3eg6wsar4f9p1lc7.png" alt="The Loop Library" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What is The Loop Library?
&lt;/h3&gt;

&lt;p&gt;The Loop Library treats AI agent loops as &lt;strong&gt;bounded feedback systems with non-negotiable terminal states&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Every published loop in the library adheres to a rigorous architectural contract:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The Ready-to-Use Prompt:&lt;/strong&gt; An unambiguous, declarative instruction that defines what the agent must do on each iteration.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Verify / Stop Criteria:&lt;/strong&gt; Explicit, measurable terminal conditions (such as green CI or full test suite passage) that tell the loop when to stop.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Strict Authority Boundaries:&lt;/strong&gt; Clear operational tripwires separating read actions, code modifications, and irreversible operations (e.g. merging to main or releasing to production).&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  The &lt;code&gt;loopy&lt;/code&gt; Agent Skill: Your In-IDE "Loop Doctor"
&lt;/h3&gt;

&lt;p&gt;Rather than manually browsing a website, you can install the &lt;strong&gt;&lt;code&gt;loopy&lt;/code&gt; skill&lt;/strong&gt; directly into your developer harness (such as Google Antigravity). When equipped with &lt;code&gt;loopy&lt;/code&gt;, your agent becomes an intelligent loop architect:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Find &amp;amp; Adapt:&lt;/strong&gt; Ask your agent: &lt;em&gt;"Find a loop in the Loop Library to help me speed up my test suite."&lt;/em&gt; The agent queries the catalog, identifies the nearest matching pattern, and adapts its thresholds to your specific stack.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audit Existing Loops ("Loop Doctor"):&lt;/strong&gt; Before letting an agent loose on a long-running task, ask &lt;code&gt;loopy&lt;/code&gt; to audit your prompt. It inspects your instructions for weak checks, missing stopping conditions, or unbounded authority, hardening the loop before a single token is burned.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Craft via Guided Interview:&lt;/strong&gt; If no existing pattern fits your problem, &lt;code&gt;loopy&lt;/code&gt; initiates a structured interview, probing you on the desired outcome, permitted tools, and exact success criteria to craft a bespoke, bounded loop.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Save to &lt;code&gt;LOOPS.md&lt;/code&gt;:&lt;/strong&gt; Once a loop proves effective in your repository, &lt;code&gt;loopy&lt;/code&gt; can commit it directly into a version-controlled &lt;code&gt;LOOPS.md&lt;/code&gt; file in the root of your project. This transforms successful loop patterns into shared, institutional team muscle memory.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Real-World Loop Patterns You Can Run Today
&lt;/h3&gt;

&lt;p&gt;Here are a few very cool, practical examples from &lt;a href="https://signals.forwardfuture.com/loop-library/" rel="noopener noreferrer"&gt;The Loop Library&lt;/a&gt; that illustrate how loop engineering transforms daily developer operations:&lt;/p&gt;

&lt;h4&gt;
  
  
  1. The Code Housekeeper Loop
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Problem:&lt;/strong&gt; Technical debt, unformatted files, dead code, and low-priority linter warnings accumulate across repositories because human developers rarely have the time or patience to clean them up manually.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How It Works:&lt;/strong&gt; As defined in the &lt;a href="https://signals.forwardfuture.com/loop-library/loops/housekeeper-loop/" rel="noopener noreferrer"&gt;Code Housekeeper Loop&lt;/a&gt;, the agent wakes up, scans the codebase for static analysis warnings or dead imports, selects &lt;strong&gt;one single discrete issue&lt;/strong&gt;, applies a targeted fix, runs the full test suite to prove zero regressions, and commits the change.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stopping Condition:&lt;/strong&gt; Stops cleanly when all linter warnings are cleared or when a predefined maximum iteration cap is reached. Because it modifies only one file per turn, blast radius is completely contained.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  2. The Fresh Clone Loop
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Problem:&lt;/strong&gt; A developer clones a repository, attempts to run the setup script, and immediately hits missing environment variables, unpinned dependency conflicts, or outdated documentation. "Works on my machine" strikes again.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How It Works:&lt;/strong&gt; The &lt;a href="https://signals.forwardfuture.com/loop-library/loops/fresh-clone-loop/" rel="noopener noreferrer"&gt;Fresh Clone Loop&lt;/a&gt; simulates the day-one developer experience in an isolated sandbox. It performs a completely clean clone, executes the documented bootstrap scripts, installs dependencies from scratch, and runs the initial test suite. If an installation step fails, it diagnoses the missing prerequisite, updates the &lt;code&gt;setup.sh&lt;/code&gt; script or &lt;code&gt;README.md&lt;/code&gt;, wipes the sandbox, and retries.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stopping Condition:&lt;/strong&gt; The loop halts only when a fresh clone successfully builds, boots, and passes tests from an empty state without human assistance.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  3. The Test Suite Speed Loop
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Problem:&lt;/strong&gt; Over time, test suites bloat. Slow database fixtures, redundant sleep calls, and un-parallelised test cases drag local feedback loops from thirty seconds to fifteen minutes, destroying developer velocity.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How It Works:&lt;/strong&gt; The &lt;a href="https://signals.forwardfuture.com/loop-library/loops/test-suite-speed-loop/" rel="noopener noreferrer"&gt;Test Suite Speed Loop&lt;/a&gt; profiles test execution times, identifies the slowest test files, isolates bottlenecks (such as redundant network calls or unmocked I/O), refactors the slowest test case, and verifies that the entire suite still passes with identical assertions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stopping Condition:&lt;/strong&gt; Halts when overall test suite execution time drops below a declared target threshold (e.g. under 60 seconds) with 100% test passage.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Summary &amp;amp; What's Next: Fuel for the Engine
&lt;/h2&gt;

&lt;p&gt;We have engineered an airtight structural harness (&lt;a href="https://dev.to/gde/from-vibing-chaos-to-reliable-agents-the-what-why-and-how-of-harness-engineering-4ba0"&gt;Part 1&lt;/a&gt;) and fired up an autonomous, self-evaluating execution loop with binary rubrics, tool trajectories, and the Ratchet Principle.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Now, what fuels the loop?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If you feed an autonomous loop vague conversational vibes and hand-waving, you won't get software; you will get automated, looping chaos at 50 tokens a second.&lt;/p&gt;

&lt;p&gt;In &lt;a href="https://dev.to/gde/spec-driven-development-for-the-win-disposable-code-living-blueprints-and-building-like-a-boss-2bnn"&gt;&lt;strong&gt;Part 3&lt;/strong&gt;&lt;/a&gt;, we provide the ultimate fuel: &lt;strong&gt;Spec-Driven Development (SDD)&lt;/strong&gt;. We will explore:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Why code is disposable, but specifications are the permanent source of truth.&lt;/li&gt;
&lt;li&gt;Authentic production spec blueprints (&lt;code&gt;tasks/plan.md&lt;/code&gt;) with Three-Tier Operational Boundaries (&lt;em&gt;Always Do&lt;/em&gt;, &lt;em&gt;Ask First&lt;/em&gt;, &lt;em&gt;Never Do&lt;/em&gt;).&lt;/li&gt;
&lt;li&gt;Putting it all into practice with &lt;strong&gt;Google Antigravity&lt;/strong&gt;: the unified harness across IDE, Extension, CLI, and SDK.&lt;/li&gt;
&lt;li&gt;Native slash commands (&lt;code&gt;/grill-me&lt;/code&gt;, &lt;code&gt;/learn&lt;/code&gt;, &lt;code&gt;/goal&lt;/code&gt;, &lt;code&gt;/plan&lt;/code&gt;) vs formal SDD, and the &lt;strong&gt;4-Phase Hybrid Power Pattern&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 &lt;strong&gt;Continue to &lt;a href="https://dev.to/gde/spec-driven-development-for-the-win-disposable-code-living-blueprints-and-building-like-a-boss-2bnn"&gt;Part 3: Spec-Driven Development For-the-Win: Disposable Code, Living Blueprints, and Building Like a Boss&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Before You Go
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Please share&lt;/strong&gt; 📢 this with anyone that you think will be interested. It might help them, and it really helps me!&lt;/li&gt;
&lt;li&gt;Please &lt;strong&gt;give me loads of claps&lt;/strong&gt;! 👏 (Just hold down the clap button.)&lt;/li&gt;
&lt;li&gt;Please &lt;strong&gt;leave a comment&lt;/strong&gt; 💬. Interaction is good!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add a star&lt;/strong&gt; ⭐ on my repos!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Follow&lt;/strong&gt; 👉 and &lt;strong&gt;subscribe&lt;/strong&gt; 🔔, so you don’t miss my content.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  References and Useful Links
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The Loop &amp;amp; Autonomous Systems
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://signals.forwardfuture.com/loop-library/" rel="noopener noreferrer"&gt;The Loop Library&lt;/a&gt; &amp;amp; &lt;a href="https://github.com/Forward-Future/loopy/tree/main/skills/loopy" rel="noopener noreferrer"&gt;Loopy Skill&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.rahuldhar.me/p/harness-engineering-vs-loop-engineering" rel="noopener noreferrer"&gt;&lt;em&gt;Harness Engineering vs. Loop Engineering&lt;/em&gt; by Rahul Dhar (The Pragmatic Tech Lead)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://datasciencedojo.com/blog/harness-engineering-vs-loop-engineering/" rel="noopener noreferrer"&gt;&lt;em&gt;Harness engineering vs loop engineering&lt;/em&gt; | Data Science Dojo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.mindstudio.ai/blog/loop-engineering-vs-harness-engineering" rel="noopener noreferrer"&gt;&lt;em&gt;Loop Engineering vs Harness Engineering: What's the Difference and Which Do You Need?&lt;/em&gt; | MindStudio&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://flowtivity.ai/blog/loop-engineering-the-feedback-cycle-that-makes-ai-agents-work/" rel="noopener noreferrer"&gt;&lt;em&gt;Loop Engineering: The Feedback Cycle That Turns AI Agents Into Reliable Workers&lt;/em&gt; | Flowtivity&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.codecentric.de/en/knowledge-hub/blog/loop-harness-context-engineering-explained" rel="noopener noreferrer"&gt;&lt;em&gt;Loop, Harness, Context Engineering: The Terms Explained&lt;/em&gt; | codecentric Knowledge Hub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=ew6gBJNzC5w" rel="noopener noreferrer"&gt;&lt;em&gt;I'm a Senior Google AI PM. Here's How I Build Loops (Finally, Loop Engineering Explained)&lt;/em&gt; (Shubham Saboo on Product Faculty)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Dazbo's Related Content
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/derailed-dash/harness-engineering-demo" rel="noopener noreferrer"&gt;&lt;em&gt;Harness Engineering Demo Repository&lt;/em&gt; on GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/gde/dialling-our-agents-to-11-agent-skills-you-need-to-be-using-2o2k"&gt;&lt;em&gt;Dialling Our Agents to 11: Agent Skills You Need to be Using!&lt;/em&gt; by Dazbo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/gde/dialling-our-agents-to-11-my-favourite-mcp-servers-3hbm"&gt;&lt;em&gt;Dialling Our Agents to 11: My Favourite MCP Servers&lt;/em&gt; by Dazbo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/gde/skills-sprawl-when-too-much-of-a-good-thing-confuses-your-ai-agent-4nij"&gt;&lt;em&gt;Skills Sprawl: When Too Much of a Good Thing Confuses Your AI Agent&lt;/em&gt; by Dazbo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/gde/meet-the-antigravity-extension-gemini-code-assist-on-steroids-in-whatever-ide-you-love-4p1n"&gt;&lt;em&gt;Meet the Antigravity Extension: Gemini Code Assist on Steroids, in Whatever IDE You Love&lt;/em&gt; by Dazbo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/gde/building-an-agentic-finops-platform-development-environment-setup-google-antigravity-mcps-and-4c43"&gt;&lt;em&gt;FinSavant Part 2: Building an Agentic FinOps Platform — Development Environment Setup, Google Antigravity, MCPs and Skills, and ADK Bootstrapping with Agents CLI&lt;/em&gt; by Dazbo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dazbo.co.uk" rel="noopener noreferrer"&gt;&lt;em&gt;Dazbo's Portfolio&lt;/em&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>harnessengineering</category>
      <category>loopengineering</category>
      <category>agenticai</category>
      <category>googleantigravity</category>
    </item>
    <item>
      <title>From Vibing Chaos to Reliable Agents: The What, Why, and How of Harness Engineering</title>
      <dc:creator>Darren "Dazbo" Lester</dc:creator>
      <pubDate>Mon, 28 Sep 2026 09:59:24 +0000</pubDate>
      <link>https://dev.to/gde/from-vibing-chaos-to-reliable-agents-the-what-why-and-how-of-harness-engineering-4ba0</link>
      <guid>https://dev.to/gde/from-vibing-chaos-to-reliable-agents-the-what-why-and-how-of-harness-engineering-4ba0</guid>
      <description>&lt;p&gt;You are in Part 1 of the series &lt;em&gt;"Beyond Vibe Coding: The Engineering Blueprint for Reliable AI Agents"&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  🗺️ The Series Roadmap: Beyond Vibe Coding
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Agentic software development is drowning in fragmented buzzwords: Harness Engineering, Loop Engineering, Context Engineering, Spec-Driven Development… Are they competing frameworks? Redundant techniques? Or fundamentally different and essential?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This five-part series unifies these concepts into one cohesive architectural blueprint for building production software with AI without writing code manually:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Part 1: From Vibing Chaos to Reliable Agents: The What, Why, and How of Harness Engineering (This Article)&lt;/strong&gt;
We diagnose the issues of vibe coding, unpack the paradigm shift of &lt;em&gt;shifting developer interventions left&lt;/em&gt;, establish our bedrock formula (&lt;strong&gt;Agent = Model + Harness&lt;/strong&gt;), explore a motorsport analogy, and deconstruct deterministic foundations that make up a production developer environment.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Part 2:&lt;/strong&gt; &lt;a href="https://dev.to/gde/loop-engineering-in-the-harness-autonomous-self-correcting-systems-part-2-155e"&gt;&lt;strong&gt;Loop Engineering in the Harness: Autonomous, Self-Correcting Systems&lt;/strong&gt;&lt;/a&gt;
We fire up the dynamic runtime engine of the harness: deconstructing the loop components, establishing hybrid evaluation rubrics (deterministic tests + LLM goal fidelity + tool trajectory verification), and applying the Ratchet Principle.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Part 3:&lt;/strong&gt; &lt;a href="https://dev.to/gde/spec-driven-development-for-the-win-disposable-code-living-blueprints-and-building-like-a-boss-2bnn"&gt;&lt;strong&gt;Spec-Driven Development For-the-Win: Disposable Code, Living Blueprints, and Building Like a Boss&lt;/strong&gt;&lt;/a&gt;
We explore Spec-Driven Development (where code is disposable and specifications are the real IP), master Google Antigravity’s unified developer harness and interactive slash commands (&lt;code&gt;/grill-me&lt;/code&gt;, &lt;code&gt;/plan&lt;/code&gt;, &lt;code&gt;/goal&lt;/code&gt;, &lt;code&gt;/boost&lt;/code&gt;, &lt;code&gt;/learn&lt;/code&gt;), and combine formal specs on disk with autonomous tactical workflows in your session.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Part 4:&lt;/strong&gt; &lt;a href="https://dev.to/gde/inner-loops-in-practice-fresh-contexts-output-discipline-and-day-1-loops-416d"&gt;&lt;strong&gt;Inner Loops in Practice: Fresh Contexts, Output Discipline, and Day-1 Loops&lt;/strong&gt;&lt;/a&gt;
We go under the hood of an inner execution loop to see why looping runs faster and cheaper than single-pass vibing (fresh subagent contexts, &lt;code&gt;LIVING_MEMORY.md&lt;/code&gt;, and strict output discipline), then wire day-one loops into any repository using declarative Markdown, tiered rubrics, &lt;code&gt;loopy&lt;/code&gt;, and Antigravity slash commands.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Part 5: Completing the AI Harness: Headless CI Loops, ADK Graphs, and Self-Improving Harnesses (Coming Soon)&lt;/strong&gt;
We scale up to unattended headless execution (Antigravity CLI, Python SDK, Remote Agent) and custom Google ADK &lt;code&gt;LoopAgent&lt;/code&gt; / ADK 2.0 &lt;code&gt;Workflow&lt;/code&gt; graphs, close the outer meta-loop with self-improving harnesses (&lt;code&gt;EXPERIENCE.md&lt;/code&gt;), and tie every concept together in a Monday-morning repo checklist.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Introduction: The Chaos of Vibe Coding
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmax46t070o2op5oqau1s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmax46t070o2op5oqau1s.png" alt="From Vibing Chaos to Harness Engineering" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Was your first vibe coding experience like mine? Type in a single prompt and then watch an entire application spring into existence. It felt like wizardry.&lt;/p&gt;

&lt;p&gt;It was clear that software development had fundamentally changed. We had entered the era of “vibe coding” — that intoxicating workflow where you lean back in your chair, sip your brew, prompt an LLM with a breezy idea, and casually mash the approval button while the model writes hundreds of lines of code across half a dozen files.&lt;/p&gt;

&lt;p&gt;For quick hobby prototypes, weekend experiments, or throwing together an interactive mock-up to impress a client on a Friday afternoon, vibe coding is both effective and &lt;em&gt;brilliant fun&lt;/em&gt;. You watch a terminal stream lines of code at lightspeed, and for a fleeting moment you feel like an omnipotent 100x developer. You can now build things in hours that would have once taken a competent coder months.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Then Monday morning arrives.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;When you attempt to take your vibe-coded solution anywhere near a real production environment, reality hits you like a cold, wet Monday in London. What felt like intoxicating velocity on Friday turns into an architectural crime scene by Monday. The code might run, but beneath the surface lies a tangled web of subtle bugs, orphaned functions, unverifiable assumptions, and &lt;em&gt;utter nonsense&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;You quickly uncover the dirty secret behind unconstrained vibing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Hallucination City:&lt;/strong&gt; The model confidently invents deprecated API methods and fictitious URLs, synthesises nonexistent package dependencies, and hallucinates framework features that simply don’t exist. Once an agent hallucinates a dependency, every subsequent turn doubles-down on the fiction, inventing bizarre workarounds for libraries that were never real in the first place.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Alert &amp;amp; “LGTM” Fatigue:&lt;/strong&gt; After reading your forty-seventh sprawling diff in two hours, your eyes glaze over. You find yourself mindlessly clicking “Approve” or typing “LGTM” without actually understanding or checking the changes, silently hoping the AI knows what it’s doing. (Spoiler: &lt;em&gt;it doesn’t.&lt;/em&gt; You haven’t eliminated manual labour; you have merely swapped creative software engineering for bleary-eyed cursory proofreading.)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Solutions That Don’t Do What You Wanted:&lt;/strong&gt; The code runs without syntax errors, but the actual business logic subtly diverges from what you originally intended. Maybe because you didn’t really know what you wanted in the first place, and you just hope that the model has magically filled in all the blanks in your fluffy request.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unmaintainable, Inscrutable Code:&lt;/strong&gt; The agent generates dense blocks of code without architectural coherence. It stitches together three different design patterns across four files. You don’t understand how it works and you haven’t really checked it. And you’d probably never reveal the code to your competent peers. &lt;em&gt;“What if they actually look at this?”&lt;/em&gt; Your code was tech-debt on day one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No Documentation:&lt;/strong&gt; Zero README updates, no Architecture Decision Records (ADRs), no API contracts, and no inline explanations of why specific trade-offs were made. The key knowledge that maybe lives in your head is completely absent from the documentation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Insecure &amp;amp; Risky:&lt;/strong&gt; Hardcoded secrets, wide-open IAM permissions, complete absence of rate limits, and unescaped SQL queries slipped into the codebase because the agent prioritised making the code run over making it safe. Maybe you didn’t like a warning in a log and you told the agent &lt;em&gt;“Make this warning disappear.”&lt;/em&gt; The agent said: &lt;em&gt;“Hold my beer.”&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inefficient Token Use &amp;amp; The Manual Loop Furnace:&lt;/strong&gt; You find yourself trapped in a soul-crushing manual loop: copy terminal error → paste into chat → get half-baked fix → copy next error → watch the context window bloat → watch your token bill skyrocket. You aren’t architecting software; you are acting as an organic clipboard between a compiler and an LLM. Inevitably, unless you happen to be paying for a premium model subscription, you’re going to hit your model quota.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lack of Scalability &amp;amp; Portability:&lt;/strong&gt; The code works on your machine, under your specific node or python version, with zero containerisation or repeatable environment configuration. Hand it to a colleague or push it to CI, and it instantly shatters. &lt;em&gt;Onboarding friction&lt;/em&gt;, anyone?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Purpose Drift:&lt;/strong&gt; By turn eight of a messy conversation, the model has completely forgotten the initial rules and constraints you laid out in turn one. (Assuming you specified any constraints at all.) It begins re-inventing components it already built or quietly undoing your earlier bug fixes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The conclusion is inescapable: &lt;strong&gt;you cannot ship vibes to production.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Yet, none of us wants to retreat to typing out thousands of lines of boilerplate by hand. The goal remains what it has always been: &lt;strong&gt;to create robust, scalable software solutions without writing code manually&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In an insightful &lt;a href="https://www.youtube.com/watch?v=F8EZJAm9iO8" rel="noopener noreferrer"&gt;Google Cloud Tech interview&lt;/a&gt; with Tilde Thurium, &lt;strong&gt;Ryan Lopopolo&lt;/strong&gt; (Principal Engineer, Agentic Cloud Platform @ Google, who first coined the term &lt;em&gt;“agent harness”&lt;/em&gt;) laid out his own radical ambition: to never write code by hand again. As Ryan wryly admitted: &lt;em&gt;“I aspire to be a lazy programmer.”&lt;/em&gt; Don’t we all?&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/F8EZJAm9iO8" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Having demonstrated that teams can build and ship massive production systems with zero manual typing by establishing that &lt;em&gt;“humans steer, agents execute”&lt;/em&gt;, Lopopolo proved that hands-off development is genuinely achievable.&lt;/p&gt;

&lt;p&gt;The answer isn’t to abandon AI agents or wait for newer models; it is to fundamentally change how we construct, control, and constrain them.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Paradigm Shift: Shifting Developer Interventions Left
&lt;/h3&gt;

&lt;p&gt;To understand why unconstrained vibe coding collapses, we should look at &lt;em&gt;where&lt;/em&gt; developers are forced to spend their energy.&lt;/p&gt;

&lt;p&gt;In naive AI interactions, developer intervention happens almost entirely &lt;strong&gt;on the right&lt;/strong&gt;. That is: downstream, after the code has already been generated. You spend your afternoon scrolling through hundreds of lines of inscrutable diffs, tweaking chat prompts to fix syntax quirks, or rewriting hallucinations. You are perpetually reacting to failure after the fact, acting as an exhausted organic filter for broken output.&lt;/p&gt;

&lt;p&gt;Harness engineering &lt;strong&gt;shifts developer intervention to the left&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Instead of manually reviewing broken outputs or wrestling with repetitive errors downstream, you invest your engineering effort upstream &lt;em&gt;before&lt;/em&gt; the agent ever runs. You engineer the environment: defining rules, embedding automated linters and type-checkers, configuring deterministic sandboxes, and establishing clear evaluation rubrics. When the agent operates within an engineered environment, failures are caught and corrected autonomously inside the execution loop, long before a human ever inspects the resulting pull request.&lt;/p&gt;

&lt;p&gt;Enter &lt;strong&gt;Harness Engineering&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8tfrykrvuyq15f5ojs4f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8tfrykrvuyq15f5ojs4f.png" alt="The Paradigm Shift" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Bedrock: If It's Not the Model, It's the Harness
&lt;/h2&gt;

&lt;p&gt;To understand what &lt;em&gt;harness engineering&lt;/em&gt; is, you must start with this fundamental equation:&lt;/p&gt;

&lt;p&gt;

&lt;/p&gt;
&lt;div class="katex-element"&gt;
  &lt;span class="katex-display"&gt;&lt;span class="katex"&gt;&lt;span class="katex-mathml"&gt;&lt;/span&gt;&lt;span class="katex-html"&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord text"&gt;&lt;span class="mord"&gt;Agent&lt;/span&gt;&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mrel"&gt;=&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord text"&gt;&lt;span class="mord"&gt;Model&lt;/span&gt;&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;span class="mbin"&gt;+&lt;/span&gt;&lt;span class="mspace"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="base"&gt;&lt;span class="strut"&gt;&lt;/span&gt;&lt;span class="mord text"&gt;&lt;span class="mord"&gt;Harness&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;


&lt;p&gt;And with this comes the ultimate maxim of modern AI development:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;“If it’s not the model, it’s the harness.”&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fixy5peueohcsbu5w6v1p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fixy5peueohcsbu5w6v1p.png" alt="The Agent: Model + Harness" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We have been conditioned by tech headlines to obsess over frontier models. Every week brings another benchmark, another parameter increase, and another claim of AGI just around the corner. But here is the hard reality: &lt;strong&gt;the harness is arguably more important than the model.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An okay, cost-effective model housed within a robust harness will consistently outperform a bleeding-edge frontier model with a poor harness. Why? Because the model is inherently probabilistic, whereas serious software engineering demands determinism. The harness is what bridges that chasm. It supplies the missing structure: living memory, automated validation, static analysis, type checking, sandboxing, and execution guardrails.&lt;/p&gt;

&lt;p&gt;Think of it like high-performance motorsport:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fh45h2rpydt5uit1tx31b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fh45h2rpydt5uit1tx31b.png" alt="The Motorsport Analogy for Agents and the Harness" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Model is the Driver:&lt;/strong&gt; Incredibly talented, capable of split-second reasoning and creative problem-solving, but prone to fatigue, distraction, and occasional moments of reckless overconfidence. Left entirely to their own devices on an open airfield, they might pull off some breathtaking doughnuts, but they can’t win a grand prix.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Entire Race Car IS the Harness:&lt;/strong&gt; The complete, precision-engineered machine built to translate the driver’s intent into track-winning performance:&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Engine &amp;amp; Transmission (Loop Engineering):&lt;/strong&gt; The internal dynamic execution engine of the harness. It delivers torque to the wheels through a disciplined cycle of intake, combustion, and telemetry. Iterative execution, continuous evaluation, and immediate feedback cycles.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Chassis (Structural Harness):&lt;/strong&gt; The living rules (&lt;code&gt;AGENTS.md&lt;/code&gt; / &lt;code&gt;GEMINI.md&lt;/code&gt;), directory layouts, and sandboxed runtimes that keep the car glued to the tarmac, dictating the exact physical limits of where the vehicle can steer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Brakes &amp;amp; Pit Telemetry (Safety &amp;amp; Evaluation Gates):&lt;/strong&gt; The deterministic test suites and escalation protocols that prevent the driver from wrapping the machine around a barrier at 180 mph.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You wouldn’t put Lewis Hamilton behind the wheel of a V12 engine block with no chassis or brakes and expect him to finish a single lap at Silverstone, let alone win the race. So why do the same with agentic software development and expect robust results?&lt;/p&gt;

&lt;h3&gt;
  
  
  ⚠️ Dazbo's Battle Scar: The Model Upgrade Fallacy
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Whenever an agentic workflow breaks down in development — falling into repetitive loops, introducing subtle runtime bugs, or failing to follow architectural patterns — the instinctive developer reaction is:&lt;/em&gt; “We need a smarter model. Let’s switch to the latest 2-trillion parameter frontier model.”&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Almost every time, this is a fallacy. Upgrading the model without improving your harness simply means your agent will generate more articulate, harder-to-spot hallucinations at four times the token cost. If your agent is failing, don’t reach for a bigger model first. Ask yourself:&lt;/em&gt; Did the harness enforce a test? Did the harness provide the exact schema? Did the harness restate the goal? &lt;em&gt;If it’s not the model, it’s the harness!&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Crucially, &lt;strong&gt;the harness is model-agnostic&lt;/strong&gt;. Whether you are routing requests through a cost-effective, high-velocity workhorse like &lt;code&gt;gemini-3.8-flash&lt;/code&gt;, or a deep-reasoning powerhouse, a well-engineered harness remains stable, repeatable, and robust. You can hot-swap the model under the hood without having to redesign your entire engineering lifecycle.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Model is a Commodity; The Harness is the IP
&lt;/h3&gt;

&lt;p&gt;This reveals a fundamental commercial reality of AI software engineering. As my friend and fellow Google Developer Expert &lt;strong&gt;Jaroslav Pantsjoha (JP)&lt;/strong&gt; highlighted in &lt;a href="https://medium.com/google-cloud/the-ai-native-developer-experience-part-2-harness-engineering-with-google-antigravity-7fb72dab243f" rel="noopener noreferrer"&gt;his analysis of the AI-native developer experience&lt;/a&gt;: &lt;strong&gt;the model is a commodity; the harness is where your true competitive advantage and intellectual property reside.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Every organisation has access to the exact same frontier foundational models via public APIs. Simply renting access to raw model intelligence provides zero lasting competitive advantage. &lt;strong&gt;Your true intellectual property and your team’s operational velocity live entirely inside your harness&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Your living rules and architectural guardrails&lt;/strong&gt; that encode decades of hard-won domain knowledge.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your curated suite of tool integrations and MCP servers&lt;/strong&gt; that securely bridge AI agents into your private internal databases and microservices.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your deterministic evaluation rubrics and automated test harnesses&lt;/strong&gt; that guarantee safety and compliance before any code reaches production.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your version-controlled living specifications&lt;/strong&gt; that turn disposable AI code into maintained, documented, and resilient software assets.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Foundational models will continue to be commoditised, upgraded, and replaced. But a well-architected enterprise harness compounds in value with every single engineering iteration.&lt;/p&gt;

&lt;h2&gt;
  
  
  Untangling the Triad: Context, Harness, and Loop Engineering
&lt;/h2&gt;

&lt;p&gt;Before we deconstruct the components, it is worth clarifying how three terms frequently heard across the industry map directly back to our bedrock formula (&lt;strong&gt;Agent = Model + Harness&lt;/strong&gt;):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Context Engineering:&lt;/strong&gt; Determines what the agent &lt;strong&gt;knows&lt;/strong&gt;. It is the cognitive payload the harness feeds to the model, including hierarchical rules (&lt;code&gt;AGENTS.md&lt;/code&gt; or &lt;code&gt;GEMINI.md&lt;/code&gt; that can be global, team, domain, or project-specific), active retrieval (RAG), agent skills, and other sources of knowledge.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Structural Harness Engineering:&lt;/strong&gt; Determines what the agent &lt;strong&gt;can touch and where it runs&lt;/strong&gt;. It provides the deterministic environment: tools, APIs, MCP servers, sandboxed execution runtimes, security guardrails, living file state, and blast-radius (damage control).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Loop Engineering:&lt;/strong&gt; Determines how the agent &lt;strong&gt;iterates and converges&lt;/strong&gt; over time. It is &lt;strong&gt;the dynamic runtime engine of the harness&lt;/strong&gt; ; the autonomous process of observing, acting, judging against rubrics, recording memory, and knowing when to stop.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Crucially, &lt;strong&gt;they are not three competing systems; loop and context are the internal functional dimensions of the harness itself.&lt;/strong&gt; If context is the agent’s briefing pack and the loop is its working cadence, the harness is the complete laboratory workbench in which all of it takes place.&lt;/p&gt;

&lt;p&gt;And we can see that state (such as markdown files) plays a significant role in all three.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deconstructing the Harness: The Deterministic Foundations
&lt;/h2&gt;

&lt;p&gt;If the model represents the non-deterministic, probabilistic core of our system, the harness represents everything else: the &lt;strong&gt;deterministic components&lt;/strong&gt; that guide, restrain, and validate every single action the model takes.&lt;/p&gt;

&lt;p&gt;So, what actually lives inside a robust developer harness?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F47kuc403syu1a1gkzqz0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F47kuc403syu1a1gkzqz0.png" alt="The Foundations of the Developer Harness" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let’s break down the essential layers:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Hierarchical Context &amp;amp; Living Rules: "De-Slopping" by Design
&lt;/h3&gt;

&lt;p&gt;Your agent should never have to guess your engineering standards, architectural decisions, or toolchain preferences. In an ad-hoc vibe coding setup, you might type: &lt;em&gt;“Please write clean Python and test it.”&lt;/em&gt; The model nods, writes an unformatted script, tests it with a couple of inline assert statements, and calls it a day.&lt;/p&gt;

&lt;p&gt;In her analysis &lt;a href="https://www.builder.io/blog/de-slop-ai-generated-codebase" rel="noopener noreferrer"&gt;&lt;em&gt;How to De-Slop an AI-Generated Codebase&lt;/em&gt;&lt;/a&gt;, Alice Moore highlights why telling an AI to &lt;em&gt;“clean this up”&lt;/em&gt; or &lt;em&gt;“write clean code”&lt;/em&gt; inevitably fails: the instruction is too vague. AI “slop” can only be prevented by translating human taste into &lt;strong&gt;concrete, non-negotiable rules&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In an engineered harness, we establish our context in files like this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Global Configuration (&lt;code&gt;GEMINI.md&lt;/code&gt; or &lt;code&gt;AGENTS.md&lt;/code&gt;):&lt;/strong&gt; Cross-project standards including language preferences, mandatory package managers (e.g. using &lt;code&gt;uv&lt;/code&gt; for Python), security baseline rules, and zero-tolerance policies for inline execution hacks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Workspace-Specific Context (&lt;code&gt;my-project/GEMINI.md&lt;/code&gt;):&lt;/strong&gt; Architecture blueprints, directory layouts, data sources, and project goals.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automated Guardrails:&lt;/strong&gt; Explicit rules that we must always adhere to. For example, performing static analysis after each change. Or, for example, requiring the agent to practice strict Test-Driven Development (TDD). I.e. writing the failing test before implementing code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Documentation Rules:&lt;/strong&gt; Mandatory upkeep of core documentation (READMEs, Architecture Decision Records, product specs, task lists) using standardised workflows so the codebase never drifts into an undocumented quagmire.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To see what this looks like in practice, here is an authentic snippet from my own global &lt;code&gt;GEMINI.md&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;# Agent Execution Guardrails &amp;amp; Standards
&lt;/span&gt;
&lt;span class="gu"&gt;## Python Guidance &amp;amp; Tooling
&lt;/span&gt;
&lt;span class="k"&gt;- &lt;/span&gt;&lt;span class="gs"&gt;**Environment Source of Truth**&lt;/span&gt;: Respect the Python version defined in
  &lt;span class="sb"&gt;`pyproject.toml`&lt;/span&gt;. For new greenfield projects, default to &lt;span class="sb"&gt;`python 3.13`&lt;/span&gt;.
&lt;span class="k"&gt;- &lt;/span&gt;&lt;span class="sb"&gt;`uv`&lt;/span&gt; is the preferred tool for Python package and environment management.
&lt;span class="k"&gt;- &lt;/span&gt;&lt;span class="gs"&gt;**Avoid Inline `python -c` Commands**&lt;/span&gt;: Do NOT execute inline Python snippets
  using &lt;span class="sb"&gt;`python -c "..."`&lt;/span&gt; or &lt;span class="sb"&gt;`python3 -c "..."`&lt;/span&gt;. Because Antigravity cannot 
  safely prefix-match arbitrary inline code payloads, this triggers a manual 
  approval prompt every time. Instead, write one-off helper logic to a 
  scratch script in your scratch directory and execute it cleanly via 
  &lt;span class="sb"&gt;`uv run python scratch/helper.py`&lt;/span&gt;.
&lt;span class="k"&gt;- &lt;/span&gt;Always include top-of-module docstrings that explain what a given .py 
  file does, why it exists (i.e. the value it provides) and an outline of 
  how it works.
&lt;span class="k"&gt;- &lt;/span&gt;Use rich (&lt;span class="sb"&gt;`pip install rich`&lt;/span&gt;) when building console / CLI applications.
&lt;span class="k"&gt;- &lt;/span&gt;&lt;span class="gs"&gt;**Zero-Tolerance for Suppression Hacks**&lt;/span&gt;: Never bypass linter or 
  type-checker errors using &lt;span class="sb"&gt;`# noqa`&lt;/span&gt;, &lt;span class="sb"&gt;`# type: ignore`&lt;/span&gt;, or &lt;span class="sb"&gt;`@ts-ignore`&lt;/span&gt; 
  comments. Resolve the underlying type contract or architectural root cause.
&lt;span class="k"&gt;- &lt;/span&gt;When adding features or making changes that are anything beyond trivial, 
  &lt;span class="gs"&gt;**use TDD**&lt;/span&gt;. Create the test, verify it fails, make the change, and then verify 
  the test passes.
&lt;span class="k"&gt;- &lt;/span&gt;To ensure Python code adheres to required standards, the following 
  commands &lt;span class="gs"&gt;**must**&lt;/span&gt; be run after creating or modifying any &lt;span class="sb"&gt;`.py`&lt;/span&gt; files:
&lt;span class="k"&gt;  ```bash
&lt;/span&gt;  uvx codespell@latest -s # check spelling and show summary
  uvx ruff@latest check --fix . # perform static checks and auto-fix
&lt;span class="k"&gt;  ```
&lt;/span&gt;
&lt;span class="gu"&gt;## Agent and AI Development
&lt;/span&gt;
&lt;span class="k"&gt;- &lt;/span&gt;NEVER try to downgrade a Gemini model in code or variables. E.g. NEVER 
  try to change &lt;span class="sb"&gt;`gemini-3.8-flash`&lt;/span&gt; to &lt;span class="sb"&gt;`gemini-3-flash`&lt;/span&gt;.
&lt;span class="k"&gt;- &lt;/span&gt;Unless otherwise instructed, use the latest generally available Gemini 
  models available; always check what the latest is. This also goes for 
  image generation.
&lt;span class="k"&gt;- &lt;/span&gt;Unless I say otherwise, agents should be built using the Google ADK 
  (&lt;span class="sb"&gt;`google-adk`&lt;/span&gt;) and the Google Gen AI (&lt;span class="sb"&gt;`google-genai`&lt;/span&gt;) packages. 
&lt;span class="k"&gt;- &lt;/span&gt;AVOID using the &lt;span class="sb"&gt;`google-generativeai`&lt;/span&gt; package. This is deprecated in 
  favour of the newer GenAI &lt;span class="sb"&gt;`google-genai`&lt;/span&gt; SDK.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We’re not politely pleading with the model. We are creating rigid rails.&lt;/p&gt;

&lt;p&gt;The rule banning inline &lt;code&gt;python -c&lt;/code&gt; snippets is a classic harness engineering battle scar. In a sandboxed developer environment, the execution engine auto-approves safe binary prefixes (such as &lt;code&gt;uv run python ...&lt;/code&gt;). When an unconstrained model starts generating dynamic inline code strings, the runtime cannot prefix-match the payload and is forced to interrupt the developer with a manual approval prompt every time it makes a minor tweak to the Python it wants to execute… Every ten seconds!&lt;/p&gt;

&lt;p&gt;Similarly, the rule forbidding &lt;code&gt;# type: ignore&lt;/code&gt; and &lt;code&gt;# noqa&lt;/code&gt; suppressions closes a notorious AI loophole. When confronted with strict linting or typing rules, an unsupervised LLM will frequently take the path of least resistance by slapping suppression comments across the file to silence the compiler. By outlawing suppressions in the harness rules, the model is compelled to fix the actual defect.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Living State &amp;amp; Version-Controlled Memory
&lt;/h3&gt;

&lt;p&gt;Human software engineers don’t attempt to hold an entire multi-week project in their brains; we maintain backlog boards, write technical specifications, document decisions, and keep scratchpads.&lt;/p&gt;

&lt;p&gt;Yet developers routinely expect an AI model to hold twenty architectural considerations across a forty-turn chat window. The moment the conversation grows long, the context window compacts, and the agent quietly forgets earlier decisions. And let’s not forget the &lt;em&gt;“lost-in-the-middle”&lt;/em&gt; problem that we frequently observe in models.&lt;/p&gt;

&lt;p&gt;The harness solves this by providing agents with structured, file-backed &lt;strong&gt;living state&lt;/strong&gt;. Although there are no rigid rules for &lt;em&gt;HOW&lt;/em&gt; you structure this, here are some suggestions from me:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Strategic &amp;amp; Architectural Truth (The Blueprints):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;PRODUCT.md&lt;/code&gt;&lt;/strong&gt;: Defines the business “why”, user personas and user stories, core problem statement, and explicit non-goals (what the system is deliberately &lt;em&gt;not&lt;/em&gt; building, preventing the agent from over-engineering features you never asked for).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;SPEC.md&lt;/code&gt;&lt;/strong&gt;: Machine-readable functional requirements, API contracts, and behavioural scenarios (Given / When / Then).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;ARCHITECTURE.md&lt;/code&gt;&lt;/strong&gt;: System topology, component boundaries, database schemas, data flow and design decisions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;DESIGN.md&lt;/code&gt;&lt;/strong&gt;: UI design, styling rules, token definitions (colours, typography, spacing), and accessibility constraints; we can even export or synchronise this file with tools like Google Stitch via MCP.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Operational &amp;amp; Execution State (The Working Memory):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;TODO.md&lt;/code&gt;&lt;/strong&gt; (or active backlog): Real-time checklists where tasks are marked off as completed.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;plan.md&lt;/code&gt;&lt;/strong&gt;: Phased vertical slices and dependencies mapped out for the immediate objective.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Transient Execution State (The Scratchpad):&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;scratch/&lt;/code&gt;&lt;/strong&gt;: Ephemeral execution notes, raw compiler traces, and intermediate data files that persist across model turns without polluting Git history. You would exclude this folder in your &lt;code&gt;.gitignore&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;(We will explore how to author, stress-test, and execute these living blueprints in depth in Part 3: Spec-Driven Development For-the-Win. Coming soon!)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Because these files are stored in standard Markdown directly in the workspace, &lt;strong&gt;they can be version-controlled with Git and shared seamlessly across developer sessions and different machines&lt;/strong&gt;. If an agent session crashes, if your laptop runs out of battery, or if you hand the task over to a colleague across the globe, the harness preserves the living state. The agent simply reads the task list on turn one and resumes exactly where it left off.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Agent Tools: Grounding Models in the Real World
&lt;/h3&gt;

&lt;p&gt;Language models in a vacuum are just predictive text generators; they interact with the outside world through tools. A robust harness equips the agent with a multi-layered execution surface:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Native Functions:&lt;/strong&gt; Strongly typed functions in the code, for fast deterministic operations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sandboxed Shell and CLIs:&lt;/strong&gt; Compilers, linters (&lt;code&gt;ruff&lt;/code&gt;, &lt;code&gt;eslint&lt;/code&gt;), test runners (&lt;code&gt;pytest&lt;/code&gt;), package managers (&lt;code&gt;uv&lt;/code&gt;, &lt;code&gt;npm&lt;/code&gt;), and cloud CLIs (e.g. &lt;code&gt;gcloud&lt;/code&gt;) executed inside isolated shell environments.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Model Context Protocol (MCP):&lt;/strong&gt; A standard that lets agents discover and execute tools without writing bespoke glue code for every service.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  ⚠️ Dazbo's Battle Scar: Tool Sprawl &amp;amp; Choice Paralysis
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;When developers first discover MCP, the temptation is to connect twenty different servers simultaneously: GitHub, Slack, Postgres, BigQuery, GKE, Firestore, Stitch, Confluence, Jira, Cloud Logging…&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Don’t do it. Connecting 20 MCP servers could easily dump 150+ tool schemas into your model’s context. That’s a lot of wasted tokens before you’ve even typed an instruction. Worse, models experience&lt;/em&gt; tool choice paralysis &lt;em&gt;and routing collisions. As I detailed in&lt;/em&gt; &lt;a href="https://dev.to/gde/dialling-our-agents-to-11-my-favourite-mcp-servers-3hbm"&gt;Dialling Our Agents to 11: My Favourite MCP Servers&lt;/a&gt;&lt;em&gt;, keep your active MCP server suite lean, curated, and strictly relevant to the task at hand.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  4. On-Demand Context: Progressive Disclosure via Agent Skills
&lt;/h3&gt;

&lt;p&gt;Flooding an LLM’s context window with thousands of lines of reference manuals on every turn is a great way to confuse your model and increase your token costs.&lt;/p&gt;

&lt;p&gt;Instead, the harness can use &lt;em&gt;agent skills&lt;/em&gt;, which use a mechanism called &lt;strong&gt;progressive disclosure&lt;/strong&gt;  &lt;strong&gt;to load on-demand&lt;/strong&gt;. Progressive disclosure operates in three levels:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Level 1 (Metadata):&lt;/strong&gt; At startup, the agent only reads tiny YAML frontmatter headers (e.g. name and trigger description, typically consuming under 100 tokens).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Level 2 (Instructions):&lt;/strong&gt; Only when a relevant task is initiated does the agent dynamically load the full &lt;code&gt;SKILL.md&lt;/code&gt; instruction set.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Level 3 (Resources):&lt;/strong&gt; Deep reference scripts, schemas, and templates are only pulled into context when needed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your agent stays lightning-fast, burns minimal tokens, and possesses instant access to all the knowledge and operational expertise it needs.&lt;/p&gt;

&lt;p&gt;Feels a bit like cheating, doesn’t it?&lt;/p&gt;

&lt;h4&gt;
  
  
  ⚠️ Dazbo's Battle Scar: Skills Sprawl &amp;amp; Context Pollution
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;If skills are so effective, why not install hundreds of them?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;As I explored in&lt;/em&gt; &lt;a href="https://dev.to/gde/skills-sprawl-when-too-much-of-a-good-thing-confuses-your-ai-agent-4nij"&gt;Skills Sprawl: When Too Much of a Good Thing Confuses Your AI Agent&lt;/a&gt;&lt;em&gt;, skills hoarding is a trap.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuf3sykrvfnyc8zqjh4ap.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuf3sykrvfnyc8zqjh4ap.png" alt="Too many skills — It’s a trap!" width="661" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Even though Level 1 progressive disclosure reads only the YAML frontmatter, loading 150+ skills can easily inject over 15,000 tokens and routing overhead into every single model turn.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The result? Severe LLM decision fatigue, tool selection degradation, and skill routing collisions. If your agent is building a Python cloud backend, it shouldn’t be wading through metadata for React video rendering or mobile UI frameworks. Curate your active skills, prune what you don’t use, and disable non-essential sub-skills in your configuration. A disciplined harness is a clean harness. (For a deep dive into the top skills I rely on daily, check out&lt;/em&gt; &lt;a href="https://dev.to/gde/dialling-our-agents-to-11-agent-skills-you-need-to-be-using-2o2k"&gt;Dialling Our Agents to 11: Agent Skills You Need to be Using!&lt;/a&gt;&lt;em&gt;.)&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  5. Packaging Knowledge &amp;amp; Capability: The Rules, Skills, and MCP Triad
&lt;/h3&gt;

&lt;p&gt;Once you begin equipping your harness with these deterministic components, an obvious engineering question arises: &lt;em&gt;How do you manage all this?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In practice, we organise with three complementary layers:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Rules (The Guardrails &amp;amp; Standards):&lt;/strong&gt; Standing instructions that ensure compliance (e.g. safe command syntax, directory layouts, and security policies).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MCP Servers (The Tools &amp;amp; Senses):&lt;/strong&gt; Execution interfaces that connect the agent to external infrastructure, databases, and APIs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agent Skills (The Procedural Playbooks):&lt;/strong&gt; On-demand workflows and recipes that teach the agent &lt;em&gt;how&lt;/em&gt; and &lt;em&gt;when&lt;/em&gt; to use those tools effectively.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;While open protocols like MCP have standardised the tool layer, there is not yet a single universal industry standard for how the entire capability stack should be packaged.&lt;/p&gt;

&lt;p&gt;However, an increasingly popular architectural pattern — supported natively by developer harnesses like &lt;strong&gt;Google Antigravity&lt;/strong&gt; — is the &lt;strong&gt;Plugin&lt;/strong&gt;. Rather than forcing developers to manually wire up an MCP server, write separate prompt rules, and install five standalone skills, a plugin acts as an aggregated delivery vehicle:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjcs5q75h6loay2bu1azz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjcs5q75h6loay2bu1azz.png" alt="The Plugin" width="800" height="358"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A prime example of this pattern in the Google ecosystem is the &lt;strong&gt;google-cloud-developer plugin&lt;/strong&gt;, which looks like this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Packaging Manifest (&lt;code&gt;plugin.json&lt;/code&gt;):&lt;/strong&gt; The schema descriptor defining metadata, versioning, and dependencies.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Standing Safety Rules (&lt;code&gt;rules/*.md&lt;/code&gt;):&lt;/strong&gt; Markdown rules (like google-cloud-discovery.md) that establish pre-flight command validation and guardrails.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Modular Agent Skills (&lt;code&gt;skills/*/SKILL.md&lt;/code&gt;):&lt;/strong&gt; Individual skill directories with YAML frontmatter headers and procedural Markdown instructions — such as google-cloud-recipe-auth, gcloud, and dynamic discovery (finding-google-skills).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tool Connectivity (&lt;code&gt;mcp.json&lt;/code&gt;):&lt;/strong&gt; A JSON configuration declaring active MCP endpoints — such as the streamable-HTTP connection to Google's official developer-knowledge server.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;google-cloud-developer/
├── plugin.json                    # Plugin metadata &amp;amp; agent-plugins.org schema
├── mcp.json                       # MCP server connection endpoints
├── rules/
│   └── google-cloud-discovery.md  # Standing guardrails &amp;amp; catalog rules
└── skills/
    ├── finding-google-skills/
    │   └── SKILL.md               # Dynamic on-demand catalog discovery
    ├── gcloud/
    │   └── SKILL.md               # Gcloud CLI validation &amp;amp; execution
    └── google-cloud-recipe-auth/
        └── SKILL.md               # Authentication recipes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Whether packaged as composite plugins or managed as standalone assets, the goal is identical: &lt;strong&gt;providing agents with both the architectural rules and the deep domain knowledge required to execute safely.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  My Curated Production Toolkit
&lt;/h3&gt;

&lt;p&gt;In my own daily engineering workflow, I rely on a focused blend of plugins and standalone skills, which include (but are not limited to):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://github.com/google/skills/tree/main/plugins/cloud/google-cloud-developer" rel="noopener noreferrer"&gt;&lt;code&gt;google-cloud-developer&lt;/code&gt; plugin&lt;/a&gt;:&lt;/strong&gt; Deep GCP architectural rules, safe execution guardrails, and native developer knowledge retrieval.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://github.com/google/agents-cli/tree/main/skills" rel="noopener noreferrer"&gt;&lt;code&gt;Google Agents CLI&lt;/code&gt; (ADK)&lt;/a&gt;:&lt;/strong&gt; Coding best practices, scaffolding, and deployment blueprints for building AI agents with the Google Agent Development Kit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://github.com/google/skills/tree/main/skills/cloud/agent-platform-eval-flywheel" rel="noopener noreferrer"&gt;&lt;code&gt;agent-platform-eval-flywheel&lt;/code&gt;&lt;/a&gt;:&lt;/strong&gt; Google Cloud's evaluation flywheel methodology for measuring agent quality, LLM-as-judge scoring, and regression datasets.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://github.com/addyosmani/agent-skills/tree/main/skills/spec-driven-development" rel="noopener noreferrer"&gt;&lt;code&gt;spec-driven-development&lt;/code&gt;&lt;/a&gt;:&lt;/strong&gt; Bridges intent to code by generating machine-executable specifications and behavioural contracts before coding begins (the focus of Part 3).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://github.com/addyosmani/agent-skills/tree/main/skills/test-driven-development" rel="noopener noreferrer"&gt;&lt;code&gt;test-driven-development&lt;/code&gt;&lt;/a&gt;:&lt;/strong&gt; Enforces strict red-green-refactor loops, guaranteeing code isn't accepted until automated test suites pass.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://github.com/addyosmani/agent-skills/tree/main/skills/code-review-and-quality" rel="noopener noreferrer"&gt;&lt;code&gt;code-review-and-quality&lt;/code&gt;&lt;/a&gt;:&lt;/strong&gt; Automated multi-axis code reviews evaluating maintainability, security, and simplicity before changes enter the main branch.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/vercel-labs/skills" rel="noopener noreferrer"&gt;&lt;strong&gt;Vercel's &lt;code&gt;find-skills&lt;/code&gt;&lt;/strong&gt;&lt;/a&gt;: Dynamic skill discovery, allowing the agent to find and fetch installable skills from public registries on-demand without manual preloading.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://github.com/derailed-dash/dazbo-agent-skills/tree/main/skills/organise-agent-skills" rel="noopener noreferrer"&gt;&lt;code&gt;organise-agent-skills&lt;/code&gt;&lt;/a&gt;:&lt;/strong&gt; My own skill for auditing installed skills, pruning token overhead, and managing on-demand progressive disclosure to prevent skills sprawl.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://github.com/derailed-dash/dazbo-agent-skills/tree/main/skills/maintaining-core-documentation" rel="noopener noreferrer"&gt;&lt;code&gt;maintaining-core-documentation&lt;/code&gt;&lt;/a&gt;:&lt;/strong&gt; My own agent skill for synchronising READMEs, architectural docs, and task lists whenever code changes.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  6. Sandboxing &amp;amp; Blast-Radius Containment
&lt;/h3&gt;

&lt;p&gt;A robust harness never allows an agent unfettered access to host operating systems or production networks. Through containerised agent sandboxes, filesystem isolation, and execution policies, the harness establishes hard boundaries.&lt;/p&gt;

&lt;p&gt;If an agent attempts an unreviewed destructive action — such as dropping a database table, executing an unsandboxed shell command that alters host configuration, or modifying &lt;code&gt;.git/&lt;/code&gt; internal objects — the harness halts execution and demands explicit human verification. Sandboxing transforms autonomous agents from dangerous mavericks into safe, bounded wingmen. (See what I did there?)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjmwnkyg2c30r4m88qdpn.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjmwnkyg2c30r4m88qdpn.jpg" alt="Maverick — can be your wingman" width="737" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Observability &amp;amp; Trajectory Monitoring: Beyond Traditional Logging
&lt;/h3&gt;

&lt;p&gt;In traditional software engineering, when a service fails, we inspect a deterministic stack trace and a linear log file: line 42 threw a &lt;code&gt;NullPointerException&lt;/code&gt;. Or we run our unit tests and see exactly what test failed.&lt;/p&gt;

&lt;p&gt;Autonomous AI agents don’t work like that. An agent doesn’t execute a single static function; it embarks on a multi-step journey toward a goal. In AI engineering, that journey is known as the agent’s &lt;strong&gt;trajectory&lt;/strong&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;What is an Agent Trajectory?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
An agent trajectory is the complete, chronological sequence of intermediate states, reasoning steps, tool calls, environment responses, and course corrections the model takes from its initial prompt to the final output.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Think of it as a state machine where every step consists of a continuous route:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fszozg3kark94i3od68yo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fszozg3kark94i3od68yo.png" alt="Agent Trajectory" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For example, a four-turn trajectory might look like:&lt;br&gt;&lt;br&gt;
&lt;code&gt;Turn 1: Read SPEC.md&lt;/code&gt; → &lt;code&gt;Turn 2: Run pytest (fails)&lt;/code&gt; → &lt;code&gt;Turn 3: Edit code&lt;/code&gt; → &lt;code&gt;Turn 4: Re-run test (passes)&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;When an agent fails, it rarely crashes with a fatal error. Instead, it suffers from &lt;strong&gt;trajectory drift&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Did it misinterpret a requirement back on turn 2?&lt;/li&gt;
&lt;li&gt;Did a sandboxed CLI return an ambiguous warning on turn 4 that poisoned the agent’s reasoning on turn 5?&lt;/li&gt;
&lt;li&gt;Did the model get stuck in a “thrashing loop” between turns 8 and 12, fruitlessly editing the same file back and forth?&lt;/li&gt;
&lt;li&gt;Did it choose a blunt command-line tool when an exact MCP endpoint was sitting right in its prompt?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Without trajectory observability, you are left staring at a vague final apology from the model, completely blind to where the journey went off the rails.&lt;/p&gt;

&lt;p&gt;A robust developer harness treats trajectory monitoring as a first-class citizen:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Step-Level Execution Traces:&lt;/strong&gt; The harness records structured session transcripts (such as JSONL traces) capturing the exact prompt payload, the model’s internal thinking traces, the precise tool arguments sent, and the raw &lt;code&gt;stdout&lt;/code&gt;/&lt;code&gt;stderr&lt;/code&gt; returned by the sandbox.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Context &amp;amp; Token Telemetry:&lt;/strong&gt; Real-time instrumentation tracking how context size inflates turn by turn. This lets you pinpoint runaway token spikes, prompt cache hit rates, and the exact cost of each iteration before a loop drains your budget.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enterprise OpenTelemetry &amp;amp; Cloud Trace:&lt;/strong&gt; When moving from local IDE harnesses to cloud-hosted agents (e.g. running Google ADK agents on Cloud Run or the Google Agent Platform), the harness exports distributed traces into &lt;strong&gt;Google Cloud Trace&lt;/strong&gt; and structured events into &lt;strong&gt;Cloud Logging&lt;/strong&gt;. Every tool call becomes an inspectable trace span.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;When you can inspect the full trajectory, debugging ceases to be guesswork. You can conduct a forensic post-mortem on any failed run and immediately determine: &lt;em&gt;Did the model experience a reasoning failure, or did my harness fail to provide the right deterministic rail?&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary &amp;amp; What's Next: Firing Up the Engine
&lt;/h2&gt;

&lt;p&gt;We have &lt;em&gt;shifted left&lt;/em&gt; and engineered the deterministic foundations: living rules, version-controlled state, curated tools, progressive skill disclosure, plugin packaging, sandboxed boundaries, and execution traces. We have built the race car chassis.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Now, how does work actually get done?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In &lt;strong&gt;Part 2&lt;/strong&gt;, we fire up the dynamic runtime engine inside the harness: &lt;strong&gt;Loop Engineering&lt;/strong&gt;. We will explore:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Why autonomous feedback loops crush single-pass generation.&lt;/li&gt;
&lt;li&gt;The core mechanical components of an engineered developer loop.&lt;/li&gt;
&lt;li&gt;The Ratchet Principle.&lt;/li&gt;
&lt;li&gt;The Diagnostic Rule of Thumb: &lt;em&gt;Is it a Loop bug or a Harness bug?&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;Designing Evaluation Rubrics (combining traditional tests with LLM goal evaluation and deterministic tool trajectory verification).&lt;/li&gt;
&lt;li&gt;A complete, turn-by-turn trace of an autonomous agent self-correcting in real time.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;loopy&lt;/code&gt; skill, and the Loop Library.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 &lt;strong&gt;Continue to Part 2: Loop Engineering in the Harness: Autonomous, Self-Correcting Systems (Coming Soon)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;See you there!&lt;/p&gt;

&lt;h2&gt;
  
  
  Before You Go
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Please share&lt;/strong&gt; 📢 this with anyone that you think will be interested. It might help them, and it really helps me!&lt;/li&gt;
&lt;li&gt;Please &lt;strong&gt;give me loads of claps&lt;/strong&gt;! 👏 (Just hold down the clap button.)&lt;/li&gt;
&lt;li&gt;Please &lt;strong&gt;leave a comment&lt;/strong&gt; 💬. Interaction is good!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add a star&lt;/strong&gt; ⭐ on my repos!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Follow&lt;/strong&gt; 👉 and &lt;strong&gt;subscribe&lt;/strong&gt; 🔔, so you don’t miss my content.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  References and Useful Links
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The Harness &amp;amp; Ecosystem
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://cloud.google.com/discover/agent-harness?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;&lt;em&gt;What is an agent harness?&lt;/em&gt; | Google Cloud Discover&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=W9BX0jyzd2k" rel="noopener noreferrer"&gt;&lt;em&gt;What is an Agentic Harness?&lt;/em&gt; (Google Cloud Tech)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=F8EZJAm9iO8" rel="noopener noreferrer"&gt;&lt;em&gt;Harness Engineering Explained: Inside the Stack Behind Antigravity, Claude Code &amp;amp; Cursor&lt;/em&gt; (The Agent Factory with Ryan Lopopolo on Google Cloud Tech)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://medium.com/google-cloud/the-ai-native-developer-experience-part-2-harness-engineering-with-google-antigravity-7fb72dab243f" rel="noopener noreferrer"&gt;&lt;em&gt;The AI-Native Developer Experience, Part 2: Harness Engineering with Google Antigravity&lt;/em&gt; by Jaroslav Pantsjoha (JP)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.builder.io/blog/de-slop-ai-generated-codebase" rel="noopener noreferrer"&gt;&lt;em&gt;How to De-Slop an AI-Generated Codebase&lt;/em&gt; by Alice Moore | Builder.io&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/google/skills/tree/main/plugins/cloud/google-cloud-developer" rel="noopener noreferrer"&gt;google-cloud-developer plugin on GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/google/agents-cli" rel="noopener noreferrer"&gt;&lt;em&gt;Google Agents CLI&lt;/em&gt; on GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/vercel-labs/skills" rel="noopener noreferrer"&gt;&lt;em&gt;Vercel Skills CLI&lt;/em&gt; on GitHub&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Dazbo's Related Articles
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/gde/skills-sprawl-when-too-much-of-a-good-thing-confuses-your-ai-agent-4nij"&gt;&lt;em&gt;Skills Sprawl: When Too Much of a Good Thing Confuses Your AI Agent&lt;/em&gt; by Dazbo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/gde/dialling-our-agents-to-11-agent-skills-you-need-to-be-using-2o2k"&gt;&lt;em&gt;Dialling Our Agents to 11: Agent Skills You Need to be Using!&lt;/em&gt; by Dazbo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/gde/dialling-our-agents-to-11-my-favourite-mcp-servers-3hbm"&gt;&lt;em&gt;Dialling Our Agents to 11: My Favourite MCP Servers&lt;/em&gt; by Dazbo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dazbo.co.uk" rel="noopener noreferrer"&gt;&lt;em&gt;Dazbo’s Portfolio&lt;/em&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>contextengineering</category>
      <category>agentskills</category>
      <category>agenticai</category>
      <category>mcps</category>
    </item>
    <item>
      <title>Meet the Antigravity Extension: Gemini Code Assist on Steroids, in Whatever IDE You Love</title>
      <dc:creator>Darren "Dazbo" Lester</dc:creator>
      <pubDate>Fri, 21 Aug 2026 01:11:12 +0000</pubDate>
      <link>https://dev.to/gde/meet-the-antigravity-extension-gemini-code-assist-on-steroids-in-whatever-ide-you-love-4p1n</link>
      <guid>https://dev.to/gde/meet-the-antigravity-extension-gemini-code-assist-on-steroids-in-whatever-ide-you-love-4p1n</guid>
      <description>&lt;p&gt;Google Antigravity (or Agy) was first launched as an agent-first development environment in late 2025. Then, in May 2026, Google released the new Antigravity suite, comprising four &lt;em&gt;surfaces&lt;/em&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbxlsl4isnnbg611mth0f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbxlsl4isnnbg611mth0f.png" alt="Antigravity surfaces" width="800" height="371"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Antigravity 2.0&lt;/strong&gt; — The agent-first, intent-driven surface. For those who care about the outcomes, but not necessarily the code. It’s the modern agentic environment for &lt;em&gt;builders&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Antigravity IDE&lt;/strong&gt; — The familiar IDE (the IDE itself is a fork of VS Code), but with all the smarts of the Antigravity harness built-in.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Antigravity CLI&lt;/strong&gt; — The terminal user interface (TUI) experience. This replaced the very awesome &lt;strong&gt;Gemini CLI&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Antigravity SDK&lt;/strong&gt; — For developers who want to harness the full power of Antigravity programmatically.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;All these surfaces use the same Antigravity &lt;em&gt;harness&lt;/em&gt;. They give you capabilities such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Advanced multi-stage reasoning, using the latest Gemini models.&lt;/li&gt;
&lt;li&gt;Full repo refactoring.&lt;/li&gt;
&lt;li&gt;Planning, execution and evidencing.&lt;/li&gt;
&lt;li&gt;Agent loops and subagent swarm orchestration.&lt;/li&gt;
&lt;li&gt;Integration with file system and shell environment.&lt;/li&gt;
&lt;li&gt;Multiple useful built-in commands and subagents.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At the same time, Google announced that both &lt;a href="https://docs.cloud.google.com/gemini/docs/codeassist/overview?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Gemini Code Assist&lt;/a&gt; and &lt;a href="https://geminicli.com/" rel="noopener noreferrer"&gt;Gemini CLI&lt;/a&gt; were &lt;a href="https://developers.googleblog.com/an-important-update-transitioning-gemini-cli-to-antigravity-cli/?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco#important-timeline-for-consumers" rel="noopener noreferrer"&gt;end-of-life&lt;/a&gt;. And indeed, unless you happened to run inside an organisation that had paid for enterprise licenses, these products got turned off in June 2026.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fm3s6nxk18kftcknpehzm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fm3s6nxk18kftcknpehzm.png" alt="Gemini CLI — end-of-life" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Worry
&lt;/h2&gt;

&lt;p&gt;Gemini CLI was great. I was gutted to see it go. But &lt;a href="https://antigravity.google/product/antigravity-cli?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Antigravity CLI&lt;/a&gt; was a worthy replacement, and it was immediately available. So we made the switch, and we were happy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;But what about the death of Gemini Code Assist?&lt;/strong&gt; If you’re not familiar with this tool: it was the Gemini agent that you could install as an extension into your favourite IDE, like VS Code or IntelliJ. The agent ran in a side panel, fully-integrated with your IDE.&lt;/p&gt;

&lt;p&gt;Then Google told us:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;“Gemini Code Assist is dead. But don’t worry. For all you coders out there, just switch to Antigravity IDE. It feels like VS Code and you get the Gemini Code Assist experience — on steroids.”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;(They may not have actually used these words.)&lt;/p&gt;

&lt;p&gt;And this is exactly what I did. I briefly mourned VS Code, and then went all-in on Agy IDE.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzvr5u0cef6vv2rq8cdu1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzvr5u0cef6vv2rq8cdu1.png" alt="All in on Agy IDE" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But I was rather vocal in sharing my thoughts with some influential folk at Google.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frkxd4n4huxiocc36eh7n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frkxd4n4huxiocc36eh7n.png" alt="Sharing opinions" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My thoughts being:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Some folks — like me — were happy to make the switch. But there are tens of millions of developers who &lt;strong&gt;WILL NOT give up their favourite IDE&lt;/strong&gt;. So, if you tell them: &lt;em&gt;“Switch to Agy, or you stay where you are, but with no Gemini”&lt;/em&gt;, then they’re gonna say: &lt;em&gt;“Okay. I’ll go with option 2.”&lt;/em&gt; To me, that’s a lose-lose situation.&lt;/li&gt;
&lt;li&gt;Some enterprises are pretty strict about their approved development environments and ecosystems. And — for reasons — they can be SOOOOO SLOW at adopting new things.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4xxvax5ha1ligc0f6tug.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4xxvax5ha1ligc0f6tug.png" alt="So slow" width="800" height="517"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The TL;DR — there was no viable path for developers who wanted to evolve from the Gemini Code Assist experience, but stay with their favourite IDE.&lt;/p&gt;

&lt;h2&gt;
  
  
  Until Now
&lt;/h2&gt;

&lt;p&gt;Today (August 20, as I write this), Google launched the Antigravity extension for IDEs! You can check out the official Google release blog, &lt;a href="https://antigravity.google/blog/antigravity-ide-extensions?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;here&lt;/a&gt;. Right now, there are Agy extensions for VS Code, Visual Studio, IntelliJ IDEs, and Zed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I can’t tell you how stoked I am about this announcement!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;What is it? Well, think of it as a replacement for the Gemini Code Assist extension. It’s Gemini Code Assist, but pumped with steroids and caffeine. It’s all the cool Agy harness capabilities we’ve come to love in Antigravity 2.0, Antigravity CLI and Antigravity IDE, but now packaged as an extension.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgwiqdq4notxw3xb3rnzw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgwiqdq4notxw3xb3rnzw.png" alt="Antigravity extension" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, as of tonight, I’ve switched back to VS Code!&lt;/p&gt;

&lt;h2&gt;
  
  
  Install the Extension
&lt;/h2&gt;

&lt;p&gt;Let’s install it! I’m using VS Code, so I’m installing &lt;a href="https://marketplace.visualstudio.com/items?itemName=Google.google-antigravity" rel="noopener noreferrer"&gt;this extension&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you happen to go looking for “Google Antigravity” in the VS Code Marketplace, be sure to install this one by &lt;code&gt;google.com&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2rdy533l00r185i5m20a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2rdy533l00r185i5m20a.png" alt="Installing Antigravity extension" width="799" height="605"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When you open the extension, you’ll see this in VS Code:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgrylix9mq9cndv0bs0d6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgrylix9mq9cndv0bs0d6.png" alt="Install in VS Code" width="800" height="459"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click &lt;strong&gt;Install&lt;/strong&gt;, and you’ll be asked to sign-in to Google:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkqdi1onnrt4rc374w4uc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkqdi1onnrt4rc374w4uc.png" alt="Sign-in" width="800" height="856"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And you’ll be asked if you want to install any of the ready-made &lt;strong&gt;plugins&lt;/strong&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fl0qtakd92xge2wrawkeu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fl0qtakd92xge2wrawkeu.png" alt="Agy plugins" width="800" height="926"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And that’s it!&lt;/p&gt;

&lt;p&gt;It took about 20 seconds, and now the Antigravity extension is working in my VS Code!&lt;/p&gt;

&lt;h2&gt;
  
  
  Take It For a Spin
&lt;/h2&gt;

&lt;p&gt;I wondered if all my existing agent skills and MCP servers would be working. So I asked it: &lt;em&gt;“Install my Gemini code reviewer”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;It immediately found and activated my &lt;a href="https://github.com/derailed-dash/dazbo-agent-skills" rel="noopener noreferrer"&gt;&lt;code&gt;install-gemini-code-review-action&lt;/code&gt; skill&lt;/a&gt; and used it to install my &lt;a href="https://github.com/derailed-dash/gemini-review-action" rel="noopener noreferrer"&gt;Gemini Code Review Action&lt;/a&gt; into the local repo. It then asked for permission to commit these changes push them to GitHub. I gave Agy permission, and it went ahead and pushed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F58etovduq1kw93k7rn26.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F58etovduq1kw93k7rn26.png" alt="Activated skills and MCPs" width="745" height="1363"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So this proved that my existing skills were immediately discovered, activated and used, and that it was able to use my GitHub MCP to perform the commit and push. Nice!&lt;/p&gt;

&lt;h2&gt;
  
  
  Models
&lt;/h2&gt;

&lt;p&gt;We can see the models that are available:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fues6nivwa77i9spiad76.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fues6nivwa77i9spiad76.png" alt="Model selection in Agy" width="800" height="813"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And we can see more model and Antigravity extension &lt;strong&gt;settings&lt;/strong&gt; here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fz57zyhg4kge0uaotxeei.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fz57zyhg4kge0uaotxeei.png" alt="Settings" width="800" height="558"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(I love the fact that next to my “AI Ultra” subscription is an “Upgrade” button. Seriously? Lol!)&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Plugins Created Some Skills Duplication
&lt;/h2&gt;

&lt;p&gt;The newly installed plugins resulted in duplication of some skills I had previously installed in my &lt;code&gt;~/.gemini/config/skills&lt;/code&gt; folder. So I said to Antigravity: &lt;em&gt;"Let's do a skills optimisation run."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;It went ahead and activated my &lt;a href="https://github.com/derailed-dash/dazbo-agent-skills" rel="noopener noreferrer"&gt;&lt;code&gt;organise-agent-skills&lt;/code&gt;&lt;/a&gt;. The skill made a number of recommendations which I implemented. The results looked like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7garfe6rp5rbx7bpe7y7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7garfe6rp5rbx7bpe7y7.png" alt="Skills optimised" width="800" height="820"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Wow!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;29 duplicated skills deleted.&lt;/li&gt;
&lt;li&gt;56 “sub-skills” set to excluded, because they are managed by their parent skills.&lt;/li&gt;
&lt;li&gt;68% reduction in token overhead!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Great, so our skills are back to running nice and lean.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Nice View of Token Usage
&lt;/h2&gt;

&lt;p&gt;Whilst we’re talking about token optimisation, I stumbled across this “Customization” page in the Agy extension settings:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhcfbtb1pgdwml611vvit.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhcfbtb1pgdwml611vvit.png" alt="Agy Settings — Customizations" width="800" height="507"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is nice view that how much of your “customization budget” is being consumed by all your &lt;code&gt;GEMINI.md&lt;/code&gt; (or &lt;code&gt;AGENTS.md&lt;/code&gt;), your skills, and your MCP tools. What’s quite interesting to note is that Agy will automatically start truncating if you exceed this budget. So you might suddenly find that your skills are being ignored, for example. This is another good reason to optimise your install skills and MCP servers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Things Not Working
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Browser Subagent
&lt;/h3&gt;

&lt;p&gt;The first thing I struggled with is the built-in browser subagent. I couldn’t get this to browse web pages for me, even after I enabled the remote debugging in Chrome. I did expect this. My VS Code is running in Windows, but connected to my repos in WSL. This has typically been a problem area for browser subagents. Maybe I’ll be able to get it working, if I put in a bit of work. But tonight… I’m far too tired!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(I should mention: this issue is only for WSL users. 4 out of 5 developers won’t be affected by this.)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;On the plus side, I was able to remote control the browser with my existing &lt;a href="https://browsermcp.io/" rel="noopener noreferrer"&gt;BrowserMCP&lt;/a&gt; configuration. No changes required.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvf901jdnpbnvgq92xa3f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvf901jdnpbnvgq92xa3f.png" alt="Browsing with BrowserMCP extension" width="800" height="767"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Antigravity In-Line Complete and Tab Features
&lt;/h3&gt;

&lt;p&gt;One thing I really love about Antigravity IDE is the real-time suggestions and edits you can make in the editor window.&lt;/p&gt;

&lt;p&gt;For example: if I were to change one instance of &lt;em&gt;“We did something”&lt;/em&gt; to &lt;em&gt;“I did something”&lt;/em&gt;, then Antigravity IDE allows me to update all remaining instances in a context-aware way, just by pressing tab.&lt;/p&gt;

&lt;p&gt;This feature is not currently working for me with the Agy extension in VS Code. So it’s possible my configuration isn’t correct, or this feature hasn’t been implemented in the extension yet. But this is only day 1!&lt;/p&gt;

&lt;h2&gt;
  
  
  What Does This Mean for Agy IDE?
&lt;/h2&gt;

&lt;p&gt;Within hours of the extension arriving, many folks have been asking me, &lt;em&gt;“What does this mean for Agy IDE? Will Google kill it?”&lt;/em&gt; It’s a question I’ve been asking my friends at Google for a little while.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Nobody&lt;/em&gt; has explicitly told me that Google &lt;em&gt;will&lt;/em&gt; kill Agy IDE. But my thoughts are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If the Agy extension provides the full Agy harness experience in all the major IDEs, what’s the &lt;em&gt;point&lt;/em&gt; in having a separate IDE that looks a lot like VS Code?&lt;/li&gt;
&lt;li&gt;Why would Google want to maintain the “IDE” components of Agy IDE, when these are essentially just a fork of VS Code anyway? That’s a lot of work.&lt;/li&gt;
&lt;li&gt;Lastly, take a look at the &lt;a href="https://antigravity.google/changelog" rel="noopener noreferrer"&gt;release notes&lt;/a&gt; for Agy 2.0, Agy CLI, and Agy IDE. The relative sparsity (is that a word?) of Agy IDE patches is telling.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Personally, I think the writing is on the wall.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrap-Up
&lt;/h2&gt;

&lt;p&gt;I’m so happy this Agy extension has arrived. Now any developer can use the extremely capable Antigravity harness from their IDE of choice. It gives a viable migration path for those who were using Gemini Code Assist before.&lt;/p&gt;

&lt;p&gt;For me, the install experience was totally painless, and everything just worked out-of-the-box. (Well, almost everything. But I can wait for the other things.) The agent is responsive and works. And it picked up all my existing configuration.&lt;/p&gt;

&lt;p&gt;That’s it! Go forth and use Antigravity in your favourite editor!&lt;/p&gt;

&lt;h2&gt;
  
  
  Before You Go
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Please share&lt;/strong&gt; 📢 this with anyone that you think will be interested. It might help them, and it really helps me!&lt;/li&gt;
&lt;li&gt;Please &lt;strong&gt;give me loads of claps&lt;/strong&gt;! 👏 (Just hold down the clap button.)&lt;/li&gt;
&lt;li&gt;Please &lt;strong&gt;leave a comment&lt;/strong&gt; 💬. Interaction is good!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add a star&lt;/strong&gt; ⭐ on my repos!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Follow&lt;/strong&gt; 👉 and &lt;strong&gt;subscribe&lt;/strong&gt; 🔔, so you don’t miss my content.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  References and Useful Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dazbo.co.uk/" rel="noopener noreferrer"&gt;Dazbo’s Portfolio&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://antigravity.google/?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Google Antigravity Official Site&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://antigravity.google/blog/antigravity-ide-extensions?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Google Antigravity IDE Extensions Announcement&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=Google.google-antigravity" rel="noopener noreferrer"&gt;Google Antigravity Extension on the Visual Studio Marketplace&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/derailed-dash/dazbo-agent-skills" rel="noopener noreferrer"&gt;Dazbo’s Agent Skills Repository&lt;/a&gt; — if you like it, please add a star!&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/derailed-dash/gemini-review-action" rel="noopener noreferrer"&gt;Dazbo’s Gemini Code Review Action&lt;/a&gt; — if you like it, please add a star!&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>antigravityextension</category>
      <category>googleantigravity</category>
      <category>vscode</category>
      <category>gemini</category>
    </item>
    <item>
      <title>Skills Sprawl: When Too Much of a Good Thing Confuses Your AI Agent</title>
      <dc:creator>Darren "Dazbo" Lester</dc:creator>
      <pubDate>Mon, 17 Aug 2026 10:13:26 +0000</pubDate>
      <link>https://dev.to/gde/skills-sprawl-when-too-much-of-a-good-thing-confuses-your-ai-agent-4nij</link>
      <guid>https://dev.to/gde/skills-sprawl-when-too-much-of-a-good-thing-confuses-your-ai-agent-4nij</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In this post, we're going to look at the problem of &lt;strong&gt;Skills Sprawl&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;What happens if you have too many skills?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;We'll understand LLM decision fatigue and tool selection accuracy, inspect the mechanics of excluded vs inactive skills in Google Antigravity, and see how pruning your setup can make your agent smarter and save hundreds of thousands of tokens per session.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjmzizl4hniw1mur7acgb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjmzizl4hniw1mur7acgb.png" alt="Special set of skills" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Skills Context (It's a Sort of Pun...)
&lt;/h2&gt;

&lt;p&gt;Everyone knows that &lt;em&gt;agent skills&lt;/em&gt; are awesome. If you don't, then:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Where have you been?&lt;/li&gt;
&lt;li&gt;You're in for a treat!&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In some of my previous posts I've talked about how skills act as &lt;strong&gt;on-demand power-ups&lt;/strong&gt; for our agents. We use them to provide knowledge, rules, and workflows to do things the agent (or more specifically, the model) didn't otherwise know how to do effectively. &lt;/p&gt;

&lt;p&gt;You might have seen me compare this to how Neo loads his skills in the Matrix. &lt;em&gt;"I know Kung Fu!"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This &lt;em&gt;just-in-time knowledge&lt;/em&gt; provides a number of advantages to our agents:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They know how to do a thing well.&lt;/li&gt;
&lt;li&gt;They don't hallucinate the things they don't know about.&lt;/li&gt;
&lt;li&gt;They don't have to experiment and course-correct; consequently, they're more likely to succeed the first time, and they do it with a minimum number of tokens consumed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In short: &lt;strong&gt;faster, cheaper, and more reliable&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Quick aside: when I say &lt;em&gt;agent&lt;/em&gt;, I'm typically talking about your agentic partner in development crime, like &lt;a href="https://antigravity.google/?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Google Antigravity&lt;/a&gt;, Claude Code, or whatever. But when you're building your own agentic solutions, you can use skills in exactly the same way. For example, check out my blog &lt;a href="https://medium.com/google-cloud/automated-github-code-reviewsusing-google-gemini-7b4d027b3092?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Automated GitHub Code Reviews Using Google Gemini&lt;/a&gt;, where I've built an agentic PR review solution that leverages skills.&lt;/p&gt;

&lt;h2&gt;
  
  
  Overview of Progressive Disclosure
&lt;/h2&gt;

&lt;p&gt;Skills use a cool mechanism called &lt;strong&gt;progressive disclosure&lt;/strong&gt; to load on-demand.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fp203vadwlsxw7uiedtki.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fp203vadwlsxw7uiedtki.png" alt="Progressive Disclosure in Agent Skills" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's quickly recap this mechanism:&lt;/p&gt;

&lt;h3&gt;
  
  
  Level 1: Metadata (Frontmatter)
&lt;/h3&gt;

&lt;p&gt;When your agent starts up, it reads &lt;strong&gt;the frontmatter&lt;/strong&gt; - and &lt;strong&gt;only the frontmatter&lt;/strong&gt; - of &lt;strong&gt;every installed skill&lt;/strong&gt; in your global configuration and workspace. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;By the way, if you don't know where these skills should be placed, or you don't know the difference between global and workspace locations, check out my earlier blog: &lt;a href="https://medium.com/google-cloud/confused-about-where-to-put-your-agent-skills-ea778f3c64f3?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Confused About Where to Put Your Agent Skills?&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The frontmatter is simply the descriptive YAML at the top of each skill which contains the skill name, a description (what it does and when it should be used), and any additional useful metadata (such as what tools it might use, author, etc). &lt;/p&gt;

&lt;p&gt;For example, this is from my &lt;code&gt;maintaining-core-documentation&lt;/code&gt; skill:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;maintaining-core-documentation&lt;/span&gt;
&lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
  &lt;span class="s"&gt;Creates, maintains, and synchronises core project documentation (README, TODO, DESIGN, Architecture, Testing, Deployment). Use when the user needs to write, update, or structure project documentation based on codebase changes, or whenever asked to perform documentation reviews or updates.&lt;/span&gt;
&lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;author&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Darren "Dazbo" Lester&lt;/span&gt;
  &lt;span class="na"&gt;repository&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;https://github.com/derailed-dash/dazbo-agent-skills&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Crucially, this frontmatter section is &lt;em&gt;tiny&lt;/em&gt;. So even though the agent reads it up-front, it consumes very few tokens. Typically fewer than 100 tokens per skill.&lt;/p&gt;

&lt;p&gt;The agent now has a mental model of all the skills that are available to it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Level 2: Instructions Loading (On-Demand)
&lt;/h3&gt;

&lt;p&gt;When the agent is asked to do a task that one of these skills might be useful for, the model selects the skill (based on the frontmatter), and then &lt;strong&gt;activates&lt;/strong&gt; it. When this happens, the agent reads the &lt;code&gt;SKILL.md&lt;/code&gt; body into context.&lt;/p&gt;

&lt;p&gt;This will typically add several hundred, if not thousands of tokens.&lt;/p&gt;

&lt;h3&gt;
  
  
  Level 3: Resources and Code (As Needed)
&lt;/h3&gt;

&lt;p&gt;Some skills may package additional resources, such as scripts, reference documents, or other assets. For example, my &lt;code&gt;maintaining-core-documentation&lt;/code&gt; skill has a &lt;code&gt;references&lt;/code&gt; subdirectory with several document template files.&lt;/p&gt;

&lt;p&gt;These assets are only loaded as needed.&lt;/p&gt;

&lt;h3&gt;
  
  
  How This Helps
&lt;/h3&gt;

&lt;p&gt;When we have skills, we don't need to include massive quantities of instructions in our global &lt;code&gt;GEMINI.md&lt;/code&gt; or &lt;code&gt;AGENTS.md&lt;/code&gt; files. Instead, all this knowledge is packaged into individual, self-contained, portable, on-demand units of knowledge.&lt;/p&gt;

&lt;p&gt;It is an elegant, modular pattern that massively reduces your token consumption.&lt;/p&gt;

&lt;h2&gt;
  
  
  But Can You Have Too Much of a Good Thing?
&lt;/h2&gt;

&lt;p&gt;There's no shortage of skills out there! You can use a public hub like &lt;a href="https://skills.sh/" rel="noopener noreferrer"&gt;skills.sh&lt;/a&gt; to find just about any skill you need. And, of course, you can create your own.&lt;/p&gt;

&lt;p&gt;Check out my blog &lt;a href="https://dev.to/gde/dialling-our-agents-to-11-agent-skills-you-need-to-be-using-2o2k"&gt;&lt;em&gt;Dialling Our Agents to 11: Agent Skills You Need to be Using!&lt;/em&gt;&lt;/a&gt;, where I list some of my favourite skills.&lt;/p&gt;

&lt;p&gt;The problem is... You end up &lt;em&gt;collecting.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flx5l2s5v8vrisigi47ok.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flx5l2s5v8vrisigi47ok.png" alt="The Museum of Obscure Digital Crafts and Skills" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I recently asked Antigravity to tell me how many skills I have. (I have sarcasm dialled up...)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Well, Dazbo, according to my context window — which is currently groaning under the crushing weight of your digital hoard — you currently have a staggering 170 skills installed.

Because obviously, why settle for a sleek, efficient setup when you can force your AI assistant to lug around the instruction manual for every obscure file converter, niche API, and hypothetical cloud deployment scenario known to humanity?

Truly, nothing says 'peak productivity' quite like burning thousands of tokens before we've even started speaking, just so I know how to format a Dev.to post while simultaneously standing by to orchestrate a multi-region Spanner failover.

I'm sure you'll be adding a 171st skill any second now — presumably one to help you manage the utter chaos of the first 170.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Hilarious. 170. &lt;em&gt;Maybe I have too many.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The irony here is that Antigravity's last comment was spot on. I decided to &lt;strong&gt;build a skill to organise and optimise my skills!&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What's the Problem?
&lt;/h2&gt;

&lt;p&gt;As we've already covered: with progressive disclosure, the agent framework performs &lt;strong&gt;Tier 1 Discovery&lt;/strong&gt; on startup. It parses the frontmatter of &lt;strong&gt;every installed skill&lt;/strong&gt; and injects this straight into the system prompt.&lt;/p&gt;

&lt;p&gt;A well-crafted skill description needs enough context, trigger keywords, and intent markers for the LLM to know when to select it. (&lt;em&gt;"Use when..."&lt;/em&gt;) &lt;/p&gt;

&lt;p&gt;When I analysed my 170 skills, it turns out that my average skill frontmatter contained 103 tokens. Now let's do some quick maths:&lt;/p&gt;

&lt;p&gt;$$\text{170 active skills} \times 100\text{ tokens/description} = 17,000\text{ tokens}$$&lt;/p&gt;

&lt;p&gt;That means my agent is injecting &lt;strong&gt;17,000 tokens of system prompt overhead on every single turn&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If I'm engaged in a typical 30-turn pair-programming session:&lt;/p&gt;

&lt;p&gt;$$30\text{ turns} \times 17,000\text{ tokens} = 510,000\text{ tokens}$$&lt;/p&gt;

&lt;p&gt;That means I am burning an additional &lt;strong&gt;half a million tokens&lt;/strong&gt; just to re-read the index of my skill library over and over again.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;So what?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Let's look at some of the potential issues this creates:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Faf7xkpfxolzc9fa2jn0i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Faf7xkpfxolzc9fa2jn0i.png" alt="Three Major Impacts of AI Skill Sprawl" width="800" height="590"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Depending on your model choice, caching configuration, and AI subscription, there may be &lt;strong&gt;financial implications&lt;/strong&gt;. But it's likely to be small.&lt;/li&gt;
&lt;li&gt;It will definitely &lt;strong&gt;eat into your token limits&lt;/strong&gt;. Most models and plans have token limits and rate limits. Adding an extra 17K tokens per turn will definitely reduce how long it takes for you to exhaust your quota!&lt;/li&gt;
&lt;li&gt;Most importantly, &lt;strong&gt;it's confusing your model&lt;/strong&gt;. &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Confusion-Nation
&lt;/h2&gt;

&lt;p&gt;Skills sprawl causes &lt;strong&gt;decision fatigue and skill selection accuracy degradation&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw7j9a8k8egjr6opmss4a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw7j9a8k8egjr6opmss4a.png" alt="Choice Ambiguity and Decision Fatigue in an Agent with 170 Skills" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When a model is presented with 170 potential skills simultaneously, it faces &lt;strong&gt;choice ambiguity&lt;/strong&gt;. Many skills will naturally have overlapping domain descriptions. For example, my 170 skills had overlaps in each of these areas:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Content generation&lt;/li&gt;
&lt;li&gt;API guides (particularly for Gemini APIs and SDKs)&lt;/li&gt;
&lt;li&gt;Google products and services&lt;/li&gt;
&lt;li&gt;Test-driven development (TDD) and code reviews&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Does academic research back this up? Absolutely.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Empirical Evidence: Shortlist Depth and Selection Accuracy
&lt;/h3&gt;

&lt;p&gt;In a recent paper titled &lt;a href="https://arxiv.org/pdf/2605.24660" rel="noopener noreferrer"&gt;&lt;em&gt;“How Many Tools Should an LLM Agent See? A Chance-Corrected Answer”&lt;/em&gt;&lt;/a&gt; (&lt;em&gt;Repantis et al&lt;/em&gt;, May 2026), researchers evaluated LLM tool selection performance across 370 tools using the &lt;a href="https://gorilla.cs.berkeley.edu/leaderboard.html" rel="noopener noreferrer"&gt;&lt;strong&gt;Berkeley Function Calling Leaderboard (BFCL)&lt;/strong&gt;&lt;/a&gt; — the industry-standard benchmark for evaluating model tool-calling capabilities.&lt;/p&gt;

&lt;p&gt;They concluded:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"Show too many tools and the model struggles to choose. Show too few and the correct tool may not appear."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;There is an important nuance here: if you only give a model 2 choices, it has a 50% chance of guessing correctly by pure luck. If you show it 50 choices, blind luck drops to 2%. &lt;/p&gt;

&lt;p&gt;When the researchers &lt;strong&gt;corrected for random chance&lt;/strong&gt; — measuring genuine model comprehension rather than lucky guesses — the impact of list size was striking:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Presenting an LLM with a crowded shortlist of &lt;strong&gt;50 tools&lt;/strong&gt; resulted in &lt;strong&gt;60.9% selection accuracy&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Scoping that shortlist down to &lt;strong&gt;~7 focused tools&lt;/strong&gt; boosted true accuracy to &lt;strong&gt;76.8%&lt;/strong&gt; (a 15.9 percentage-point leap in decision precision).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frdcap5u3ecqmop33ifcn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frdcap5u3ecqmop33ifcn.png" alt="LLM Tool Selection Accuracy vs Shortlist Depth" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Related benchmarks like &lt;a href="https://arxiv.org/abs/2310.03128" rel="noopener noreferrer"&gt;&lt;strong&gt;MetaTool&lt;/strong&gt;&lt;/a&gt; and &lt;a href="https://arxiv.org/abs/2307.16789" rel="noopener noreferrer"&gt;&lt;strong&gt;ToolBench&lt;/strong&gt;&lt;/a&gt; show the same results: as toolset sizes scale past 30–50 items without structured routing, error rates spike rapidly due to &lt;strong&gt;description collision&lt;/strong&gt; and noise. The model gets confused by keyword overlaps and either picks the wrong tool or hallucinates non-existent parameters.&lt;/p&gt;

&lt;p&gt;Okay, in this blog, I'm talking about skills, not tools. But the principle is the same. Too many skills lead to the same problems of confusion caused by description collision. &lt;/p&gt;

&lt;p&gt;We want:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Our agent to pick the right skills with a high degree of accuracy.&lt;/li&gt;
&lt;li&gt;To avoid burning unnecessary tokens.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;I need a way to optimise my installed skills!&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Do I Have So Many Skills?
&lt;/h2&gt;

&lt;p&gt;Before I start pruning my skills, I need to understand why I have so many.&lt;/p&gt;

&lt;p&gt;I went back and reviewed my Git history to trace how I got here. Here's what I discovered:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Google Cloud &amp;amp; AI knowledge:&lt;/strong&gt; Over 120 skills pulled from official Google repositories, including &lt;a href="https://github.com/google/skills" rel="noopener noreferrer"&gt;&lt;code&gt;google/skills&lt;/code&gt;&lt;/a&gt;, &lt;a href="https://github.com/google/agents-cli" rel="noopener noreferrer"&gt;&lt;code&gt;google/agents-cli&lt;/code&gt;&lt;/a&gt;, &lt;a href="https://github.com/google-gemini/gemini-skills" rel="noopener noreferrer"&gt;&lt;code&gt;google-gemini/gemini-skills&lt;/code&gt;&lt;/a&gt;, and &lt;a href="https://github.com/GoogleCloudPlatform/vertex-ai-creative-studio/tree/main/experiments/mcp-genmedia/skills" rel="noopener noreferrer"&gt;&lt;code&gt;GoogleCloudPlatform/vertex-ai-creative-studio&lt;/code&gt;&lt;/a&gt;. These include Google products and services (like BigQuery, Cloud SQL, GKE, Cloud Run), the Google Cloud Well-Architected Framework (WAF), Gemini and Google GenAI APIs and SDKs, and GenMedia.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dazbo Agent Skills:&lt;/strong&gt; Custom skills I wrote for &lt;a href="https://github.com/derailed-dash/dazbo-agent-skills" rel="noopener noreferrer"&gt;&lt;code&gt;derailed-dash/dazbo-agent-skills&lt;/code&gt;&lt;/a&gt; for documentation, blogging, security, installing automated PR code reviews, skill organisation, and deployment.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Core Software Engineering &amp;amp; Best Practices:&lt;/strong&gt; 25 skills adopted from Addy Osmani's &lt;a href="https://github.com/addyosmani/agent-skills" rel="noopener noreferrer"&gt;&lt;code&gt;addyosmani/agent-skills&lt;/code&gt;&lt;/a&gt; repository covering TDD, code review, debugging, interface design, context engineering, and software delivery workflows.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Research, Strategy &amp;amp; Technical Writing:&lt;/strong&gt; 5 specialised skills installed from Shubham Saboo's &lt;a href="https://github.com/Shubhamsaboo/awesome-llm-apps/tree/main/agent_skills" rel="noopener noreferrer"&gt;&lt;code&gt;shubhamsaboo/awesome-llm-apps&lt;/code&gt;&lt;/a&gt; repository (&lt;code&gt;deep-research&lt;/code&gt;, &lt;code&gt;fact-checker&lt;/code&gt;, &lt;code&gt;strategy-advisor&lt;/code&gt;, &lt;code&gt;technical-writer&lt;/code&gt;, &lt;code&gt;content-creator&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Specialised &amp;amp; Community Skills:&lt;/strong&gt; Niche skills sourced from specific community repositories, including &lt;a href="https://github.com/wshobson/agents" rel="noopener noreferrer"&gt;&lt;code&gt;wshobson/agents&lt;/code&gt;&lt;/a&gt; (&lt;code&gt;documentation-and-adrs&lt;/code&gt;, &lt;code&gt;interview-me&lt;/code&gt;), &lt;a href="https://github.com/coreyhaines31/marketingskills" rel="noopener noreferrer"&gt;&lt;code&gt;coreyhaines31/marketingskills&lt;/code&gt;&lt;/a&gt; (&lt;code&gt;seo-audit&lt;/code&gt;), &lt;a href="https://github.com/remotion-dev/skills" rel="noopener noreferrer"&gt;&lt;code&gt;remotion-dev/skills&lt;/code&gt;&lt;/a&gt; (&lt;code&gt;remotion-best-practices&lt;/code&gt;), and &lt;a href="https://github.com/vercel-labs/skills" rel="noopener noreferrer"&gt;&lt;code&gt;vercel-labs/skills&lt;/code&gt;&lt;/a&gt; (&lt;code&gt;find-skills&lt;/code&gt;).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here is the complete breakdown of the 170 skills I had installed, grouped by category and origin repository:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Group / Category&lt;/th&gt;
&lt;th&gt;Count&lt;/th&gt;
&lt;th&gt;Source Repository / Origin Link&lt;/th&gt;
&lt;th&gt;Summary of Included Skills&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Google Cloud Core Services &amp;amp; WAF&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;82&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/google/skills" rel="noopener noreferrer"&gt;&lt;code&gt;google/skills&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;GCP product &amp;amp; infrastructure guides (BigQuery, Cloud SQL, AlloyDB, GKE, Cloud Run, Firebase), Well-Architected Framework (WAF) pillars, networking, and developer APIs (Google Ads, Analytics, Mobile Ads).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Addy Osmani Engineering Workflows&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;25&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/addyosmani/agent-skills" rel="noopener noreferrer"&gt;&lt;code&gt;addyosmani/agent-skills&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;SDLC &amp;amp; software engineering workflow heuristics covering TDD, code review, debugging, context engineering, spec-driven development, and interface design (orchestrated via &lt;code&gt;using-agent-skills&lt;/code&gt;).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Google Agent Platform &amp;amp; ADK CLI&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;20&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/google/agents-cli" rel="noopener noreferrer"&gt;&lt;code&gt;google/agents-cli&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Agent Development Kit (ADK) CLI lifecycle tools (scaffolding, testing, evaluation, deployment, publishing) and server-managed Agent Platform resource handlers.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Specialised &amp;amp; Community Skills&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;14&lt;/td&gt;
&lt;td&gt;Various Community Sources&lt;/td&gt;
&lt;td&gt;Niche tools and community extensions including Dev.to formatting, Playwright browser testing, Remotion React video, SEO auditing, Python dependency management, and skill discovery (&lt;code&gt;find-skills&lt;/code&gt;).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Gemini API &amp;amp; GenAI SDKs&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/google-gemini/gemini-skills" rel="noopener noreferrer"&gt;&lt;code&gt;google-gemini/gemini-skills&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Technical integration guides for the Gemini API (&lt;code&gt;google-genai&lt;/code&gt; SDK), multimodal streaming, Live API, NotebookLM auth, and server-managed interactions.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Google GenMedia &amp;amp; Creative Studio&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/GoogleCloudPlatform/vertex-ai-creative-studio/tree/main/experiments/mcp-genmedia/skills" rel="noopener noreferrer"&gt;&lt;code&gt;vertex-ai-creative-studio&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Specialised role personas for multimedia production (audio engineering, image generation, video editing, voice direction, script producing, story generation).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Dazbo Custom Agent Skills&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/derailed-dash/dazbo-agent-skills" rel="noopener noreferrer"&gt;&lt;code&gt;derailed-dash/dazbo-agent-skills&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Personal workflow automation for documentation maintenance, blog writing (&lt;code&gt;dazbo-content&lt;/code&gt;), secrets management (&lt;code&gt;git-crypt&lt;/code&gt;), UTM link tagging, PR review actions, skill organisation, and deployment.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Awesome LLM Apps (Research &amp;amp; Content)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/Shubhamsaboo/awesome-llm-apps/tree/main/agent_skills" rel="noopener noreferrer"&gt;&lt;code&gt;shubhamsaboo/awesome-llm-apps&lt;/code&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;Autonomous research, fact-checking, strategy advisory, and technical documentation generation workflows.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;TOTAL&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;170&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;So you can see how easy it is for your skills base to get out of hand! Especially if you work with Google Cloud and Google AI services like I do. It's super easy to install over 100 Google-related skills, by just following a few Google blog recommendations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Next Question: Do I Need Them All?
&lt;/h2&gt;

&lt;p&gt;I asked Antigravity to read all of my skills in detail, and identify any areas of overlap and redundancy.&lt;/p&gt;

&lt;p&gt;There was a LOT of redundancy! We uncovered seven major categories of overlap, duplication, and inefficiency:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Exact Byte-for-Byte File &amp;amp; Naming Duplicates:&lt;/strong&gt; In &lt;a href="https://github.com/google/skills/tree/main/skills/cloud/gemini-agents-api" rel="noopener noreferrer"&gt;&lt;code&gt;google/skills&lt;/code&gt;&lt;/a&gt;, the skill directory &lt;code&gt;gemini-agents-api&lt;/code&gt; declared &lt;code&gt;name: gemini-managed-agents-api&lt;/code&gt; in its frontmatter. This directory vs. frontmatter mismatch caused installation tools to spawn two exact duplicate folders (&lt;code&gt;gemini-agents-api&lt;/code&gt; and &lt;code&gt;gemini-managed-agents-api&lt;/code&gt;) carrying 100% byte-for-byte identical content.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deprecated SDKs vs. Modern APIs:&lt;/strong&gt; Older skills still provided code snippets using the deprecated &lt;code&gt;google-generativeai&lt;/code&gt; package and obsolete model strings, directly contradicting modern &lt;code&gt;google-genai&lt;/code&gt; SDK standards and confusing the agent during code generation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API Guide Overlaps &amp;amp; Fragmentation Across Repositories:&lt;/strong&gt; The &lt;code&gt;gemini-api&lt;/code&gt; skill in &lt;a href="https://github.com/google/skills/tree/main/skills/cloud/gemini-api" rel="noopener noreferrer"&gt;&lt;code&gt;google/skills&lt;/code&gt;&lt;/a&gt; (which exists as an enterprise Agent Platform guide) collided directly with &lt;code&gt;gemini-api-dev&lt;/code&gt; in &lt;a href="https://github.com/google-gemini/gemini-skills/tree/main/skills/gemini-api-dev" rel="noopener noreferrer"&gt;&lt;code&gt;google-gemini/gemini-skills&lt;/code&gt;&lt;/a&gt;. Installing across multiple Google repositories resulted in competing guides for the same underlying APIs (&lt;code&gt;gemini-api&lt;/code&gt;, &lt;code&gt;gemini-api-dev&lt;/code&gt;, &lt;code&gt;gemini-agents-api&lt;/code&gt;, &lt;code&gt;gemini-interactions-api&lt;/code&gt;, and &lt;code&gt;gemini-live-api-dev&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Irrelevant Domain Bundles (The Monolithic Repo Problem):&lt;/strong&gt; Pulling down the monolithic &lt;a href="https://github.com/google/skills" rel="noopener noreferrer"&gt;&lt;code&gt;google/skills&lt;/code&gt;&lt;/a&gt; repository imported mobile advertising suites (Android/iOS banner ads, Unity SDKs) that had zero relevance to cloud backend architecture and agent development.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hierarchical Sub-Skill Redundancies (The Meta-Skill Tax):&lt;/strong&gt; 25 individual SDLC skills from &lt;a href="https://github.com/addyosmani/agent-skills" rel="noopener noreferrer"&gt;&lt;code&gt;addyosmani/agent-skills&lt;/code&gt;&lt;/a&gt; (such as &lt;code&gt;test-driven-development&lt;/code&gt; and &lt;code&gt;code-review-and-quality&lt;/code&gt;) were loaded into system prompt context at startup, despite being child sub-skills already orchestrated on-demand by &lt;code&gt;using-agent-skills&lt;/code&gt;. Similarly, 20 sub-skills from &lt;a href="https://github.com/google/agents-cli" rel="noopener noreferrer"&gt;&lt;code&gt;google/agents-cli&lt;/code&gt;&lt;/a&gt; were loaded continuously rather than routed via &lt;code&gt;google-agents-cli-workflow&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tooling &amp;amp; MCP Surface Overlaps:&lt;/strong&gt; Standalone tools like the &lt;code&gt;adk-docs-mcp&lt;/code&gt; server were redundant because &lt;code&gt;google-developer-knowledge&lt;/code&gt; already indexes ADK documentation (&lt;code&gt;adk.dev&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Capability &amp;amp; Persona Redundancies:&lt;/strong&gt; &lt;code&gt;documentation-and-adrs&lt;/code&gt; (&lt;a href="https://github.com/addyosmani/agent-skills" rel="noopener noreferrer"&gt;&lt;code&gt;addyosmani/agent-skills&lt;/code&gt;&lt;/a&gt;) was a duplicate of &lt;code&gt;architecture-decision-records&lt;/code&gt; (&lt;a href="https://github.com/wshobson/agents" rel="noopener noreferrer"&gt;&lt;code&gt;wshobson/agents&lt;/code&gt;&lt;/a&gt;), while generic &lt;code&gt;content-creator&lt;/code&gt; (&lt;a href="https://github.com/Shubhamsaboo/awesome-llm-apps/tree/main/awesome_agent_skills" rel="noopener noreferrer"&gt;&lt;code&gt;shubhamsaboo/awesome-llm-apps&lt;/code&gt;&lt;/a&gt;) collided with my custom &lt;a href="https://github.com/derailed-dash/dazbo-agent-skills" rel="noopener noreferrer"&gt;&lt;code&gt;dazbo-content&lt;/code&gt;&lt;/a&gt; persona.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What Else Did I Discover?
&lt;/h2&gt;

&lt;p&gt;Beyond the sheer volume of redundant skills, I made another cool discovery: &lt;strong&gt;many skill collections come with a "parent" Meta-Skill.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When you install a large collection of skills — such as Addy Osmani's engineering skills (&lt;a href="https://github.com/addyosmani/agent-skills" rel="noopener noreferrer"&gt;&lt;code&gt;addyosmani/agent-skills&lt;/code&gt;&lt;/a&gt;), or Google's 20 Agent Platform skills (&lt;a href="https://github.com/google/agents-cli" rel="noopener noreferrer"&gt;&lt;code&gt;google/agents-cli&lt;/code&gt;&lt;/a&gt;) — your instinct is to leave all 20 to 25 skills enabled in your workspace. I mean... &lt;em&gt;Why wouldn't you?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;However, these skill suites are designed to be &lt;strong&gt;hierarchical&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;addyosmani/agent-skills&lt;/code&gt;:&lt;/strong&gt; Orchestrated by the &lt;code&gt;using-agent-skills&lt;/code&gt; meta-skill.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Google ADK &amp;amp; Agent Platform:&lt;/strong&gt; Orchestrated by the &lt;code&gt;google-agents-cli-workflow&lt;/code&gt; meta-skill.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GCP Data Pipelines:&lt;/strong&gt; Orchestrated by the &lt;code&gt;gcp-data-pipelines&lt;/code&gt; meta-skill.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In each case, the parent meta-skill is supposed to work as a sort of skills index or decision tree. When a specific task comes in — such as writing unit tests or running a security audit — the parent meta-skill directs the agent to fetch and read &lt;em&gt;only&lt;/em&gt; the specific &lt;em&gt;child&lt;/em&gt; sub-skill from disk on demand.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9ue0lyme8b2bzh4zci3g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9ue0lyme8b2bzh4zci3g.png" alt="Parent Meta-Skill Routing Architecture" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Conclusion? &lt;strong&gt;We don't need to load the frontmatter of all the &lt;em&gt;child&lt;/em&gt; skills. We only need the parent skill!&lt;/strong&gt; In the examples above, I can easily replace nearly 50 skills with just 3 orchestration skills!&lt;/p&gt;

&lt;p&gt;So now I could implement a solution to organise my skills. The primary objectives:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Remove skills that are truly redundant.&lt;/li&gt;
&lt;li&gt;Prevent Level 1 skills loading (i.e. reading frontmatter into context) for skills that have parent meta-skills. For these, only pre-load the parent meta-skills.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Clarifying Skill States
&lt;/h2&gt;

&lt;p&gt;To design a lean agent workspace, we must be crystal clear on the three distinct states a skill can occupy throughout its lifecycle. They can be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Installed and inactive (discoverable).&lt;/li&gt;
&lt;li&gt;Installed and excluded.&lt;/li&gt;
&lt;li&gt;Activated.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's define these in more detail:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Installed and inactive (discoverable)&lt;/strong&gt;: These skills are present on disk and discoverable by our agent. When the agent (e.g. Antigravity) starts, their frontmatter is automatically read into context.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Installed and excluded&lt;/strong&gt;: These skills reside in your disk library but are &lt;em&gt;excluded&lt;/em&gt; from automatic Level 1 loading. For these, the agent does not automatically read their frontmatter and is therefore not &lt;em&gt;directly&lt;/em&gt; aware of them during your conversation with it. But because they are present on disk and available to the agent, they can still be explicitly activated.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Activated&lt;/strong&gt;: This is the runtime state when a skill's full &lt;code&gt;SKILL.md&lt;/code&gt; body has been loaded into the current turn context, i.e. Level 2 loading (and Level 3, where supporting files are present and appropriate).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Crucially, &lt;strong&gt;both &lt;em&gt;installed and inactive&lt;/em&gt; and &lt;em&gt;installed and excluded&lt;/em&gt; skills can transition into this &lt;em&gt;Activated&lt;/em&gt; state.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbsdsrap31wexgzsx7k97.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbsdsrap31wexgzsx7k97.png" alt="Agent Skill Lifecycle: States &amp;amp; Transitions" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Excluding Skills
&lt;/h2&gt;

&lt;p&gt;So now we know that a good optimisation strategy is to use exclusion to prevent a bunch of skills being loaded at startup into the "Installed and inactive" state.&lt;/p&gt;

&lt;p&gt;But how can we do this?&lt;/p&gt;

&lt;p&gt;In &lt;strong&gt;Google Antigravity&lt;/strong&gt;, global skill exclusions are managed via &lt;code&gt;~/.gemini/config/skills.json&lt;/code&gt; (or &lt;code&gt;.agents/skills.json&lt;/code&gt; for workspace-level skills).&lt;/p&gt;

&lt;p&gt;The native &lt;code&gt;exclude&lt;/code&gt; array accepts skill folder names. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"exclude"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"alloydb-basics"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"cloud-spanner-migrations"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"firebase-basics"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Any skill listed in the &lt;code&gt;exclude&lt;/code&gt; array is completely skipped during Tier 1 discovery. Its frontmatter is therefore &lt;strong&gt;not&lt;/strong&gt; injected into the system prompt, saving tokens instantly.&lt;/p&gt;

&lt;p&gt;So this is easy!&lt;/p&gt;

&lt;p&gt;But here's a cool trick. You can easily "un-exclude" a skill by prefixing its name with &lt;code&gt;//&lt;/code&gt; inside the quotes. This is useful because it allows us to re-enable up-front skill loading, without having to check our disk to find the skill and its name. &lt;/p&gt;

&lt;p&gt;So my approach is to always have &lt;em&gt;all&lt;/em&gt; my available skills in the &lt;code&gt;exclude&lt;/code&gt; list, but to comment-out the ones that need to be discovered automatically.&lt;/p&gt;

&lt;p&gt;Note: I have the &lt;code&gt;//&lt;/code&gt; &lt;em&gt;inside&lt;/em&gt; the quotes. Why? Because this is not valid JSON:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"exclude"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="s2"&gt;"alloydb-basics"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="s2"&gt;"find-skills"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"firebase-basics"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But this is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"exclude"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"//alloydb-basics"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"//find-skills"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="s2"&gt;"firebase-basics"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And because the &lt;code&gt;exclude&lt;/code&gt; list uses &lt;em&gt;exact&lt;/em&gt; string matching, you can use this &lt;code&gt;//&lt;/code&gt; trick to enable/exclude skills on the fly, without having to remove the skill from the &lt;code&gt;exclude&lt;/code&gt; list entirely. &lt;/p&gt;

&lt;p&gt;In the example above: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;alloydb-basics&lt;/code&gt; and &lt;code&gt;find-skills&lt;/code&gt; are &lt;em&gt;not&lt;/em&gt; excluded, so they are auto-discovered on startup and their frontmatter is loaded into context.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;firebase-basics&lt;/code&gt; &lt;em&gt;is&lt;/em&gt; excluded, so it is &lt;em&gt;not&lt;/em&gt; auto-discovered on startup and its frontmatter is &lt;em&gt;not&lt;/em&gt; loaded into context.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now we've got everything we need to implement a repeatable mechanism to organise and clean up our skills.&lt;/p&gt;

&lt;h2&gt;
  
  
  Irony and Guitars: I Made a Skill!
&lt;/h2&gt;

&lt;p&gt;Because: when you've got too many skills, you definitely need one more. (In this way, skills are a lot like guitars, or cats.)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fc2h2psk391ngciv9w5fy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fc2h2psk391ngciv9w5fy.png" alt="The N+1 Rule for Guitars (and Skills)" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Anyway, based on what I learned, I created a skill that:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Identifies duplicative skills and recommends complete removal of those that are redundant.&lt;/li&gt;
&lt;li&gt;Identifies which skills are orchestrated by a parent &lt;em&gt;meta-skill&lt;/em&gt; and &lt;em&gt;excludes&lt;/em&gt; the &lt;em&gt;child&lt;/em&gt; skills from automatic discovery.&lt;/li&gt;
&lt;li&gt;Identifies skills which look particularly niche or rarely used, and recommends excluding these also. They can always be included later, or even activated by explicitly asking the agent to do so.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Let's see how it performs! After installing my skill, I said to Antigravity:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"Optimise my skills please"&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Outcomes of Optimising
&lt;/h2&gt;

&lt;p&gt;My skill ran and presented this proposal summary table:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Baseline (Unoptimised)&lt;/th&gt;
&lt;th&gt;Proposed (Optimised)&lt;/th&gt;
&lt;th&gt;Delta / Savings&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Installed Skills Directories&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;170&lt;/td&gt;
&lt;td&gt;165&lt;/td&gt;
&lt;td&gt;-5 (-2.9%)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Installed &amp;amp; Discoverable Skills&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;170&lt;/td&gt;
&lt;td&gt;49&lt;/td&gt;
&lt;td&gt;-121 (-71.2%)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Installed &amp;amp; Excluded Skills&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;116&lt;/td&gt;
&lt;td&gt;+116&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Prompt Token Overhead&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;~17,000 tokens&lt;/td&gt;
&lt;td&gt;~3,350 tokens&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;-13,650 tokens (-80.3%)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;It goes on to say:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;Upon your confirmation, I will execute the following steps:
&lt;span class="p"&gt;
1.&lt;/span&gt; &lt;span class="gs"&gt;**Retire Redundant Skills**&lt;/span&gt;: Delete the 5 redundant skill directories
   (&lt;span class="sb"&gt;`gemini-managed-agents-api`&lt;/span&gt;, &lt;span class="sb"&gt;`liveapi-service`&lt;/span&gt;, &lt;span class="sb"&gt;`documentation-and-adrs`&lt;/span&gt;, 
   &lt;span class="sb"&gt;`gemini-api-dev`&lt;/span&gt;, &lt;span class="sb"&gt;`gemini-live-api-dev`&lt;/span&gt;) from &lt;span class="sb"&gt;`~/.gemini/config/skills/`&lt;/span&gt;.
&lt;span class="p"&gt;2.&lt;/span&gt; &lt;span class="gs"&gt;**Generate Optimised `skills.json`**&lt;/span&gt;: Write the full-inventory &lt;span class="sb"&gt;`~/.gemini/config/skills.json`&lt;/span&gt; 
   with 49 active skills (&lt;span class="sb"&gt;`//`&lt;/span&gt; prefix) and 116 excluded skills.
&lt;span class="p"&gt;3.&lt;/span&gt; &lt;span class="gs"&gt;**Verify Context Footprint**&lt;/span&gt;: Re-audit the active skill prompt token overhead to confirm 
   successful reduction to ~3,350 tokens.
&lt;span class="p"&gt;
---&lt;/span&gt;
&lt;span class="gt"&gt;&amp;gt; [!IMPORTANT]&lt;/span&gt;
&lt;span class="gt"&gt;&amp;gt; **Mandatory Guardrail Confirmation**: In accordance with `organise-agent-skills` guardrails, please confirm if you would like me to proceed with deleting the 5 redundant skill directories and creating the optimised `~/.gemini/config/skills.json`.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By trimming back to a core of 49 active skills and delegating the rest to meta-skills and on-demand rules:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We slashed system prompt overhead by approximately 13,650 tokens; that's an &lt;strong&gt;80.3% reduction&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;We saved over &lt;strong&gt;400,000 tokens per pair-programming session&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Agent response latencies dropped noticeably.&lt;/li&gt;
&lt;li&gt;Tool selection precision increased because the agent was no longer fighting distractor noise from over 100 overlapping skill descriptions. Instead of having a mild existential crisis every turn trying to choose between five different Gemini SDK guides, the agent simply picks the right tool and gets on with the job.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffyukucn73r0k4e7lknvp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffyukucn73r0k4e7lknvp.png" alt="System Prompt Startup Overhead Comparison" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary &amp;amp; Conclusion
&lt;/h2&gt;

&lt;p&gt;Agent skills are awesome. They're so easy to find, install and use. But when we allow skills to sprawl unchecked, we start confusing our agents. This impacts accuracy, reliability, performance, and cost.&lt;/p&gt;

&lt;p&gt;So increasingly, we need a way to manage and optimise our skills. For this, I've done some work so you don't have to!&lt;/p&gt;

&lt;p&gt;Feel free to download my optimisation skill off-the-shelf:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Install all the Dazbo Agent Skills&lt;/span&gt;
npx skills add https://github.com/derailed-dash/dazbo-agent-skills

&lt;span class="c"&gt;# Install just the `Organise Agent Skills` skill&lt;/span&gt;
npx skills add https://github.com/derailed-dash/dazbo-agent-skills &lt;span class="nt"&gt;--skill&lt;/span&gt; organise-agent-skills
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or if you have the Vercel &lt;code&gt;find-skills&lt;/code&gt; skill installed, you can just ask your agent: &lt;/p&gt;

&lt;p&gt;&lt;em&gt;"Install &lt;code&gt;dazbo-agent-skills&lt;/code&gt; for me."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;So, that's it, folks. Go forth and optimise. If you find this skill useful, please give the &lt;a href="https://github.com/derailed-dash/dazbo-agent-skills" rel="noopener noreferrer"&gt;repo&lt;/a&gt; a star.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Have you experienced Skills Sprawl in your agentic environment? How many skills are currently active in your setup? Let me know in the comments below!&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Before You Go
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Please share&lt;/strong&gt; 📢 this with anyone that you think will be interested. It might help them, and it really helps me!&lt;/li&gt;
&lt;li&gt;Please &lt;strong&gt;give me loads of reactions / hearts&lt;/strong&gt;! 💖&lt;/li&gt;
&lt;li&gt;Please &lt;strong&gt;leave a comment&lt;/strong&gt; 💬. Interaction is good!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add a star&lt;/strong&gt; ⭐ on my repos!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Follow&lt;/strong&gt; 👉 and &lt;strong&gt;subscribe&lt;/strong&gt; 🔔, so you don’t miss my content.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  References and Useful Links
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Standards, Hubs &amp;amp; Agent Platforms
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://agentskills.io/home" rel="noopener noreferrer"&gt;Agent Skills Specification &amp;amp; Open Standard&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://skills.sh/" rel="noopener noreferrer"&gt;Skills Hub &amp;amp; Directory (&lt;code&gt;skills.sh&lt;/code&gt;)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://antigravity.google/?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Google Antigravity&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Related Dazbo Articles &amp;amp; Repositories
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dazbo.co.uk/" rel="noopener noreferrer"&gt;Dazbo's Portfolio&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/gde/dialling-our-agents-to-11-agent-skills-you-need-to-be-using-2o2k"&gt;&lt;em&gt;Dialling Our Agents to 11: Agent Skills You Need to be Using!&lt;/em&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://medium.com/google-cloud/confused-about-where-to-put-your-agent-skills-ea778f3c64f3?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;&lt;em&gt;Confused About Where to Put Your Agent Skills?&lt;/em&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://medium.com/google-cloud/automated-github-code-reviewsusing-google-gemini-7b4d027b3092?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;&lt;em&gt;Automated GitHub Code Reviews Using Google Gemini&lt;/em&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/derailed-dash/dazbo-agent-skills" rel="noopener noreferrer"&gt;Dazbo Agent Skills Repository (&lt;code&gt;derailed-dash/dazbo-agent-skills&lt;/code&gt;)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Key Agent Skills Repositories
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/google/skills" rel="noopener noreferrer"&gt;Google Skills (&lt;code&gt;google/skills&lt;/code&gt;)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/google/agents-cli" rel="noopener noreferrer"&gt;Google Agents CLI &amp;amp; Workflow Skills (&lt;code&gt;google/agents-cli&lt;/code&gt;)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/google-gemini/gemini-skills" rel="noopener noreferrer"&gt;Google Gemini API Skills (&lt;code&gt;google-gemini/gemini-skills&lt;/code&gt;)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/addyosmani/agent-skills" rel="noopener noreferrer"&gt;Addy Osmani Agent Skills (&lt;code&gt;addyosmani/agent-skills&lt;/code&gt;)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/Shubhamsaboo/awesome-llm-apps/tree/main/agent_skills" rel="noopener noreferrer"&gt;Awesome LLM Apps Skills (&lt;code&gt;shubhamsaboo/awesome-llm-apps&lt;/code&gt;)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/coreyhaines31/marketingskills" rel="noopener noreferrer"&gt;Corey Haines Marketing Skills (&lt;code&gt;coreyhaines31/marketingskills&lt;/code&gt;)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/remotion-dev/skills" rel="noopener noreferrer"&gt;Remotion Video Skills (&lt;code&gt;remotion-dev/skills&lt;/code&gt;)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/vercel-labs/skills" rel="noopener noreferrer"&gt;Vercel Labs Skills (&lt;code&gt;vercel-labs/skills&lt;/code&gt;)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Academic Research &amp;amp; Benchmarks
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Paper: &lt;a href="https://arxiv.org/pdf/2605.24660" rel="noopener noreferrer"&gt;&lt;em&gt;“How Many Tools Should an LLM Agent See? A Chance-Corrected Answer”&lt;/em&gt;&lt;/a&gt; (Repantis et al., May 2026)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://gorilla.cs.berkeley.edu/leaderboard.html" rel="noopener noreferrer"&gt;Berkeley Function Calling Leaderboard (BFCL)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>agentskills</category>
      <category>progressivedisclosure</category>
      <category>googleantigravity</category>
      <category>agenticai</category>
    </item>
    <item>
      <title>Finally — Hard Caps to Limit Your Google Cloud Spend</title>
      <dc:creator>Darren "Dazbo" Lester</dc:creator>
      <pubDate>Wed, 29 Jul 2026 09:49:50 +0000</pubDate>
      <link>https://dev.to/gde/finally-hard-caps-to-limit-your-google-cloud-spend-1363</link>
      <guid>https://dev.to/gde/finally-hard-caps-to-limit-your-google-cloud-spend-1363</guid>
      <description>&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;p&gt;For years, Google Cloud budget alerts were purely informational. They sent an email while your project quietly burned through your savings.&lt;/p&gt;

&lt;p&gt;I built my own Pub/Sub Killswitch to sleep peacefully at night, but it requires a bit of plumbing to install. What we really wanted was an easy option in the Google Cloud Console.&lt;/p&gt;

&lt;p&gt;Good news! Google has finally introduced native Cloud Spend Caps (currently in Public Preview). You can now hard-cap spend per service so an unexpected API leak or runaway script hits a 403 Permission Denied wall instead of creating a $10,000 bill.&lt;/p&gt;

&lt;p&gt;Here is how it works, how fast it triggers, and what you need to know…&lt;/p&gt;

&lt;h2&gt;
  
  
  What’s the Problem?
&lt;/h2&gt;

&lt;p&gt;Over the last couple of years I’ve read weekly horror stories about individuals getting hit for thousands, or even tens of thousands of dollars of unexpected costs from Google Cloud.&lt;/p&gt;

&lt;p&gt;Do a quick Google search, and you’ll find examples like…&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.tomshardware.com/tech-industry/artificial-intelligence/google-cloud-customer-wakes-up-to-usd18-000-bill-despite-usd7-budget-thanks-to-forgotten-public-api-key-attacker-put-in-60-000-requests-and-blasted-through-usd1-400-spending-cap" rel="noopener noreferrer"&gt;“Google Cloud customer wakes up to $18,000+ bill despite $7 budget, thanks to forgotten API key in published project — attacker put in 60,000+ requests and blasted through $1,400 spending cap”&lt;/a&gt; — Tom’s Hardware, April 2026&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.reddit.com/r/googlecloud/comments/1pimbs9/got_hit_with_a_65000_bill_overnight_from_gcs_due/" rel="noopener noreferrer"&gt;Got hit with a $65,000 bill overnight from GCS due to a spike in list object calls&lt;/a&gt; — Reddit, December 2025&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.reddit.com/r/googlecloud/comments/1tr4vp8/google_cloud_billed_me_19000_usd_r105000_brl/" rel="noopener noreferrer"&gt;Google Cloud billed me ~$19,000 USD (~R$105,000 BRL) after an API key breach — and the charges keep growing even after I deleted everything&lt;/a&gt; — Reddit, May 2026&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The big problem that most folks don’t understand is this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;GOOGLE BUDGET ALERTS WERE NOT HARD LIMITS. THEY DID NOT PREVENT YOU FROM SPENDING MORE THAN YOUR BUDGET.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Most of the examples I see follow the same pattern…&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A user follows Google best practice and sets a budget alert on their project. Say, $50 dollars per month.&lt;/li&gt;
&lt;li&gt;They go to bed.&lt;/li&gt;
&lt;li&gt;They wake up owing thousands.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Reading these stories was causing me so much distress. Both for the many people getting caught out, but also because the same thing happening to me felt like an inevitable ticking time bomb.&lt;/p&gt;

&lt;p&gt;In theory, I know more about Google Cloud than the average punter. I’m supposed to be a &lt;a href="https://developers.google.com/community/experts?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Google Developer Expert (GDE)&lt;/a&gt; and &lt;a href="https://partners.cloud.google.com/google-cloud-ambassadors?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Google Ambassador&lt;/a&gt;, after all!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;But still I was terrified!&lt;/em&gt; And I know at least a couple of fellow GDEs that have been hit with this. Which just goes to show: &lt;strong&gt;even if you know a lot about Google Cloud and think you’re doing everything right, it’s still possible to get caught out.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;And since Google didn’t offer any hard limit (aka &lt;em&gt;hard cap&lt;/em&gt;) mechanism, there was literally no off-the-shelf solution.&lt;/p&gt;

&lt;h2&gt;
  
  
  So I Built My Own Killswitch
&lt;/h2&gt;

&lt;p&gt;I built a mechanism that responds to budget alerts by detaching billing from whatever project(s) is/are associated with that alert. Sure, you can still get billing alert delays, but this mechanism typically stops any offending project inside of an hour of costs exceeding your budget. And this could be the difference that turns a £10,000 unexpected bill into a $100 unexpected bill. My solution is free and easy to install. And I blogged about it &lt;a href="https://medium.com/google-cloud/how-to-avoid-a-massive-cloud-bill-41a76251caba" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Using it requires a bit of setup…&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You need to create your budget alerts, of course.&lt;/li&gt;
&lt;li&gt;You need those alerts to be sent to a Pub/Sub topic that you create.&lt;/li&gt;
&lt;li&gt;You need to deploy a Cloud Run Function that does the actual work of responding to the alert and disconnecting a project.&lt;/li&gt;
&lt;li&gt;You need to wire-up that Cloud Run Function such that it is triggered by events on the Pub/Sub topic.&lt;/li&gt;
&lt;li&gt;You need pay careful attention to the roles you assign to the service account that runs this Cloud Run project — particularly if you happen to have many different Google Cloud projects.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fq3e68ntbezwtoxvyw6nu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fq3e68ntbezwtoxvyw6nu.png" alt="My GCP Billing Killswitch" width="800" height="553"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Even though the solution is well-documented and all of the above is scripted, it’s still a fair bit of work. It can be daunting for many.&lt;/p&gt;

&lt;p&gt;I spoke to Google about this. A lot.&lt;/p&gt;

&lt;h2&gt;
  
  
  Google Introduced Cloud Spend Caps!
&lt;/h2&gt;

&lt;p&gt;They delivered!&lt;/p&gt;

&lt;p&gt;I tested this out in Private Preview over the last couple of weeks, but it went public today! So now y’all can use it too.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting Up a Spend Cap
&lt;/h2&gt;

&lt;p&gt;First, &lt;strong&gt;create a Budget&lt;/strong&gt; in the Google Cloud Console. Same place as before…&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuhehlv5vjoq7idl8ohnd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuhehlv5vjoq7idl8ohnd.png" alt="Create budget alert" width="800" height="626"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Traditionally, you would then set the amounts and then you’d see these available actions…&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgtut2ln8jcb2f5uji980.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgtut2ln8jcb2f5uji980.png" alt="Traditional budget alert — no spend cap" width="615" height="710"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But NOW you have the option to select &lt;strong&gt;“Spend cap enforcement”&lt;/strong&gt; when you create the budget.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkd9nrey8lc0c2duvhlzw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fkd9nrey8lc0c2duvhlzw.png" alt="Spend cap enforcement" width="572" height="438"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you select this, &lt;strong&gt;you MUST then specify a service&lt;/strong&gt;. &lt;em&gt;(Currently you can only select one.)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5kv2t0csfgkgy7eo6gyv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5kv2t0csfgkgy7eo6gyv.png" alt="Specify a service" width="569" height="690"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note that if you use the “Spend cap” type, you can no longer select the option to publish to Pub/Sub:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fp8bnisyt36lfuly8vu50.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fp8bnisyt36lfuly8vu50.png" alt="No Pub/Sub with Spend Caps" width="567" height="711"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once created, the new budget alert looks like this. Note how this new alert says &lt;em&gt;“Spend cap status: Configured”&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu358sphvmfjhqavgazj4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu358sphvmfjhqavgazj4.png" alt="Spend cap configured" width="799" height="263"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Trying It Out
&lt;/h2&gt;

&lt;p&gt;I started running up some cost on my Gemini API inside this project.&lt;/p&gt;

&lt;p&gt;Ooh, look! Inside my CI/CD pipeline I can see it’s hit a &lt;strong&gt;“403 — permission denied”&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F71xqdjdyhfl5rri8ykaf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F71xqdjdyhfl5rri8ykaf.png" alt="No permission!" width="800" height="510"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And I got this email, almost immediately.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7y2kuvckfm0i0vj6t38h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7y2kuvckfm0i0vj6t38h.png" alt="Spend cap reached" width="800" height="971"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It’s not too subtle! You’re gonna struggle to miss this in your inbox!!&lt;/p&gt;

&lt;p&gt;We can take a look in Cloud Console to see more information:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmsw6m4lxau6ay3p536rq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmsw6m4lxau6ay3p536rq.png" alt="Spend limit reached" width="799" height="355"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Okay, successful test! It worked exactly as we wanted it to.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Lift the Cap?
&lt;/h2&gt;

&lt;p&gt;What if we want to continue working with our service? In that case, we just need to lift the spend cap.&lt;/p&gt;

&lt;p&gt;Open your budget and then click on &lt;strong&gt;“Lift spend cap”&lt;/strong&gt; in the Console:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqta76f6t0zpdtxkq5emc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fqta76f6t0zpdtxkq5emc.png" alt="Lift spend cap" width="800" height="539"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You’ll see this message:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fun6no0670ukt9pfypt87.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fun6no0670ukt9pfypt87.png" alt="Proceed?" width="799" height="466"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now you need to specify a new, &lt;em&gt;higher&lt;/em&gt; amount:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ft7plj54324je3wk0z1mk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ft7plj54324je3wk0z1mk.png" alt="Lift in progress" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You get a warning that it might take an hour to lift the cap. But for me, it took about 2 minutes:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ff0p1qx6o7yatehnta5mi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ff0p1qx6o7yatehnta5mi.png" alt="May take one hour" width="800" height="391"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then I received these two emails, nearly immediately:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx1uh27yh113noc36eazt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fx1uh27yh113noc36eazt.png" alt="Email: spend cap lifted" width="800" height="785"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Spend cap updated:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdbrgxvzyy983q2fmh767.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdbrgxvzyy983q2fmh767.png" alt="Email: spend cap updated" width="800" height="859"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So when you’re working with spend caps, you always know exactly what’s going on.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Does This Differ From Spend Caps in AI Studio?
&lt;/h2&gt;

&lt;p&gt;It works the same way. But AI Studio only lets you set spend caps associated with Gemini API keys.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Most Frequently Asked Question…
&lt;/h2&gt;

&lt;p&gt;One of the biggest historical problems with budget alerts, and anything that leverages them (like my Billing Killswitch) is that the alerts are only triggered after billing cycle reconciliation. This results in a delay between your actual spend, and billing alerts firing. This delay could be hours. A lot of damage can be done to your credit card in a few hours!&lt;/p&gt;

&lt;p&gt;With the new spend capping feature, Google promises that “near real-time enforcement”, with the &lt;strong&gt;caps triggering within minutes of actual spend thresholds being met&lt;/strong&gt;. In my testing, it triggered within a couple of minutes.&lt;/p&gt;

&lt;p&gt;Two minutes rather than two hours? I’ll take it!&lt;/p&gt;

&lt;p&gt;Maybe, in the near future, we might expect some closer integration with the new Anomaly Detection feature. Wouldn’t it be nice if we had a toggle to enable capping to trigger based on the &lt;em&gt;prediction&lt;/em&gt; of a spend cap being hit in the next few minutes or hours? (For the SREs out there… This would be a similar approach to setting alerts based on the rate of error budget consumption.)&lt;/p&gt;

&lt;p&gt;Anyway, that’s my prediction. Let’s see!&lt;/p&gt;

&lt;h2&gt;
  
  
  Spend Cap Limitations?
&lt;/h2&gt;

&lt;p&gt;Just a couple that I noticed.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;At the moment, you have to set these caps one service at a time. It would be better if we could pick multiple services. So for now, I’ll still be using my Killswitch mechanism when I want to limit billing across the whole project or collections of projects.&lt;/li&gt;
&lt;li&gt;At the moment, you can’t have a cap and ALSO send a message to Pub/Sub. That might be useful for some.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Wrapping Up
&lt;/h2&gt;

&lt;p&gt;Native Cloud Spend Caps are an absolute game-changer. They provide the one thing cloud engineers have been begging for: actual, deterministic spend boundaries. If you’re building with high-throughput APIs like Gemini, get this configured immediately.&lt;/p&gt;

&lt;p&gt;Good architecture isn’t just about high availability — it’s about keeping your wallet intact!&lt;/p&gt;

&lt;h2&gt;
  
  
  Before You Go
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Please share&lt;/strong&gt; this with anyone that you think will be interested. It might help them, and it really helps me!&lt;/li&gt;
&lt;li&gt;Please &lt;strong&gt;give me loads of claps&lt;/strong&gt;! (Just hold down the clap button.)&lt;/li&gt;
&lt;li&gt;Please &lt;strong&gt;leave a comment&lt;/strong&gt; 💬. Interaction is good!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add a star&lt;/strong&gt; on the repo!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Follow&lt;/strong&gt; and &lt;strong&gt;subscribe&lt;/strong&gt;, so you don’t miss my content.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Useful Links and References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://cloud.google.com/blog/topics/cost-management/new-early-anomalies-and-spend-caps-on-google-cloud-budgets?utm_campaign=DEVECO_GDEMembers&amp;amp;utm_source=deveco" rel="noopener noreferrer"&gt;Google Cloud blog — Detect early and enforce firmly with Google Cloud’s enhanced cost controls for AI spend&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://medium.google-cloud/how-to-avoid-a-massive-cloud-bill-41a76251caba" rel="noopener noreferrer"&gt;My GCP Billing Killswitch Blog&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/derailed-dash/gcp-billing-killswitch" rel="noopener noreferrer"&gt;My GCP Billing Killswitch on GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dazbo.co.uk/" rel="noopener noreferrer"&gt;Dazbo’s Portfolio&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>gcpbilling</category>
      <category>finops</category>
      <category>killswitch</category>
      <category>hardcap</category>
    </item>
  </channel>
</rss>
