# "Cursor AI Just Got Smarter 4 New Rule Types"
<!--
ref: @content/youtube/bmad-code/2025-03-24-cursor-ai-just-got-smarter-4-new-rule-types
triggers: [rules not firing, need for dynamic rule generation, agent misbehavior, overly complex rule setup]
trigger_prompt: When the user encounters issues with static rules or seeks to implement a more adaptive and responsive rule system for their AI agents.
version: 4
updated_at: 2026-10-31T19:08:17.182Z
-->

From BMad Code, 2025-03-24: Cursor has quietly transformed its rules system into four distinct rule types — Always, Auto-Attached, Agent-Selected, and Manual — each with different triggering semantics that hinge on the `description` field and glob patterns.

Brian from BMAD Code walks through Cursor's recently shipped (and largely undocumented) overhaul of its rules system, including the four new rule types and practical patterns for agent-driven rule generation.

## Core Thesis
Cursor has quietly transformed its rules system into four distinct rule types — Always, Auto-Attached, Agent-Selected, and Manual — each with different triggering semantics that hinge on the `description` field and glob patterns. Used well, this turns rules from a static config file into a living, lazy-loaded, agent-aware behavioral layer that should be grown reactively as the LLM misbehaves, not preemptively as boilerplate.

## Key Insights
- **Four rule types, four trigger mechanisms**: *Always* (every request), *Auto-Attached* (glob-matched files), *Agent-Selected* (semantic match against the description), and *Manual / Macro* (explicit `@rulename` invocation).
- **The description field is load-bearing**: For Agent-Selected rules, Cursor only feeds each rule's one-sentence description into context, then decides which to pull fully — so vague descriptions silently break rule loading.
- **Subfolder organization replaces numeric prefixes**: Rules in `.cursor/rules/` can now be grouped by category in subfolders, deprecating the old ordering hack.
- **MDC viewer breaks agent rule writes**: The custom `.mdc` editor conflicts with the agent's file writes — overriding the file association to plain text fixes save failures entirely.
- **LLM date hallucination corrupts research**: Models often assume the wrong year, polluting web search results — a rule that forces the agent to shell out to `date` and inject system time fixes this.
- **Lazy loading minimizes context overhead**: Only descriptions are loaded by default; full rule bodies are pulled on demand, keeping the context window clean.
- **Rules should shrink as projects mature**: Once conventions are visible in indexed code, many rules become redundant and should be pruned.
- **Self-correcting loop**: When the agent errs, instruct it to write a rule that prevents recurrence — converting mistakes into durable guardrails.
- **Don't over-rule greenfield projects**: Modern LLMs already know popular framework conventions; pre-baked mega rule repos are mostly unnecessary.

## Actionable Takeaways
1. Open `settings.json` and add `"workbench.editorAssociations": { "*.mdc": "default" }` to stop the MDC viewer from breaking agent rule writes.
2. Migrate flat `.cursor/rules/` files with numeric prefixes into category subfolders.
3. Use `F1 → "Cursor Rule"` to scaffold new rules with the correct type via the UI.
4. Delegate rule authoring to the agent itself — describe the failure, paste a concrete bad example, and let it generate the MDC.
5. Match rule type to use case: *Always* for universal policies, *Auto-Attached* for file-scoped conventions, *Agent-Selected* for intent-based behaviors, *Manual* for invoked macros.
6. Build manual macro rules for repeatable workflows like `@git-push` (auto-stage, AI-generated commit message, push).
7. Wire Tavily (free 1,000 credits/month) via MCP and write an Agent-Selected rule that triggers it for deep research, with system time injected to prevent date hallucination.
8. Test new rules in a fresh context window to confirm they actually fire on intent, not in-context cheating.
9. Audit and rewrite rule descriptions whenever an Agent-Selected rule fails to trigger.
10. Periodically delete rules and verify the LLM still behaves — prune what's no longer needed.
11. Use `apply-rules.sh` from the rules template to bootstrap projects without overwriting existing rules.

## Notable Quotes
> "The description field is critical."

> "Manual is basically what I like to call macro mode. And this is super exciting."

> "All rule creation I do almost 100% is me asking the agent to create the rule for me."

> "Rely on the LLM. See what it can do at first and then give it guard rails as you need to."

> "Tell the agent, 'Hey, you did this. It caused this issue. Don't do it again. Create a rule instead.'"

> "It's just one sentence from all of your rules. So it's not a lot of context overhead."

> "Don't just think that you're going to create a rule one and done and it's going to be perfect. It is a constantly evolving system."

---

*You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).*

*Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*