Last reviewed
Correct answer: B. As a single field with the patterns separated by commas, such as `docs/**/*.md, docs/**/*.mdx`.
Explanation
The principle — The globs field takes its patterns on a single line, and multiple patterns are separated with commas.
Why the key is correct — Writing docs/**/*.md, docs/**/*.mdx scopes the rule to both extensions under docs/, so it auto-attaches whenever a matching file is in context. A value Cursor cannot read as a pattern list matches nothing, and a rule matching nothing never attaches, which sends the author off to debug their prompt when the fault is in the frontmatter.
Why the others are wrong — A dashed YAML sequence looks idiomatic in frontmatter but is the wrong shape for this field. Space separation is shell habit rather than the syntax here. Brace expansion is a shell feature too, and it leaves the scoping to a mechanism the rules system is not using.
Remember this — One line, patterns separated by commas.
Sources — Cursor's Rules documentation.
Sources
“Separate multiple patterns with commas.”
Practise 10 questions on this topic
Take Cursor Basics — Timed Test 1 (10 questions) — scored instantly, explanation for every question, no login.