Everyone says documenting code is important yet no one seems to want to take the time to write such documentation. My question is wouldn't it be possible to just let a LLM keep reading your repo and generate the necessary documentation? People already use LLMs to code and are trying to make LLMs work as full developers. If we expect them to work as independent developers in the near future, can't we get them to at least write useful documentation first?
I'd break things down into two broad kind of documentation:<p>1. Comments on code<p>2. User-facing manuals<p>There's no need for an LLM to write the former. Comments are left by a person to explain decisions when they're no longer present. LLMs don't go away. You can always ask the LLM why the code was written that way.<p>As for users... they famously don't read. UX designers take that into account, and try to make their interfaces self-documenting. A user who can't figure it out from the design in front of them probably won't find the right part of the manual to read, either. They'd rather dive in than read cover-to-cover.<p>The "for dummies" books seem to sell well. I wonder if you could get an LLM to write those.
This is the first thing I do when using LLM's to create code. So we can and I do have LLMs writing documentation.<p>In my domain IIoT, I even created a yaml structure to make this easy. <a href="https://unsframework.com" rel="nofollow">https://unsframework.com</a> (wip)
Good documentation is no different than good software architecture. Neither are challenging yet most people in the work force cannot do either effectively, because these things require extensive practice making original organizational decisions. Practice isn’t something that can be wished away by some ineffective hallucination tool.<p>If you think that lack of experience can be replaced by AI then good luck. Microsoft has very recently lost all faith in AI to do any of this for reason.