HACKER Q&A
📣 ghosts_

How do you keep documentation up to date with AI generated code?


I've seen numbers like 75% of code at Google is AI generated, huge %s of code overall is AI generated, open source projects overwhelmed with "slop" PR requests.

It's pretty undeniable that AI code is here to stay - so on your teams / companies how are you managing staying up on PR reviews, and documentation?


  👤 ReptileMan Accepted Answer ✓
From my observations - by accumulating technical debt faster than US and EU financial combined.

If someone asks about the internals of the projects it is - you want the truth, you can't handle the truth.


👤 RetroTechie
If you want do it right:

1. Update the documentation first, to describe the desired / expected behaviour.

2. Followed by the code changes that implement the documented behaviour.

PRs: for any behaviour change, feature addition etc: patch must include corresponding documentation updates. If not: reject.

Iirc that was (still is?) OpenBSD's approach to keeping docs up-to-date.


👤 moomoo11
have an ai workflow man it’s mid 2026.

any time ai does any work, it ensures the ADRs are up to date.

it is part of the execution workflow.

maintain the todos which are a record of work that was done. ADRs have the latest current documentation.