-
Notifications
You must be signed in to change notification settings - Fork 32
feat: implement memory system for better Claude Code context #359
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
feat: implement memory system for better Claude Code context #359
Conversation
Adds a structured memory system to provide targeted, loadable context:
**Components implemented:**
1. Context Files (.claude/context/)
- backend-development.md - Go backend, K8s integration patterns
- frontend-development.md - NextJS, Shadcn UI, React Query patterns
- security-standards.md - Auth, RBAC, token handling
2. ADR Infrastructure (docs/adr/)
- Template and README for creating ADRs
- 5 critical ADRs documenting architectural decisions:
* 0001-kubernetes-native-architecture.md
* 0002-user-token-authentication.md
* 0003-multi-repo-support.md
* 0004-go-backend-python-runner.md
* 0005-nextjs-shadcn-react-query.md
3. Repomix Usage Guide (.claude/repomix-guide.md)
- When to use each of the 7 existing repomix views
- Example prompts for different scenarios
4. Decision Log (docs/decisions.md)
- Chronological record of major decisions
- Links to ADRs, code, and context files
5. Pattern Catalog (.claude/patterns/)
- error-handling.md - Consistent error patterns
- k8s-client-usage.md - User token vs service account
- react-query-usage.md - Data fetching patterns
**CLAUDE.md updated** with Memory System section providing quick
reference to all memory files and example usage prompts.
**Value:** Enables targeted context loading instead of relying solely
on comprehensive CLAUDE.md, improving response accuracy for specialized
tasks while keeping main docs focused on universal rules.
Resolves ambient-code#357
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Claude Code ReviewSummaryThis PR implements a well-structured memory system for Claude Code, providing targeted, loadable context through organized documentation files. The implementation is comprehensive, well-organized, and adds significant value to the developer experience. The documentation is clear, consistent, and follows established patterns. Overall Assessment: ✅ APPROVED - High-quality documentation work with minor suggestions for improvement. Issues by Severity🟡 Major Issues1. Line Number References May Become Stale
2. Missing Validation in Repomix Guide
🔵 Minor Issues3. Date Inconsistencies in Context Files
4. ADR Dates Don't Match Git History
5. Template Formatting in decisions.md
6. Missing Cross-References
Positive HighlightsExcellent Architecture:
Comprehensive Coverage:
High Documentation Quality:
Practical Value:
Excellent Integration:
RecommendationsPriority 1 (Address before merge):
Priority 2 (Nice to have):
Future Enhancements:
Maintenance Plan:
Testing Validation✅ All 16 files created successfully ConclusionThis is excellent documentation work that significantly improves the developer experience. The memory system is well-designed, comprehensive, and practical. The only significant issue is the use of specific line numbers that will become stale - recommend replacing with function-level references before merge. Recommendation: APPROVE with minor changes requested (line number references). Review completed by Claude Code on 2024-11-22 |
…-code#359) ## Summary Implements a structured memory system to provide targeted, loadable context instead of relying solely on the comprehensive CLAUDE.md file. ## Components Implemented ### 1. Context Files (`.claude/context/`) - `backend-development.md` - Go backend, K8s integration patterns - `frontend-development.md` - NextJS, Shadcn UI, React Query patterns - `security-standards.md` - Auth, RBAC, token handling ### 2. ADR Infrastructure (`docs/adr/`) - Template and README for creating ADRs - 5 critical ADRs documenting architectural decisions: * `0001-kubernetes-native-architecture.md` * `0002-user-token-authentication.md` * `0003-multi-repo-support.md` * `0004-go-backend-python-runner.md` * `0005-nextjs-shadcn-react-query.md` ### 3. Repomix Usage Guide (`.claude/repomix-guide.md`) - When to use each of the 7 existing repomix views - Example prompts for different scenarios - Best practices for combining views with context files ### 4. Decision Log (`docs/decisions.md`) - Chronological record of major decisions - Links to ADRs, code, and context files - Template for future entries ### 5. Pattern Catalog (`.claude/patterns/`) - `error-handling.md` - Consistent error patterns (backend, operator, runner) - `k8s-client-usage.md` - User token vs service account patterns - `react-query-usage.md` - Data fetching patterns (queries, mutations, caching) ### 6. CLAUDE.md Updated - Added Memory System section with quick reference table - Example usage prompts for loading context ## Value Proposition - **Targeted context loading**: Load only relevant context for specific tasks - **Reduced context bloat**: Keep main CLAUDE.md focused on universal rules - **Better decision traceability**: Document WHY decisions were made, not just WHAT - **Faster onboarding**: New Claude sessions understand context quickly - **Pattern reuse**: Codified best practices reduce reinventing the wheel ## Example Usage ``` "Claude, load the backend-development context file and the backend-focused repomix view (04), then help me add a new endpoint for listing RFE workflows in a project." ``` ``` "Claude, reference the security-standards context file and review this PR for token handling issues." ``` ``` "Claude, check ADR-0002 (User Token Authentication) and explain why we use user tokens instead of service accounts for API operations." ``` ## Testing - [x] All 16 files created successfully - [x] CLAUDE.md updated with Memory System section - [x] Markdownlint run on all new files (auto-fixed formatting) - [x] Git hooks validated (branch protection working correctly) ## Acceptance Criteria (from issue ambient-code#357) - [x] All files created per implementation plan - [x] CLAUDE.md updated with memory system section - [x] Claude can successfully reference memory files in new session - [x] Example prompts tested and verified working Closes ambient-code#357 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
Summary
Implements a structured memory system to provide targeted, loadable context instead of relying solely on the comprehensive CLAUDE.md file.
Components Implemented
1. Context Files (
.claude/context/)backend-development.md- Go backend, K8s integration patternsfrontend-development.md- NextJS, Shadcn UI, React Query patternssecurity-standards.md- Auth, RBAC, token handling2. ADR Infrastructure (
docs/adr/)0001-kubernetes-native-architecture.md0002-user-token-authentication.md0003-multi-repo-support.md0004-go-backend-python-runner.md0005-nextjs-shadcn-react-query.md3. Repomix Usage Guide (
.claude/repomix-guide.md)4. Decision Log (
docs/decisions.md)5. Pattern Catalog (
.claude/patterns/)error-handling.md- Consistent error patterns (backend, operator, runner)k8s-client-usage.md- User token vs service account patternsreact-query-usage.md- Data fetching patterns (queries, mutations, caching)6. CLAUDE.md Updated
Value Proposition
Example Usage
Testing
Acceptance Criteria (from issue #357)
Closes #357
🤖 Generated with Claude Code