What's hard about refactoring it? I sorta get the point you're trying to make, but codegen models generate code, but they also understand and explain code very well in plain language. I believe domain experts are smart enough to solve the problems that crop up and maintain their code with help from AI.