Can anyone provide best setup for AI tools to build within instructions? (ex. Cursor rules/prompts/IDE vs API)

Hello,

I have been using Cursor most often but finding it inconsistent with dismantling codebase recently or struggling to follow instructions.

Can anyone recommend the most optimal setup to have AI tools help build code following instructions?

Whether that be through:

-optimal cursor rules -optimal prompt inclusion -optimal IDE setup -optimal tool with API

Is there a God setup anyone would recommend to avoid some of the unwanted issues/hallucinating/unwarranted editing that occurs with AI coding tools at times?

Thank you!