2 min lesson
Scope one rule to component files
Scope one icon rule to component files, then test a matching and nonmatching task.
Step 1 of 2
Open one Always Apply rule that should govern only component files. Change it to Apply to Specific Files with alwaysApply set to false and a component glob. Keep the body focused on one behavior. Run a fresh task with a matching file in context, then another task outside the glob. Inspect the loaded rules and both diffs. Before keeping the rule, check every other applicable Project Rule for a contradictory instruction.
Scope a rule to the files it belongs in
0:47 · narratedRead this demo as text
- product-aware-development and AGENTS show no path next to them in Settings, Rules — they apply everywhere. search-scope carries a path, src/components/search, so it only attaches when a file under there is in play.
- Close Settings. Both open tabs, EmptyState and searchFilter, sit under that same path — the glob covers either file, not just the one you happen to be editing.
- Keep the glob as narrow as the behavior it changes. A rule with no path fires everywhere, even files it was never written for — a scoped rule stays quiet outside its own directory.
Practice next: Open a broad Always rule and scope it with globs before the next agent run.
Simulated Cursor 3.12 (macOS, light) — beta educational reconstruction, not the real product.