adr-review
它能做什么
这项技能引导智能体把代码改动与已接受的架构决策记录进行比较,并指出违规或偏离之处。适合希望代码遵守既定决策的团队。
适用场景
- ✓当你即将合并拉取请求,并希望对照决策进行检查的时候。
- ✓当某项改动涉及一个已有已接受决策的领域的时候。
- ✓当你想定期检查代码是否仍遵循架构的时候。
技能链接
https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-adr/skills/adr-review/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请对照我们已接受的架构决策检查我的分支,并告诉我是否有改动违反了其中之一。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会读取差异,找出与被改动文件相关的决策记录,并检查这些改动是否与某项已接受的决策相矛盾。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
ADR Review
Review code changes against accepted Architecture Decision Records to detect violations, drift, and non-compliance.
When to use
Before merging a PR, after significant code changes, or as part of a periodic compliance check. Use this to ensure code changes respect the architectural decisions the team has agreed upon.
Steps
Get diff -- Run
git diff main...HEAD --name-only(or the specified branch) to list changed files. Then rungit diff main...HEADto get the full diff content.Find relevant ADRs -- For each changed file:
Grepthe file for ADR references (ADR-\d+)Grepdocs/adr/for ADRs that mention the changed file paths or modules- Call
mcp__plugin_ruflo-core_ruflo__memory_searchwith the file path and change summary to find semantically related ADRs
Load ADR content --
Readeach relevant ADR file. Focus on:- The Decision section (what was decided)
- The Status (only enforce "accepted" ADRs)
- The Consequences (expected constraints)
Check for violations -- Analyze each changed file against its relevant ADRs:
- Does the code change contradict an accepted decision?
- Does it use a technology/pattern that an ADR explicitly rejected?
- Does it modify a module in a way the ADR's consequences warned against?
- Is the code referencing a deprecated or superseded ADR?
Query relationship graph -- Call
mcp__plugin_ruflo-core_ruflo__memory_listwith namespaceadr-edges(rows are keyed<relation>:<from>__<to>with relationsupersedes,amendsordepends-on) to check if any referenced ADR has been superseded. If the namespace is empty, runadr-indexfirst. If a referenced ADR is superseded, flag that the code references an outdated decision.Report -- Present findings as a compliance report:
## ADR Compliance Report ### Violations - [ ] <file>:<line> — violates ADR-NNN: <reason> ### Warnings - [!] <file> references superseded ADR-NNN (replaced by ADR-MMM) ### Compliant - [x] <file> — consistent with ADR-NNN ### Unlinked Changes - [?] <file> — no ADR coverage (consider creating one)Suggest actions -- For each violation, suggest whether to update the code or propose a new ADR to supersede the violated one.
常见问题
它只检查已接受的决策吗?
是的。这项技能说明它只强制执行状态为已接受的决策。
它与哪个分支进行比较?
默认与 main 比较,不过你可以指定其他分支。
它会修改代码吗?
这项技能用于审查,它会报告问题,改动则由你决定。
详情
热度
- GitHub 星标
- 81k
- 排名
- #1554
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
agent-adaptive-coordinator
81k帮你的智能体在工作量变化时拆分和重新平衡一组 AI 智能体,并选择适合任务的分工方式。
agent-agent
81k教你的智能体把一个大目标拆成有顺序的行动计划,并在情况变化时重新规划。
agent-agentic-payments
81k帮你的智能体管理 AI 购物的消费授权,包括消费上限、时间窗口、商户规则和签名审批。
agent-analyze-code-quality
81k帮你的智能体检查代码质量,找出代码异味、技术债务和重构建议,且不改动文件。