2 min lesson
Scope one nested AGENTS.md
Place one API instruction in a nested AGENTS.md, then test it inside and outside that directory.
Step 1 of 2
Take one repeated instruction and name who needs it and where it should load. Choose the rule type before writing the file. For a simple directory instruction, add AGENTS.md inside that directory and commit it. Keep the wording short, name the exact behavior and point to a command or canonical file. Start a fresh task inside the boundary without repeating the instruction, inspect what Agent loaded and review the output. Run another task outside the boundary to confirm the instruction stays out.
Rules that load before the edit
0:37 · narratedRead this demo as text
- Open Cursor Settings, Rules. search-scope is a project rule — it only applies under the file path src/components/search.
- Close Settings and open Agent chat. The prompt names the search-scope rule and AGENTS.md so you can see whether the agent loaded them.
- Send it. Watch the agent load search-scope and AGENTS.md, then edit EmptyState only — durable instructions beat retyping the same correction.
Practice next: Now do the module workflow: turn a repeated correction into a checked-in rule and test it with a small run.
Simulated Cursor 3.12 (macOS, light) — beta educational reconstruction, not the real product.