Consolidate daily memory logs into deduplicated topic files and promote high-signal items to MEMORY.md. Reads all daily logs from the Obsidian vault, classifies observations into emergent topics via Gemini, deduplicates within topics using cosine similarity, writes topic files, indexes them for search, and updates a managed section in MEMORY.md. Use when the user says "consolidate", "consolidate memories", "organize my memories", "run consolidation", or "/consolidate".
Run the memory consolidation pipeline to organize daily log observations into deduplicated topic files.
Detect the user's intent from their message:
Activate the virtual environment and run the pipeline:
source .venv/bin/activate && python -m claude_memory consolidate [FLAGS]
Flags:
--dry-run: Show planned changes without writing any files--no-promote: Run consolidation but skip the promotion step--pipeline behavioral: (default) Consolidate behavioral observation logs, promote to MEMORY.md--pipeline business: Consolidate business fact logs, promote to reference files (People/, org-context/, etc.)--pipeline all: Run both pipelines sequentiallyThe command outputs a JSON report to stdout.
Parse the JSON report and present a human-readable summary:
Consolidation Complete
- Daily logs read: {daily_logs_read}
- Observations parsed: {observations_parsed}
- Topics created: {topics_created}
- Duplicates merged: {duplicates_merged}
- Items promoted to MEMORY.md: {promoted_to_memory}
Topics:
Topic Observations {name} {observation_count} ...
Present the same table but prefix with:
Dry Run (no files written)
If the report contains "status": "error":
Consolidation Failed
Error: {error}
Check the log for details:
cat ~/.claude-memory/logs/consolidation.log | tail -20
When --pipeline all is used, the report contains nested behavioral and business sub-reports. Present both side by side.
Regal/Claude/Memory/Topics/Regal/Claude/Memory/Business/Topics/