oh, gotcha. Interesting approach with .md files! I also have problems with agent getting carried away and starting to create documentation, test files, etc. mostly notice this with Claude 4.
It's just cursor's system prompt problem. they just need time to "tame" the model after release.
for now, I just make sure that in every chat thread i have "DO NOT WRITE ANY DOCUMENTATION OR TEST OR ANYTHING THAT WASN'T EXPLICITLY ASKED. STAY LEAN"
But i sort of reached the point where I don't mind claude going off the rails a bit. Like restricting it with .md and constantly updating those guardrails sounds like more of a burden than help.
its just the prompt problem. try reading the chat and every time you see it doing excessive shit stop the chat and slap it on wrist saying "never create .env i already have it, you just don't have access, etc".
also, sounds obvious, but don't forget to create new conversations often. the "ignore a files it's just created" sounds like context window overload. 200k window for a new model sounds like a crime from anthropic
You can ask cursor itself to create and update the tasks.md file.
Tell it to remove the task from the file after it's done, then do a commit. That way if it screws up at some point you can checkout the last good commit and start from there in a new chat.