技能 编程开发 ADR 图完整性验证

ADR 图完整性验证

v20261020
adr-verify
该技能用于验证持久化 ADR 图的数据完整性,读取 adr-patterns 和 adr-edges 命名空间。它能检测悬空引用、替代循环和状态不匹配问题。作为 adr-index 的配套工具,适用于 CI 门禁和导入后验证。发现循环或严格模式下问题时会退出码 1。
获取技能
194 次下载
概览

ADR Verify

Companion to adr-index. After import, reads the persisted graph and surfaces integrity issues:

  • Dangling refs — edge points at an ADR ID that doesn't exist in adr-patterns. Common cause: the referenced ADR is in a sibling repo or got deleted.
  • Supersede cycles — ADR-A supersedes ADR-B and ADR-B supersedes ADR-A (or longer cycles). Always data corruption.
  • Status mismatches — an ADR is the source of a supersedes edge but its own status isn't Superseded. Usually a missed status update during a successor ADR's promotion.

What this skill cannot catch: an adr-patterns row for an ADR that was deleted from disk and has zero edges referencing it or from it — invisible to every check above (issue #2666). If the reported ADR count looks higher than what's actually on disk, run adr-reindex, not adr-verify again.

When to use

  • Right after adr-index to confirm the graph is healthy
  • In CI as a fail-closed gate (VERIFY_STRICT=1 exits 1 on any issue)
  • Before publishing an ADR-related release

Steps

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

Optional env:

  • VERIFY_FORMAT=json — JSON instead of markdown
  • VERIFY_STRICT=1 — exit 1 on ANY issue (default: only on cycles)

Exit codes

CodeMeaning
0Graph healthy (or dangling refs / status mismatches present in non-strict mode)
1Supersede cycle detected, OR strict mode + any issue present

Cross-references

  • adr-index — populates the data this skill verifies
  • scripts/import.mjs — has its own dry-run validation; this skill is the read-back companion
  • adr-reindex — reconciles a deleted ADR that adr-verify cannot detect
信息
分类 编程开发
名称 adr-verify
版本 v20261020
大小 1.97KB
更新时间 2026-10-21
语言