Comment by atemerev
By practice. It requires some skill too, to constantly remove slop and keep the project from deteriorating. Usually by suggesting good architecture, asking for tests, and rewriting / cleaning up some bad code endlessly. Still much faster than manual development.
But how exactly !