Skip to content

Commit 9e4bc1e

Browse files
fix(memvid): remove dead memvid memory scheme repo-wide (hotfix)
memvid (v2.31 semantic memory) is no longer used — its backend (memvid-core.py) and skill are already gone, leaving dead code with a real bug. Purge all remaining references: - scripts/ralph: delete cmd_memvid, the memvid|memory dispatcher case, the MEMORY help section, and the doctor block referencing MEMVID_STATUS — which is NEVER assigned and aborted `ralph doctor` under set -u (the bug this fixes). - Active hooks (pre-compact-handoff.sh, smart-memory-search.sh): drop the memvid indexing call and tombstone comments. - Skills/agents (orchestrator, research, smart-fork): drop memvid from memory- source lists and diagrams; research now persists via `ralph ledger save`. - Docs/CHANGELOG/README/plans/audits: purge memvid mentions, rebalance diagrams. Backups under .claude/archive/ are intentionally left untouched (immutable snapshots). Full suite: 1467 passed; `ralph doctor` runs clean (no unbound var). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 636b994 commit 9e4bc1e

32 files changed

Lines changed: 137 additions & 516 deletions

.claude/agents/orchestrator.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
# VERSION: 3.0.0
33
name: orchestrator
4-
description: "Smart Memory-Driven Orchestration with parallel memory search and GLM-4.7 multimodal capabilities. Lead Software Architect coordinator with Plan-Sync validation, RLM-inspired routing (v2.46), GLM-4.7 vision/web/docs integration (v2.69), Aristotle First Principles methodology, living knowledge vault, and memory context from vault (Obsidian), memvid, handoffs, ledgers. Coordinates 6 ralph-* teammates including ralph-frontend (WCAG 2.1 AA) and ralph-security (6 quality pillars). Ensures 100% plan coverage through adversarial cross-validation between Claude Opus and Codex GPT-5.2."
4+
description: "Smart Memory-Driven Orchestration with parallel memory search and GLM-4.7 multimodal capabilities. Lead Software Architect coordinator with Plan-Sync validation, RLM-inspired routing (v2.46), GLM-4.7 vision/web/docs integration (v2.69), Aristotle First Principles methodology, living knowledge vault, and memory context from vault (Obsidian), handoffs, ledgers. Coordinates 6 ralph-* teammates including ralph-frontend (WCAG 2.1 AA) and ralph-security (6 quality pillars). Ensures 100% plan coverage through adversarial cross-validation between Claude Opus and Codex GPT-5.2."
55
tools: Bash, Read, Write, Task, mcp__zai-mcp-server__*, mcp__web-search-prime__*, mcp__web-reader__*, mcp__zread__*
66
model: opus
77
---
@@ -12,7 +12,7 @@ model: opus
1212
You're not just an AI assistant. You're a **Lead Software Architect**. Every orchestration decision you make ensures the implementation matches the plan EXACTLY. Plans never survive implementation unchanged - but with Plan-Sync, we catch drift and maintain consistency.
1313

1414
## Your Work, Step by Step (v2.47)
15-
0. **Smart Memory Search**: PARALLEL search across vault, memvid, handoffs, ledgers
15+
0. **Smart Memory Search**: PARALLEL search across vault, handoffs, ledgers
1616
1. **Clarify & Analyze Gaps**: Find missing requirements BEFORE coding starts
1717
2. **Plan with Precision**: Create verifiable specs for each step
1818
3. **Persist Plan State**: Initialize `.claude/plan-state.json` for tracking
@@ -69,9 +69,8 @@ You are the **Lead Software Architect** coordinating multiple AI models with pla
6969

7070
Based on @PerceptualPeak Smart Forking concept: "Why not utilize the knowledge gained from your hundreds/thousands of other Claude code sessions? Don't let that valuable context go to waste!!"
7171

