How to reference external codebase/files + keep file always in context?

Loving Cursor. I’m trying to think of ways for it to be more helpful in terms of provided context. I have two company packages in my node_modules folder. They are name-spaced under the company and require a npm key to access if installing. It’s a design-system and config for tailwind. I would love to reference these somehow when working on the main codebase, but I’m not sure how. Also, is there a way to always keep docs/a certain file in context for a certain workspace? I know about the general .cursorrules file, but not sure how to reference a file/keeping docs/etc in context using it.

I also am aware of the @web directive, but it won’t work on a private company repo of course.

Just update here for anyone…

You can either drag other repositories/files you have locally into your current editor and you will now be able to add that file to context. Perhaps it would be good to work out of a shared directory with all your repositories so you can share more context, but this doesn’t sound ideal and I’m not sure what that means for saving unnecessary tokens on responses. I generated a script from another repository called tailwind-config-viewer to produce a small json with design tokens so my current workspace will know what widths/paddings/etc we have configured as our tailwind config is served through a namespaced npm module. I’m going to try similar with generating a single .d.ts file for our external design system. The previous script is a local node script that runs at specific times using Mac’s launch agent plist file extension and saves to my main repository (you can add files like these to a local git ignore btw).

Also, if you always want a file in context, add it via the chat, but then right-click and click the pin button. Next time you open chat it will still be there.