Any tips to stop composer changes things that I've not asked it to?

Does anybody have any tips on how I can stop composer/claude changing elements of my webapp without me asking it to?

Here’s an example, I have list of customers in a table on a page. At the top of that page are breadcrumbs to help the user navigate the webapp.

The table also switches to card view when viewed on a mobile.

All that was working fine.

What wasn’t working was when I edit a customer, the changes weren’t saving in the database.

So I asked in composer to fix this.

It fixed it, but removed my breadcrumbs and removed the card based layout from the customer list so the table formatting was screwed on a mobile.

Thank god for the checkpoint.

I went back and asked to fix the issue again without changing the style of the list, removing the card layout or breadcrumbs.

If fixed the problem and also changed the style of the table, including colour and buttons, removed the card layout and removed the breadcrumbs.

This happened 4 times. Each time I tried to word things differently.
Apparently, AI doesn’t understand sarcasm.

Then it eventually fixed the issue and didn’t touch anything else.

This happens quite regular, so was wondering, am I missing something here? Do I need to prompt in a certain way?

Its very frustrating and over time just wastes lots of credits.

2 Likes

I have some very strongly worded guidance in my .cursorrules files about touching things that aren’t currently being discussed - it seems primarily to be a Claude issue.

That seems to have tempered its tendency to ‘fix’ errors that aren’t related to the functionality I’m working on.

1 Like

good point, I’ll try that thanks

I have had this issue as well. Thanks for the tip, I will try it too.

1 Like

How does cursor use the .cursorrules file? Does it get read every time the AI is prompted?

Found this reddit thread which might be useful for anyone else having this kind of issue:

https://www.reddit.com/r/cursor/comments/1fu02l6/cursor_composer_works_great_for_me_but_it/

1 Like