My agent.md to improve LLM-assisted code quality

(fabiensanglard.net)

10 points | by ibobev 2 hours ago

3 comments

  • OptionOfT 8 minutes ago
    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 drawings to explain complete systems.

    The what _is_ the code.

    • getnormality 7 minutes ago
      I would never tell an agent to write "what does the code do" comments. Their default comments are already way too fluffy.
  • getnormality 9 minutes ago
    This is a problem that people mostly have to solve themselves. Like, I've been working with Claude for almost a year now and I have never once seen it write "Arrow Anti-Pattern" code. That, and much of the rest, would be fluff in my projects. Agent instructions are best learned from experience project-by-project.
  • acedTrex 5 minutes ago
    Agents.md is such a ridiculous concept, just write good contributing docs and then optionally @ the file in whatever agetn file you use.

    That way everyone benefits.