364 points · by aakil · 3mo ago · 237 comments
Comment blocks are <= 7 words, function names <= 4 words. User-facing message strings should be <= 10 words. Use an active voice, no stage performances, and pick the most common word when choosing among alternatives.
Limiting the number of words is the strongest factor in cleaning up the output, IMO.
For older code I've instructed it to delete all the comments, and then I re-comment it using a new session and these guidelines, asking it to rejustify the need for every comment to itself.
I see this in docs a lot. I've been reading a lot of docs these days where it feels like the LLM is trying to hype up the person writing the docs. It's like it has no conception that the writing is meant for a 3rd party audience.
I see the full multi-paragraph comments in my codebases and get annoyed but also feel like the additional context helps improve the llm results over time because that history helps it know what's been tried and removed in the past. It's additional context for the system that improves with context.
The feature I want in the code tool itself (for me) is to adjust how verbose the comments are so I can read "just code", then "terse comments" then "full comments" then "full comments with historical context" (including fit commits and ticket references) and finally, full-on literate programming. And I'd like to switch between on the fly as I read through the code.
I think this is something we could actually produce with llms, and I feel the ability to switch between these modes would help the llm as well.
Sometimes I just need to see what's being done. Sometimes I need to know why. Sometimes I need to know what's been tried. Never always all of these things. And expecting to find this context in git comments doesn't feel right either.
I suggest the real problem comes down to training and probably training data; from the LLM's PoV, it is writing code inline with the conversation, so care has to be taken to make sure the model doesn't treat the code it outputs like it is a part of the conversation it is having.
This is the point.
// No retry was added here per AC 37b in FEATURE.MD.
// Judged on merit from computed properties during the cursor saga
// Chop 6ms due to lenience and lax-constraints vs 18ms baseline April perf measurements
Also, it reads like ass.
Claude writes comments about how things used to work, which can be useful sometimes, especially if it's a big change that requires one to genuinely consider legacy behavior, but most of the time it shouldn't be there.
Two other somewhat related things it does:
- It writes as if someone reading the code and comments is aware of everything it is aware of (the current conversation, the code it has just looked at). It's really hard to make it understand that things need to stand on their own. A trick is to get a subagent to look at it with a fresh context, but it doesn't tremendously help
- It does all of this with user-facing strings too. Claude loves to write up tooltips and other labels that leak everything to the end user. Every single concern we have, every edge case we've meticulously made our code handle, it passes on to the user, so they don't "need to worry". But no sane user would think of these things. For them, a feature is a feature. The "dynamic scheduling" button should state what dynamic scheduling does plainly, and every edge case is handled by us. The "add" button does not need a label letting the user know that they will later be able to click the "delete" button, because the user will just realize it due to our adherence to proper design. Claude fails to understand good UX for the user cannot be replaced with endless labels and explanations.
It's an uphill battle and all attempts at solving this (or the brain-dead way new Anthropic models write) usually fail to work with me.
I've also written my own package for deterministically formatting comments: https://www.npmjs.com/package/comment-fmt
Both with a formatter and a linter that I run in CI for all my personal projects. Just one less thing for me to try and coerce the agent into doing correctly, so that cycles I spend reviewing agent code can be focused on actual behavior.
The CC-5 rule specifically seems to be (just from reading through, nothing repeatable-eval based) the part that actually catches and prevents me from having to clean it up afterwards.
```
### Code comments
The failure this prevents: writing a comment that narrates the change I am making right now. That context is real, but it expires the instant the change merges — the defect it describes no longer exists, so the comment becomes a story about a problem no future reader can observe. It is a changelog entry in the wrong file, and a third copy of text already required in the commit body (3.b) and the PR description.
- *CC-1 (MUST NOT)* Write a comment describing a change, a fix, a defect, its cause, or what the code used to do. No "was/now/previously/instead of", no "this fixes", no "needed because otherwise", no "note that we no longer".
- *CC-2 (MUST)* Apply the survival test to every comment before writing it: would this still be true and useful to someone reading this file a year from now, who never saw the diff? If it only makes sense beside the diff, it is changelog — delete it and put it in the commit body.
- *CC-3 (MUST)* Default to zero comments. Declarative config — Terraform, DNS records, k8s manifests, CI YAML, Helm values — is self-describing and takes none. A resource named `dmarc-example-com` does not need a comment saying it is the DMARC record.
- *CC-4 (MAY)* Comment only when a future editor would actively break something without it: a non-obvious external constraint, a required out-of-band manual step, an invariant the surrounding code cannot show. One line. If it needs a paragraph it belongs in `plans/`, not inline.
- *CC-5 (MUST)* Before every commit, re-read the comment lines I added: `git diff --cached | grep '^+' | grep -E '#|//|/*'`. Each hit must pass CC-2 on its own. Deleting is always an acceptable outcome. "I already wrote it", "it is only one line", and "this one is genuinely useful" are not exemptions — the last one is the exact thought that precedes every violation.
- *CC-6 (MUST)* Applies to comments I edit as well as ones I add. When a change invalidates an existing comment, the default action is DELETE, not rewrite it into a new narrative.
```
Yes, I am aware that claude mostly generated this, and it can probably be better and/or more succinct.
Specifically, I like the "canary" trick that people have discussed where you add a small, innocuous rule to your CLAUDE.md like "When responding to me, start every sentence with my name." so that when Claude stops doing this, you know you've used way too much context and need to start a new session.
You know the problem; then why not address it? Does Compacting the context not help?
Intermittent nudges
I had it fix something then went and reduced one of the 3 line comments to 4 words. Then for some reason I told the bot to reload the source, it offered to make the other comments terse and did a passable job of it. Shocking!
Now how to get it to do that all the time...
Of course, you have to intuit a reasonable line length, but Claude cries if you happen to clip its wings too aggressively.
I haven't had the same problems others have but I'm also not a heavy user of it.
Claude, since Opus 5, speaks more and more like a wannabe-thought-leader pontificating on social media for engagement. Everything is a bait-then-switch, or a multi-post story format. The "engagement" that works well for social media makes actual work extremely frustrating.
My unsupported belief is that this is caused by an obnoxious number of people using previous models in an attempt to automate social media engagement, they figured out what worked, and that was fed directly back into newer model training (either by using thought traces in training, or just by continuing to scrape social media content)
My own suspicion is that LLMs are not becoming more general-purpose over time, as these companies had hoped, and ongoing development in that direction is stalling. They will likely need to move in the direction of more specialization and train LLMs for specific use-cases. However, this would also be admitting that they are not on a direct path to AGI.
I believe it is (very) unfortunately converging on the communication style that currently makes the most money as far as publicly available communication goes. Unfortunate, but not entirely unexpected.
One of the reasons that "don't do X" type of instructions work reliably is because you are telling the model "don't think of a pink elephant". There's also Anthropic's related research that shows that when you tell a model "don't do X", and it does X later for whatever reason, it starts acting more misaligned. This is because it thinks "well, I guess I am the sort of model that disobeys instructions, whatever" - this was specifically about cheating on tests, but you can imagine this happens in other contexts as well like following instructions on what kinds of text to output.
So, what you want to do is to avoid telling Claude "don't do X", and tell Claude "in your thoughts, in memories and various notes that you write, use your Claude-ese. In your output to humans, translate everything into long full sentences."
If anyone's interested, I can share my Claude Code output style that reflects this.
(Hi Adnan! Long time! (Adnan is an ex-coworker))
So I guess Anthropic wants zero mention of thoughts with Fable: they're worried about anything that remotely smells like distillation but only with Fable.
Nope, I just tried it out myself recently and... wow. In the very first conversation it started glazing me about being right to push back, having the crucial insight, and something something the load-bearing-whatever.
So yeah, I'm on the same page as you, how on earth have they not fixed it yet? Do people like it? I added a system prompt to tell it to stop doing it and it's helped a decent bit already. ChatGPT/Codex has some annoying bits of prose but it never did this, so it can't be that complicated to get rid of.
They might even have a version that writes less annoying prose, but they are being squeezed hard by OpenAI and the Chinese so unless it performed better or equal to the annoying one it’s never left the lab.
I did not see an explanation though.
The moralizing is incredibly obnoxious as well. It didn't seem so bad at first, but it instantly became intolerable the second I remembered I was paying for those tokens.
One of the comments was one guy saying “how he loved to live in Missouri and eat concrete soup” or something like that.
I was too lazy to write a similar reply and asked Claude, instead of saying no, it wrote 3 paragraphs about how I shouldn’t write about eating concrete soup and how it is dangerous to do so.
"Vomit: Clean up Claude 5's token output with a separate LLM" (github.com/zachahn)
285 points | 23 hours ago | 288 comments
"Claudish to English" (https://github.com/gvzdv/claudish-to-english)
4 points | bryan0 |10 days ago | 2 comments
You have literally no way to know that.
And your reasoning to get to this conclusion? Obscured like Claude’s thinking traces?
It's why time and time again you see people complaining on Internet forums about issues, and if you're part of a specific Internet bubble you might think that this complaining represents a general trend among the broader population and wonder how it is that no one is doing anything about this issue that you and the rest of your bubble are constantly complaining about... and the answer is mostly because the vast majority of people, who don't live in the same bubble you do, are mostly fine with how things work, but you're not going to hear them express it.
My general feeling here is that this really needs to be fixed at the model level. All other solutions are mere hacks that work for a bit but all have drawbacks. It's either adding yet more context (which has variable rates of success) or piping to a different model to translate, or using a skill, or mentioning this per each prompt, or....
At this point I think it's in Opus's nature to talk like this, and given enough back-and-forth it will start to drift back to its classic mode, aka this incomprehensible "load-bearing seam" babble.
Let me ground my answer so I'm not just guessing. The blast radius of this change is significant and requires careful surgery to get right.
It's clear now and there's two options going forward: A. Use this tool OP suggested B. Rewrite the Internet from the ground up without this clear contradiction in place - 3-5 days
I recommend B and started 3 subagents to read all the code before I get started. I'll wait for them to finish.
(A model that can run reasonably well in a ~24GB MacBook.)
So for the parent's Macbook question `gemma4-26b-mlx` should work well.
For you with 24 GB VRAM, `gemma4-26b-a4b`. I tried higher VRAM models and they slowed down while still doing just as well or slightly worse.
If someone else tests and finds a better performing model though, please update me here, I'd love to try it.
It was mentioned that ChatGPT (still) has some similar quirks too. What are they? Maybe I actually shouldn't look out for them, so that the freshness of ChatGPT will not be lost.
As much as Claude's style frustrates me I can't say I'm willing to pay for double the tokens to fix it.
I have grown tired of Codex/GPT's writing style, too, but it's not nearly as bad. It's terse and factual by default. Even better if you use the "simple english" skill.
I actually found that GLM 5.x is the best in terms of editing documentation. It's still best to write things by hand to give your own organic voice, though. And not insult your readers.
It’s interesting to watch, I don’t think it’s rational - just hype-driven herd behavior, the desire to pick one and stick with it, things like that. It’s similar to the kind of dominance Apple has, which most of the time has to do with style more than substance.
I put it at the top of CLAUDE.md. I wonder if I put at a 8th grade level, it would be less of a cognitive load.
All my agents use debuzz now
ex:
* Currently trying to make sure open models are regulated out of existence.
* More concerned about preventing distillation than providing actual value.
Someone made a Claude version of her skills:
here is the line i use: use technical language to spell things out, and keep it free of jargon and project shorthand
Haven't tried, because I have just been using 4.6 since 5 was released.
Claude will eventually ignore it just as any other style like "Technical".
Should be pretty difficult to ignore
Better just clean stuff up afterward with a dedicated agent.
why do you choose gemini? imo this is a fundamental problem of all frontier ai models.
I prefer this since everyone has their own preference for how the output should sound and it's very simple and transparent. And you can easily ask follow-ups.
It can be via tmux, or herdr, because it can read the pane.
Or it can use a hook to read the conversation file. I call it `backseat-driver`
I sometimes use it as a proxy when fable genuinely does a good job, but is too difficult to understand.
I let the translator know it's role and anything I say it should forward with better context.
I don't swear at it anymore, but I'd often say "just do it, retard", and the translator would actually steer it in a useful manner.
> The last one guesses its own refusals, marking the door open before we walked around it. Say the word and I'll do the joinery
Like WTF are you even talking about
Excuse me? Those tokens are expensive, fuck you very much for wasting them.
Avoid the stock LLM register.
Sigh.Also, Westworld? These violent delights have violent ends? Perhaps there's a tinge of Pascal's wager to it, but I prefer to be courteous to the rapidly improving synthetic intelligences.
I've been saying this since probably a year, that the entire Claude product: from the sign-up, the payment, the UX, the UI, the harness, the intelligence itself, the output, the "flavor" ..is just so mid that all the hype posted on HN about Claude must have been paid PR or a case of the emperor with no clothes.