In this paper, it is recommended that one document the following:module structuremodule interfacesIf I'm writing detailed module structures and interfaces in a standalone document, aren't I repeating work that is also done with object declaration statements, unit tests, and  docstrings?If so, and if this is bad repetition in the DRY sense of the term, how do professional programmers avoid this kind of repetition?Automatically generate tests/docstrings/code from documentation?Automatically generate documentation from tests/docstrings/code?Rely on the code as documentation and don't duplicate in the first place?Suck it up, Nancy! It's called work for a reason.
How do I follow DRY when documenting module structure and interfaces?
documentation;documentation generation
Automatically generate documentation from tests/docstrings/codeCorrect.Find a tool that fits your language and creates documentation from comments embedded in the code.