Pretty challenging once the codebase gets large, but also a lot of fun to take a big mess and bring it under control.
I'm asking because I have read these comments here and there about fixing the mess AI made. I know what mess it usually creates and it doesn't get better with the new models. But I also know that whatever is created by AI kind of works more often than not, and once something breaks, it's just one prompt away to fixing it.
So what I do is mostly use the AI to understand things like architecture, encapsulation, deployment pipelines, types, migration structure, etc.
It's a lot of "Audit the callers of X and give me a report" as well as reading code. I'm looking for stuff that doesn't pass my smell test, especially relating type types/interfaces. I look at the AI recommendations, but they're only useful once I've scoped them down to more granular questions, such as assessing the interfaces between specific layers of a pipeline.
That process is about understanding the shape of the solution that exists and then trying to formulate what shape it should have.
Then it's a lot of identifying a very boring, vanilla architectural target and moving towards it in phases, using the strangler fig pattern pretty aggressively. I review every PR, but mostly at the level of architecture rather than every specific line.
There's also a well documented phenomena [1] where LLMs struggle to recall information in the middle of the context.
[1] https://charlesanthonybrowne.medium.com/how-llms-end-up-igno...
Yeah over the past year I've become convinced that humans' limited working memory is actually a superpower, because it allows us to avoid this type of problem.
Previously, I'd be contracted to clean up messes from cut-rate dev shops. Now, there's plenty of opportunity for me to clean up messes from AI-driven development.