adr-verify
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseADR Verify
ADR 验证
Companion to . After import, reads the persisted graph and surfaces integrity issues:
adr-index- Dangling refs — edge points at an ADR ID that doesn't exist in . Common cause: the referenced ADR is in a sibling repo or got deleted.
adr-patterns - Supersede cycles — and
ADR-A supersedes ADR-B(or longer cycles). Always data corruption.ADR-B supersedes ADR-A - Status mismatches — an ADR is the source of a edge but its own status isn't
supersedes. Usually a missed status update during a successor ADR's promotion.Superseded
作为的配套工具。导入完成后,读取已持久化的图谱并识别完整性问题:
adr-index- 悬空引用 —— 关联指向的ADR ID在中不存在。常见原因:被引用的ADR位于同级仓库中或已被删除。
adr-patterns - 替代循环 —— 且
ADR-A 替代 ADR-B(或更长的循环链)。这属于数据损坏问题。ADR-B 替代 ADR-A - 状态不匹配 —— 某个ADR是(替代)关联的源,但自身状态并非
supersedes(已被替代)。通常是在后续ADR升级时遗漏了状态更新。Superseded
When to use
使用场景
- Right after to confirm the graph is healthy
adr-index - In CI as a fail-closed gate (exits 1 on any issue)
VERIFY_STRICT=1 - Before publishing an ADR-related release
- 在执行后立即使用,确认图谱状态健康
adr-index - 在CI流程中作为强制检查关卡(设置时,任何问题都会导致以状态码1退出)
VERIFY_STRICT=1 - 在发布ADR相关版本前使用
Steps
操作步骤
bash
node plugins/ruflo-adr/scripts/verify.mjsOptional env:
- — JSON instead of markdown
VERIFY_FORMAT=json - — exit 1 on ANY issue (default: only on cycles)
VERIFY_STRICT=1
bash
node plugins/ruflo-adr/scripts/verify.mjs可选环境变量:
- —— 输出JSON格式而非markdown格式
VERIFY_FORMAT=json - —— 任何问题都会导致以状态码1退出(默认:仅在检测到循环时退出)
VERIFY_STRICT=1
Exit codes
退出码
| Code | Meaning |
|---|---|
| Graph healthy (or dangling refs / status mismatches present in non-strict mode) |
| Supersede cycle detected, OR strict mode + any issue present |
| 代码 | 含义 |
|---|---|
| 图谱状态健康(或在非严格模式下存在悬空引用/状态不匹配问题) |
| 检测到替代循环,或开启严格模式且存在任何问题 |
Cross-references
交叉引用
- — populates the data this skill verifies
adr-index - — has its own dry-run validation; this skill is the read-back companion
scripts/import.mjs
- —— 生成本工具需要验证的数据
adr-index - —— 自带试运行验证;本工具是其配套的回溯验证工具
scripts/import.mjs