Documentation is only useful for agents if the source is unavailable, and if you are trying to save on tokens and trust that the docs are accurate.
If none of that is relevant to you, or rather accuracy is your concern, it's much better just to search the source code for your answers, from how to set up the application to configuration questions to troubleshooting. Bonus points if you strip out all the comments programmatically via linting before you even let the agent view the code, to avoid possible context poisoning.
It also redirects the agents from adding enormous sloppy comments in the code - I have a linter that only allows 1 line comments with a reference to a docs folder tag `See BOB-IS-UNCLE.md`
Then you can ruthlessly prune the docs folder on PR review and regular passes when e.g. claude really wants to write a novel about the glorious intricacies of bugs it's solved.
Comments
Documentation is only useful for agents if the source is unavailable, and if you are trying to save on tokens and trust that the docs are accurate.
If none of that is relevant to you, or rather accuracy is your concern, it's much better just to search the source code for your answers, from how to set up the application to configuration questions to troubleshooting. Bonus points if you strip out all the comments programmatically via linting before you even let the agent view the code, to avoid possible context poisoning.
Code doesn't explain best practices, architectural concerns, and so on. Best combo? Docs + code.
It also redirects the agents from adding enormous sloppy comments in the code - I have a linter that only allows 1 line comments with a reference to a docs folder tag `See BOB-IS-UNCLE.md`
Then you can ruthlessly prune the docs folder on PR review and regular passes when e.g. claude really wants to write a novel about the glorious intricacies of bugs it's solved.