

cites the paper the algorithm came from
Having done this, I usually put a comment referencing which step of the algorithm I’m on along with whatever the “title” of that step is (the primary action from it, like “collect flex items into flex lines” from CSS Flexbox Level 1 step 9.3.5). Sometimes, the following line of code is that entire step and is self-explanatory, but I still feel like the comment explains why that line exists by referencing the algorithm directly.

I’ll respond for the sake of argument, but to put it bluntly: there are no stupid questions, just questions phrased stupidly.
Documentation comes in many formats. There’s prose documentation split into articles and chapters, there’s video documentation, inline documentation for code, tutorials, training, and so on. Most things are documented several ways. This is because people learn things differently from each other.
To remove documentation entirely and rely on only LLMs to document removes all of the ways that people might learn and narrows it down to only one form of documentation. Even if we ignore how fallible LLMs can be, having documentation in only a single format limits learning only to those who learn effectively through that format.
In other words, relying only on LLMs for documentation discards all of the millenia of teaching strategies learned throughout the course of human history and puts it in the hands of a stochastic magic box that is incapable of recreating those strategies.