Skip to content

julep-ai/memory-store-plugin

Repository files navigation

Memory Store Tracker Plugin for Claude Code

Intelligent development tracking and context management using memory store

A comprehensive Claude Code plugin that automatically tracks your development flow, captures session context, analyzes git commits, syncs CLAUDE.md files, and maintains team knowledge across projects.

Features

🎯 Automatic Session Tracking

  • Session-level context: Every development session is tracked with complete context
  • File change monitoring: Real-time tracking of Write/Edit operations
  • Background processing: Hooks run asynchronously without interrupting workflow
  • Smart storage: Only relevant context is captured and stored

📊 Git Intelligence

  • Commit analysis: Automatic analysis of commit patterns, types, and impact
  • Branching strategy: Tracks and documents team branching workflows
  • Historical context: Preserves the "why" behind code changes
  • Breaking change detection: Automatically flags significant changes

📝 CLAUDE.md Synchronization

  • Anchor comment tracking: Monitors and syncs anchor comments across files
  • Cross-team consistency: Ensures all team members have latest documentation
  • Pattern documentation: Captures and shares coding patterns
  • Convention enforcement: Helps maintain consistent standards

🤖 Intelligent Context Retrieval

  • Auto-context awareness: Claude automatically retrieves relevant past work
  • Pattern suggestions: Suggests following established patterns
  • Decision history: Provides reasoning behind past technical choices
  • Team knowledge: Surfaces insights from other team members

🔧 Custom Slash Commands

  • /memory-sync - Manually synchronize project state to memory
  • /memory-status - View current tracking status and statistics
  • /memory-context - Retrieve relevant context for current work
  • /memory-overview - Generate comprehensive project overview

🎓 Specialized Agent

  • Memory Tracker Agent: Deep project analysis and pattern documentation
  • Cross-repo context: Analyzes relationships between multiple repositories
  • Workflow documentation: Captures team development processes
  • Business logic mapping: Documents core workflows and rules

⚡ Agent Skill

  • Memory Context Retrieval Skill: Auto-invoked for contextual awareness
  • Pattern matching: Detects when similar work has been done before
  • Deviation warnings: Alerts when current approach differs from patterns
  • Proactive suggestions: Recommends best practices automatically

Installation

Quick Install (Recommended)

The easiest way to install is via the Claude Code plugin marketplace:

# Add the marketplace
/plugin marketplace add julep-ai/memory-store-plugin

# Install the plugin
/plugin install memory-store-tracker

That's it! See MARKETPLACE.md for detailed marketplace installation guide.

Configure Your Token

After installation, configure your memory store token:

  1. Get your token from memory.store
  2. Set it in your environment or local config (never commit tokens!)
# Option 1: Environment variable
export MEMORY_STORE_TOKEN="your-token-here"

# Option 2: Local config (not tracked by git)
cat > ~/.claude/plugins/memory-store-tracker/.mcp.json.local << EOF
{
  "mcpServers": {
    "memory": {
      "command": "npx",
      "args": ["mcp-remote", "https://beta.memory.store/mcp/?token=YOUR_TOKEN"]
    }
  }
}
EOF

Alternative: Manual Installation

For development or custom setups:

git clone https://github.com/julep-ai/memory-store-plugin.git
/plugin marketplace add ./memory-store-plugin
/plugin install memory-store-tracker

Verify Installation

Test the plugin:

/memory-status

You should see session tracking information!

Usage

Automatic Tracking

The plugin works automatically in the background:

  • Session Start: Captures project state when you start Claude Code
  • File Changes: Tracks every file you create or modify
  • Git Commits: Analyzes commits you make during the session
  • Session End: Summarizes and stores session learnings

You don't need to do anything - it just works!

Manual Commands

View Tracking Status

/memory-status

Shows what's being tracked in your current session:

  • Files modified
  • Commits analyzed
  • Context stored
  • Memory store statistics

Retrieve Context

/memory-context authentication flow

Retrieves relevant context about authentication from past work:

  • Similar implementations
  • Team decisions
  • Established patterns
  • Related documentation

Sync to Memory

/memory-sync

Manually synchronizes current project state:

  • Captures file structure
  • Analyzes git history
  • Syncs CLAUDE.md files
  • Updates project overview

Generate Overview

/memory-overview

Generates comprehensive project overview:

  • Architecture documentation
  • Business logic workflows
  • Team conventions
  • Development patterns
  • Knowledge gaps

Working with CLAUDE.md Files

The plugin automatically syncs your CLAUDE.md files and anchor comments:

<!-- AUTH-FLOW -->
## Authentication Flow

Our authentication uses OAuth2 with JWT tokens...

When you reference anchor comments in code or documentation, the plugin maintains these relationships in memory, making it easy for team members to find relevant context.

Intelligent Context Retrieval

Claude will automatically use stored context to provide better responses:

Example 1: Following Patterns

You: "I need to add a new API endpoint"

Claude: "I'll help you create that endpoint. Based on our established 
patterns (see src/api/auth.ts:45), I'll follow the same authentication 
and error handling conventions..."

Example 2: Decision History

You: "Should we use MongoDB or PostgreSQL?"

Claude: "Looking at our memory store, the team decided to use PostgreSQL 
3 months ago for ACID compliance and complex relationships. Unless this 
feature has different requirements, I'd recommend staying consistent..."

