I don't really think so. When writing code with AI, I feel like we're doing two different jobs at once: writing documentation and writing code. Even though they're technically two sides of the same coin, it gets really frustrating.
Besides, no matter how good our design docs are, AI just can't grasp the business context outside of what's written. Plus, AI loves to modify things using band-aid patches, making it incredibly hard to keep the code clean. The design logic often gets messy, and you ultimately lose true logical consistency.
My current workaround is to provide detailed architecture and design principles upfront, and also add comments at the top of each file to clearly define its scope. That seems to help a bit.
But my biggest headache right now is that AI struggles to adapt to the latest APIs—it actually likes to revert the new APIs I've just updated back to the older, deprecated ones.
Yes! Yes! Yes! The band-aid patches! I really hate that.
Regarding old API regression, I think that's because the LLM sees a lot more examples of deprecated APIs throughout the code, than new replacements you just introduced. You could try forcing it to immediately replace old calls to deprecated endpoints, then actually removing the definition completely, so that you reduce the number of bad examples and increase that of good examples