Create a new Architecture Decision Record with sequential numbering and AgentDB registration
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-adr-create-065e1f54106a ,按照其中的说明把「adr-create」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Create a new Architecture Decision Record with the next sequential number, register it in the AgentDB graph, and link it to related ADRs.
When a significant architectural decision needs to be recorded -- new technology adoption, API design choices, data model changes, infrastructure decisions, or any cross-cutting concern that affects multiple components.
Find next number -- Glob for docs/adr/ADR-*.md and parse existing numbers to determine the next sequential ID (ADR-001, ADR-002, etc.). Create docs/adr/ if it does not exist.
Slugify title -- Convert the title argument to a lowercase, hyphen-separated slug (e.g., "Use PostgreSQL for persistence" becomes use-postgresql-for-persistence).
Create ADR file -- Write the file at docs/adr/ADR-NNN-<slug>.md using the standard template:
# ADR-NNN: <Title>
- **Status**: proposed
- **Date**: <today's date YYYY-MM-DD>
- **Deciders**: <leave blank for author to fill>
- **Tags**: <leave blank>
## Context
<!-- What is the issue that motivates this decision? -->
## Decision
<!-- What is the change that we are proposing? -->
## Consequences
### Positive
-
### Negative
-
### Neutral
-
## Links
Store in AgentDB -- Call mcp__plugin_ruflo-core_ruflo__agentdb_hierarchical-store with:
mem:ADR-NNNsemantic{ "id": "ADR-NNN", "title": "<title>", "status": "proposed", "date": "<today>", "file": "docs/adr/ADR-NNN-<slug>.md" }Find related ADRs -- Call mcp__plugin_ruflo-core_ruflo__memory_search with the title as query in namespace adr-patterns to find related decisions. If matches are found, add them to the Links section and call mcp__plugin_ruflo-core_ruflo__agentdb_causal-edge for each relationship with:
mem:ADR-NNNmem:ADR-RELATEDdepends-onStore pattern -- Call mcp__plugin_ruflo-core_ruflo__memory_store in namespace adr-patterns with key ADR-NNN and the title + context as value for future semantic search.
Report -- Output the created file path, ADR number, and any related ADRs found.