Build with Antigravity
This is the main event. You'll feed your spec from step 3 into Antigravity and watch a real career site come together. The work here is mostly steering, not typing.
1. Open your project
You'll start from an empty folder. The agent scaffolds the project — writes the HTML/CSS/JS in public/, a small server.js, a Dockerfile, runs npm install, and starts the dev server — as part of its first turn. No starter repo to clone.
Create the folder, initialize a git repo in it, and remember the path:
mkdir -p ~/projects/career-launchpad && cd ~/projects/career-launchpad && git init
Git is version control — it tracks every change to your code over time. git init turns this folder into a tracked project, so every save the agent makes shows up as a reviewable diff. You'll never lose work; you can always roll back to an earlier checkpoint.
Initializing git up front means the diff-tracking hook you'll add in section 3 has a repo to talk to from turn one. Then open the folder in your agentic editor:
- Open Antigravity.
- Use File → Open Folder and pick
~/projects/career-launchpad(the empty folder you just created). - The agent panel is on the right. From here on, everything happens inside the IDE.
From your terminal:
cd ~/projects/career-launchpad
gemini
(If you didn't install globally, use npx @google/gemini-cli instead.) The agent prompt opens right in your terminal — that's where you'll paste prompts and approve tool calls.
2. Bring in your Stitch design
When you finished your Stitch design in step 4, you noted the layout, palette, and components. Now hand that to the agent — there are two equally good ways, both copy-paste, no MCP setup needed.
In Stitch, click Copy HTML/CSS in the code panel (top-right of your selected screen). Paste it into a new file at ~/projects/career-launchpad/design-reference.html. The agent will read it directly when you point at it in the build prompt.
Take a screenshot of your Stitch design (Cmd+Shift+4 on macOS, Win+Shift+S on Windows). Save as ~/projects/career-launchpad/design-reference.png. Both Antigravity and Gemini CLI are vision-capable — the agent can read the image directly.
Either approach works for both Antigravity and Gemini CLI. Pick whichever feels easier.
Stitch ships an MCP server that connects Antigravity directly to your live design. It's a slick demo and worth exploring after the workshop, but it adds an API-key step, an MCP install step, and a "verify the connection" step before you can ship a single line of code. For the 50-minute workshop window we're optimizing for "least likely to break." Copy-paste reads the same data the MCP would, just with three fewer setup steps.
Further reading: Stitch MCP setup docs.
3. Add a hook to keep things deterministic
Skills and MCP servers give the agent more to do. Hooks are the opposite — they constrain what happens around every tool call. Same agent, same prompt, same outcome — every run.
A hook is a shell command your agent runs automatically before or after a tool call (Bash, Edit, Write, etc.). Think git pre-commit hook, but for agents. Both Antigravity and Gemini CLI read hooks from .gemini/settings.json, so the same file works in either path. Three workshop-relevant uses:
- Observe. Log every file the agent touches, so you have a trail without scrolling the diff panel.
- Verify. Auto-format or lint after every
Edit/Write— output style stops drifting between iterations. - Constrain. Block destructive shell commands before they run (
rm -rf,curl | sh) — the same hygiene the security slide called out.
Create .gemini/settings.json at the project root with this minimal hook:
{
"hooks": {
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{ "type": "command", "command": "git diff --stat HEAD" }
]
}
]
}
}
From now on, every time the agent edits a file you'll see a one-line summary of what changed in the project. No more "wait, did it really only touch the file I asked for?" — the hook tells you, on every turn, automatically.
The agent is non-deterministic by design. Hooks aren't. Anything you put in a hook runs every time, in the same order, with the same effect. That's how you turn an unpredictable assistant into a system you can ship — by moving the parts that need to be reliable out of the prompt and into the harness.
4. Give the agent a memory
Hooks make every turn deterministic. Memory makes every session deterministic. The agent has no recall between runs and a finite context window within them — so the facts you want it to keep have to live somewhere it will reliably look.
Three layers, in order of how often you'll touch them:
- Project memory ·
GEMINI.md. A small markdown file at the project root. Antigravity loads it at the start of every session — facts the agent should never have to re-derive (project structure, dev commands, the shape ofpersona.json, what not to touch). - Spec artifacts ·
persona.json+ the Antigravity prompt from step 3. Long-form truth that lives in files. When the agent contradicts a constraint, paste the relevant paragraph from the prompt back into the chat — re-grounding takes ten seconds and saves twenty minutes of correction. - Session memory · the current chat. The most volatile layer. Long sessions accumulate dead-end paths, abandoned ideas, and contradicted decisions. When the agent starts feeling "off," it usually means session memory is poisoned — start fresh with
/clearand reload from layers 1 and 2.
Drop a starter GEMINI.md at the project root:
# Career Launchpad — agent notes
## Project shape
- Plain HTML/CSS site, no framework, no build step.
- `public/` holds `index.html`, `styles.css`, optional `app.js`.
- `server.js` at the root serves `public/` and reads `process.env.PORT` (default 8080).
- Dev: `node server.js` (or `npm run dev` if the package script exists). Refresh the browser to see edits.
## Source of truth
- `persona.json` — name, tagline, projects, skills, contact, faq.
Edits to content go here, not in HTML.
- `docs/antigravity-prompt.md` — the original prompt from step 3 with
Market Profile, sections, and constraints. When in doubt, re-read it.
## Don't touch
- `package.json`, `package-lock.json` — leave dependencies alone unless asked.
- `node_modules/` — never edit.
## Conventions
- Plain HTML, CSS, vanilla JS. No framework, no transpiler. Keep it that way.
- One commit per accepted change. Short imperative messages.
Edit it as the project grows — but keep it tight. Every line in GEMINI.md is paid for in context tokens on every turn.
GEMINI.md is not a notebook. If it grows past one screen, it stops being useful — the agent skims, the model's attention budget gets diluted, and the truly important lines get drowned out. Rule of thumb: if a fact is going to change next week, it doesn't belong in GEMINI.md; it belongs in a spec file the agent reads on demand.
The patterns we're using today — GEMINI.md for project memory, small reversible steps, spec-first prompting — work for a personal site. For larger projects you'll want a more structured workflow that codifies brainstorm → spec → plan → execute → review → finish as named stages with templates and review gates. The "Spec-driven workflow" deep-dive walks through one — useful for week-long features once a single prompt isn't enough.
5. Pull in your prompt from step 3
From step 3 you have two prompts — one for Stitch (used in step 4) and one for Antigravity. The Antigravity prompt is the second of the two fenced code blocks NotebookLM generated. It already includes everything Antigravity needs: the plain-HTML/CSS stack, the section list, basic SEO, and an instruction to write a persona.json at the project root. You don't need to construct anything else.
The persona.json Antigravity will write looks roughly like this — useful to know the shape because the bonus tracks (steps 8 and 9) read from it:
{
"name": "Alex Schmidt",
"tagline": "IT student turning ideas into shipping software.",
"bio": "Third-year IT student in Munich focused on web platforms and applied AI. I like small teams, sharp problems, and building things that ship.",
"skills": ["TypeScript", "Node.js", "Python", "Google Cloud", "Postgres"],
"projects": [
{
"name": "Campus Map",
"description": "An indoor wayfinding app for the university — 800+ active users in the first semester.",
"tech": ["React", "Mapbox", "Cloud Run"],
"link": "https://github.com/alex/campus-map"
}
],
"experience": ["Working student at a fintech, 12 months"],
"interests": ["Climbing", "Live music", "Open source"],
"contact": {
"email": "alex@example.com",
"linkedin": "https://linkedin.com/in/alex",
"github": "https://github.com/alex"
},
"faq": [
{
"q": "What kind of role are you looking for next?",
"a": "A working student or junior backend role on a small product team."
}
]
}
6. Have the agent build the site
Paste the Antigravity prompt from step 3 as your first agent message. Append a single line at the bottom telling it where the design reference lives — the file you saved in section 2.
<paste the Antigravity prompt from step 3 here — the second
fenced code block NotebookLM generated>
Match the visual reference at ./design-reference.html — implement the same
layout, color palette, typography, and component styling in plain HTML/CSS.
If you used a screenshot instead of the HTML/CSS export, change the path to ./design-reference.png and the line becomes: "Match the visual reference at ./design-reference.png — implement the same layout, palette, typography, and component shapes in plain HTML/CSS."
Paste the prompt into the Antigravity agent panel. The agent plans, scaffolds the project from your empty folder, runs npm install, starts the dev server, and shows you a diff. Approve the changes and refresh the localhost URL it reports — typically http://localhost:8080. You should see your name, your projects, and your tagline rendered against the design from step 4.
Paste the prompt at the gemini> prompt. The agent will ask permission for each shell command (npm install, npm run dev, etc.) — approve each as it asks. Watch the dev-server log; when it says "ready on port 8080" (or similar), open http://localhost:8080 in your browser.
Re-read the prompt you just pasted. Five things make it useful — drop any one and quality drops with it.
- Named inputs. The prompt names exactly what data goes where (
persona.json,AI-USAGE.md,./design-reference.html). The agent doesn't have to guess. - Named outputs. Specific file targets and a launch checklist bound the blast radius. The diff stays small enough to actually review.
- Explicit scope. Sections are listed: Hero, About, Tech Stack, Projects, Experience, Contact. Not "make a portfolio."
- Reference for taste. Pointing the agent at
./design-reference.html(the file you saved from Stitch in section 2) lets it match palette, typography, and component shapes. Without it, the agent invents visual direction. - Profile-specific intent. The prompt's Market Profile comment line (e.g.
# Market profile: B — EU remote from outside EU) tells the agent which time-zone badges, employer references, and credential signals to surface.
Compare with a typical bad prompt: "Build me a nice career site from my data." Same intent, but the agent has to guess the inputs, outputs, scope, design, and trade-offs. It will guess — and you'll spend the next twenty minutes correcting the guesses one at a time.
The shape: Inputs · Outputs · Scope · Constraints · Verification. Say all five; almost every agentic prompt fits this skeleton. (Deep dive: prompting in practice.)
Imagine you want to add a writing/blog section to your site, fed from a new posts.json file you'll create. Write the prompt yourself, using the same shape as the prompt you pasted in section 6. Fill the blanks:
Read ____________ and create ____________________
to render a list of posts with title, date, excerpt, and a link to the
full post. Match the existing site's design tokens.
Build brief:
______________________________________________________________
The point isn't the right answer — it's that the shape of the prompt now lives in your head, not in this guide. Worked-example research (Kalyuga 2007, d ≈ 0.5–1.0 for novices) shows the largest learning gain comes from studying a full example, then attempting a similar problem with the scaffold partially removed.
Show one possible answer
Read posts.json and create public/blog/index.html and a small
public/blog/post.html template
to render a list of posts with title, date, excerpt, and a link to the
full post. Match the existing site's design tokens.
Build brief:
A simple chronological blog index. No comments, no auth. Each post is
markdown rendered to HTML at build time. Stitch reference at
<paste-your-stitch-url>.
Before you click Approve on the first big diff, type a one-sentence summary in the chat: which files changed, what new behaviour appeared, what was deleted. Don't scroll back through the diff to do it.
This feels slow. It is the move that separates using the agent from learning the agent. Bastani et al. (PNAS 2025, Without Guardrails) found students using unguarded AI scored 17pp lower on later concept tests; the parallel arm where students had to articulate before accepting matched controls. Same tool, different scaffolding.
7. Iterate
The first build will be 80% of the way there. Send small, focused follow-ups instead of one giant rewrite request:
- "Add a subtle hover effect to the project cards — slight lift, soft shadow."
- "Change the hero to a diagonal gradient using the accent color."
- "Make the layout work on a 375px-wide phone — single column, no horizontal scroll."
- "Replace the skill progress bars with rounded pill tags."
- "Add a footer with my contact links from persona.json."
Pick one line from the change Antigravity just made — a new CSS rule, a new attribute, a single function call. Predict out loud: what would happen if you deleted that line? Then delete it, save, watch localhost.
The point isn't the deletion — it's the prediction. Worked-example research (Kalyuga 2007, d ≈ 0.5–1.0 for novices) says the act of generating a hypothesis is what builds the mental model. Reading a diff doesn't. Predicting and being wrong does.
8. Optional: pre-rendered FAQ
The persona.json Antigravity wrote includes a faq array (or you can add one yourself with two or three Q/A pairs). Tell Antigravity to render it as a static "Ask me about..." section near the bottom of the page.
Render the faq array from persona.json as a section titled
"Ask me about..." with each question as a heading and the answer
underneath. No collapsing — make all answers visible.
This gives the page an "AI-aware" feel without any runtime risk: no API calls, no rate limits, no tokens to manage. It also makes the page actually useful to a recruiter scanning quickly. The real, live chatbot is covered in the bonus track — this is the lightweight version.
Work in short cycles: ask for one change, eyeball the result, and run git commit when something looks good. Small reversible steps beat a monolithic prompt every time.
git add and git commit do
git add . stages the files you want to save (the . means "everything in this folder"). git commit -m 'message' creates a labeled checkpoint with a short note attached. Think of it as save with a sticky note — every commit is a point you can return to later.
Close the chat panel. Without scrolling, paraphrase the prompt you pasted in section 6: what does it ask Antigravity to read (or be aware of), what does it ask Antigravity to produce, and what's a constraint it imposes?
If you can't reproduce the shape from memory, the next time you reach for this pattern you'll re-prompt your way to it. If you can, it's yours. The point of this workshop is not that Antigravity built your site — it's that you can do it again on Monday without the slides.
Troubleshooting
Antigravity / Node
npm install hangs
Cause. Conference Wi-Fi is rate-limiting or blocking the npm registry, or the cache is corrupted.
Fix. Switch to a hotspot, then clear the cache and retry:
npm cache clean --force
rm -rf node_modules package-lock.json
npm install
"Port 8080 already in use" / EADDRINUSE
Cause. An earlier dev server is still running.
Fix. Kill it or use a different port.
# find and kill it (macOS / Linux)
lsof -ti:8080 | xargs kill -9
# or run on a different port
PORT=8081 npm run dev
The agent doesn't see my project
Cause. You opened a parent folder, or the agent was launched in the wrong directory.
Fix (Antigravity). Close the folder and re-open it from the project root (the empty folder you created in section 1, or once scaffolded, the directory with package.json).
Fix (Gemini CLI). Quit with Ctrl+C, cd into the right folder, and run gemini again.
Stitch handoff
Agent says it can't find design-reference.html (or .png)
Cause. The file isn't in the project root, or the agent is looking in a subfolder it scaffolded (e.g. src/).
Fix. Move (or copy) the file to the project root next to package.json. Then in the agent chat: "The visual reference is at ./design-reference.html — re-read it from the project root."
The site doesn't look like the Stitch design
Cause. The agent treated the reference as inspiration, not a target.
Fix. Be explicit: "Open ./design-reference.html. Match its color palette (extract the exact hex codes from its CSS), typography stack, spacing scale, and component shapes (button corner radius, card padding, hero proportions). Don't invent new visual choices." Then point at one specific component you want fixed first.
- The Antigravity prompt from step 3 is the single source of truth — content, design intent, and constraints all live in one prompt.
persona.json, written by Antigravity at build time, holds your structured data. Edit it later and run another prompt to push the change through.- Antigravity does the typing; you steer with short, specific prompts.
- The pre-rendered FAQ gives an AI-feel without operational cost — the runtime chatbot lives in the bonus track.
- Small commits make iteration safe.
Two Google codelabs map closely to what you just did:
- Getting Started with Google Antigravity — the canonical first codelab.
- Build and Deploy to Google Cloud with Antigravity — the formal version of this workshop's path.
More on the resources page.