Skip to content

/update-memory

Update project contextual memory and documentation systematically.

Overview

The /update-memory command helps maintain and evolve your project's distributed memory system. It ensures that important context, decisions, and knowledge are preserved in CLAUDE.md files throughout your codebase.

This command was recovered from Orchestre v4 and enhanced in v5.3.0 to work seamlessly with the distributed memory architecture.

Usage

/update-memory [context]

Parameters

  • context (optional): Specific context or reason for the memory update
    • Examples: "api redesign", "performance optimizations", "bug fixes", "feature completion"
    • Default: "recent changes"

Examples

Basic Memory Update

/update-memory

Updates memory files based on recent changes and activities in the project.

Feature-Specific Update

/update-memory "authentication system implementation"

Updates memory with specific focus on the authentication system work.

Architecture Decision Update

/update-memory "switched from REST to GraphQL"

Documents architectural changes and their rationale in the memory system.

Workflow Integration

The /update-memory command:

  1. Discovers Existing Memory

    • Scans for all CLAUDE.md files in the project
    • Analyzes current memory structure
    • Identifies gaps in documentation
  2. Analyzes Recent Changes

    • Reviews completed tasks
    • Examines code modifications
    • Identifies significant patterns
  3. Updates Documentation

    • Updates root CLAUDE.md with project-level insights
    • Updates feature-specific CLAUDE.md files
    • Creates new memory files where needed
    • Maintains memory templates

Memory Structure

The command updates various memory locations:

project/
├── CLAUDE.md                    # Project overview and architecture
├── .orchestre/CLAUDE.md         # Orchestration-specific memory
├── src/
│   ├── api/CLAUDE.md           # API-specific patterns
│   ├── components/CLAUDE.md     # Component architecture
│   └── utils/CLAUDE.md         # Utility patterns
└── docs/CLAUDE.md              # Documentation insights

Best Practices

  1. Regular Updates

    • Run after completing major features
    • Update before switching contexts
    • Use after resolving complex issues
  2. Contextual Updates

    • Provide specific context for targeted updates
    • Focus on "why" not just "what"
    • Document decision rationale
  3. Team Knowledge

    • Update memory before handoffs
    • Document tribal knowledge
    • Capture problem-solving approaches

Integration with Other Commands

Memory Templates

The command uses templates from .orchestre/memory-templates/:

  • Feature documentation template
  • Architecture decision records
  • Problem-solution patterns
  • Integration guides

Version History

  • v5.3.0: Recovered from v4, enhanced distributed memory support
  • v4.1.0: Added memory templates and pattern recognition
  • v4.0.0: Original implementation

Built with ❤️ for the AI Coding community, by Praney Behl