130 pointsby ibobev6 hours ago28 comments
  • impulser_7 minutes ago
    I disagree with the less than 30 characters.

    Im 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.

    • ttoinou3 minutes ago
      When it's instructions for agents it's not really "hard" limits, the agents can go more or less
  • OptionOfT4 hours 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.

    • hawk_2 hours ago
      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.
      • robby_w_g22 minutes ago
        How do you stop LLMs from making comments? In my experience, LLMs treat requirements for code output as suggestions
        • 17 minutes ago
          undefined
      • lkjdsklf26 minutes ago
        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

    • figmert2 hours ago
      Right. I've really struggling to get AI to stop explaining the what. It seems to add it to the commits, PRs, code, wherever it feels like. I've put in multiple places to not write the "what", but the "why", and in multiple ways, but it still does it in one or other place.
      • jaggederest2 hours ago
        The best way I've found to solve this is using LLM as CI - use a small cheap model to inspect the diff and look for those kinds of comments. Prompt left to the observer but using `claude -p` / `codex exec` gets you a lot cleaner output usually, and makes robots fight robots instead of you constantly having to reprompt and it ignoring you.
    • throwatdem1231112 minutes ago
      Linters and static analysis -> setup as hooks in your harness. Don’t rely on CLAUDE.md because it’ll ignore it a lot.

      > 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.

    • getnormality4 hours ago
      I would never tell an agent to write "what does the code do" comments. Their default comments are already way too fluffy.
      • saghm2 hours ago
        But then you don't know about where the load bearing seams are!
      • throwatdem1231130 minutes ago
        I tell the agent to NEVER write comments in the system prompt and it ignore it like 90% of the time. RLHF is a helluva drug.
      • rustystump3 hours ago
        I added to the memory, system prompts, and the prompt itself and every soa model still litters code with the most inane useless crap. I will then get code to review from a coworker using fable/opus. It has more lines of comments then code.

        Maybe I am some god tier code reader (i am not) but i dont think i have ever found a comment in code to be useful in my day job. That isnt true, i once came across

        // submit to the dark lord

        Above the function that sent a payment to PayPal for processing. It made me laugh so I let it be.

        • danielheath2 hours ago
          Most useful code comment I have encountered read:

          “”” After you give up on trying to refactor this code, increment the following line accordingly. HOURS_WASTED_HERE=26 “””

      • 3 hours ago
        undefined
    • tyrean hour ago
      Mine says what I tell engineers:

      > Write in-code comments that describe _why_ code or a class does what it does, but not _what_ it does. The "what" should be self-evident.

    • arialdomartini2 hours ago
      Incidentally, I'm from the opposite school and consider every “if” followed by a braced block a smell. If a conditional body needs a block, it's doing enough to deserve a name, so I promote it to a single named call, à la "Extract till you drop".
    • culi2 hours ago
      My biggest pet peeve with agents is when people beg their (non-deterministic) agents to do something that a lint rule could've accomplished
      • irishcoffee2 hours ago
        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.

        • selcuka25 minutes ago
          Pi even installs ripgrep and fd if it can't find them in the path.
        • eterman hour ago
          So it turns out that a lot of these unix utilities have such bad UX that having a tool that knows how to really leverage them feels like a superpower.

          If you've ever used an LLM to deal with ffmpeg you'll know exactly what I mean.

    • 0xfeba2 hours ago
      > Propose ASCII drawings to explain complete systems.

      LLMs are very bad at ASCII drawings.

      https://medium.com/data-science/why-llms-suck-at-ascii-art-a...

    • _boffin_2 hours ago
      One thing I don’t get with a lot of these agents.md and other skills are… why not throw as much mechanical checks and other stuff at the repo to constrain as you want instead of asking a non-deterministic agent (squishy or non-squishy) to maintain it.

      With the mechanical routes, we get checks, failures, and so much more. A bit wild to me.

      Make an agent operate within defined constraints and yell at it when it doesn’t.

  • Supermanchoan hour ago
    It's interesting to read these things.

    I would describe this as 13 code writing rules (interpreted to be at least 16 - Starting with reduce code indentation) plus a commit message instruction set which I chose to ignore - because it's style-specific and not interesting to me.

    8 or 9 of these rules are not necessary. Basic CS is not something I have needed to ask agents, I use, to follow. eg Explaining that you need explicit interfaces is not a necessary instruction, nor is leveraging early return.

    Unclear instructions are of limited utility. What "Let the reader of the code breathe" or "reduce code indentation" means is subjective and will rarely be effective. Maybe the training for the language being used has gaps, which others do not. If you want to measure, ask it to output a string when it applies a rule. You'll figure out what works, what doesn't and how often, quickly.

    There's 3 or 4 style choices included.

    The rest are not something I would use, but we all get burned by different things so I get it.

  • YuechenLi4 hours ago
    Since we are sharing our AGENTS.md, I thought I'd share my own, because most of the time, this is pretty much all you need for LLMs to write good code, everything else can be added per project: ---- *Convergence rule* Every substantial task must end in exactly one of three states:

    A. Success The intended capability works in the real path and the real motivating case materially improves.

    B. Meaningful progression The capability is not complete, but one genuine blocker is removed and the next blocker is isolated with evidence.

    C. Honest stop Further work would require overbroad scope expansion, excessive debt, brittle patching, or tangled logic. Stop and report the reason with concrete evidence.

    Do not continue producing patches once the work stops converging.

    Do not confuse activity with progress. A failed attempt is only acceptable if it leaves behind a narrower problem, stronger evidence, or a justified stop.

    Any partial work must leave the codebase in a cleaner, more legible, and more diagnosable state than before. ----

    A lot of the article's AGENTS.md just feel like telling the LLM agents either something they already know (for example, most of the time they know to use exhaustive switch/match statements instead of "arrow anti-pattern") or seems actively harmful ("keep function names short" seems arbitrary and may cause the LLMs to write weird abbreviations for functions that are harder to read and review.

    • lelanthran3 hours ago
      > but one genuine blocker is removed and the next blocker is isolated with evidence.

      What's the difference between a "genuine blocker" and a "blocker"? Why is the next blocker not genuine? Does it become genuine only after isolation?

      • YuechenLi3 hours ago
        "Genuine blocker" is mostly there because otherwise LLMs may consider the smallest thing that they couldn't immediately figure out to be blockers and stop without implementing anything. The rule is there to tell the LLM if they can figure out how to resolve the blocker by themselves, they don't have to ask me to help resolve the blocker.
        • CrazyStat2 hours ago
          Today Codex decided that it could resolve the blocker by just changing the mandatory policy it was running up against into an “advisory policy.”
    • chrisweekly2 hours ago
      "honest", "real", "genuine" -- wat.
    • maccard2 hours ago
      How often would you say step C happens and the agent stops when it can’t proceed?
      • YuechenLian hour ago
        Not very often, but when it happens, usually it's time to sit down and brainstorm architecture with the LLM to figure out how to proceed next instead of looping blindly.
  • newsomix9xl3 hours ago
    A great piece.

    I esp liked:

    "- Don't touch blocks of code unrelated to the feature you implement. e.g. Don't add comments to a block of code if you did not create it or modify it. As much as possible try to minimize the number of changed lines when implementing a feature."

    The feature where you ask the LLM to fix one thing and it fixes three things.

    I kept noticing this in diffs.

    • zbentley3 minutes ago
      > As much as possible try to minimize the number of changed lines when implementing a feature

      Great way to get LLMs to start making an endless profusion of methods instead of adding parameters to or switching to a richer return type from an existing method, in my experience.

      I’m tired of seeing “get_total_rounded_up” + “get_total_float” bloat when a few changes to unrelated code to round floats to ints would keep the method API surface small.

  • vatsachakan hour ago
    What's the point of agents.md if you just use an LLM on a codebase?

    Just say, complete this bit like how the rest is...

    Even then they aren't great at it. Idk, the best case use for LLMs are extremely specific requests, for example "write an evaluator for this byte code and if you can't ask for clarification"

    The ultimate specification language is code anyways so you might as well stick a to-do, a comment describing the semantics of the function and say "okay codex fill the to-do"

    • sejjean hour ago
      I have it pull out some guidelines by doing an analysis. Then I modify the result where I disagree.

      It's much easier to follow the rules than it is to compute the rules on the fly all the time.

  • getnormality4 hours 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.
    • Sammian hour ago
      Yes, the interesting part about seeing other people's agent.md files, is getting to see what issues they have with working with agents. Seems different people run into very different issues, which probably is caused by how differently we work. So a the file probably should be personalised.
  • oumua_don174 hours ago
    Just this one line in AGENTS.md has given better results to reduce if not eliminate verbosity and grandeur.

    **Always use ASD-STE100 Simplified Technical English

    Disclaimer: I saw this listed in some other HN post that I can' locate right away.

    • mattjoyce3 hours ago
      This will produce quite verbose prose. STE100 is good for specs and explanations but it works best with a glossary or terms. will burn tokens.
    • wpasc4 hours ago
      idk who came up with it first, but ASD-STE100 has been floating around more since matt pocock put it in one of his skills
  • theturtletalks24 minutes ago
    I used to be big into agents.md files but read the latest SOTA doesn’t need them anymore. Have people still been getting value out of them?
  • meeritaan hour ago
    This approach never worked for me. Explanation here:

    - https://www.minid.net/2026/7/14/how-to-automatise-with-ai

    But in summary: the more bloated your AGENTS.md is, the worse the context consumption gets. The best approach I use is telling the agent to first think about what it needs to do, then choose which rules apply. I got 100% consistency across every area of my projects.

    In the post there's also a replica of one of projects rules I use, feel free to provide feedback: https://github.com/meerita/monorepo-nextjs-golang-rust-pytho...

    • Fuzzwahan hour ago
      Why is there no 17? :)

      Conditional logic .agents/rules/16-conditional-logic.md

      Identifiers and UUIDv7 .agents/rules/18-identifiers-and-uuidv7.md

      Thanks for sharing this approach, I'll give it a shot in my mono repo project.

      • meerita40 minutes ago
        I cannot recall why the 17 is missing. Maybe was some internal specific of the projects.
  • 8cvor6j844qw_d619 minutes ago
    Some of these are generic software engineering advice.

    I noticed modern frontier models (e.g., Fable/Opus/Sol) need less procedural coaching than earlier models.

    Are they sure it improves code quality?

  • Geee4 hours ago
    I feel like claude.md is like Asimov's laws of robotics. Whatever you write there ends up eventually messing up everything.
    • jdiff2 hours ago
      Anything that goes into the context window has that going for it. That's a huge part of why Claude's gone absolutely bonkers with genuine, brutal honesty. The system prompt's absolutely stuffed full of those keywords, so now every single output is tainted with that right from the start.
  • selcuka18 minutes ago
    The article refers to it as AGENT.md, but the standard name is AGENTS.md (plural).
  • chr15m43 minutes ago
    > Explicitly ask the harness to reload agent.md. "Reload agent.md" is enough when I see code quality dropping.

    Having the LLM re-read the file is really silly and a common bug in harnesses. Even sillier is when the harness allows a file to be compressed away during summarisation. The harness should compose the context so this doesn't happen. Files should be "added" (by LLM or human) and then always be injected into context the same way forever. "Reload this file" is not something you should ever have to type.

  • dzhar112 hours ago
    From FAB's AGENT.MD: > - Avoid magic numbers and strings by extracting recurring or meaningful values into descriptive constants (const) or enums. ---

    I've been seeing the same thing with models like GPT5.6 and Opus4.8 in GH Cop CLI. They still introduce magic numbers, and in Scala they often put an entire 10-line Spark expression inside an if condition instead of extracting it into a meaningfully named value to keep "if" readable. I wonder when common sense instructions will be baked into the models.

  • eschaton3 hours ago
    I didn’t see anything in there instructing the LLM not to generate text about goblins.
  • tomr753 hours ago
    I think this is dated. I wonder if the author has tried codex/other harnesses
  • Luker884 hours ago
    I had good results with making it add a few lines with a summary of RFC 2119/8147 keywords (SHALL/MUST...), and then using those, uppercase.

    local llm remain more in line like that.

  • FooBarWidget4 hours ago
    One tactic I’ve found helpful is multi pass quality improvement. First make it work. Then review for guidelines adherence. Loop until satisfied.
  • bellowsgulch4 hours ago
    I've read a few of these over the years, and none of them seem to be useful. I have three sentences in my custom instructions, and those are basically all useless, too.

    Even my second one, "Avoid decorative or section-header comments. Never use `----` or `====` as comment separators. Comments should explain only non-obvious behavior, rationale, constraints, or implementation details." seems to be ignored by models regularly, so I don't see the point.

    But this is in my private harness. Perhaps other harnesses have better instruction following. My custom instructions are prepended to my first user message, not set as a system message.

  • dude2507113 hours ago
    It seems like everyone goes through a detailed AGENTS.md phase.
    • esafakan hour ago
      The problem is that linting the AGENTS.md is risky work. Everything added there was in response to mistakes. If I remove some instruction I run the risk of repeating the mistake.
  • preommr2 hours ago
    Agents.md are (and probably will continue to be) an ugly band-aid.

    - new model comes out and a bunch of it becomes obsolete

    - they get flat out ignored, esp. with larger context windows. The ai just responsds with, "your'e right I shouldn't have done that"

    - they sometimes end up poisoning the reasoning because the rule gets interpreted in an unintended way.

  • latchkey2 hours ago
    this was what i was doing 3-4 months ago. i just have AI write/update my agents.md file now as i find problems. i also have ai keep a set of design documentation that it can update as it goes too. oh and he should try omp+codex/xhigh, he will probably be less annoyed.
  • acedTrex4 hours 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.

    • svachalekan hour ago
      These days that sounds like a really good idea. 6 months ago, AGENTS.md would have contained a lot of instructions that would have been embarrassing to write out for a human audience.
    • FooBarWidget4 hours ago
      No, why should I have to remember to @ in every prompt? Or ask contributors to remember. It just makes it easier to make human mistakes. I have better things to do than micromanagement. There is huge value in auto-included context.
      • anygivnthursday4 hours ago
        The GP wrote @ it from the agents.md file, not from the prompt. Their point was that instead of writing "how to contribute" instructions for agents, you could explain that in the CONTRIBUTING.md and link it from your agents file, so both humans and agents read it from one place.
        • formerly_proven3 hours ago
          Symlinks exist, but it's kind of ridiculous all harnesses just ignore CONTRIBUTING, HACKING and friends.
      • acedTrex4 hours ago
        You put the @ in the context file the LLMs all use, claudemd agentsmd whatever the thing that most harnesses force load.

        Then the model will go discover what it needs to.

  • fenestellaan hour ago
    [flagged]
  • kevinbaivan hour ago
    [flagged]
  • sohaibqasem2 hours ago
    [dead]
  • tyrean hour ago
    My most impactful section has been on voice. It's impact is that I don't go insane, which is pretty high value. (Not putting quote blocks so people can copypasta):

    ## Voice

    Rule #1: No AIisms

    Avoid the stock phrases and rhetorical tics that mark AI prose. Say the thing plainly instead. Be concise and direct.

    *Banned phrases* — never use these, or close variants:

    - "Honest" or "honestly"

    - "Exactly" or "exact, unless referencing a specific quantity or measurement

    - "You're absolutely right" / "You're right to push back" / "Great question"

    - "load-bearing", "full stop", "worth stating plainly", "worth noting"

    - "the honest answer", "to be clear", "let me be direct"

    - "it's not just X, it's Y" — and every cousin: "not X but Y", "X is not Y; it is Z", "this isn't X — it's Y"

    - "this matters because", "that reduction is useful, because", "here's the thing", "and that's the trap"

    - "in other words", "put differently", "better posed:", "the deeper point is"

    - "delve", "leverage", "harness", "unlock", "tapestry", "realm", "seamless", "robust", "holistic", "paradigm", "cutting-edge", "game-changer", "transformative", "elevate", "empower", "streamline", "landscape", "ecosystem" (unless literally software packaging)

    - "genuinely", "structurally", "fundamentally", "quietly", "meaningfully" as depth-manufacturing adverbs

    - "Ultimately," / "At the end of the day," as a closing summary

    - "serves as", "stands as", "represents", "marks a" where "is" works

    - "say the word"

    *Banned moves:*

    - The aphoristic closer. Don't end on a line engineered to sound quotable.

    - The suspense hook — "the cleanest way to think about this is this:"

    - Anticipate-and-rebut — raising an objection only to knock it down.

    - Meta-signposting — "Three caveats belong up front", "below I'll explain".

    - Reflexive hedging stacks: "almost", "tends to", "roughly", "largely", "with few exceptions".

    - Litotes as confidence: "not difficult", "not optional", "no small thing".

    - AI-humility asides about being a language model.

    - Self-ranking your own points: "most importantly", "the key insight here".

    - Em dash overuse. One per paragraph at most; a comma usually works.

    - Colon-reveals and dramatic mid-sentence pauses where "and" or "but" is the real conjunction.

    - Fragment rhythm. Not every third sentence. Like this.

    - Uniform structure — every paragraph three sentences, every sentence the same length. Vary it.

    - Mirrored clauses: "X does A; Y does B" balanced for symmetry alone.

    - Validate-then-precise: "That's correct, and we can make it precise."

    Vary the openers. Don't answer three messages in a row with the same shape.