Learn by Directing AI
Unit 1

The System

Step 1: Set up the project

Open a terminal and navigate to your development directory:

cd ~/dev

Start Claude Code:

claude

Paste the setup prompt:

Create the folder ~/dev/web-dev/p8. Download the project materials from https://learnbydirectingai.dev/materials/webdev/p8/materials.zip and extract them into that folder. Read CLAUDE.md -- it's the project governance file. Open VS Code in the project directory. Install the Claude Code extension and the Live Server extension if they aren't already installed.

Once Claude finishes, your workspace has the entire production tracking system for Sahel Noix. The CLAUDE.md file is already written -- it gives Claude context about the codebase, the tech stack, and the constraints. You didn't write it this time. Notice how that changes the conversation from the first prompt.

Step 2: Read the Slack message

Open materials/first-contact.md.

Aminata Kone is the Operations Director at Sahel Noix, a cashew processing company in Korhogo, Cote d'Ivoire. Forty-five people work there. The processing floor runs from 6AM to 7PM.

Two production outages this season. Both caused by developers pushing code directly to production. She wants two things: a CI/CD pipeline so changes are tested before they go live, and a way to connect the developers' AI tools to the database so they stop asking her what the tables look like.

She's direct. Short messages, numbered lists, no small talk. She's under real pressure -- the company is scaling from 500 to 800 tonnes next season and the tracking system cannot go down during processing.

Step 3: Talk to Aminata

Open the chat with Aminata. The Slack message tells you the broad problem, but not enough to plan the work.

You need to understand:

  • When does downtime hurt? She mentioned outages but didn't say when they're worst. Ask about the processing schedule and when the system absolutely cannot be down.
  • What depends on the system? She mentioned tracking production. What else runs through this system? Reporting? Compliance? Exports?
  • What's the database like? She said the developers keep asking about the tables. Why? Is the schema documented? How has it evolved?

Aminata answers precisely when you ask the right questions. She won't volunteer information you didn't ask for. The hidden constraints are yours to discover.

Step 4: Explore the codebase

The production tracking system is a Next.js frontend with an Express backend and a PostgreSQL database. Open the key files:

Look at the Express API routes in src/server/. There are five route files -- batches, cooperatives, quality checks, shipments, and export certificates. Each handles CRUD operations for a different part of the cashew processing workflow.

Look at the Prisma schema in prisma/schema.prisma. Six tables. Notice the column naming: some columns use French (date_reception, poids_brut, grade_qualite, type_certificat, numero, date_emission), others use English (created_at, net_weight, batch_id). No documentation comments. This is what Aminata meant when her developers keep asking what the tables look like.

Look at the test files in tests/. Twelve unit tests, three integration tests. They all pass locally. But there's no way to run them automatically before deployment.

Step 5: See what the project memory does

Ask Claude to list the Express API routes and describe what each one does. Compare the answer to what you see in src/server/.

Claude should get this right -- the CLAUDE.md file gives it the context to understand the codebase without you describing it. This is what infrastructure does: it makes the first prompt in every session better.

Now imagine starting this conversation without the CLAUDE.md file. Claude would need you to explain the project, the stack, the file structure, and the constraints before it could help with anything. The project memory file eliminates that overhead.

Step 6: Map the system

Before you build anything, understand what you're protecting.

The tracking system handles: batch reception from farming cooperatives, processing stage tracking (shelling, grading, roasting, packaging), quality control inspections, shipment management, and export certificate generation.

If this system goes down during processing hours, batches go untracked. If it goes down during a shipment window, export certificates can't be generated, containers miss their vessels, and the company pays storage fees.

The stakes are real. The pipeline you build in the next unit needs to protect all of this.

✓ Check

Check: Ask Claude to list the Express API routes and their purposes. Compare against the actual routes in the codebase. If they match, the CLAUDE.md context is helping. If they don't, the CLAUDE.md context isn't loaded or is incomplete.