AIs do a good job of maintaining their own code, including refactoring, increasing test coverage, ensuring documentation doesn't become stale, updating dependencies. They've been extensively trained to perform pretty much all of the functions of maintaining codebases and they do it far more diligently than most people.