Because that's impossible. Any "robot" that can generate code must be trained on massive amounts of code, most of which is open source.
And how are you supposed to guarantee equivalent functionality by analyzing "README files, API docs, and type definitions"?
And how are you supposed to guarantee equivalent functionality by analyzing "README files, API docs, and type definitions"?