But software isn't like traditional academia. It might have grown from it but most advances aren't really published in the traditional sense, you've got blogposts, presentations and source code instead.
This would be like teaching cooking without looking at any recipes, just from physics and first principles. Or learning music without looking at the sheet music / listening to any existing songs, just generic musical theory and chords. I don't think humans can do it "zero-shot" either...
I don't see how this disproves my point. There's a vast divide between "theoretical" and "applied" software engineering. You don't usually see Google engineers publish their search optimisations in journals. And similarly, you don't see university professors making commercial libraries from their articles' ideas. This isn't the case in every field but in software, it very much is.
And this implies that training on the "theoretical" side of things doesn't give you much insight on the "practical" side. Stuff like cyclomatic complexity, UML diagrams and all that stuff might be well-represented in literature but way less so in real software, so training on the literature will produce completely different software than training on production software code.
Just skip the source code. Consider it an easier challenge than reinventing relativity from 19th century physics.