Claude Code · L2 · 1
Claude Code · ISTO.

Lesson 2 · Plan, build, check

Before we start

Last week we said: "plan and build on shared data". Today we do it.

01Lesson 1: files. The chat forgets, the files don't. CLAUDE.md is what Claude reads first, with your definitions in it.
02Today: from a question to a tool. Connect to the shared database, plan a restock planner, build it in phases, check one number. Feeding the database from Sage and Shopify comes in lesson 3.
03You follow along. Everyone builds the same planner, step by step with us. Before lesson 3 you take the same steps on your own project, from your PLAN.md.
The pre-work, together

Your plan with Grill Me: how did it go?

  • Your project in one line: what are you building, and for whom?
  • One question Grill Me asked that you hadn't thought about.
  • Where it got stuck: Plan Mode, saving PLAN.md, the skeleton, the Supabase account.

Today: the method on a shared example. Before lesson 3: your own PLAN.md.

Get the practice project

Download it into your projects folder.

Your turn · 4 min
  • Click the link below. Your browser downloads brand-brain-demo.zip. No GitHub account needed.
  • Unzip it. Mac: double-click the file. Windows: right-click → Extract All… → Extract. You get a folder called brand-brain-demo.
  • Move that folder into your projects folder.
  • Open your workspace (claude.code-workspace on your Desktop): brand-brain-demo appears inside projects in the Explorer.

https://github.com/Adapt-to-AI-B2B/practice-este-brain/releases/latest/download/brand-brain-demo.zip

Este is a fictional clothing brand. Every number in it is invented, so you can't break anything real.

Why a separate database

Why not ask Sage and Shopify directly?

ASK THEM DIRECTLY ClaudeSagestoresShopifyweb shop Sage + Shopify? 1thousands of requests 2
ASK A COPY SagestoresShopifyweb shop The copyboth together Claude 12
1They're busy. One question from Claude can become thousands of requests.
2Each knows half. Units sold needs Sage and Shopify together.

Direct connections are fine for one-system actions. Questions across systems need the copy.

The database

Where the copy lives.

Supabase · recommendedA Postgres database, the standard type most tools and developers already know. Works with tools you already use, such as Power BI. Roles for who can read or change what, and it can move to any Postgres host.
Airtable · alternativeFriendlier to look at, but row limits per base (50,000 on the Team plan) and the data lives in Airtable's format.

Loading the data once is the hard part.

Connect to the shared database

Connect Claude to the shared database.

Your turn · 8 min
  1. Accept the Supabase invitation in your email, if you haven't. Open supabase.com signed in with that same email: you see the project este-shared.
  2. In a Claude Code session, send the prompt below. If Claude asks to open the docs page or to run a command, allow it. It answers that the server was added.
  3. Open a new session (connectors load when a session starts). Type /mcp → supabase → Authenticate. In the browser choose the organization you were invited to and click Authorize Claude.
  4. Ask Claude: "In the Supabase project este-shared, list the tables in schema este."

Install the Supabase MCP server for all my projects (user scope), not just this folder. Docs: https://supabase.com/docs/guides/ai-tools/mcp

This connector can change data, not only read it. Today we only ask questions.

Ask the practice data

Ask in plain words. Ask for the query.

How many Men's T-shirts in Medium / Green does Lisboa Chiado have in stock today? Show me the query you used.

Asking for the query shows where the number came from.

What's in the practice data

Este's practice data: one year of an invented clothing brand.

Products29 styles in 335 sizes and colours: tops, bottoms, shoes, accessories. Cost and prices in euros, dollars and pounds.
Store sales6 stores in Lisbon, Porto, Madrid and London. Every sale from October 2025 to September 2026.
Online ordersOrders from 6 countries over the same year, and the returns.
StockWhat each store and the 2 warehouses hold, and what the online shop shows.
Buying20 suppliers and their lead times, purchase orders (some still open), and the production plan for the next two seasons.
Your turn · 5 minAsk whatever you'd want to know if this were your company: a product, a store, a month, a supplier. Then: "Show me the query you used."

Every number is invented, so ask freely. It's yours to keep: try more questions after class.

Where the tool lives

A sister project: the tool sits next to the data, not inside it.

Lesson 1: a folder inside a project
este-handbook/
├── CLAUDE.md
└── docs/meetings/
    └── CLAUDE.md  its own rules

Meeting notes are part of the handbook. Their folder adds its own rules, and the handbook's CLAUDE.md still applies.

Today: two projects side by side
projects/
├── brand-brain-demo/  the data
│   └── CLAUDE.md  tables and definitions
└── restock-planner/  the tool
    └── CLAUDE.md  "use brand-brain-demo's definitions"

The planner is a separate tool. Its CLAUDE.md points to the data project, so it uses the same definitions.

  • Inside when it's part of the same project: notes, documents, a folder with its own rules.
  • Next to it when it's a tool of its own: you can share it, change it or delete it without touching the data. In lesson 3 the planner gets its own place on GitHub; a tool inside the data project would drag the data along.
Asking or building

Asking is one message. Building starts with a plan.

