No. 124·noun·also called AGENTS.md, CLAUDE.md, Cursor rules

Rules file

A plain text file in your project that gives the coding agent standing instructions it reads at the start of every session.

SPECIMEN · DIAGRAM · LAYERS
Tool's built-in instructionsSet by the agent maker
Rules fileYour standing project instructions, loaded every session
Your requestWhat you ask for right now
Your project filesThe code the agent reads and edits
Definition

What it is

A rules file is a short text file, usually named AGENTS.md or CLAUDE.md, that lives in your project. The agent loads it at the start of every conversation, before it reads your request. Think of it as the onboarding note you would give a new contractor on day one.

Put in the things you would otherwise repeat: what the app does, which package manager to use, how to start it locally, what to never touch, how you like things named. Keep it short. A long file crowds out the actual task and the agent starts ignoring parts of it.

Different tools look for different filenames, and the format is plain Markdown, so you can read and edit it yourself. Many agents can also write a first draft for you.

A rules file is not a prompt (which is what you ask for right now) and not a spec (which describes a feature). It describes how to work in this project, every time.

Say it like a builder

How to ask for it

Vague

“Every time I start a new chat I have to remind it to use our brand colors and not install random packages. Can you make it remember?”

Precise

“Create a rules file (AGENTS.md) at the project root. Include: use pnpm, not npm; our brand colors are in the design tokens file; ask before adding any new dependency; run the tests before saying a task is done. Keep it under 30 lines.”

Why it works

'Make it remember' could mean memory features, a longer prompt or a database, while 'rules file' names the one file the agent reliably reads each session and the prompt sets its contents and size.

In the wild

You've seen this in

  • GAn AGENTS.md file at the top of an open-source repository on GitHub
  • CA CLAUDE.md file in a Claude Code project
  • CThe Rules section in Cursor's project settings
Usage note

Often confused with