Do we think that was necessary? What would have happened if OP had just asked it to rewrite and test/validate each piece as it went until everything is verified and complete?
My gut feeling is this is doing way too much, and it would've figured it out.
converting code to more abstract and denser representations and then manipulating them makes sense to me. Finding better representations is like half of mathematics.
But we know, Bun was 535496 lines for $165000.
The whole point of this experiment was to try and make the rewrite as cheap as possible.