1 min lesson
The 2026 config stack
Work through this: "A developer wrote a rule in .cursor/rules/db.mdc to enforce query conventions, but says it never seems to apply when they edit database code. Walk through how you'd diagnose it."
Step 1 of 2
The 2026 config stack
Rules are one of several context inputs that stack and can conflict. A power user knows the order and can debug a clash.
- 1Custom instructions. Your personal, account-level preferences that ride along on every project.
- 2Skills (SKILL.md). Packaged how-to the agent pulls in when a task matches.
- 3MCPModel Context Protocol. A standard that lets an AI agent pull in context from outside the repo, like Jira tickets or internal docs. Press Enter for the full definition. servers. External tools and data sources the agent can call mid-task.
- 4Rules / .cursorrules. Project conventions, scoped by globs or applied always.
- 5AGENTS.md. The portable fallback rule file read across IDEs.
Loading everything with alwaysApply: true is the classic anti-pattern. It bloats context, dilutes the signal and makes the agent slower and less precise. Scope rules with globs so each one rides along only when it's relevant and reserve always-apply for the two or three conventions that genuinely hold everywhere.
Your rule has a description and no globs, so it's auto-attach: the agent only pulls it in when it judges the rule relevant to the task. If you want it to fire whenever you edit an API handler, add a glob like src/api/*/.ts. If it must always be present, set alwaysApply: true, but keep that list short or you'll drown the real signal.