description: Documents the three-tiered memory system implementation, knowledge promotion rules, and pattern stability scoring.
globs: '/memory/','/brain.js','/processor.js','/context/'
alwaysApply: false
memory-architecture
Core Memory Tiers
The system implements a three-tiered memory architecture:
- Short-term (Working) Memory
- Active pattern tracking with weighted context scoring
- Time-decay relevance using 24-hour half-life formula
- Frequency-based boosting up to 50%
- Priority multipliers for discrepancies (1.2x) and needed context (1.1x)
- Medium-term Memory
- Requires stability score > 0.8 for promotion from working memory
- Pattern relationship tracking and contextual tagging
- Example diversity tracking for concept validation
- Long-term Memory
- Requires stability score > 0.9 for promotion from medium-term
- Inheritance-based knowledge evolution
- Pattern conflict detection and resolution
Stability Scoring Components
Each memory element receives a stability score based on:
- Type presence: 0.2
- Content presence: 0.2
- Metadata presence: 0.2
- Relationships presence: 0.2
- Tags presence: 0.2
Knowledge Evolution Rules
- Concepts require multiple stable examples before promotion
- Pattern conflicts trigger high-severity discrepancy resolution
- Implementation conflicts handled as medium-severity issues
- Frequency weights capped at 0.5 (100 occurrences)
- Example diversity weights capped at 0.5 (10 unique examples)
Key Files:
/working-memory/processor.js
/context/checker.js
/examples/car-knowledge.js
/brain.js
Importance Scores:
- Memory Tier Implementation: 95
- Stability Scoring System: 90
- Knowledge Evolution Rules: 85
- Pattern Conflict Resolution: 80
$END$