agentdb-advanced
Master advanced AgentDB features including QUIC synchronization, multi-database management, custom distance metrics, hybrid search, and distributed systems…
Reconcile the ADR index against a DELETED ADR file or relation line by dropping and rebuilding adr-patterns + adr-edges from scratch (scripts/reindex.mjs). Use when adr-index alone leaves stale rows behind.
$ npx -y skills add ruvnet/ruflo --skill adr-reindex --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/adr-reindexContext preview
The summary Claude sees to decide when to auto-load this skill.
Reconcile the ADR index against a DELETED ADR file or relation line by dropping and rebuilding adr-patterns + adr-edges from scratch (scripts/reindex.mjs). Use when adr-index alone leaves stale rows behind.
name: adr-reindex description: Reconcile the ADR index against a DELETED ADR file or relation line by dropping and rebuilding adr-patterns + adr-edges from scratch (scripts/reindex.mjs). Use when adr-index alone leaves stale rows behind. argument-hint: "" allowed-tools: Bash mcp__plugin_ruflo-core_ruflo__memory_list
`adr-index` only ever **adds** or upserts rows — it has no way to remove one. Delete an ADR file (or a single relation line from a surviving file) and the row `adr-index` wrote for it survives every future `adr-index` run, forever, with no dangling-ref or cycle ever pointing at it. `adr-verify` then certifies the resulting graph as healthy, because an orphan row with zero edges in or out is invisible to both its checks. See issue #2666.
This is a different failure mode from staleness (an ADR that changed but whose stored record didn't) — that's convergence, `adr-index`'s job. This is **reaping** — the source of truth (the ADR file) is gone, so the derived cache row for it must be gone too. The only reliable way to reap is to drop both namespaces and rebuild from what's actually on disk right now.
node plugins/ruflo-adr/scripts/reindex.mjs
Optional env:
1. **Purge** — hard-deletes every row in `adr-patterns` and `adr-edges` via `memory purge --namespace <ns> --force` (the CLI's real `DELETE FROM memory_entries`, not `memory delete`'s soft tombstone that still blocks a same-key re-store — see "Why not `adr-index` + `memory delete`" below). 2. **Rebuild** — re-scans every ADR currently on disk (same dual-format parser `adr-index` uses) and stores it fresh. 3. **Post-condition** — re-lists `adr-patterns` and asserts the count equals the number of ADR files just scanned. This is stronger than `adr-index`'s "N stored, 0 errors" tally: if a concurrent memory.db writer clobbered the purge (see Caveats), the store loop would still report success on every call — only a fresh recount catches that.
Exits non-zero if the post-condition fails.
`memory delete` is a **soft** delete (`UPDATE ... SET status='deleted'`) — the row keeps occupying its `UNIQUE(namespace, key)` slot, so a later non-upsert `memory store` for that same key still fails. `memory cleanup` only reaps entries by age/TTL/quality, not by "does its source file still exist" — it has no orphan concept. Neither gets you back to a clean graph; only a real namespace-scoped `DELETE FROM` does, which is what `memory purge` (and this skill) uses.
An agent meta-harness for Claude Code and Codex. 📖 RuFlo Explained — Build an AI Team That Plans, Remembers, Tests, and Improves A 14-chapter guide: from the basic idea to a first useful task, then memory, agent teams, plugins, cost and verification.
Repo: ruvnet/ruflo
Master advanced AgentDB features including QUIC synchronization, multi-database management, custom distance metrics, hybrid search, and distributed systems…
Create and train AI learning plugins with AgentDB's 9 reinforcement learning algorithms. Includes Decision Transformer, Q-Learning, SARSA, Actor-Critic, and…
Implement persistent memory patterns for AI agents using AgentDB. Includes session memory, long-term storage, pattern learning, and context management. Use…
Optimize AgentDB performance with quantization (4-32x memory reduction), HNSW indexing (150x faster search), caching, and batch operations. Use when optimizing…
Implement semantic vector search with AgentDB for intelligent document retrieval, similarity matching, and context-aware querying. Use when building RAG…
Quantum-resistant, self-learning version control for AI agents with ReasoningBank intelligence and multi-agent coordination