跳到正文
Skillpedia
技术文档17k · #10744

architecture-decision-record-skill

它能做什么

这个技能帮助 AI 智能体为软件项目创建和整理架构决策记录。适合希望清楚保存重要技术选择历史的开发者和团队。

适用场景

  • ✓当你的团队在两个数据库等技术之间做选择,并希望把选择记录下来时。
  • ✓当你需要在项目中建立决策记录文件夹,并遵循清晰的命名规则时。
  • ✓当旧决策被新决策取代,需要将旧记录标记为已被取代时。

技能链接

https://github.com/architecture-decision-record/architecture-decision-record/blob/main/skills/architecture-decision-record-skill/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/architecture-decision-record/architecture-decision-record/blob/main/skills/architecture-decision-record-skill/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请帮我写一份决策记录,说明为什么我们的订单服务选择 PostgreSQL 而不是 MongoDB。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会先判断这项决策是否值得记录,然后查找已有的记录文件夹。它会选择一个模板,并填写背景、决策及其影响。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Architecture decision record (ADR) skill

Helps a developer or team create and maintain architecture decision records: short documents that capture an important architecture decision, the context that led to it, and its consequences.

This skill is general-purpose: it applies to any repository the user is working in, not just this one. reference/templates.md and reference/writing-guide.md are self-contained — no need to read the rest of this repo to use them.

1. Decide if this decision deserves an ADR

Not every decision needs one. Recommend an ADR when the decision:

  • Is architecturally significant (affects structure, external interfaces, quality attributes, or is expensive/risky to reverse).
  • Needs to be understood by future developers who weren't in the room.
  • Involved real trade-offs worth recording (not a one-line style choice already covered by a linter or style guide).

Skip an ADR when the decision is tiny, self-contained, single-developer, already covered by policy/standards, or purely a temporary workaround/POC.

If the user is unsure, ask what the decision is and who needs to understand "why" later — that usually settles it.

2. Find or create the ADR directory

Look for an existing convention first:

git ls-files | grep -iE '(^|/)(adr|adrs|decisions?)(/|$)'
  • If one exists, follow its naming/format/numbering so far.
  • If none exists, ask the user (or default to) a top-level decisions/ or adr/ directory. Some teams prefer decisions/ because the word "architecture" and the abbreviation "ADR" put some contributors off, while "decisions" invites broader use (vendor, planning, scheduling decisions too).
  • Some projects number files (0001-choose-database.md, adr-tools style); others don't. Match what's already there; otherwise unnumbered present-tense file names (see below) are simplest to start with.

3. Name the file

Convention used across this ecosystem:

  • A present-tense imperative verb phrase, e.g. choose-database.md, format-timestamps.md, manage-passwords.md, handle-exceptions.md.
  • Lowercase with dashes.
  • .md extension.
  • If the project numbers ADRs, prefix with a zero-padded sequence number, e.g. 0007-choose-database.md.

4. Pick a template

Ask the user's preference, or pick based on the shape of the decision — see reference/templates.md for the full skeletons. Quick guide:

Situation Template
Default / most teams / unsure Nygard — Title, Status, Context, Decision, Consequences
Want lightweight options-with-pros/cons MADR
Enterprise, need traceability to requirements/principles Tyree & Akerman
Fast executive sign-off on a narrow technical choice (a library, a model, a CI strategy) ITD (Important Technical Decision)
Vendor/tool selection with cost, SWOT, stakeholder opinions Business case
Want a one-paragraph "Y-statement" style summary plus narrative Alexandrian pattern
Need formal, testable non-functional requirements language Planguage
Contributing to / matching EdgeX Foundry conventions EdgeX
Full architecture documentation, ADR is one section of it arc42 (§9)
Want a lightweight traffic-light options-comparison table Gareth Morgan
Want an "Options → Options Analysis → Recommendation" narrative flow GIG Cymru NHS Wales

When in doubt, default to Nygard — it's the simplest, most widely recognized, and easiest for a team to adopt without tooling.

5. Write it well

Load reference/writing-guide.md for the fuller checklist. The essentials:

  • One decision per ADR. Don't bundle multiple architecturally distinct decisions into one file.
  • Context should explain the organization's situation, constraints, and the forces in tension — not just "we needed a database."
  • Decision should state the chosen direction plainly, not hedge.
  • Consequences should cover both what gets easier and what gets harder, plus any follow-on ADRs this decision now requires.
  • Timestamp it. Costs, vendor pricing, and scaling numbers change — date anything that might go stale.
  • Give the record a status: proposed | accepted | rejected | deprecated | superseded by <link>.

6. Handle supersession, not silent edits

ADRs are usually treated as immutable once accepted (some teams instead prefer a "living document" with dated addenda — ask if unsure which this team wants). When a new decision replac

常见问题

每一项技术选择都需要决策记录吗?

不需要。该技能建议为重大且难以撤销的决策做记录,小的或临时的选择则会跳过。

智能体会遵循我们现有的记录格式吗?

会。如果你的项目已有记录文件夹,智能体会遵循其命名和编号方式。

它能替换旧的决策记录吗?

可以。该技能涵盖撰写一份用来取代旧记录的新记录。

详情

作者的原始描述

Use when a user wants to create, write, name, place, or organize an Architecture Decision Record (ADR) in a software project — e.g. "write an ADR for choosing a database", "document this architecture decision", "set up an adr/ or decisions/ directory", "which ADR template should I use", "supersede an old ADR". Covers picking a template, naming the file, filling in context/decision/consequences, and deciding whether a decision even needs an ADR.

repo: architecture-decision-record/architecture-decision-record

热度

GitHub 星标
17k
排名
#10744
许可证
—
更新时间
2026/10/29

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

相似技能