I am trying to not sound offensive here, but given the question you're asking, I don't think we're going to join up here. I think one of us is missing something fairly fundamental, and my hunch is it is you.
The agent will already have seen enough super optimised code and read enough material about it. It will read the entire repo you're in, and understand how the code should be structured and written to work efficiently. And anything it doesn't get at first, you write about in the AGENTS.md file and tell it.
Then it works. If you can teach a human to write specialised 3d rendering code, you can distill the same teachings to an agent in text form, and it'll work.
I am supremely confident of this, and I bet that neither you nor the author of the article has bothered to try properly.