Legacy .cursorrules Deprecated — Clean Migration to .cursor/rules/*.mdc + AGENTS.md
Deprecation Warning: Root .cursorrules is legacy and loads unconditionally on every file edit.
Cursor replaced the single root .cursorrules file with modular .cursor/rules/*.mdc files supporting YAML frontmatter, glob scoping, and team version control. For multi-agent repos (Cursor + Claude Code + Codex), move shared rules into AGENTS.md, keep a thin @AGENTS.md CLAUDE.md pointer, and split Cursor-specific file rules into scoped .cursor/rules/*.mdc files.
Broken vs. Fixed Configuration
# .cursorrules (injected on every file in the monorepo) Use React 19 hooks properly. Always write Alembic migrations with downgrade(). Never import server code in client components.
# .cursor/rules/frontend.mdc
---
description: React 19 UI component rules
globs: ["apps/web/src/**/*.{ts,tsx}"]
alwaysApply: false
---
- Don't import server DB clients in client components. Instead call typed RPC routes in apps/web/src/api/.Why This Happens
A single root .cursorrules file injects frontend CSS tips when editing SQL migrations and backend rules when editing React components, burning tokens and causing conflicting context.
Step-by-Step Fix
- 01Separate universal repo rules from path-specific rules
Build commands, repo layout, and safety boundaries belong in root AGENTS.md; framework conventions belong in glob-scoped .mdc files.
- 02Convert .cursorrules with the AgentLint Converter
Paste your .cursorrules into /convert/cursorrules-to-agents-md/ to generate valid YAML frontmatter and AGENTS.md automatically.
- 03Verify globs and remove duplicate root .cursorrules
Once .cursor/rules/*.mdc matches your real files, delete .cursorrules so Cursor never loads duplicate conflicting copies.
Automated AgentLint Checks That Catch This
Frequently Asked Questions
Does Cursor still read AGENTS.md natively alongside .cursor/rules/*.mdc?
Yes. Modern Cursor reads root AGENTS.md automatically, making AGENTS.md the cleanest single source of truth paired with glob-scoped .mdc rules.
Should I keep both .cursorrules and .cursor/rules/ during transition?
Only briefly during team rollout — keeping both long-term causes rule drift and duplicate token usage.