Skip to content

v2.1.2 simplify auto-memory to type-based 3-tier strategy

Choose a tag to compare

@JochenYang JochenYang released this 06 Nov 11:08
· 60 commits to main since this release

Changed

  • Simplified Auto-Memory Strategy: Refactored from complex evaluation-based scoring to streamlined type-based 3-tier strategy
    • Tier 1 (Silent): Auto-record technical execution types (bug_fix, feature_add, code_modify, etc.) without confirmation
    • Tier 2 (Notify): Auto-record with deletion notice (solution, design, documentation) - user can remove if not needed
    • Tier 3 (No Record): Only record conversation and error types when force_remember=true
    • Removed complex scoring algorithm (200+ lines) in favor of simple type checking
    • Significantly reduced decision latency: ~50ms → <1ms

Removed

  • Evaluation System Components: Deleted 6 files (~800 lines) from src/core/ directory
    • AutoMemoryTrigger.ts - Decision trigger logic
    • DevelopmentValueEvaluator.ts - Value assessment system
    • DevelopmentProcessDetector.ts - Process recognition
    • UserFeedbackLearning.ts - Feedback learning mechanism
    • UnifiedMemoryManager.ts - Unified manager
    • auto-memory-types.ts - Type definitions
  • Tool Count: Reduced from 18 to 14 MCP tools by removing backend automation tools
    • Removed extract_file_context (integrated into record_context)
    • Removed generate_embeddings (auto-generated on record)
    • Removed optimize_project_memory (backend task)
    • Removed update_quality_scores (lazy-loaded automatically)
  • Parameters: Removed auto_evaluate parameter (no longer needed)

Added

  • Lazy-Loading Quality Score Updates: Background maintenance triggered during semantic search
    • Automatically updates quality scores every 24 hours
    • Non-blocking async execution (doesn't affect search performance)
    • Updates up to 200 contexts per cycle
    • Skips recently updated contexts (within 7 days)
    • Implementation: checkAndUpdateQualityScoresInBackground() method

Improved

  • Performance: Memory usage reduced by ~15% (removed evaluation caches)
  • Maintainability: Significantly simplified codebase with clear type-based logic
  • User Experience: Instant memory decisions with transparent 3-tier strategy
  • Documentation: Updated README (English and Chinese) with simplified configuration
    • Removed version number annotations from feature descriptions
    • Updated Node.js requirement badge: 18.0.0 → 20.0.0
    • Streamlined smart recording guidelines
    • Updated architecture diagram to reflect 3-tier strategy

Technical Details

  • Auto-Memory Logic: Now in handleRecordContext() method using simple type switch
  • Quality Scoring: Moved to background lazy-loading pattern (MCP-compatible)
  • Backend Tasks: Embedding generation remains auto-triggered on record_context
  • Backward Compatibility: Fully compatible - existing contexts and parameters preserved

Migration Notes

  • No breaking changes - all existing functionality preserved
  • Old auto_evaluate parameter silently ignored (no errors)
  • force_remember parameter enhanced and retained
  • All stored context data remains intact