Feature request for product/service
Cursor IDE
Describe the request
Problem
Currently, .mdc rule files have three activation controls: alwaysApply, globs, and description. None of these allows targeting a specific built-in interaction mode (Agent, Plan, Debug, Ask).
This forces rules that are only relevant in certain modes to either:
Use alwaysApply: true, wasting context tokens in every prompt regardless of mode
Use alwaysApply: false, risking the rule not loading when it matters
Use cases
A “debug logging” rule that enforces project logging is most critical in Debug mode (where the AI adds diagnostic instrumentation) but is also needed in Agent mode (when writing new code). It’s irrelevant in Plan and Ask modes.
A “preserve existing comments” rule matters in Agent mode (code edits) but adds noise in Ask mode (read-only questions) and Plan mode (no edits happen).
Architecture/codebase-map rules are useful in Plan mode and Ask mode for answering “where does X go?” questions, but irrelevant during active debugging.
Proposed solution
Add an optional mode field to the .mdc frontmatter:
---
description: Debug logging must use the project instruments
mode: [agent, debug]
alwaysApply: true
---
mode accepts an array of built-in mode names: agent, plan, debug, ask
When the mode is present, the rule only loads in the specified modes
When mode is absent, current behavior is preserved (mode-agnostic)
mode works alongside existing alwaysApply and globs — it's an additional filter, not a replacement
This would reduce token waste from always-on rules while ensuring rules are active exactly where they matter.