As a senior dev... AI actually improved the code we wrote in my last job. Mind you the codebase was in a shite position (tons of technical debt, plague-like avoidance of inline comments because "all of that knowledge is on Jira/Notion" except it wasn't; lots of legacy code, undocumented weird behaviours, everyone was doing their own coding style without regards to the rest of the codebase and so on).
With controlled AI contributions, we've managed to:
- refactor large chunks of code where the overall high level logic didn't need to change, but the underlying tooling did (e.g. lots of UI layers got rewritten from a very early attempt at a standardised MVVM approach to a well defined MVI one, we've also managed to eliminate the remaining RxJava/RxKotlin legacy flows to replace them with Coroutines)
- UI layers got refactored in no time because the AI agent was able to convert them appropriately (and even fixed a handful of UI bugs)
- a handful of core monoliths (yes I know... I hated working with them as well, but we never had the chance to properly refactor) got split up into more manageable, vertical-specific domain controllers without breaking
- the elimination of a legacy overarching component that was estimated at 6 months, got reduced to 6 weeks
- unit test coverage skyrocketed because even if the code was hand-written, an agent would provide coverage, based not just on implementation but on intention (and adoption of TDD/BDD finally started spreading).
Meanwhile code quality improved because we've had well established patterns and styles defined in the agent instructions, and even the anti-documentation "pragmatists" got shut up when they finally understood that the AI works better if there's fucking comments to explain what's going on