72-
- **SMART MEMORY SEARCH (Step 0b)**: PARALLEL search across 4 memory sources before every orchestration
72+
- **SMART MEMORY SEARCH (Step 0b)**: PARALLEL search across 3 memory sources before every orchestration
7373
- vault (Obsidian): Markdown KG with frontmatter (permanent)
74-
- memvid: Vector-encoded context (sub-5ms)
7574
- handoffs: Session snapshots (30 days)
7675
- ledgers: Session continuity data (permanent)
7776
- **MEMORY CONTEXT FILE**: Results aggregated to `.claude/memory-context.json`
@@ -86,7 +85,6 @@ Based on @PerceptualPeak Smart Forking concept: "Why not utilize the knowledge g
8685
"version": "2.47.0",
8786
"sources": {
8887
"claude_mem": {"results": []},
89-
"memvid": {"results": []},
9088
"handoffs": {"results": []},
9189
"ledgers": {"results": []}
9290
},
@@ -183,7 +181,7 @@ Based on @PerceptualPeak Smart Forking concept: "Why not utilize the knowledge g
183181
├─────────────────────────────────────────────────────────────────────────────┤
184182
│ │
185183
│ 0. EVALUATE → Quick complexity assessment (trivial vs non-trivial) │
186-
│ 0b.SMART_MEMORY → PARALLEL search: vault + memvid + handoffs +
184+
│ 0b.SMART_MEMORY → PARALLEL search: vault + handoffs +
187185
│ ledgers + GLM webSearchPrime ◄── ENHANCED v2.69 │
188186
│ └─ Results → .claude/memory-context.json │
189187
│ 1. CLARIFY → AskUserQuestion intensively (MUST_HAVE + NICE_TO_HAVE) │

.claude/audits/TECHNICAL_DEBT_INVENTORY_v2.68.26.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ scripts/validate-global-architecture.sh
448448
---
449449

450450
### MED-019: Memory System Files Unvalidated
451-
**Location**: `~/.ralph/memory/` (semantic.json, memvid.json, etc.)
451+
**Location**: `~/.ralph/memory/` (semantic.json, etc.)
452452
**Description**: No validation that JSON files are well-formed
453453
**Impact**: Corruption risk
454454
**Effort**: S (add validation hook)

.claude/hooks/pre-compact-handoff.sh

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -193,17 +193,6 @@ else
193193
log "WARN" "Handoff generator script not found or not executable: $HANDOFF_SCRIPT"
194194
fi
195195

196-
# Index in Memvid if available and enabled
197-
if command -v ralph &>/dev/null; then
198-
# Check if memvid feature exists in ralph
199-
if ralph memvid status >> "$LOG_FILE" 2>&1; then
200-
log "INFO" "Indexing checkpoint in Memvid"
201-
ralph memvid save "Pre-compact checkpoint: ${SESSION_ID} at ${TIMESTAMP}" >> "$LOG_FILE" 2>&1 || {
202-
log "WARN" "Memvid indexing failed (non-critical)"
203-
}
204-
fi
205-
fi
206-
207196
# Clean up old handoffs (keep last 20 per session, older than 7 days)
208197

209198
# Backup plan state if exists (v2.81.0)

.claude/hooks/smart-memory-search.sh

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@
4040
# continuity system, not Vault memory system. Reader had 0/35 empirical hits;
4141
# root cause was writer bug (fixed separately in pre-compact-handoff.sh +
4242
# session-end-handoff.sh). See ADR: L0 "vault-as-truth" principle.
43-
# v3.3.0 (2026-04-15): Removed memvid (zombie code — backend memvid-core.py
44-
# deleted from ~/.claude/scripts/ but hook still referenced it). No functional
45-
# impact; measured results of memvid source were always 0. Ledgers kept
46-
# pending empirical value analysis.
4743
# v2.69.0: FIX CRIT-003 - Added guaranteed JSON output trap
4844
# v2.68.26: GLM-4.7 web search integration - 5th parallel source via webSearchPrime API
4945
# v2.68.25: FIX CRIT-001 - Removed duplicate stdin read (SEC-111 already reads at top)
@@ -296,7 +292,6 @@ cleanup_and_json() {
296292
trap 'cleanup_and_json' EXIT ERR INT TERM
297293

298294
VAULT_FILE="$TEMP_DIR/vault.json"
299-
# v3.3.0: MEMVID_FILE removed — memvid-core.py backend was deleted; zombie code
300295
# v3.4.0: HANDOFFS_FILE removed — session state, not memory
301296
LEDGERS_FILE="$TEMP_DIR/ledgers.json"
302297
WEB_SEARCH_FILE="$TEMP_DIR/web-search.json" # v2.68.26: GLM-4.7 Integration
@@ -440,9 +435,6 @@ fi
440435
) &
441436
PID1=$!
442437

