This codelab is part of the 2026 Agentic Architect Sprint by Google. Earlier codelabs steered an agent one step at a time. This one hands the agent a single high-level goal and lets it run the agent loop itself — evaluate → act → check the result → repeat — until the work is verified complete, with no step-by-step prompting.
That is the heart of closed-loop engineering: instead of approving each move, you give the agent an objective and an oracle that decides "done," and it self-corrects until the oracle is green. The autonomy command is Antigravity 2.0's
/goal — it runs to completion without asking for intermediate input. You will use it to build and verify a small static storefront from one sentence.
tests/shop.test.js plus verify.mjs — that defines "done" and bounds the run.
/goal runs the full agent loop autonomously, self-approving its plan.node --test + node verify.mjs) makes "done" machine-checkable and stops the loop.The oracle is pure functions plus static checks, verifiable offline with node --test — no agent run needed to confirm it. The autonomous run is the lesson, bounded by the oracle: the agent stops when the checks pass.
Target duration: 35–45 minutes.
/goal is an Antigravity 2.0 command. Download and install the app from antigravity.google/download, open it, and sign in through the onboarding flow with your Google Account (or your organization's account).
Confirm the one local prerequisite — Node runs the closed-loop oracle (the agent runs it too, during the loop):
node --version # Node.js 20+
The kit lives in workspace/. Pull down just that folder with a sparse checkout, then open it in the Antigravity 2.0 app (Open Folder → select the workspace folder):
git clone --no-checkout --depth 1 https://github.com/evanca/gde-sprint-26-loop-public.git
cd gde-sprint-26-loop-public
git sparse-checkout init --cone
git sparse-checkout set workspace
git checkout
cd workspace
The storefront is a skeleton and the oracle is red — that is the starting point the agent will close:
node --test # FAIL — the shop helpers in js/shop.js are stubs
node verify.mjs # FAIL — index.html is missing #grid, #filters, #cart-total
The contract lives entirely in code: tests/shop.test.js (the pure helpers in js/shop.js) and verify.mjs (page structure, accessibility, product data). There is no separate spec file — the tests are the spec, and the agent reads them.
Serve the skeleton and look at it — the header renders, but there is no grid, no filter, and no cart, because the helpers are unimplemented:
python3 -m http.server 8000 # open http://localhost:8000/ , then stop it
Nothing here is built yet. In the next step you hand the whole job to one /goal.
In the Antigravity 2.0 agent chat, type /goal and give it the objective in one sentence — the goal is in the prompt, and the agent reads the tests for the exact contract:
Build and verify a polished, static storefront for the Lumière boutique from data/products.json — a product grid, a category filter, and a running cart subtotal, accessible and fully static (HTML/CSS/JS only; no backend, network, or build step). Implement js/shop.js and js/app.js and complete index.html. The goal is complete only when both `node --test` and `node verify.mjs` pass — read tests/shop.test.js and verify.mjs for the exact contract, and don't weaken them.

/goal runs the entire loop from that one prompt. First it writes an Implementation Plan — and, unlike the default mode, it approves its own plan and keeps going instead of pausing for you:

Then it works the loop on its own — act → verify → repair — editing js/shop.js, js/app.js, and index.html, running the tests, and fixing what fails (here, cleaning up a duplicate import) until the oracle is green:

When the checks pass, the loop finishes on its own. Antigravity produces a Walkthrough artifact by default — a human-readable summary of what was built and how it was verified. You do not ask for it, and it is not a workspace file; it is the run's native record:

Serve the folder and you have a working storefront — a product grid, a category filter, and a live cart subtotal, all built from one goal:

The oracle is the same whether a human or the agent built the page — that is the point of a closed loop. Run it yourself:
node --test # shop helpers: price, categories, filter, subtotal, summary
node verify.mjs # structure, accessibility, product data

To watch the loop again, restore the skeleton (re-checkout workspace/) and re-run the /goal command; the agent should converge to a green oracle once more.
You ran a single high-level goal to completion with a self-correcting agent loop: from one /goal prompt the agent planned, approved its own plan, acted, verified against an objective oracle, repaired what failed, and finished with a Walkthrough — all with no step-by-step prompting.
You learned:
/goal runs the full agent loop without asking for intermediate input, and self-approves its plan.node --test + node verify.mjs) makes "done" concrete and stops the loop.Portability: the pattern is goal + verifiable oracle + autonomous loop. The same /goal works in the Antigravity 2.0 app and the Antigravity CLI (agy); only the surface changes. Give any capable agent one objective and an oracle it can check, and the loop self-corrects until the oracle is green.