AI CODING TOOLS

Why Cursor Rules Stop Working on Multi-Stack Projects

You write a .cursorrules file once, Cursor follows it for a week, and then it starts generating code that ignores half your conventions again — the wrong import style, an outdated Next.js pattern, a component structure nobody agreed to. You retype the same instructions in chat, and the fix does not stick past the current session. Cursor rules stop working for reasons that are almost always mechanical, not mysterious: a format mismatch, a glob pattern that no longer matches the file you are editing, or a rule file Cursor never loaded in the first place. Cursor rules are project-level instruction files — either a single .cursorrules file or scoped .cursor/rules/*.mdc files — that Cursor includes in its prompt context so it writes code the way your team actually wants it written.

Why Do Cursor Rules Stop Working Partway Through a Project?

Cursor rules usually break for one of three reasons: the rule file uses the wrong format for how your project is set up, the glob pattern in an .mdc file's frontmatter does not match the files you are actually editing, or the file lives outside the path Cursor scans for rules. None of these are Cursor forgetting anything — they are configuration mismatches that only show up once the project grows past the file or two you originally tested against.

A project that starts as a single Next.js app with one rules file works fine, because every file you touch matches the one glob you wrote. Add a Python worker, a Drizzle schema, or a second frontend package six weeks later, and any file in those new folders gets no rule coverage at all — Cursor was never told to apply one. The output looks inconsistent because it is: half your codebase has a rule attached, and half does not.

There is a second, less obvious cause: a single .cursorrules file that has grown past a few hundred lines competes with everything else in Cursor's prompt context for the same file, function, and conversation history it also needs to read. Rules near the bottom of a long file get less weight than the ones near the top, even though nothing in the file format guarantees that ordering matters. Splitting one bloated .cursorrules file into several scoped .mdc files, each loaded only for the code it actually applies to, fixes this by shrinking what Cursor has to hold in context for any single edit.

What Actually Causes Cursor to Ignore a .cursorrules File?

The legacy .cursorrules format is a single file at your project root, and Cursor includes it in every prompt for that project, no glob required. If output that used to follow it stops working, the usual cause is a partial migration: someone added .cursor/rules/*.mdc files for part of the stack, and Cursor now blends both — with the more specific, more recently loaded rule quietly winning when the two disagree.

The .mdc format adds frontmatter — description, globs, and alwaysApply — and every one of those fields is a place a rule can silently stop applying. A glob written for *.tsx will not match a new .ts utility file. An alwaysApply: false rule only loads when the glob matches the file open in the editor, not the whole project. Get any of those three fields wrong and the rule file sits in the repo doing nothing, with no warning from Cursor that it was skipped. Testing a new or edited .mdc file against one file it should match and one it should not is the fastest way to catch a bad glob before it costs you an afternoon.

Legacy .cursorrules vs Modern .mdc Rules

Aspect.cursorrules.cursor/rules/*.mdc
ScopeWhole project, always includedPer-file, only where globs match
StructureOne fileMany small files, one per concern
FrontmatterNonedescription, globs, alwaysApply
Best fitSmall, single-stack reposMulti-stack repos and monorepos

How Do You Debug a Rule That Is Not Applying?

Work through this in order before assuming Cursor is broken.

  1. Ask Cursor directly what conventions it is following for the current file — it echoes back only the rules actually in its context, which tells you immediately if the one you expect is missing.
  2. Confirm the rule file lives where Cursor scans for it: project root for .cursorrules, or .cursor/rules/ for .mdc files, not a nested subfolder.
  3. Open the .mdc frontmatter and check that the globs pattern actually matches the extension and folder of the file you are editing.
  4. Restart Cursor. Rule changes take effect on the next session, not the one you are currently in.
  5. Search the rules directory for a second file with an overlapping glob — a silent conflict is more common than a missing rule.

Writing and maintaining that rule set by hand works fine for one stack. It gets tedious once you are past your second or third framework in the same repo, or once new developers join and do not know which of the existing rules are still accurate. That is the point where a pre-built, per-stack rule set saves the rewrite: BuyCoded's Cursor Rules Mega-Pack ships 40 rule files across 20 stacks — Next.js 15, React 19, Tailwind v4, Django 5, Rust, Supabase, and more — in both the legacy .cursorrules format and the modern .mdc format, with the frontmatter and globs already filled in correctly for each stack.

Is It Worth Writing Your Own Rules From Scratch?

For a single-stack side project, writing your own .cursorrules by hand is genuinely fine, and probably faster than shopping around for a pack. The problem shows up once you are spanning three or more stacks, or once other developers are working in a rules setup they did not write themselves. Hand-maintained rule files drift quietly, and nobody notices until Cursor's output starts contradicting itself.

Buying a pack does not remove the maintenance work entirely — you still decide how strict a given rule should be for your team, and you still update it when a framework ships a breaking change. What it changes is the starting point: instead of writing the first draft of 1,700+ directives across 20 stacks, you are editing an already-correct rule set for the $27 the mega-pack costs, which is less than the time it takes to write accurate rules for even one unfamiliar stack.

Cost of migration is the other objection worth naming directly: dropping a pre-built pack into an existing repo does not mean deleting the rules you already have. The mega-pack's rule files are scoped per stack, so you install only the ones matching frameworks you actually run, and keep any project-specific rule you already wrote for internal-only conventions. The two sets coexist, because Cursor loads every .mdc file whose glob matches, regardless of which pack it came from.

What Is the Fastest Way to Fix This?

Two steps. First, run the debug checklist above and confirm you are actually looking at a format or glob problem, not a one-off Cursor bug — most Cursor-ignores-my-rules reports turn out to be the former. Second, if you are maintaining rules for more than one or two stacks by hand, browse the BuyCoded catalog and pick up the rule set for the stacks you actually run, so the fix is a five-minute install instead of a rewrite.

Frequently asked questions

Does .cursorrules still work in the newest version of Cursor?

Yes. Cursor keeps supporting the legacy single-file .cursorrules format alongside the newer .cursor/rules/*.mdc scoped format, so an existing rules file does not stop working after an update. The two formats can coexist in the same project, though most teams migrate fully to .mdc once they need per-stack scoping instead of one global file.

Can two Cursor rule files contradict each other?

Yes, and Cursor does not flag the conflict for you. If two .mdc files with overlapping globs give opposite instructions, Cursor includes both in context and the more specific or more recently loaded rule tends to win inconsistently. Check for overlapping globs first whenever output looks like it is following an old convention.

Do Cursor rules also work in other AI coding tools?

No. .cursorrules and .mdc are Cursor-specific formats that only that editor reads. Other tools use their own convention files — Claude Code uses CLAUDE.md and skills, for example — so a rules file written for Cursor needs translating before it does anything in a different editor.

How many rule files can one project use at once?

There is no hard limit, but every rule file Cursor loads adds to the prompt context sent on each request. Teams commonly run five to fifteen scoped .mdc files per project, one or two per stack layer, rather than one giant file, since narrower globs make conflicts easier to spot and fix.

Is it safe to commit Cursor rule files to a shared repo?

Yes, and it is the recommended setup. Committing .cursor/rules/ or .cursorrules means every teammate's Cursor instance reads the same conventions instead of each developer keeping a personal, drifting copy, which is the main reason rules stop matching what the rest of the team expects.