*TEMP FIX* For cursor creating a new SRC Directory & Files instead of editing pre-existing files

This is the most game breaking error Cursor AI has right now & made me want to remove their service completely, but…

Seeing as it’s A.I. I found a work around with a prompt that will get it back on track until the Cursor devs hard code it into their claude model(s).

Paste the below prompt into the chat with your model:

"You are creating new files instead of adhearing to our already pre-exisiting project structure and files.

[YOUR MAIN FOLDER] is the main folder
[YOUR ROOT DIRECTORY] is the root directory and src is the main folder with our important files

You are editing files within a project where the existing src folder is located in the root directory of my project. Please make sure that any code edits you suggest are directed at the files within this existing src folder and do not create a new src folder. Make sure you only refer to or create files within this pre-existing src directory. Do not create or reference any directories outside the existing src structure, and verify that all file paths reference this specific directory. Thank you."

This has saved my a** multiple times now.

Hope it helps!