> The point of a refactor is for you to think deeply about the code you are responsibility for, so you can make it better (faster, easier to work on, more tests, whatever).
I'm pretty pessimistic on AI and don't have access to good agentic workflows, but refactors are exactly the thing where it seems to me like agents could be really strong - once I've refactored something architecturally, I might have hundreds of instances of a thing that needs to be updated in a predictable way, but is complicated enough that it's going to be faster for me to manually update hundreds of instances rather than writing a generalizable find/replace tool.
Sure they’re fine at that sort of rote find/replace job as long as it’s relatively straightforward. But it only really works if you do the hard parts yourself then tell the agent to go and do the rote part. Even then I’ve had it turn to slop more often than not as the agent has to start contorting the code into weird shapes to try and finish the job. It’ll never stop and be like “hey maybe this was a bad idea, let’s try something else”. And by the time you get to review it, you’ve spent 20 bucks on something that needs to be thrown away.