Short answer to single go is not possible. Even a popular frameworks such Angular, Zend, Symfony, all are rewritten at some point because to improve the code quality. Software engineering is about constant improvement.
Code quality is not only about code which developers write. It is everything around code as well such as documentation, code format, maintainability, comments and so on.
I mostly concentrate on maintainability so frequent small changes do not consume hell a lot of time to achieve.