Cursor rules are instruction files that Cursor adds to the agent’s context. You write them once, and Cursor reads them in later chats. Project rules are .mdc files in .cursor/rules, which Cursor’s docs say is version-controlled and scoped to the codebase. Cursor also reads AGENTS.md files, and it has User and Team rules for wider scopes.
This page covers the rule types, how each one is applied, and where Hindsight fits for Cursor users. Facts come from Cursor’s rules docs (read 2026-11-15) and Hindsight’s coding agents page (read 2026-11-12 and 2026-11-15).
What are Cursor rules?
Cursor rules are saved instructions that Cursor includes in the agent’s prompt when a rule applies. The docs say a language model does not keep memory between completions, so rules are how a project’s conventions carry from one chat to the next. A rule can state a coding style, a test command or a list of files to avoid. Rules change what the agent sees. They do not make it learn from what happened.
Which kinds of Cursor rules are there?
Cursor’s docs list four types.
| Rule type | Scope | Where it is kept | How it is set |
|---|---|---|---|
| Project Rules | One codebase | .cursor/rules/*.mdc, version-controlled | Files in the folder, or /create-rule in chat |
| User Rules | All your projects | Your Cursor environment | Customize, then Rules |
| Team Rules | Whole organization | Cursor dashboard, Team and Enterprise plans | Admins; a rule can be enforced so users cannot turn it off |
| AGENTS.md | Project root and its subfolders | Plain Markdown, no frontmatter | Just a file in the folder |
Project rules are the only type the docs place in your repo. Plain .md files in .cursor/rules are ignored: project rules must use the .mdc extension.
How does Cursor decide when a rule applies?
Each .mdc file has three settings in its frontmatter: description, globs and alwaysApply. The Rules screen sets them for you, and the combination picks one of four modes.
- Always Apply (
alwaysApply: true): included in every chat session. - Apply Intelligently (a
descriptionis set): the agent includes the rule when it judges it relevant. - Apply to Specific Files (
globsis set): included when a matching file is in context. - Apply Manually (no description and no globs): included only when you
@-mention the rule in chat.
The docs give one size limit: “Keep rules under 500 lines.” They also suggest splitting a large rule into smaller ones. Cursor does not state a hard technical cap.
Does Cursor have memories as well?
Older Cursor versions had a Memories feature that saved notes from chats. Cursor staff said on the Cursor forum that it was removed in version 2.1.x, and they suggested exporting the memories and moving them into Rules. The docs link for Memories now opens the Rules page. Treat rules you write as the supported way to keep instructions The AI coding agent memory guide covers the same change.
Where Hindsight fits
Cursor’s rules are text you maintain by hand, so they hold only what you wrote down. Hindsight is an open-source memory server that records what happened in each session. Its Coding Agents package has a Cursor CLI installer:
1npx @vectorize-io/hindsight-coding-agents install cursor-cli
According to Hindsight’s coding agents page, the installer writes hooks to ~/.cursor/hooks.json and MCP settings to ~/.cursor/mcp.json. Capture is automatic, and each repo gets one memory bank, coding-agent::{gitProject}, shared with the other agents that work in that repo. The same package covers 22 CLI agents in all, so one bank can hold Cursor and Claude Code sessions for the same project.
- What it does not cover: the page documents Cursor CLI only, not the Cursor IDE. It also says past Cursor chats cannot be imported, because Cursor keeps its history in internal SQLite databases with unversioned schemas.
- Cost: Hindsight calls an LLM on writes, so each captured session costs more than a line added to a
.mdcfile. - Vendor source: the Hindsight page is written by its maker. Test it on one repo before you rely on it.
For how the other coding agents keep their instructions, see AI coding agent memory. For Claude Code’s files, see Claude Code memory. For Codex, see Codex memory.
Sources
- Cursor project rules, rule types and AGENTS.md: cursor.com/docs/context/rules (read 2026-11-15)
- Hindsight Coding Agents, Cursor CLI installer and bank naming: hindsight.vectorize.io/sdks/integrations/coding-agents (read 2026-11-15)