OP here, the only way out is through. needless to say, claude and gemini did most of the work here, i just assisted.
sidenote, claude is mega reluctant to any reverse engineering. i had to do the initial - shitty - job with uncensored qwen, and claude was much more ok fixing that than starting from scratch.