Hacker News new | ask | show | jobs
by solenoid0937 27 days ago
The other big problem with LLM documentation is that it tends to drift from the code, because agents forget to update it. Then later agents sometimes reference the documentation, sometimes reference the code, and get confused.

For agent written code I now default to no documentation and explanatory function signatures, it works better for me at least.

2 comments

Humans also tend to forget to update documentation and the same confusion happens. I don't think it's really a new problem.
I agree, I think for agents though, documentation does more harm than good. When I'm writing code with an agent I tell it to skip documentation entirely (reading or writing it) and it leads to more accurate outcomes.

When agents write most of our code, I question if we will still even need documentation.

I think that's a fair take. I think we definitely still need specs that describe the desired behavior as an artifact. But documentation describing the implementation definitely feels less important.
I just have a rule in AGENTS.md that any additions, removals or modifications to the public facing APIs should update the corresponding API documentation, works fine for me (assuming both sit in the single workspace).