upvote
I recall, back in the AmigaOS days, we kept the documentation inline with the code. E.g. you had your exported API function in a shared library code's .c file, with the documentation right above it sitting in a special formatted comment. Easily kept in sync (code wasn't that convoluted back then either.) Afterwards, during the build phase, the documentation (for other developers) was extracted on-the-fly. There was a fixed format/style and the documentation was compact and actually useful too.

(aka "autodocs", for those who remember the term)

reply
I simply added a documentation agent to my parallel code review skill. Automatically finds documentation drift.
reply
That could work, but there's still the chance that things could diverge if multiple people are working on a project and not everyone is as diligent as you. With LLM context windows continuously growing, agents should be able to scan the whole repository and even relevant repositories on the fly, provided they contain the truth and only what's necessary (i.e. minimal commentary).
reply