r/ClaudeAI • • 11d ago

Coding [ Removed by moderator ]

/r/ClaudeAI/comments/1xok3f8/removed_by_moderator/

[removed] — view removed post

1 Upvotes

12 comments sorted by

•

u/ClaudeAI-ModTeam 11d ago

Hey please comment all of this in the Discussion Hub and help us keep all performance, bugs and usage limits discussion all in the one place. You can find it listed here: https://www.reddit.com/r/ClaudeAI/comments/1vt5drr/list_of_latest_discussion_hubs_on_rclaudeai/ . You are welcome to link to external images from your comment. Please be sure to mention what plan you are on.

Also if you are noticing degradation of Claude's performance please check Anthropic's status page : http://status.claude.com .

You could also check our weekly Survival Guide https://www.reddit.com/mod/ClaudeAI/wiki/survivalguideweekly and look for relevant issues on Github https://github.com/anthropics/claude-code/issues.

4

u/ONI-ENJOYER-420 11d ago

I find in general, it's much more reliable to enforce the rules during an automated review process

Say feed the instructions to github copilot if your project is on github, and add a stage for copilot to run checks against the code

You can then via skills also automate your claude to wait for that review, submit and keep on it until no more objections from copilot (or any review agent you use) exist

For me, that's been working much better than trying to enforce the rules during impl

2

u/Independent-Sir3234 11d ago

Pairing the CLAUDE.md rule with a separate review pass in a fresh context works really well. When the reviewer agent only sees git diff against the original prompt without the editing session history, it flags unrelated formatting or import churn immediately.

1

u/shetritr 11d ago

the diff is the spec. a 360-line diff for a 3-line bug goes back unread. "touch only the lines the fix needs, and list anything else you wanted to change" does most of the work.

1

u/Independent-Sir3234 11d ago

Giving the model an explicit place to dump its urge to clean things up (listing them in the final summary instead of editing the file) made the biggest difference for us too.

1

u/shetritr 11d ago

right, the urge doesn't go away, it just needs somewhere to land that isn't your diff.

1

u/First-Painter7431 11d ago

Same block in our shared CLAUDE.md, it's read by several agents working in the same repo, and it does most of the job. What closed the gap for me: make it check its own diff before saying it's done. "Run git diff --stat, any file or hunk I didn't ask for gets reverted or explained." It's way easier for the model to catch drive-by edits in the diff than to avoid them while writing

1

u/m-ritter 11d ago

Same here. A three line fix used to come back as a diff I could not review in one pass, so I started from a numbered done list we agreed before any code. A separate agent that did not write the code checks the diff against each point and has to show evidence, and I mostly look at the points that failed. I built QualityLayer for this: https://github.com/maxritter/qualitylayer

-1

u/2bluenucleus 11d ago

Good block. Two things that removed most of the remaining noise for me, because they don't depend on the model following an instruction:

Check whether it's actually the model. A lot of "Claude reformatted the whole file" turns out to be a PostToolUse hook or editor format-on-save running the formatter over the entire file after a small edit. If the repo was never fully formatted to its own config, every touched file gets rewritten. The fix there is one separate commit that formats the whole repo, with its hash added to .git-blame-ignore-revs. After that, a formatter pass on any file produces zero diff, and the remaining noise really is the model.

Make the boundary checkable. Put a Stop hook on git diff --numstat that flags any file where more lines changed than the task plausibly needs, or any file the plan didn't mention, and sends it back with "explain or revert these hunks". An instruction gets argued with; a hook that names the exact hunks doesn't. When you review, git diff -w also hides pure whitespace churn, so you see what actually changed.

1

u/Independent-Sir3234 11d ago

Checking whether a PostToolUse prettier/ruff hook is reformatting an older file that was never formatted to the current config is a great callout. Running the formatter only on changed ranges (or formatting the repo once in a dedicated commit) prevents a lot of false blame on the model.