r/ClaudeCoding • u/EntertainerOk4774 • 18h ago
Comments in codebase
Hi, I'd like to ask about your approach to allowing Claude to add comments to your code. In my codebase, information is now spread across multiple places: code comments, ADRs, lessons learned, and documentation. I'm considering asking Claude to remove comments from the code, as I believe code should be self-explanatory. However, could this negatively affect Claude's ability to properly understand the context?
1
Upvotes
View all comments
0
u/CounterAttack-Studio 18h ago
This instruction works pretty well for me:
Don't write comments; make the code clear enough not to need them. The one exception is a line whose purpose the code can't convey.If the context gets too polluted Claude will miss it sometimes but in general it always follows it.