Discover and explore top open-source AI tools and projects—updated daily.
rlancemartinAI code assistant memory and learning system
Top 91.4% on SourcePulse
Summary
Claude Diary automates the creation and reflection of session diary entries for Claude Code, enhancing its long-term memory (CLAUDE.md). It continuously refines Claude's understanding of user preferences and workflows by learning from activity over time. This plugin targets Claude Code users seeking to improve their AI assistant's contextual awareness and learning capabilities.
How It Works
This system automates Claude Code's long-term memory updates using a three-component approach: Observations, Reflection, and Retrieval. A /diary command or pre-compact.sh hook captures session context (conversation, tools, files) to generate markdown diary entries. These entries are then analyzed by a /reflect command, which identifies recurring patterns (2+ occurrences) and synthesizes insights across categories like PR feedback, preferences, and anti-patterns. The reflection process automatically updates CLAUDE.md with concise, imperative rules, creating a dynamic, learning memory.
Quick Start & Requirements
Clone the repository (git clone https://github.com/rlancemartin/claude-diary). Install commands by copying commands/*.md to ~/.claude/commands/. Set up the pre-compact.sh hook by copying it to ~/.claude/hooks/, making it executable, and configuring it in ~/.claude/settings.json or via the /hooks command. Requires Claude Code and a bash environment.
Highlighted Details
pre-compact.sh hook or manual /diary command.CLAUDE.md is automatically updated with one-line, imperative rules./reflect command options support date ranges, projects, topics, and recent entries.Maintenance & Community The README outlines future work but provides no specific details on active maintenance, notable contributors, sponsorships, or community channels (e.g., Discord/Slack).
Licensing & Compatibility Released under the MIT License, permitting free use, modification, and sharing, ensuring compatibility with commercial and closed-source applications.
Limitations & Caveats Current implementation relies on parsing JSONL transcripts, with a future session metadata API anticipated. Planned enhancements include project-level memory, adaptive reflection triggers, and proactive memory retrieval for contextual relevance.
1 month ago
Inactive