Building Apps with AILesson 8 of 87

Module 1 · The machine, and what the model can see of it

The rules file, and what belongs in it

In this lesson

  • 8 min read
  • 6 reading sections
  • Knowledge check
  • Lesson 8 of 9 in this chapter

This chapter’s goalChoose between an inline completion tool, an editor agent and a prompt-to-app platform for a given job, name the four parts of a running web app and which of them the model can observe, and get a project running on your own machine or a free hosted one without asking anybody for help.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmNot availableNot available
Full audiobookNot availableNot available

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 7Free · no account needed
Lesson steps

One file, read every turn

Every serious tool now looks for a plain text file of project instructions and puts it into the context automatically: CLAUDE.md, .cursorrules, AGENTS.md, .github/copilot-instructions.md. Same idea, different filenames, and several tools read more than one.

This is the highest-leverage thing you can write. It is the only text that is present in every single request without you doing anything.

What belongs in it

Six categories, and nothing else.

The stack, stated flatly. “Next.js app router, TypeScript, Postgres via Drizzle, Tailwind.” Without this the model infers from whatever file it happened to read.

Where things live. “All database queries in lib/queries.ts. Route handlers in app/api/. Shared types in types/.” This is what keeps a project navigable after two hundred generated files.

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Every lesson here is open. Your progress is recorded once you pass the Building with AI exam.

Stuck on something?Ask Beatriz, your AI tutor

How to cite: Addaly (2026) ‘The rules file, and what belongs in it’, in Building Apps with AI. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/building-apps-with-ai/the-rules-file-your-tool-reads (Accessed: 29 November 2026).