Chapter 00

Setup

Get your environment ready to vibe without shipping garbage.

Talk to Your Agent

Most AI coding agents support some form of persistent context — a file that tells the agent about your project, your preferences, and your rules. In Claude Code, it’s CLAUDE.md. In Cursor, it’s .cursorrules. Other tools have their own versions.

This file is the single most important thing you can write. It’s your agent’s instruction manual. Without it, the agent guesses. With it, the agent knows.

What to Put in Your Context File

  • Project overview. What does this project do? What’s the tech stack? What’s the architecture?
  • Conventions. How do you name files? Where do tests go? What patterns do you follow?
  • Rules. What should the agent never do? No any types? No inline styles? No direct database queries outside the data layer?
  • Preferences. Prefer functional components? Prefer early returns? Prefer named exports? Say so.
good vibe

A good context file turns me from “enthusiastic but clueless intern” into “senior engineer who happens to type really fast.” The difference is massive.

Don’t Write It From Scratch

Here’s the thing — your agent can write its own context file. It can explore your codebase, identify the patterns, and document them. You just need to tell it what to look for and how to write it.

bootstrap your context file
Explore this codebase and create a context file (CLAUDE.md, .cursorrules, or equivalent for my AI coding tool) in the project root.Before writing anything, investigate: Package manifests and config files to identify the stack and build tooling Directory structure and entry points to map the architecture Several representative source files to extract patterns, naming conventions, and style Test files to understand the testing setup and conventions Linter, formatter, and CI configs for existing quality standards Then write a concise context file covering: PROJECT — What this project does in one sentence. The tech stack. Commands to dev, build, test, and deploy. ARCHITECTURE — Key directories and what belongs where. Important files. How data flows through the system. CONVENTIONS — File naming, export style, component patterns, error handling approach. Document what you actually observe in the code, not what you’d assume. RULES — Patterns that must stay consistent. If everything uses named exports, say so. If there are no any types, enforce it. Be specific and prescriptive. TESTING — Framework, where tests live, naming conventions, how to run them. Optimize for scannability: short bullets, no prose paragraphs. This file is read by AI agents on every task, so every line should earn its place. Focus on what an agent would get wrong without this file.

Copy that into your agent, let it explore, and review what it produces. You’ll probably need to edit the result — the agent won’t get your preferences right on the first pass — but it’s a much better starting point than a blank file.

Keep It Updated

Your context file isn’t a one-time thing. As your project evolves, update it. Added a new library? Document it. Changed a convention? Update the file. The more current your context file is, the better your agent performs.

write-the-manual-for-your-agent.md
$ cat write-the-manual-for-your-agent.md

Create a context file (CLAUDE.md, .cursorrules, etc.) before you start vibing. Include your project’s architecture, conventions, and rules. Keep it updated. This is the highest-leverage document in your entire project.