Live data from Hacker News

My agent.md to improve LLM-assisted code quality

fabiensanglard.net

51–60 of 200 posts

Re: My agent.md to improve LLM-assisted code quality

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

Re: My agent.md to improve LLM-assisted code quality

#54
post #47

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 on…

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.

Re: My agent.md to improve LLM-assisted code quality

#56
post #5

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.

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.

Re: My agent.md to improve LLM-assisted code quality

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

Re: My agent.md to improve LLM-assisted code quality

#58

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.

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.

Re: My agent.md to improve LLM-assisted code quality

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

Re: My agent.md to improve LLM-assisted code quality

#60
post #54
post #47

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 on…

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.

I cannot recall why the 17 is missing. Maybe was some internal specific of the projects.
Post reply on HN