This was partially done with Claude, but it needed an insane amount of prodding to not do stupid things.