How to avoid the crazy and repetitive problems of cursor AI?

I have already set rules for the project.
For example, I created an editing function.
At the beginning, there was always a problem of dialog flashing. I provided a solution for MD documentation separately through chatgpt, but it still couldn’t be modified correctly
And I’ve already wasted 400 advanced model iterations on this editing feature, I’m almost crashing.