In short.
This is Cursor's official documentation page on Rules, reusable instructions that guide the AI Agent in the Cursor code editor, written for developers and team administrators who configure that Agent. It documents four instruction sources, file-based and relevance-based activation, organizational precedence and nested AGENTS.md files. Rules do not affect Cursor Tab or other AI features. Its strongest practical detail concerns when instructions enter the model context: mentioning another file does not automatically include that file's contents. The page documents configuration behavior but supplies no measurements of instruction adherence or productivity. Nothing was executed or tested.
Researched and written by an AI model and checked by a second AI model. How it works
Covers the complete supplied documentation page at [https://cursor.com/docs/rules.md], including examples, best practices, Team Rules, repository imports, nested AGENTS.md, User Rules and the FAQ. Linked pages, referenced code files, image contents, community repositories and plugin documentation are outside scope. No explicit licence notice appears in the supplied text. Nothing was executed; setup, activation, precedence, enforcement and generated-code behavior remain untested.
The overview
Identity
This is Cursor's documentation for Rules, available at [https://cursor.com/docs/rules.md]. It explains how reusable instructions supply context to Cursor Agent for code generation, edits and development workflows.
The page covers Project Rules stored in a codebase, User Rules applied across a user's projects, Team Rules managed through the organization dashboard, and AGENTS.md files containing plain Markdown instructions.
Assessment
The guide is useful when developers repeatedly explain the same architecture, conventions or workflow to Cursor Agent. It provides enough configuration detail to distinguish instructions that always apply from instructions activated by a file pattern, relevance or an explicit mention.
The documented value is reusable context and shared configuration. The page does not establish how consistently models follow that guidance, how much time it saves or whether it improves code quality. Administrative enforcement makes a Team Rule mandatory to include; it does not establish guaranteed compliance by the model.
Users
Individual developers can use User Rules for recurring preferences and AGENTS.md for straightforward project instructions. Repository maintainers can use Project Rules to share architecture decisions, templates and guidance scoped to particular directories or file types.
Team administrators can use Team Rules to distribute organizational instructions across repositories and decide whether members may disable them. Developers seeking changes to Cursor Tab will not get those changes through Rules, according to the FAQ.
Capabilities
Project Rules support four activation modes: always included, selected by Agent from a description, attached when matching files are in context, or activated manually by an @-mention. Files can be organized into folders under .cursor/rules and shared through version control.
Team Rules support immediate activation or draft status, optional or mandatory enforcement, and glob patterns for file-specific application. Enabled Team Rules without a glob apply to every Agent conversation across the team's repositories, unless a member has turned off a non-enforced rule in Customize.
AGENTS.md works in the project root and subdirectories. Nested instructions combine with parent instructions, with more specific instructions taking precedence. Rules can also direct Agent to read templates or other files when needed.
Using it
Requirements
The documented workflows use Cursor Agent, project files, Customize settings or the Cursor team dashboard. Project Rules require the .mdc extension inside .cursor/rules and use frontmatter fields named description, globs and alwaysApply. Plain .md files in that directory are ignored by the rules system.
AGENTS.md provides a plain Markdown option without frontmatter. Team Rules are available on Team and Enterprise plans, and the page assigns their administration to team administrators. Minimum Cursor version, operating-system requirements and detailed plan entitlements are not specified.
Mechanism
Persistence comes from reusing stored instructions at the start of the model context. For Project Rules, alwaysApply: true includes the rule in every chat session and overrides its description and globs. With alwaysApply: false, the documented configurations use matching globs for automatic attachment, a description without globs for Agent-selected relevance, or neither field for manual activation.
All applicable Team, Project and User Rules are merged; when guidance conflicts, Team Rules take precedence over Project Rules, which take precedence over User Rules. Nested AGENTS.md files have their own documented rule that more specific instructions take precedence over parent instructions. The page does not specify how AGENTS.md conflicts with the other three rule types are resolved.
A reference such as @migration-template.sql remains text in the rule. Agent reads the referenced file with its tools when it needs the content; the file is not automatically inserted into context. The page says this reference handling is the same in the editor, CLI and Cloud Agents.
Setup
To create a Project Rule, use /create-rule in Agent and describe the desired guidance, or open Customize, select Rules and choose Add Rule. The resulting .mdc file belongs under .cursor/rules. Choose the activation mode and supply the corresponding description or file pattern.
For simpler instructions, place AGENTS.md at the project root and add nested files where particular directories need additional guidance. User Rules are configured through Customize and Rules. Team administrators create Team Rules through the Cursor dashboard and choose activation, enforcement and any file scope.
The page recommends keeping rules focused, actionable and under 500 lines, splitting large instructions into smaller rules and checking shared project rules into Git. These setup paths were not executed.
Example
The page gives a component convention example using globs: src/components/**/*.tsx and alwaysApply: false. Its instruction body asks for named exports, colocated style files, smaller components and composition. The documented trigger is a matching component file being present in context.
For a migration workflow invoked only when needed, the page shows alwaysApply: false with no description or globs. The user activates that rule by @-mentioning it. A referenced migration template still requires Agent to read the file; essential instructions must appear directly in the rule body to be included with the rule. Neither example was run.
Assessment & evidence
Limitations
Rules affect Agent and do not affect Cursor Tab or other AI features. Relevance-based rules depend on Agent deciding that a description applies. File-scoped rules depend on matching files being in context, and referenced file contents are not automatically included.
Members may disable non-enforced Team Rules. Enforced rules cannot be disabled in Customize, but the page explicitly cautions against using AI guidance as the only security control. No adherence benchmarks, model-specific results or failure-rate measurements are supplied.
Repository rules are not imported directly on their own. The documented import route packages them in a plugin and uses a marketplace, including a .cursor-plugin/marketplace.json manifest for the repository import route. The linked plugin instructions are outside this page.
Reasoning
The activation model suggests a practical design choice: use always-applied rules for broadly relevant instructions and narrower rules for conventions tied to particular work. This is an inference from the documented scope controls and the recommendation to keep rules focused; the page supplies no measured comparison between these approaches.
The distinction between a file reference and included content matters when deciding where to put critical guidance. Referencing a canonical template can reduce duplicated documentation, while putting essential instructions in the rule body ensures that those instructions accompany the applied rule. Neither approach guarantees that generated output follows them.
Alternatives
Within Cursor, AGENTS.md offers simple readable project instructions, Project Rules add structured activation controls, User Rules supply personal preferences across projects, and Team Rules provide centralized organizational administration. The page says Team Rules work alongside other rule types and that applicable Team, Project and User Rules are merged; it does not say how AGENTS.md interacts with Project Rules when both are present.
The page recommends linters for common style conventions and references to canonical code examples instead of copying extensive guidance. It mentions community rule collections without identifying or assessing particular collections. Comparisons with other coding assistants are not established by this source.
Evidence
The source is the complete supplied Cursor Rules documentation at [https://cursor.com/docs/rules.md]. It contains configuration tables, frontmatter examples, creation steps, team administration details, AGENTS.md behavior and troubleshooting guidance.
The source snapshot was captured at 2026-11-14T23:13:31.800Z. Its source revision is sha256:dae9d3ecd7e389fc94ee57d87911fe8d54bae1f00ce451d44303616648247ce0. Findings describe the documentation; no installation, rule activation, generated output or organizational enforcement was tested.
Access & freshness
Costs
Team Rules require a Team or Enterprise plan. The page gives no subscription prices, seat minimums, model charges or separate Rules fees. It does not establish whether the other rule types are available without a paid subscription.
Applied rules occupy model context, but the page provides no token measurements or billing calculations. Total cost and any incremental usage cost from rules remain unknown.
Rights
The supplied page does not state a licence or redistribution terms for its documentation text or example rules. Permission to redistribute those materials is unknown. It also does not establish rights for referenced templates, community collections or plugins.
Freshness
The available snapshot is from 14 November 2026. The page provides no publication date, last-update date or Cursor release number tying its instructions to a particular version.
Nested AGENTS.md support is described as available. The page does not establish when it became available or which older releases support it. Behavior outside the documented snapshot remains unverified.
Actions
Start with one recurring instruction and choose its intended scope: personal preference, whole project, particular files or organization. Use AGENTS.md for straightforward project guidance, or a .mdc Project Rule when activation controls are useful.
For a file-scoped rule, check the pattern against both intended and unintended file paths, then inspect whether the rule activates during the relevant task. Put essential instructions in the body and reference longer templates when Agent can read them as needed.
Before relying on shared configuration, review conflicting instructions and the documented precedence. Team administrators should choose activation and enforcement deliberately. Keep ordinary code checks and security controls in place, and assess actual Agent behavior in the intended Cursor environment.