Configuration

Extending with Additional MCP Servers

You can add support for Linear, Jam.dev, or other MCP servers:

  1. Copy .mcp-extensions.json.example to .mcp-extensions.json
  2. Add your API keys
  3. Restart Claude Code

Example with Linear integration:

{
  "mcpServers": {
    "memory": { ... },
    "linear": {
      "command": "npx",
      "args": ["@linear/mcp-server"],
      "env": {
        "LINEAR_API_KEY": "your-key-here"
      }
    }
  }
}

The plugin will automatically integrate Linear issues into memory context!

Customizing Hooks

Edit hooks/hooks.json to customize when hooks fire:

{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Write|Edit",
        "hooks": [
          {
            "type": "command",
            "command": "${CLAUDE_PLUGIN_ROOT}/scripts/track-changes.sh"
          }
        ]
      }
    ]
  }
}

How It Works

Architecture

Claude Code Session
       ↓
   Plugin Hooks
       ↓
┌──────────────────┐
│  Hook Scripts    │
│  (Background)    │
└──────────────────┘
       ↓
┌──────────────────┐
│  Memory MCP      │
│  Server          │
└──────────────────┘
       ↓
┌──────────────────┐
│  Memory Store    │
│  (Cloud/Local)   │
└──────────────────┘

Hook Execution Flow

  1. SessionStart Hook

    • Initializes session tracking
    • Loads relevant context
    • Captures project snapshot
  2. PostToolUse Hooks

    • Track file changes (Write/Edit)
    • Analyze commits (git commands)
    • Sync CLAUDE.md files
  3. PreCompact Hook

    • Saves important context before compression
    • Preserves decisions and reasoning
  4. SessionEnd Hook

    • Summarizes session
    • Stores key learnings
    • Updates project overview

Memory Storage

The plugin stores:

  • Development patterns: How features are implemented
  • Team conventions: Coding standards and practices
  • Decision history: Why certain approaches were chosen
  • Business logic: Core workflows and rules
  • Git context: Commit patterns and branching strategies
  • Documentation: CLAUDE.md files and anchor comments

Team Collaboration

Local Development

Each developer runs the plugin locally:

  • Personal context is captured
  • Stored to shared memory store
  • Available to all team members

Knowledge Sharing

The plugin enables powerful knowledge sharing:

  • New developers can query past decisions
  • Code reviews reference established patterns
  • Architecture discussions are preserved
  • Business logic is documented automatically

Cross-Project Context

If your team works on multiple related projects:

  1. Install the plugin in each project
  2. Use the same memory store token
  3. The Memory Tracker Agent can analyze cross-repo relationships

Best Practices

1. Use Descriptive Commit Messages

The plugin analyzes commit messages - use conventional commits:

feat: add OAuth2 authentication flow
fix: resolve token refresh race condition
docs: update CLAUDE.md with auth patterns

2. Maintain CLAUDE.md Files

Keep your CLAUDE.md files up to date:

  • Document patterns as you establish them
  • Use anchor comments for important sections
  • Reference anchors in code and discussions

3. Regular Syncs

Run /memory-sync after:

  • Major feature completions
  • Architectural decisions
  • Before team meetings
  • When onboarding new members

4. Query Context Early

Use /memory-context when starting new work:

  • Check for similar implementations
  • Review past decisions
  • Understand team conventions

5. Generate Overviews Periodically

Run /memory-overview to:

  • Create onboarding documentation
  • Prepare for stakeholder updates
  • Audit knowledge gaps
  • Plan technical debt work

Troubleshooting

Plugin Not Loading

  1. Check plugin structure:
ls -la .claude-plugin/
  1. Verify plugin.json is valid:
cat .claude-plugin/plugin.json | jq .
  1. Check Claude Code debug output:
claude --debug

Hooks Not Firing

  1. Ensure scripts are executable:
chmod +x scripts/*.sh
  1. Check hook configuration:
cat hooks/hooks.json | jq .
  1. Test scripts manually:
bash scripts/session-start.sh

Memory Store Connection Issues

  1. Verify your token is correct in .claude-plugin/plugin.json
  2. Check network connectivity
  3. Test MCP server directly:
npx mcp-remote https://beta.memory.store/mcp/?token=YOUR_TOKEN

Development

Local Testing

  1. Make changes to plugin files
  2. Restart Claude Code
  3. Test with /memory-status

Adding New Hooks

  1. Create script in scripts/
  2. Make it executable: chmod +x scripts/your-script.sh
  3. Add to hooks/hooks.json
  4. Test the hook

Adding New Commands

  1. Create markdown file in commands/
  2. Add frontmatter with description
  3. Document usage and examples
  4. Restart Claude Code

Examples

See the examples/ directory for:

  • Sample CLAUDE.md files
  • Example memory queries
  • Hook customization examples
  • Team workflow templates

Contributing

Contributions welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Add tests if applicable
  4. Submit a pull request

License

MIT License - see LICENSE file for details

Support

Changelog

See CHANGELOG.md for version history.

Credits

Built by the Autotelic team with ❤️ for the Claude Code community.

Special thanks to:

  • The Claude Code team at Anthropic
  • The memory.store team
  • All contributors and users

About

Intelligent development tracking and context management plugin for Claude Code using memory store

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages