Hey team
Iām working on a project that uses a custom SCSS system with two important files:
-
@var_default.scss
: contains a SCSS map of all theme variables. -
@font-icon.json
: contains the full icon catalog (names + unicode mapping).
My goal is to use Cursor AI to help me edit .scss
files more safely and intelligently.
We have custom mixins like:
@include icon-set-normal(icon-name);
color: setVariable(global__error__color);
The issue is: these mixins only work with values that exist in the two referenced files above.
So I wrote an AI rule like this (in Markdown):
# Rule: Always check @font-icon.json and @var_default.scss
When editing SCSS files, always consult @font-icon.json for icons and @var_default.scss for valid variables.
If these files are not loaded in the context, ask the user before continuing.
However⦠Cursor doesnāt really respect that.
Even though it acknowledges the rule (and sometimes mentions the files), it doesnāt truly load them into context.
Looking at the network inspector, I often see things like:
[font-icon.json](mdc:app/font-icon.json)
ā¦which appears to be a reference, not the full inclusion of the file.
My question:
Is there any way to force Cursor to load certain files in full before answering or suggesting code?
Iād like Cursor to:
-
Include both files in context before editing SCSS.
-
Stop and ask me if the files arenāt present (or auto-open them).
-
Avoid suggesting variables or icons that donāt exist in these files.
Let me know if:
-
Thereās a correct syntax for this in Rules (maybe with
mustInclude
or similar?). -
You plan to support stronger file context validation in the future.
Thanks so much