Backend code I'm fairly comfortable if the tests are good that it works correctly. It's a much more constrained environment. Obviously there can be things like performance issues that creep in or problems when it mocks too much of the environment.
Meanwhile frontend code I have to consider different browsers, screen sizes, a11y issues, and so on, which agents can certainly do but you have to be fairly explicit about it, and they don't always make the best tradeoffs.
Frontend code is probably far harder to apply this technique to.
Sweet, we could even develop a standard language(s) to lay out such specs, and write in specialised text editors that would help with debugging. Hell we could even call it ‘programming’
While you're being tongue in cheek, what you're missing is that the spec you'd be working on in some cases can be compressed to a small fraction the size of the implementation code. Alternatively, it can be written for clarity and correctness rather than performance, and then the implementation can be optimized like crazy without ever worrying about correctness.