Skip to lesson
Exit
How Coding Agents Work (and Their Limits)1 / 2

1 min lesson

How rules and AGENTS.md shape the slice

Work through the cases in "How rules and AGENTS.md shape the slice", pairing each signal with the move that fits.

Step 1 of 2

How rules and AGENTS.md shape the slice

Retrieval is automatic, but you are not powerless over it. Cursor gives developers explicit levers to bias what lands in context and a DX Engineer should be able to teach when to reach for each.

Rules (.cursor/rules/*.mdc)

Persistent instructions and pointers the agent should always honor for this project or path.

Use them to encode conventions and steer the agent toward the right files and patterns.

AGENTS.md

A project-level brief the agent reads: how the codebase is laid out, how to build and test, what to avoid.

Good for the orienting context every task needs - the README written for an agent.

@-mentions

Explicitly pull a file, folder or symbol into the current request's context.

The most direct fix when retrieval missed something you know is relevant.

Open files & recent edits

Implicit signals that bias retrieval toward what you're working on.

Why keeping the relevant file open often quietly fixes a 'wrong context' problem.

Say it like this

The model isn't reading your repo. It's reading a small slice the harness retrieved for this request. If the agent missed a file, the question to ask isn't 'why is it dumb' - it's 'was that file in context?' Open it, @-mention it or add a rule and you've fixed it.

Learn more

Optional practice

Practice: How rules and AGENTS.md shape the slice