I forbid my agents from adding any comments. I review the code and add comments manually. If I can't understand something despite having the context then I throw away the code instead of having an LLM generate comments to explain what it did. This way the code stays readable/debuggable by humans.

How do you stop LLMs from making comments? In my experience, LLMs treat requirements for code output as suggestions

If you don’t trust the code to write a decent comment, why trust it write good code?

Of course, ensuring compilation or other checks can verify some code, which it can’t do for comments. But comments still serve the same purpose as human comments.

Ask the agent to write a script to run after each changes, against the newly added code.

Use that script as a super linter.

That’s the only way I found to strictly enforce some rules, like the no comments rule, without enforcing them against my own changes or old code.

[deleted]

That seems like a really smart workflow

I wish my coworkers would adopt this.

I’m sick of reading a fucking Charles dickens novel for every fucking tiny function

[flagged]