-
Notifications
You must be signed in to change notification settings - Fork 32
feat: add memory system and repomix analysis for Claude Code #360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat: add memory system and repomix analysis for Claude Code #360
Conversation
This comment has been minimized.
This comment has been minimized.
This adds a comprehensive memory system to improve Claude Code's context efficiency: - Memory system with loadable context files (.claude/context/) - 7 repomix views optimized for different tasks (backend, frontend, security, architecture) - Repomix usage guide and configuration (.claude/repomix-guide.md, .repomixignore) - Implementation plans for memory system and CLAUDE.md optimization - Heatmap visualization showing codebase density Benefits: - Reduced token usage by loading only relevant context - Faster responses with targeted context files - Better alignment with task-specific needs - Visual codebase complexity insights 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
6402cd2 to
2e201e4
Compare
Claude Code ReviewSummaryThis PR introduces a comprehensive memory system and repomix analysis framework to dramatically improve Claude Code's context efficiency. The implementation is architecturally sound and provides substantial value through:
Overall Assessment: ✅ Approved with minor recommendations The memory system is a significant quality-of-life improvement that reduces token usage, improves response accuracy, and provides on-demand context loading. However, the 20MB repository impact from XML files and lack of testing warrant attention. Issues by Severity🔵 Minor Issues1. Repository Size Impact (20MB added)Location: Issue: Adding 20MB of XML files to the repository significantly increases clone time and storage requirements:
Recommendation:
Trade-off: Keeping files in repo provides immediate availability vs. storage overhead. 2. Exposed GitHub Secrets References (False Positive)Location: XML files contain GitHub Actions workflow definitions Finding: Status: ✅ Not a security issue - These are template references, not leaked credentials. Recommendation: None required (this is expected and safe). 3. Missing Test Coverage DocumentationLocation: Context files and patterns Issue: While the context files mention testing in checklists, there's no dedicated guidance on:
Recommendation: Consider adding 4. CLAUDE.md Not Fully OptimizedLocation: Issue: The optimization plan (
Recommendation:
5. Repomix View Documentation DiscrepancyLocation: Issue: The repomix guide lists file sizes that don't match the actual analysis:
Recommendation: Update guide with actual file sizes or use size ranges. 6. Missing Validation/TestingIssue: No automated tests validate that:
Recommendation: Add CI check in follow-up: - name: Validate Memory System
run: |
# Check file references
grep -o '\.claude/[^)]*' CLAUDE.md | xargs -I {} test -f {}
# Validate XML syntax
find repomix-analysis -name '*.xml' -exec xmllint --noout {} \;Positive Highlights🌟 Excellent Architecture
🌟 High-Quality Documentation
🌟 Practical Usage Examples
🌟 Security-Conscious
🌟 Immediate Value
RecommendationsPriority 1: Consider Storage StrategyAction: Decide on repository size trade-off
Why: 20MB is significant but not catastrophic. Document the decision. Priority 2: Execute CLAUDE.md Optimization (Optional)Action: Follow steps in
Why: Plan exists but wasn't fully executed. Either complete it or document deferral. Priority 3: Add CI Validation (Follow-up)Action: Add GitHub Actions workflow to validate:
Why: Prevents documentation drift as codebase evolves. Priority 4: Testing Patterns Context (Follow-up)Action: Create
Final Verdict✅ APPROVED - This PR delivers significant value with excellent architecture and documentation quality. The minor issues are non-blocking and can be addressed in follow-up PRs. Merge Confidence: High Suggested Merge Strategy: Squash and merge with commit message: Reviewed By: Claude Code (Sonnet 4.5) |
|
|
||
| | Memory Type | Location | Use When | Example Prompt | | ||
| |-------------|----------|----------|----------------| | ||
| | **Context Files** | `.claude/context/` | Working in specific area of codebase | "Claude, load backend-development context and help me add an endpoint" | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this buy over having components/backend/AGENTS.md and/or components/backend/README.md?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no problem with both for now. I want to see about making context a "proper noun" within the ambient system, meaning bubble it up to a top level concern for users. Where we put/read the actual context is I think should be your team's choice.
Here are factors I had in mind while thinking it up.
- need to support files not tracked in git
- I like the concept of this being equivalent to notebookLM (throw all kinds of stuff in a pile).
- A well-known location means the LLM has to do less work/searching. This is a critical thing to do, as often as possible only give it precisely what it needs.
If / when best practices/standards emerge, even loose ones, we should try to adapt. The symlink agents.claude is agood example. anthropic could fix that in a second if they wanted
Yes...do we really need pregenerated repomix files here? Is that a thing people do in general? I don't understand why one would do it versus having an agentic system use tools to load things on demand. |
|
idk why i cant respond to the last comment but no, we dont.ill clean that up. |
Summary
This PR introduces a comprehensive memory system and repomix analysis framework to dramatically improve Claude Code's context efficiency and developer experience.
What's New
Memory System (
.claude/context/,.claude/patterns/)Repomix Analysis (
repomix-analysis/)01-full-context.xml- Complete codebase view02-production-optimized.xml- Security-focused analysis03-architecture-only.xml- High-level architecture04-backend-focused.xml- Backend development context05-frontend-focused.xml- Frontend development context06-ultra-compressed.xml- Minimal tokens, maximum info07-metadata-rich.xml- Comprehensive metadataDocumentation
.repomixignoreconfiguration for targeted analysis.claude/repomix-guide.mdfor quick referenceBenefits
✅ Reduced token usage - Load only relevant context for each task
✅ Faster responses - Smaller context windows = quicker processing
✅ Better accuracy - Targeted context improves relevance
✅ Visual insights - Heatmap reveals complexity hotspots
✅ Developer efficiency - Quick access to task-specific knowledge
Files Changed
.repomixignore- Repomix exclusion patternsdocs/implementation-plans/- Design documentationrepomix-analysis/- 7 XML views + heatmap + reportUsage Example
Test Plan
🤖 Generated with Claude Code