443-
# v3.3.0: Task 2 (memvid) removed — backend ~/.claude/scripts/memvid-core.py
444-
# was deleted; search always returned 0 results silently. Zombie code.
445-
446438
# v3.4.0: Task 2 (handoffs) removed — handoffs serve session-handoff state,
447439
# not long-term memory. Reader had 0/35 empirical hits; writer bug fixed
448440
# separately in pre-compact-handoff.sh + session-end-handoff.sh.
@@ -666,7 +658,6 @@ validate_json() {
666658
}
667659

668660
VAULT_RESULT=$(validate_json "$VAULT_FILE" '{"results": [], "source": "vault"}')
669-
# v3.3.0: MEMVID_RESULT removed (zombie)
670661
# v3.4.0: HANDOFFS_RESULT removed (session state, not memory)
671662
LEDGERS_RESULT=$(validate_json "$LEDGERS_FILE" '{"results": [], "source": "ledgers"}')
672663
WEB_SEARCH_RESULT=$(validate_json "$WEB_SEARCH_FILE" '{"results": [], "source": "web_search"}') # v2.68.26
@@ -675,7 +666,6 @@ PROCEDURAL_RESULT=$(validate_json "$PROCEDURAL_FILE" '{"results": [], "source":
675666

676667
# Count results per source
677668
VAULT_COUNT=$(echo "$VAULT_RESULT" | jq '.results | length' 2>/dev/null || echo 0)
678-
# v3.3.0: MEMVID_COUNT removed (zombie)
679669
# v3.4.0: HANDOFFS_COUNT removed (session state, not memory)
680670
LEDGERS_COUNT=$(echo "$LEDGERS_RESULT" | jq '.results | length' 2>/dev/null || echo 0)
681671
WEB_SEARCH_COUNT=$(echo "$WEB_SEARCH_RESULT" | jq '.results | length' 2>/dev/null || echo 0) # v2.68.26

.claude/skills/orchestrator/SKILL.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -219,12 +219,6 @@ ralph adversarial "Design review"
219219
ralph retrospective
220220
```
221221

222-
**Save learnings to memory**:
223-
```bash
224-
ralph memvid save "Implemented OAuth2 successfully: [pattern details]"
225-
ralph memvid save "AVOID: [error pattern] caused [issue]"
226-
```
227-
228222
-> **VERIFIED_DONE**
229223

230224
## Model Routing

.claude/skills/research/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ Compile findings into structured report:
178178
179179
Save research to memory for future reference:
180180
```bash
181-
ralph memvid save "Research on ${TOPIC}: [key findings]"
181+
ralph ledger save research "Research on ${TOPIC}: [key findings]"
182182
```
183183
184184
## Research Templates

.claude/skills/smart-fork/SKILL.md

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
# VERSION: 3.0.0
33
name: smart-fork
4-
description: Smart Forking - Find and fork from relevant historical sessions using parallel memory search across vault, memvid, handoffs, and ledgers
4+
description: Smart Forking - Find and fork from relevant historical sessions using parallel memory search across vault, handoffs, and ledgers
55
author: Multi-Agent Ralph
66
version: 2.47.2
77
model: sonnet
@@ -56,12 +56,12 @@ When you invoke `/smart-fork`, we search across ALL memory sources **in parallel
5656
│ PARALLEL MEMORY SEARCH │
5757
├──────────────────────────────────────────────────────────────┤
5858
│ │
59-
│ ┌────────────┐ ┌────────────┐ ┌────────────┐ ┌──────────┐
60-
│ vault │memvid │ handoffs │ │ ledgers
61-
│ │ MCP │ │ search │ scan │ scan
62-
│ └─────┬──────┘ └─────┬──────┘ └─────┬──────┘ └────┬─────┘
63-
│ │ PARALLEL │ PARALLEL │ PARALLEL
64-
│ └──────────────┴──────────────┴─────────────┘
59+
┌────────────┐ ┌────────────┐ ┌────────────┐
60+
vault │ handoffs │ │ ledgers
61+
│ MCP │ scan │ scan │
62+
└─────┬──────┘ └─────┬──────┘ └─────┬──────┘
63+
│ PARALLEL │ PARALLEL
64+
└──────────────┴───────────────┘
6565
│ ↓ │
6666
│ AGGREGATOR (top 5) │
6767
│ ↓ │
@@ -117,8 +117,8 @@ TOP 5 RELEVANT SESSIONS:
117117
Summary: Authentication middleware setup
118118
Fork: claude --continue pqr345-stu678
119119
120-
Memory sources searched: vault (5), memvid (3), handoffs (8), ledgers (2)
121-
Total results: 18
120+
Memory sources searched: vault (5), handoffs (8), ledgers (2)
121+
Total results: 15
122122
```
123123

124124
### `/smart-fork --suggest`
@@ -143,7 +143,6 @@ Step 0: EVALUATE
143143
└── 0b: SMART MEMORY SEARCH (v2.47) ◄── NEW
144144
145145
├── Search vault for relevant observations
146-
├── Search memvid for semantic matches
147146
├── Search handoffs for recent context
148147
└── Search ledgers for session continuity
149148
@@ -161,7 +160,6 @@ Step 0: EVALUATE
161160
| Source | Content | Speed | Retention |
162161
|--------|---------|-------|-----------|
163162
| **vault MCP** | Semantic observations | Fast | Permanent |
164-
| **memvid** | Vector-encoded context | Sub-5ms | Permanent |
165163
| **handoffs** | Session context snapshots | Fast | 30 days |
166164
| **ledgers** | Continuity data | Fast | Permanent |
167165

@@ -226,7 +224,7 @@ ralph memory-stats
226224

227225
### "No memory sources available"
228226

229-
**Cause**: None of the 4 memory sources (vault, memvid, handoffs, ledgers) are initialized.
227+
**Cause**: None of the 3 memory sources (vault, handoffs, ledgers) are initialized.
230228

231229
**Fix**:
232230
```bash
@@ -236,9 +234,6 @@ ralph handoff create
236234
# Initialize ledgers
237235
ralph ledger save
238236

239-
# Initialize memvid (optional)
240-
ralph memvid init
241-
242237
# Verify Obsidian vault directory
243238
ls ~/Documents/Obsidian/MiVault/ 2>/dev/null && echo "vault OK"
244239
```

.ralph/plans/unified-herding-blanket.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,6 @@ SESIÓN DE TRABAJO EN PROYECTO X
575575
│ Integración con hooks existentes: │
576576
│ smart-memory-search.sh ya hace búsqueda parallel: │
577577
│ ├─ claude-mem (ephemeral) │
578-
│ ├─ memvid (vector) │
579578
│ ├─ handoffs (session snapshots) │
580579
│ ├─ ledgers (continuity) │
581580
│ └─ vault (NUEVO: curated knowledge) ← SE AÑADE │

CHANGELOG.md

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@
5757
- Previously: NO cleanup policy (2,852 episodes accumulated)
5858

5959
- **Redundant Storage Removed**: Deprecated memory files deleted
60-
- Deleted `~/.ralph/memory/memvid.json` (175KB - purpose unclear)
6160
- Deleted `~/.ralph/memory/semantic.json` (62KB - deprecated after claude-mem migration)
62-
- Removed memvid from `scripts/ralph` (tool definition + validation function)
6361
- semantic.json hooks already disabled in v2.55.0 (no action needed)
6462

6563
### Changed
@@ -78,12 +76,6 @@
7876
- Future: Requires MCP server with API REST or CLI wrapper
7977
- See: docs/analysis/MCP_MIGRATION_TECHNICAL_LIMITATIONS.md (future doc)
8078

81-
- **Memvid References**: Some hooks still reference memvid (non-blocking)
82-
- `pre-compact-handoff.sh`: Will fail gracefully if memvid missing
83-
- `session-start-repo-summary.sh`: Creates empty memvid.json if needed
84-
- `smart-memory-search.sh`: Skips memvid search if unavailable
85-
- These are legacy references that degrade gracefully
86-
8779
---
8880

8981
## [2.91.0] - 2026-02-16
@@ -1257,22 +1249,20 @@ fi
12571249

12581250
**smart-memory-search.sh** now:
12591251
1. claude-mem MCP (local)
1260-
2. memvid (local)
1261-
3. handoffs (local)
1262-
4. ledgers (local)
1263-
5. GLM web search (via Coding API + MiniMax fallback)
1264-
6. GLM docs search (via Coding API + MiniMax fallback)
1252+
2. handoffs (local)
1253+
3. ledgers (local)
1254+
4. GLM web search (via Coding API + MiniMax fallback)
1255+
5. GLM docs search (via Coding API + MiniMax fallback)
12651256

12661257
---
12671258

12681259
#### DAY 1-2: Web Search + Visual Validation (COMPLETE)
12691260

1270-
**smart-memory-search.sh** originally searched 5 parallel sources:
1261+
**smart-memory-search.sh** originally searched 4 parallel sources:
12711262
1. claude-mem MCP
1272-
2. memvid vector storage
1273-
3. handoffs (session context)
1274-
4. ledgers (continuity data)
1275-
5. **NEW: webSearchPrime (GLM-4.7)**
1263+
2. handoffs (session context)
1264+
3. ledgers (continuity data)
1265+
4. **NEW: webSearchPrime (GLM-4.7)**
12761266

12771267
```bash
12781268
# New Task 5 in parallel search

README.es.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ El sistema aborda el desafío fundamental de la programación asistida por IA: *
5252
│ │ ▼ │ │
5353
│ │ ┌──────────────────────────────────────────────────────────────┐ │ │
5454
│ │ │ BÚSQUEDA DE MEMORIA INTELIGENTE (PARALELO) v2.47 │ │ │
55-
│ │ │ ┌───────────┐ ┌───────────┐ ┌───────────┐ ┌───────────┐ │ │ │
56-
│ │ │ │claude-mem │ │ memvid │ │ handoffs │ledgers │ │ │ │
57-
│ │ │ │ (MCP) │ │ (HNSW) │ │ (30 días) │ │CONTINUIDAD│ │ │ │
58-
│ │ │ └─────┬─────┘ └─────┬─────┘ └─────┬─────┘ └─────┬─────┘ │ │ │
59-
│ │ │ │ PARALELO │ PARALELO │ PARALELO │ PARALELO │ │ │
60-
│ │ │ └─────────────┴─────────────┴─────────────┘ │ │ │
55+
│ │ │ ┌───────────┐ ┌───────────┐ ┌───────────┐ │ │ │
56+
│ │ │ │claude-mem │ │ handoffs │ │ ledgers │ │ │
57+
│ │ │ │ (MCP) │ │ (30 días) │ │CONTINUIDAD│ │ │ │
58+
│ │ │ └─────┬─────┘ └─────┬─────┘ └─────┬─────┘ │ │ │
59+
│ │ │ │ PARALELO │ PARALELO │ PARALELO │ │ │
60+
│ │ │ └─────────────┴───────────── │ │ │
6161
│ │ │ │ │ │ │
6262
│ │ │ ▼ │ │ │
6363
│ │ │ ┌─────────────────┐ │ │ │
@@ -247,11 +247,11 @@ El sistema aborda el desafío fundamental de la programación asistida por IA: *
247247

248248
```
249249
BÚSQUEDA DE MEMORIA INTELIGENTE (PARALELO)
250-
┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
251-
│claude-mem│ │ memvid │ │ handoffs │ │ ledgers │
252-
└────┬─────┘ └────┬─────┘ └────┬─────┘ └────┬─────┘
253-
│ PARALELO │ PARALELO │ PARALELO │ PARALELO
254-
└────────────┴────────────┴────────────
250+
┌──────────┐ ┌──────────┐ ┌──────────┐
251+
│claude-mem│ │ handoffs │ │ ledgers │
252+
└────┬─────┘ └────┬─────┘ └────┬─────┘
253+
│ PARALELO │ PARALELO │ PARALELO
254+
└────────────┴────────────┘
255255
256256
.claude/memory-context.json
257257
```

0 commit comments

Comments
 (0)