cd /news/large-language-models/ask-hn-formatting-guidelines-for-llm… · home topics large-language-models article
[ARTICLE · art-136166] src=news.ycombinator.com ↗ pub= topic=large-language-models verified=true sentiment=· neutral

Ask HN: Formatting Guidelines for LLM Comments

A Hacker News user asked whether any prompt or system exists to enforce consistent code-comment formatting across large language models, citing tedious manual cleanup of LLM-generated comments before committing code to production. The user noted that LLMs comment inconsistently, with some styles preferable to others, and proposed strict guidelines on what to comment and what not to comment that would work across all LLMs. The Ask HN post, submitted at news.ycombinator.com/item?id=49790384, had 1 point and 0 comments.

by read1 min views7 publishedSep 21, 2026

Does any prompt or system exist which addresses this issue?

I tend to write my code comments in a very idiosyncratic way, and LLMs either don't understand that (nor do I expect them to), or it isn't much worth explaining. I'm fine with normal LLM comments, but publishing to production means I often have to do a lot of manual clean up with comments when committing code, and that's tedious.

It would even be fine if LLMs all commented the same, but they don't. I actually like the way some LLMs comment, but others are horrendous. The inconsistency is what makes this a mess, and simply saying "no comments whatsoever" (though it works) is hardly an alternative. What I want is a clean, consistent format with strict guidelines on what, and importantly what not, to comment, that works for all LLMs.

The idea here being that I can go on my merry way coding with agents, and that going forward they'll always output perfectly understandable code which I'll never have to check again.

Is there any progress here?

Comments URL: [https://news.ycombinator.com/item?id=49790384](https://news.ycombinator.com/item?id=49790384)

Points: 1

── more in #large-language-models 4 stories · sorted by recency
── more on @hacker news 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/ask-hn-formatting-gu…] indexed:0 read:1min 2026-09-21 ·