A bunch of these should be enforce with linting, that way people who still hand-craft code get the same kind of feedback, e.g. Always use {}, even on a one-line "if" statement. & Keep function names short. Less than 30 characters. Then this one really is a pattern that creates a lot of churn: - Add a small, to the point, comment to explain what the block does and why . Use examples when possible. Propose ASCII drawin…
I would never tell an agent to write "what does the code do" comments. Their default comments are already way too fluffy.
My agent.md to improve LLM-assisted code quality
61–70 of 200 posts
Re: My agent.md to improve LLM-assisted code quality
#62A bunch of these should be enforce with linting, that way people who still hand-craft code get the same kind of feedback, e.g. Always use {}, even on a one-line "if" statement. & Keep function names short. Less than 30 characters. Then this one really is a pattern that creates a lot of churn: - Add a small, to the point, comment to explain what the block does and why . Use examples when possible. Propose ASCII drawin…
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.
I wish my coworkers would adopt this.
I’m sick of reading a fucking Charles dickens novel for every fucking tiny function
Re: My agent.md to improve LLM-assisted code quality
#63Earlier quoted context omitted.
My biggest pet peeve with agents is when people beg their (non-deterministic) agents to do something that a lint rule could've accomplished
Seems like 80% of agent use boils down to: grep | sed -i Which is kind of cool if you’re unaware enough to know to do it yourself. Oh, and find. Agents use find a lot.
Re: My agent.md to improve LLM-assisted code quality
#64Re: My agent.md to improve LLM-assisted code quality
#65A bunch of these should be enforce with linting, that way people who still hand-craft code get the same kind of feedback, e.g. Always use {}, even on a one-line "if" statement. & Keep function names short. Less than 30 characters. Then this one really is a pattern that creates a lot of churn: - Add a small, to the point, comment to explain what the block does and why . Use examples when possible. Propose ASCII drawin…
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.
Re: My agent.md to improve LLM-assisted code quality
#66I noticed modern frontier models (e.g., Fable/Opus/Sol) need less procedural coaching than earlier models.
Are they sure it improves code quality?
Re: My agent.md to improve LLM-assisted code quality
#67Re: My agent.md to improve LLM-assisted code quality
#68Earlier quoted context omitted.
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
Re: My agent.md to improve LLM-assisted code quality
#69A bunch of these should be enforce with linting, that way people who still hand-craft code get the same kind of feedback, e.g. Always use {}, even on a one-line "if" statement. & Keep function names short. Less than 30 characters. Then this one really is a pattern that creates a lot of churn: - Add a small, to the point, comment to explain what the block does and why . Use examples when possible. Propose ASCII drawin…
> ASCII drawings in code
Please don’t this is super obnoxious. Make proper diagrams and kee them in knowledge base. Link out to them if you need to and let the agent fetch them via MCP or API or whatever if it wants them.
Re: My agent.md to improve LLM-assisted code quality
#70Im against restricting anything related to code length this goes for function names and length, file length ect.
I rather the dots be as close as possible than trust the agent connects the dots.
I dont care if the file is 5000 lines I rather the agent reads one file and get all the context than trust it will read all the need files.
I see so many review skills that puts hard limits on these thing and it just bad.
The function name shouldn't be limited they should be as clear as possible and if for some reason it over 30 chars so be it.
I want to read the function name and the logic and it match exactly. I don't want the agent being lazy because of some limit I set.
In fact I force my agents to write long functions because I specifically tell it not to break out repeated code that doesn't actually deserve a function.
A check on a function input doesn't need to be a function. A auth guard doesn't need to be it own function.
types.go types.ts absolutely the worst file to see in any code base. Put the type next to the code that uses it.