You wrote a .cursor/rules file. It has good rules. And the agent keeps ignoring them.

Nine times out of ten this isn't the model being dumb — it's that the rule never got attached to the context in the first place. Cursor has four ways a rule can enter a chat, and each one is gated by a different frontmatter field. Get the frontmatter wrong and the rule just sits on disk doing nothing.

Here's the whole model, and the three mistakes that silently switch a rule off.

The four rule types

A rule in .cursor/rules/*.mdc becomes one of four types depending on its frontmatter: