Trim CLAUDE.md: remove generic advice, keep project-specific content#6890
Open
knutwannheden wants to merge 2 commits intomainfrom
Open
Trim CLAUDE.md: remove generic advice, keep project-specific content#6890knutwannheden wants to merge 2 commits intomainfrom
knutwannheden wants to merge 2 commits intomainfrom
Conversation
Remove sections that restate standard Java/TypeScript conventions Claude already knows (Code Style, Best Practices, Version Control Guidelines, Error Handling, Task Management, etc.). These add context window cost every session without changing behavior. Retain all project-specific content: core architecture, build commands, project structure, AST traversal patterns, RPC test gotchas, parser extension guide, sub-module CLAUDE.md references, and conventions. Reduces file from ~240 lines to ~110 lines — roughly halving the per-session token cost while preserving all actionable, non-obvious guidance.
The RPC hang/timeout guidance is already covered with more specific detail in both rewrite-python/rewrite/CLAUDE.md (pytest --timeout) and rewrite-javascript/rewrite/CLAUDE.md (--detectOpenHandles, queue.ts). Remove the redundant generic version from the root file.
timtebeek
approved these changes
Mar 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reduces the file from ~240 lines to ~110 lines. Every line in CLAUDE.md costs context window tokens in every Claude Code session — generic advice that restates what the model already knows has real cost with no benefit.
Test plan