Compaction-proof prompt instructions

Would be nice to have a way to create persistent prompts (that survive compaction) at the level of:
User
Project (Folder hierarchy)
Folder (Just this folder)
File
Does that already exist somehow?

Just curious - isn’t that what cursor rules are for?