/ruflo-adr:adr-reindexfrom ruflo-adr
Reconciles ADR index by dropping and rebuilding adr-patterns and adr-edges from scratch. Use after deleting an ADR file or relation line, or as periodic cleanup when adr-index leaves stale rows.
Ships in ruflo-adr. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
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.
adr-verify can't catch what adr-reindex catches — see below)adr-verify's ADR count looks higher than find docs/adr -name '*.md' | wc -lnode plugins/ruflo-adr/scripts/reindex.mjs
Optional env:
REINDEX_FORMAT=json — JSON instead of markdownREINDEX_DRY_RUN=1 — report what would happen, purge/write nothingADR_ROOT=/path — scan root and the root the underlying memory purge/memory store subprocesses run from (must match whatever root adr-index was last run with, or you'll reconcile the wrong repo's namespace)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).adr-index uses) and stores it fresh.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.
adr-index + memory deletememory 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.
memory purge directly against adr-patterns/adr-edges outside this flow.memory.db, but not against every writer — a daemon or MCP server mid a read-modify-write cycle on the sql.js fallback path can still flush an older image afterward and resurrect what this just purged. The post-condition check exists specifically to surface this; re-run the skill if it fails.related/depends-on edges pointing at an ADR that was never scanned in this root (a legitimate sibling-repo reference, not an orphan) are dropped by the rebuild the same as everything else in adr-edges — they only come back if the sibling repo's ADRs are indexed in the same run. This matches adr-verify's own documented "dangling ref, common cause: sibling repo" caveat; it isn't new drift introduced by this skill.adr-index — convergence (add/upsert); this skill is reaping (remove what's gone)adr-verify — read-back integrity check; run after reindex to confirm adrCount matches diskscripts/reindex.mjs — implementationdocs/adrs/) — the decision record for this skillWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
5 skills in this plugin
/adr-createCreate a new Architecture Decision Record with sequential numbering and AgentDB registration/adr-indexBuild or rebuild the ADR index + dependency graph by running scripts/import.mjs (handles v3-style and plugin-style ADR formats; one Bash call vs hundreds of MCP round-trips)/adr-reviewReview code changes against accepted ADRs for compliance violations/adr-verifyRead back adr-patterns + adr-edges namespaces, surface dangling refs / supersede cycles / Unknown statuses; exit 1 on cycles2 plugins ship this exact skill · first indexed Jul 18, 2026
npx claudepluginhub ruvnet/ruflo --plugin ruflo-adrOther plugins' skills for the same job