A Cursor Team Rule and a repository's project rule give conflicting guidance — which one wins, and can a developer switch the Team Rule off?
answer
- three scopes, one merged context
- organisation first, personal last
- a dashboard checkbox per rule
- optional means on until switched off
- guidance, not a control
basics
~20 sCursor merges all applicable rules and, on a conflict, gives precedence in the order Team Rules, then Project Rules, then User Rules. A developer can turn a Team Rule off in Customize unless an admin set it to Enforce this rule.
solid answer
~50 sCursor applies rules in the order **Team Rules → Project Rules → User Rules**: every applicable rule is merged into Agent's context, and where their guidance conflicts the earlier source takes precedence — so the Team Rule wins. Whether a developer can switch it off depends on one admin setting in the team dashboard. With **Enforce this rule** on, the rule is required for every member and cannot be disabled in Customize; without it, the rule is enabled by default but each member can toggle it off under **Team Rules** in Customize. Team Rules exist on Team and Enterprise plans, are free-form text, can be scoped with glob patterns, and apply to Agent across all the team's repositories. Precedence is still guidance to a model, though: Cursor itself warns that AI guidance should not be your only security control.
go deeper
Recall the order Team Rules, then Project Rules, then User Rules, and that Team Rules come from the team dashboard rather than from the repository.
Explain that all applicable rules are merged and precedence only settles conflicts, and describe the enforced versus optional switch and glob-scoped Team Rules.
Choose which rules to enforce, which to leave optional and which belong in the repository, and back must-hold constraints with checks, since enforced rules still only steer a model.
Weigh central control against team autonomy: a small enforced set everyone can read, room for local conventions, and evidence that rules work, without letting rules stand in for controls.
## Three scopes of rules Cursor's **Agent** can receive instructions from several rule sources at once. Three of them form a hierarchy: | Scope | Where it is defined | Where it is stored | Who controls it | | :-- | :-- | :-- | :-- | | **Team Rules** | Team dashboard, by admins | Cursor's servers; synced to all members | Admins; a member may switch off an unenforced one | | **Project Rules** | `.mdc` files in `.cursor/rules` | The repository, version-controlled | Whoever edits the repository | | **User Rules** | **Customize → Rules** (or files in `~/.cursor/rules`) | The Cursor account, synced across sign-ins (the local files stay on that machine) | The developer | `AGENTS.md` files sit beside project rules as plain-markdown instructions; the documented ordering is the three-scope chain above. ## Precedence: merged, not replaced Cursor documents the order as: 1. **Team Rules** 2. **Project Rules** 3. **User Rules** Two words in the documentation carry the meaning. All applicable rules are **merged** — a Team Rule does not delete the project rule, both reach the model. And when guidance **conflicts**, the earlier source takes precedence. So a project rule saying "use the shared HTTP client only in new code" and a Team Rule saying "use the shared HTTP client everywhere" both arrive, and the Team Rule is the one meant to prevail. ## Enforced and optional Team Rules An admin creates a Team Rule in the dashboard and sets two checkboxes: - **Enable this rule immediately** — checked, the rule is active on creation; unchecked, it is saved as a draft and applies only once enabled. - **Enforce this rule** — checked, the rule is **required** for every member and cannot be disabled in Customize. Unchecked, the rule is **optional**: enabled by default, but each member can toggle it off under **Team Rules** in Customize. Team Rules are free-form text; they do not use the folder structure of project rules. They **can** carry a glob pattern such as `**/*.py`, in which case they apply only when matching files are in context; without one they apply to every conversation. They are available on the Team and Enterprise plans. ## A worked conflict Suppose a team enforces a Team Rule, "every new endpoint validates its input with the shared schema library", while one older repository has a project rule saying "validate inputs by hand in legacy handlers", and a developer's User Rule asks for "minimal changes". 1. Agent receives all three, merged into its context. 2. On new endpoints the Team Rule and the project rule conflict, and the Team Rule takes precedence. 3. The User Rule still applies wherever it does not conflict — it shapes how much Agent changes, not which library it uses. 4. The developer cannot switch the Team Rule off, because it is enforced; the repository can rewrite its project rule to say "legacy handlers only" and remove the conflict at the source. ## What precedence does not give you - **Not a guarantee.** Precedence tells the model which guidance should win; it is not a filter on the output. Cursor's own documentation notes that some teams use enforced rules in compliance workflows and adds that AI guidance should not be the only security control. - **Not every surface.** Rules apply to Agent (Chat). They do not apply to Tab or Inline Edit, and Bugbot's pull-request reviews read their own rule sources. - **Not part of a profile export.** User rules and team rules are not included in profile exports; account user rules come back by signing in. ## Choosing a policy for a team A lead deciding what goes where can use a simple split: - **Enforce** the few organisation-wide rules that must reach every Agent chat — data-handling constraints, banned dependencies, licence headers — and keep them short, since they are merged into every conversation (or into every conversation touching their globs). - Leave **optional** the house-style preferences that individual teams may legitimately override. - Put **repository-specific** conventions in project rules, reviewed in pull requests like code. - Leave tone and personal workflow to **User Rules**. - Back anything that truly must hold with a check that runs whether or not the model listened — a linter, a test, a required review. The dashboard shows which Team Rules exist; Customize shows each developer which ones are active for them.
- A developer's User Rule says "skip tests for tiny changes"; an enforced Team Rule says "add a test with every change". What happens?Both rules are merged into Agent's context. Because Team Rules precede User Rules, the Team Rule's guidance is the one meant to win, and since it is enforced the developer cannot switch it off in Customize. It still steers a model rather than blocking output, so a CI check on test coverage is what actually guarantees it.
- Can a Cursor Team Rule apply only to Python files?Yes. Team Rules support glob patterns: with `**/*.py` set, the rule applies only when matching files are in context. A Team Rule with no glob applies to every conversation.
- Where do Cursor User Rules live, and do they follow a developer to a new laptop?User Rules written in **Customize → Rules** are stored on the Cursor account and sync when the developer signs in on another machine. User rule files placed in `~/.cursor/rules` stay on that machine and do not sync. Neither kind is included in a profile export.
Rule precedence works like a rental flat's rules. The landlord's lease, the house rules and a tenant's own habits all apply at once; where they clash the lease wins, and only lease clauses marked mandatory cannot be struck out by the tenant.
- A project rule overrides a Team Rule because it sits closer to the code
- Only the highest-precedence rule is sent; lower ones are dropped
- Every Team Rule is mandatory and members can never switch one off
- An enforced Team Rule guarantees Agent never violates it
- Team Rules are files committed to a .cursor folder in each repository