Deep dive: AI

How to work with an agent, and what it costs: the AI half of the talk at the start of the workshop, slide by slide. The parts every agent tool is built from have a page of their own, Deep dive: building blocks; the web half is on Deep dive: web development.

On this page

Vibe coding or agentic coding

"Vibe coding" is a name Andrej Karpathy gave in February 2025 to a way of working: you describe what you want, accept what comes back and do not read the code. That is fine for a throwaway idea. It is not how you build something with your name on it, because nobody knows what is in it.

Agentic coding uses the same agent and the same model. The difference is that you lead, in a loop of your own: plan, let the agent do one small step, read what it did, accept, check. Today every Role was one turn of that loop.

Leading starts with the prompt. A prompt you can check has five parts:

Vague

"Make my site better." The agent has to guess what better means, where to change it, and when it is done.

Shaped

"Read design/brief.md. Make the project cards easier to see, with the surface colour from the brief. Change only site/assets/styles.css. Run node tools/check.mjs and show me the result."

Speaking is faster than typing, and you give more detail: every system has dictation built in. On a Mac press Fn twice, on Windows Win+H. And the first prompt is a draft: send a good-enough one, read what comes back, and improve it.

How professionals build a website

The slide showed eight steps, from the spec to publishing. Every step used to be a job for a person; today an agent does the work of each one, and you lead. You took five of the steps in the workshop. The others, and what changes on a real project, are on their own page: Do it professionally.

Building blocks of agentic work

Model, agent, tools, MCP, rules, memory, skills, hooks and subagents: every agent tool has these parts, and plugins package them. The slide showed six; memory, hooks and subagents, the three for later, are on that page too. Each one, and how to write your own skill, is on its own page: Deep dive: building blocks.

The agent acts on your laptop

An agent is not a chatbot. It writes files and runs commands on your laptop, with your rights: whatever you may delete, it may delete. Three rules keep that safe, today and at home.

The Install script in Setup was exactly this: code from the internet, run on your laptop. You could do it because the script is public in the Template repo and does three things you can read: install Git and Node, copy your repo, open it. At home, the rule stays: read before you pipe a script into your shell.

Try it: in a fresh chat, ask What do the commands in .agents/mcp_config.json run on my laptop, and with which rights? The agent explains the MCP server your repo starts. Then open install.sh or install.ps1 in your repo and find the three things it does.

Tokens: input and output

A model reads and writes in tokens: pieces of words, about three quarters of a word each in English. There are two kinds:

An example: a chat that has grown to 50,000 tokens sends those 50,000 again with your next message, and with the one after. Twenty more short messages cost a million input tokens, although you typed only a few lines. Many tools reuse the unchanged start of a chat at a lower price, but a long chat still costs more on every turn, in time and in quota.

Three habits keep it cheap: start a fresh chat for each task, point to files instead of pasting them, and ask for short answers when a short answer will do.

Stay independent of any one model

Everything you used today was free: Antigravity, Stitch, GitHub Pages, and a weekly quota of Gemini Flash. Google paid for the tokens. On your own, today's prices are subsidised too: a plan of 200 US dollars a month buys tokens that would cost many times more at the pay-per-use rate, and nobody knows how long that lasts. Companies pay per token, and before long every team will need ways to use fewer. Few people plan for this yet; it is where things are going. Three habits keep you independent:

Context: enough, not everything

Everything the agent sees right now is its context. It has a limit, and it ends with the chat.

Answers get worse long before the context is full: the more a chat contains, the less sharply the model attends to any part of it. Some tools summarise old messages when the context runs full. That buys room, but a summary loses detail, often the rule you cared about.

Files are the memory

The agent forgets everything when a chat ends. Your repo does not. Three kinds of files carry knowledge from one chat to the next:

The pattern: think in the chat, write the result into a file, start the next chat from the file.

When a chat goes wrong

Signs: the agent forgets a rule you gave it ten minutes ago, says "let me try a different approach" again and again, or you correct the same mistake twice. Then follow the two-turn rule: if two attempts did not fix it, a third will not either. Start a fresh chat and say the task in one sentence, plus what you learned. Point to files instead of pasting them:

Agent chat

Read docs/spec.md and site/content.json.
Rewrite my bio so that it speaks to the visitors named in the spec.
Change only site/content.json, then read the change back to me.

Still stuck? Try a bigger model for that one task, or fix it yourself when that is quicker, and let the agent check your work.

Eight steps to a professional website

The last slide summed up the day. You took each step once today; on every project after it, take them again:

  1. Pick the right model. The smallest, fastest one that does the job answers quickly and leaves quota for the rest of the work.
  2. Plan first. Your content and a spec before any code give every later step the same goal.
  3. Design your own look. Your style, your colour and one detail of yours make a site people remember.
  4. One Role per chat. A fresh chat stays sharp, and your files carry the work.
  5. Build on today's web. Current knowledge, such as Modern Web Guidance, gives you less code and faster pages.
  6. Prove it works. The Check, screenshots and numbers show what is fixed.
  7. Read before you accept or allow. The agent drafts, and it asks before it runs a command; you decide what goes live and what runs.
  8. Publish through a pipeline. Read git status, then merge: live in a minute.

Check yourself

Seven questions on this page. Pick one answer each, then check them.

A Google search finds a skill that promises the perfect portfolio. Why not paste it into your repo as it is?
A chat has run for an hour, and the agent keeps forgetting a rule you gave it. What do you do?
Why does every message in a long chat cost more than the one before?
What carried your work from one Role's chat to the next?
Which prompt lets you check the result?
What makes coding agentic rather than vibe coding?
Your AI plan doubles in price next month. What keeps your project safe?