Automated code documentation

Never write code documentation again.

Not because documentation doesn't matter. Because the cost of writing it never made sense.

The incentive is backwards. The author pays the cost: their time, now. The reader gets the benefit, later. So the documentation doesn't get written.

Then it rots.

Code changes and the documentation doesn't. The two drift apart, and teams learn to distrust the docs and stop reading them.

A codebase nobody has documented is hard for a new engineer. It is harder for a coding agent, which has only what is written down.

The math changed.

The cost that blocked documentation was human time. It is now near zero. An engine reads the whole function and its context and writes the documentation that was already in the author's head: what the function does, what it takes, what it returns, what it raises.

Run it again on a diff and drift stops being permanent.

From comments to a documented codebase.

In-code documentation is where it starts. Function and module documentation, in the repository's existing style, with the non-obvious lines explained. Your code is never rewritten. Only the documentation changes.

The same source can describe the whole repository. A wiki built from that documentation, an architecture map, and sequence diagrams for the main flows is in development.

What's still yours.

The judgment stays with you. Autodoc writes the mechanical part.

"Why does this exist?" is a human note.
"This function deletes expired sessions." is not.

New posts, in your inbox