Skip to content

Autodoc overview

Autodoc writes documentation from the code itself, so nobody has to maintain it by hand.

Autodoc documents the files you touch in TypeScript, Python, and Go. It delivers the result as a draft pull request that you review before anything merges.

  • Function and module documentation. Summary, parameters, return values, and what is raised, in the repository’s existing style.
  • The non-obvious lines, explained. Why a retry is idempotent. What a magic number means.
  • Parameter and return types. Inferred from annotations and call sites.
  • Your code is never rewritten. Only comments change. Everything that is not a comment is verified unchanged.

In development: generated repository documentation

Section titled “In development: generated repository documentation”

The next step is documentation for the whole repository, generated from the code and kept current as the code changes.

  • Everything is generated. There is no page editor and no hand-written pages to maintain. If the reason for a decision matters, it belongs in the code as a comment or in a commit message, and Autodoc picks it up from there.
  • It lives in the repository. The documentation is a folder of files, reviewed like code, with its history in git.
  • It updates with the code. When a change alters the code, the affected pages are regenerated.
  • Every statement is traceable. Pages link back to the files and lines they describe.

What it will contain:

  • an architecture map: what talks to what
  • sequence diagrams for the main flows
  • a page for each module, built from the in-code documentation and linked to each other

The planned file format is described in Documentation format.