跳到正文
cccskills
免费在 GitHub 公开

adr-reindex

Rebuild the index of ADRs, records of architectural decisions, after files or relationship lines are deleted. It clears stored records and relationships, indexes the files still present, and checks that the final record count matches.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

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.

查看安装方法

适用场景

  • Rebuild the index after deleting an ADR file
  • Remove stale relationships after editing an ADR
  • Reconcile the ADR index on a schedule
  • Preview a rebuild without changing stored data

包含的文件(1)

  • SKILL.md4.5 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

ADR Reindex

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.

When to use

  • After deleting an ADR file (or removing a relation line from one)
  • Periodically, as a scheduled reconcile (adr-verify can't catch what adr-reindex catches — see below)
  • If adr-verify's ADR count looks higher than find docs/adr -name '*.md' | wc -l

Steps

node plugins/ruflo-adr/scripts/reindex.mjs

Optional env:

  • REINDEX_FORMAT=json — JSON instead of markdown
  • REINDEX_DRY_RUN=1 — report what would happen, purge/write nothing
  • ADR_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)

What it does

  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.

Why not adr-index + memory delete

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.

Caveats

  • Irreversible. This purges the entire namespace, not a diff — always safe here because step 2 immediately rebuilds from the current on-disk truth, but don't call memory purge directly against adr-patterns/adr-edges outside this flow.
  • #2621 (unaddressed): the purge is lock-protected against a second concurrent purge/delete on the same 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.
  • Cross-repo 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.

Cross-references

  • 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 disk
  • scripts/reindex.mjs — implementation
  • ADR-0002 (docs/adrs/) — the decision record for this skill

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Compare models available through the HuggingFace router with chat-ui configuration, research missing models, and write short English descriptions of their architecture and capabilities. Add entries to both production and development configuration files and commit the changes.

中文简介正在准备中。当前显示英语简介。

  • Adding newly available router models to chat-ui
  • Writing concise descriptions of model capabilities
  • Updating production and development model entries together
ruvnet/ruflo7.7万2026年10月18日 更新

Create an Architecture Decision Record, a document for recording important design choices, with the next sequential number. It generates a Markdown template, registers the record in AgentDB, and links related decisions found through search.

中文简介正在准备中。当前显示英语简介。

  • Record the reasoning behind adopting a technology
  • Start an ADR for an API or data model change
  • Document an infrastructure decision
ruvnet/ruflo7.7万2026年10月18日 更新

adr-index

免费

Build a searchable index and relationship graph from ADRs, records of architectural decisions. Import two supported document formats, refresh existing metadata without duplicate relationships, and review summaries of statuses, missing references, and inconsistencies.

中文简介正在准备中。当前显示英语简介。

  • Index ADRs imported from another project
  • Refresh a graph that differs from files on disk
  • Set up ADR tracking in an existing codebase
ruvnet/ruflo7.7万2026年10月18日 更新

Review code changes against accepted Architecture Decision Records, documents that capture agreed design choices. Report violations, outdated references, compliant changes, and areas without ADR coverage, then suggest code fixes or a new decision record where appropriate.

中文简介正在准备中。当前显示英语简介。

  • Check a pull request before merging
  • Review major code changes against agreed design decisions
  • Find references to superseded ADRs
ruvnet/ruflo7.7万2026年10月18日 更新

Check saved architecture decision records (ADRs) for broken references, circular replacement relationships, and inconsistent statuses. Use the results to verify imported records or stop a CI check when selected integrity rules fail.

中文简介正在准备中。当前显示英语简介。

  • Checking ADR integrity after import
  • Blocking CI when ADR issues are found
  • Reviewing ADR data before a release
ruvnet/ruflo7.7万2026年10月18日 更新

Coordinate multiple AI agents by adjusting their communication structure and task assignments as workloads change. The skill describes performance monitoring, switching coordination patterns, forecasting agent capacity, and validating changes with rollback when performance worsens.

中文简介正在准备中。当前显示英语简介。

  • Choosing a coordination structure for multiple agents
  • Redistributing tasks when agent workloads become uneven
  • Forecasting how many agents a workload needs
ruvnet/ruflo7.7万2026年10月18日 更新

查看 ruvnet 的全部技能

报告此技能的问题