Cursor tutorial and project rules
Project rules
Cursor project rules live in .cursor/rules as .mdc files. Their metadata controls when they apply. The official rules documentation, checked November 14, 2026, distinguishes rules that always apply, rules attached to matching files, rules chosen by relevance and rules invoked manually.
A fictional returns app needs a rule for its API handlers: use the shared validator and preserve the documented error shape. Scope that instruction to the handler files. Applying it to a design document adds irrelevant context; putting it in a plain .md file under .cursor/rules does not make it a project rule.
Review after the edit
A correctly loaded rule still needs a checked result. Read the proposed change and run a request that uses the error path. If the agent removed the shared validator to make a test pass, the change violates the instruction even when the test result is green.
Practice the decision in this scripted workspace, then inspect the active rules in your installed Cursor version. For the difference between product instruction files, use the Claude Code and Cursor comparison.