Hey, thanks for the request.
As designed, “Apply to Specific Files” rules should trigger automatically when the agent reads or edits files that match the glob pattern, so you don’t need to mention them explicitly with @. This is described in the rules docs as “when file matches a specified pattern”.
That said, there are known reliability issues with glob-based rule triggering. The team is aware, and your report helps raise visibility. You’re not the only user seeing this behavior.
A couple temporary workarounds:
- Switch to “Always Apply” and then limit the rule content conditionally, for example: “When working with
*.tsxfiles insrc/components/, follow these patterns: …” - Use
AGENTS.mdin specific directories. These are auto-discovered when the agent works with files in that directory or its children. This is usually more reliable for directory-scoped instructions.
Also worth noting: the context usage tooltip may not always show every rule that was actually included. There’s separate feedback about the transparency of that indicator.
What version of Cursor are you on, and can you share an example of the glob pattern you’re using? That’ll help confirm whether it’s a pattern-matching issue or a more general triggering problem.