AskA question, or one small change. Just ask."How many Men's T-shirts did we sell in September?"
Build: the build loop · "Build a restock planner page."
1 · PlanPlan Mode. Claude proposes, you correct.
2 · PhasesSmall pieces, one at a time.
3 · SketchText sketch, then a mockup.
4 · BuildClaude builds the phase.
5 · CheckYou check it, then the next phase.
Plan the restock planner

Ask for the plan. Change nothing yet.

Your turn · 7 min
  1. In VS Code's Explorer, right-click your projects folder → New Folder → restock-planner.
  2. Open a new Claude Code session and switch to Plan Mode: Shift+Tab, or the mode button at the bottom right of the message box, until it says Plan. Send the prompt below.
  3. Grill Me asks you questions, one at a time. We answer them together.
  4. Don't approve the plan yet: we review it together next.

We are working on projects/restock-planner, a new tool. The data is in projects/brand-brain-demo. I want a page to try out production quantities: I pick a product, change how many we plan to produce this autumn-winter, for example 8,000 Men's T-shirts instead of 7,000, and see how many weeks of stock that gives us, how much more money it ties up, and when an order placed today would arrive. Don't build anything yet. /grill-me, but ask me 5 questions at most.

Habit 1

Review the plan before you approve it.

Together · 4 min
  1. Read the whole plan, asking:
    • Will it look the way I imagine?
    • Can I follow it? If a part isn't clear, ask Claude to write it more simply.
    • Does it use the data the way I would?
    • Are its assumptions right? What did it decide on its own?
    • Does it change anything I didn't ask for?
  2. Something you'd change? Add a comment to the plan.
  3. Claude updates the plan. Read it again.
  4. Don't approve it yet: next we split it into phases.
THE PLAN
Your comment
Habit 2

Break it into phases: small pieces you can check.

The whole project One big build: a mistake shows up only at the end.
→
Phase 1The smallest piece that works on its own.Check ✓
Phase 2The next piece, built on something solid.Check ✓
Phase …As many as the plan needs.Check ✓

Claude proposes the phases. You check that the first one is small.

Your turn · 2 min · still in Plan Mode

Split the plan into a few phases, smallest useful piece first. No more questions: list the phases and wait for me.

Habit 3

Sketch the shape before the code.

First a text sketch: it costs seconds and you fix it in seconds. Then an HTML mockup you can open and look at. Only after you've reviewed it does Claude build.

1 · Text sketch: seconds
+--------------------------------------+
| RESTOCK PLANNER · data as of [date]  |
| Style: [ Men's T-shirt (MTS)    v ]  |
| Planned units: [===o------] [ 7000 ] |
+---------+---------+---------+--------+
| COVER   | EXTRA   | EXTRA   | ARRIVES|
| TODAY   | WEEKS   | CASH    |        |
| x.x wk  | +x.x wk | EUR xx  | [date] |
+---------+---------+---------+--------+
2 · HTML mockup: you can see itThe same page in the browser, with made-up numbers: the style picker, the planned units, four boxes. You check the layout and the words before any real number goes in.

The sketch forces the decisions nobody has made yet into view, while changing them still costs nothing.

The build loop

Inside every phase, the same loop.

↓
Habit 4 · Compound Save what the build taught: a rule or a definition in CLAUDE.md, a note for next time.

↻ Ask for changes until you're happy, then the next step. Same loop in every phase.

Phase 1 · the page

Phase 1: a sketch, then a page with made-up numbers.

Your turn · 12 min
  1. Switch Plan Mode off (mode button → Auto, or Shift+Tab until it says Auto). Read phase 1 aloud.
  2. Send prompt 1. Read the sketch. Ask for one change, in your own words.
  3. Send prompt 2. Claude asks to create planner.html: allow. Open it: double-click it in Finder or File Explorer, or right-click it in VS Code → Reveal in Finder / Reveal in File Explorer.
  4. Does it look the way you imagined?

1 · Let's start phase 1. Before any code, show me a text sketch of the page. Then wait.

2 · Turn the sketch into a page I can open in the browser, with made-up numbers for now. Save it as planner.html. Then stop.

Phase 1 · the real numbers

Phase 1, with the real numbers.

1 · Claude readsThe numbers come from the data project, with its definitions.
2 · Claude builds them inInto the page, with the date of the data.
3 · The page stays simpleIt opens with a double-click: no key, no connection.
Your turn · 5 min

Now build phase 1, applying the real numbers.

Habit 4

Save what the session taught: the next one starts further ahead.

01
"What here will happen again? What should I write down for Claude?"
02
"Is there a task I'm still doing by hand that Claude could do?"
Your turn · 3 min

"Before we stop: what did this session teach that's worth saving? Suggest specific updates to CLAUDE.md or the docs, so the next session goes better, and name one task I did by hand today that you could do. Tell me what you suggest before you change anything."

Without this, Claude starts from zero every session. With it, every session builds on the one before.

To keep

Four habits from today.

  • 1 · Review the plan before Claude builds.
  • 2 · Break it into phases: small pieces you can check.
  • 3 · Sketch before the code, and ask for changes until you're happy.
  • 4 · Compound: save what each session taught.

Before lesson 3: git, a GitHub account, and one phase of your own project.

Your turn to ask

Questions?