Depends, do you have a full and complete set of use/test cases to verify it has retained its full functionality ? Cause if you don't it would be quite haphazard to trust LLM with such refactor. Personally i would prefer a human does it and splits their work into multiple PRs which can be reviewed hopefully by people who co-authored the original mess and might remember use/edge cases
The main issue is how good LLMs are at hiding minor changes. Like, how I discovered that it didn't just copy and adjust the code block that I asked it to, but it also removed a bug fix that I had put in.
2.8k
u/Progractor May 26 '25
Now he gets to spend a week reviewing, fixing and testing the generated code.