THink of this way. AI shouldn't detect WHAT/WHY to do, you should. AI should just do the HOW.
One example. Lets say you want to add caching to your application. You shouldn't let AI decide everything on the architecture. Instead, you should dictate to the AI what it should look like. Then lets AI just write the equivalent code.
An example prompt that I would do "Let's add caching functionality. Use Redis as a caching store and lets start with storing these 3 API results in cache".
This ensures that AI only does what you need it to do and not making too many decision on its own. If you let it be too loose, you are giving too much control to AI and will then slowly lose what you are building.