← All exercises
Exercise 04 / 10

Pair Programming with an Agent

You describe. The agent builds. You review every change.

Duration60–90 minutes
DifficultyIntermediate
PrerequisitesExercises 01–03 — a working development environment and an AI coding agent.
Pair Programming with an Agent
Fig. 04Hands-On Guide
Introduction

Overview

Now you're going to build something from scratch — a complete web application — by describing what you want to an AI coding agent. You won't write the code yourself. You'll write the house rules, agree a plan, review what the agent builds, and iterate until it's right.

This is pair programming with an AI: you bring the vision, the agent brings the implementation. You'll build a Travel Bucket List web app with full CRUD and localStorage, reviewing every change as a git diff and committing step by step — then push it to a new GitHub repository.

Go off-script. These prompts are suggestions, not assignments. If you want a dark mode toggle, a map view, or a 'random destination' button — ask for it. The agent will figure out how to build it. The point is to practise the back-and-forth: describe, review, refine.

— from the exercise
What you'll build

By the end of this exercise.

  • An AGENTS.md with your project's house rules, read by the agent at the start of every session
  • A plan you approved before the agent wrote any code
  • A Travel Bucket List web app in a single index.html — add, view, edit, mark as visited, and delete
  • Data persistence across page refreshes via localStorage
  • A Git history of small, reviewed steps — every change read as a diff, then kept or thrown away
  • The app pushed to a new repository on GitHub
Key concepts

Terms you'll learn.

AGENTS.md
The cross-tool instruction file: house rules the agent reads at the start of each session
Plan mode
The agent investigates and proposes a plan, but changes nothing until you approve
git diff
Shows exactly what changed since your last commit — review it before you keep a change
CRUD
Create, Read, Update, Delete — the four basic data operations
localStorage
Browser storage that persists between visits — no server needed
DOM
The live representation of the page that JavaScript can change
Event listener
Code that runs when something happens (click, submit, keypress)
What's covered

Sections in this exercise.

  1. 01What You'll Build
  2. 02What You'll Need
  3. 03Create the Project
  4. 04Write the House Rules
  5. 05Describe the App
  6. 06Review What the Agent Built
  7. 07Open It in Your Browser
  8. 08Save a Checkpoint
  9. 09The CRUD Cycle
  10. 10Iterate and Improve
  11. 11When Something Goes Wrong
  12. 12Understand What Was Built
  13. 13Commit and Push
What just happened

You built a complete web application without writing a single line of code yourself. You wrote down the house rules, agreed a plan, reviewed every change as a diff, and committed one small step at a time. This is the core loop: describe, review, iterate, understand.