技能 编程开发 创建架构决策记录

创建架构决策记录

v20261020
adr-create
此技能自动化创建架构决策记录(ADR),生成连续编号,编写 Markdown 文件,并在 AgentDB 中注册条目。它处理标题转换、模板生成和关联决策链接,以优化项目文档管理。
获取技能
198 次下载
概览

Create ADR

Create a new Architecture Decision Record with the next sequential number, register it in the AgentDB graph, and link it to related ADRs.

When to use

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.

Steps

  1. 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.
  1. Slugify title -- Convert the title argument to a lowercase, hyphen-separated slug (e.g., "Use PostgreSQL for persistence" becomes use-postgresql-for-persistence).
  1. Create ADR file -- Write the file at docs/adr/ADR-NNN-<slug>.md using the standard template:

```markdown

ADR-NNN: </h1> <ul><li><strong>Status</strong>: proposed</li><li><strong>Date</strong>: <today's date YYYY-MM-DD></li><li><strong>Deciders</strong>: <leave blank for author to fill></li><li><strong>Tags</strong>: <leave blank></li></ul> <h2>Context</h2> <p><!-- What is the issue that motivates this decision? --></p> <h2>Decision</h2> <p><!-- What is the change that we are proposing? --></p> <h2>Consequences</h2> <h3>Positive</h3> <p>-</p> <h3>Negative</h3> <p>-</p> <h3>Neutral</h3> <p>-</p> <h2>Links</h2> <p>```</p> <ol><li><strong>Store in AgentDB</strong> -- Call <code>mcp__plugin_ruflo-core_ruflo__agentdb_hierarchical-store</code> with:</li></ol> <ul><li>key: <code>mem:ADR-NNN</code></li><li>tier: <code>semantic</code></li><li>value: a JSON-encoded string: <code>{ "id": "ADR-NNN", "title": "<title>", "status": "proposed", "date": "<today>", "file": "docs/adr/ADR-NNN-<slug>.md" }</code></li></ul> <ol><li><strong>Find related ADRs</strong> -- Call <code>mcp__plugin_ruflo-core_ruflo__memory_search</code> with the title as query in namespace <code>adr-patterns</code> to find related decisions. If matches are found, add them to the Links section and call <code>mcp__plugin_ruflo-core_ruflo__agentdb_causal-edge</code> for each relationship with:</li></ol> <ul><li>sourceId: <code>mem:ADR-NNN</code></li><li>targetId: <code>mem:ADR-RELATED</code></li><li>relation: <code>depends-on</code></li></ul> <ol><li><strong>Store pattern</strong> -- Call <code>mcp__plugin_ruflo-core_ruflo__memory_store</code> in namespace <code>adr-patterns</code> with key <code>ADR-NNN</code> and the title + context as value for future semantic search.</li></ol> <ol><li><strong>Report</strong> -- Output the created file path, ADR number, and any related ADRs found.</li></ol> </div> </div> </div> <div class="col-md-4"> <div class="tw-bg-white tw-rounded-xl tw-shadow-sm tw-border tw-border-gray-200 tw-p-6 tw-mb-6"> <div class="tw-text-sm tw-font-bold tw-text-gray-900 tw-uppercase tw-tracking-wider tw-mb-4"> <i class="iconfont icon-details tw-mr-1.5 tw-text-gray-400"></i>信息 </div> <div class="tw-flex tw-justify-between tw-py-3 tw-border-b tw-border-gray-50 last:tw-border-0"> <span class="tw-text-gray-500"><i class="iconfont icon-category tw-mr-1"></i>分类</span> <span class="tw-font-medium tw-text-gray-900"> <a href="/skill?categoryId=11" class="tw-text-primary hover:tw-underline">编程开发</a> </span> </div> <div class="tw-flex tw-justify-between tw-py-3 tw-border-b tw-border-gray-50 last:tw-border-0"> <span class="tw-text-gray-500"><i class="iconfont icon-code tw-mr-1"></i>名称</span> <span class="tw-font-medium tw-text-gray-900 tw-font-mono tw-text-xs tw-break-all">adr-create</span> </div> <div class="tw-flex tw-justify-between tw-py-3 tw-border-b tw-border-gray-50 last:tw-border-0"> <span class="tw-text-gray-500"><i class="iconfont icon-tag tw-mr-1"></i>版本</span> <span class="tw-font-medium tw-text-gray-900">v20261020</span> </div> <div class="tw-flex tw-justify-between tw-py-3 tw-border-b tw-border-gray-50 last:tw-border-0"> <span class="tw-text-gray-500"><i class="iconfont icon-file tw-mr-1"></i>大小</span> <span class="tw-font-medium tw-text-gray-900">2.66KB</span> </div> <div class="tw-flex tw-justify-between tw-py-3 tw-border-b tw-border-gray-50 last:tw-border-0"> <span class="tw-text-gray-500"><i class="iconfont icon-user-o tw-mr-1"></i>来源</span> <span class="tw-font-medium tw-text-gray-900"> <a href="https://github.com/ruvnet/ruflo" target="_blank" rel="nofollow noopener" class="tw-text-primary hover:tw-underline tw-flex tw-items-center tw-gap-1"> <i class="iconfont icon-github"></i> ruvnet/ruflo </a> </span> </div> <div class="tw-flex tw-justify-between tw-py-3 tw-border-b tw-border-gray-50 last:tw-border-0"> <span class="tw-text-gray-500"><i class="iconfont icon-time tw-mr-1"></i>更新时间</span> <span class="tw-font-medium tw-text-gray-900">2026-10-21</span> </div> </div> </div> </div> </div> </div> <footer class="ub-footer-link tw-bg-white"> <div class="ub-container"> <div class="row"> <div class="col-md-3 col-12"> <div class="image tw-text-center lg:tw-text-left" style="padding:1rem;"> <div class="ub-html"> <div class="tw-font-bold tw-text-2xl"> SkillUI </div> <p>开源技能管理GUI面板</p> </div> <div class="tw-mt-2"> <a class="tw-text-gray-400" href="http://beian.miit.gov.cn" target="_blank">陕ICP备20000530号-21</a> </div> <div class="tw-mt-2"> skillui.com © 2026 All rights reserved </div> </div> </div> <div class="col-md-1"></div> <div class="col-md-6 col-12"> <div class="row"> <div class="col-6"> <div class="link"> <div class="title"> <i class="iconfont icon-book"></i> 文档 </div> <div class="list"> <a href="/zh/download">软件下载</a> <a href="/zh/document">帮助文档</a> <a href="/zh/article/agreement">使用协议</a> <a href="/zh/article/support">技术支持</a> </div> </div> </div> <div class="col-6"> <div class="link"> <div class="title"> <i class="iconfont icon-users"></i> 支持 </div> <div class="list"> <a href="/zh/article/contact"> <i class="iconfont icon-file"></i> 联系我们 </a> <a href="mailto:mzkeep@163.com"> <i class="iconfont icon-email"></i> mzkeep@163.com </a> <div> <i class="iconfont icon-address"></i> 陕西·西安 </div> <div> <a href="javascript:;" onclick="$('.ub-i18n-switch').fadeIn();"> <i class="iconfont icon-language"></i> 简体中文 <i class="iconfont icon-angle-down"></i> </a> </div> </div> </div> </div> </div> </div> <div class="col-md-2 col-12"> <div class="tw-p-4 tw-text-center"> <img class="tw-w-full tw-mx-auto tw-rounded-lg tw-shadow-xl" style="max-width:10rem;" src="" /> </div> </div> </div> </div> </footer> <div class="ub-i18n-switch"> <div class="dialog" style="max-width:40vw;"> <a class="close" href="javascript:;" onclick="$('.ub-i18n-switch').fadeOut();"> <i class="icon iconfont icon-close"></i> </a> <div class="head">语言</div> <div class="body"> <div class="languages"> <div class="row"> <div class="col-md-3"> <a class="item" href="/zh"> <span class="icon" style="background-image:url(https://cdn.skillui.com/vendor/I18n/lang-flags/cn.png?3477106951)"></span> <span class="text">简体中文</span> </a> </div> <div class="col-md-3"> <a class="item" href="/en"> <span class="icon" style="background-image:url(https://cdn.skillui.com/vendor/I18n/lang-flags/us.png?3257566192)"></span> <span class="text">English</span> </a> </div> </div> </div> </div> </div> </div> <script src="https://cdn.skillui.com/asset/common/lazyLoad.js?4042050371"></script> </body> </html>