architecture-decision-record-skill
Skill này làm gì
Skill này giúp agent AI tạo và tổ chức các bản ghi quyết định kiến trúc cho một dự án phần mềm. Skill dành cho lập trình viên và đội nhóm muốn giữ lịch sử rõ ràng về lý do các lựa chọn kỹ thuật quan trọng được đưa ra.
Khi nào nên dùng
- ✓Khi đội nhóm của bạn đang chọn giữa hai công nghệ, chẳng hạn hai cơ sở dữ liệu, và muốn lựa chọn đó được ghi lại.
- ✓Khi bạn cần thiết lập một thư mục cho các bản ghi quyết định trong dự án và tuân theo một kiểu đặt tên rõ ràng.
- ✓Khi một quyết định cũ được thay thế bằng quyết định mới và bản ghi cũ cần được đánh dấu là đã bị thay thế.
Liên kết skill
https://github.com/architecture-decision-record/architecture-decision-record/blob/main/skills/architecture-decision-record-skill/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Bạn có thể viết một bản ghi quyết định giải thích vì sao chúng tôi chọn PostgreSQL thay vì MongoDB cho dịch vụ đơn hàng không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent trước hết kiểm tra xem quyết định có đáng được ghi lại không, rồi tìm thư mục bản ghi hiện có. Nó chọn một mẫu và điền vào phần bối cảnh, quyết định và hệ quả.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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/oradr/directory. Some teams preferdecisions/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.
.mdextension.- 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
Câu hỏi thường gặp
Mọi lựa chọn kỹ thuật đều cần bản ghi quyết định không?
Không. Skill khuyến nghị ghi lại các quyết định quan trọng, khó đảo ngược, và bỏ qua những lựa chọn nhỏ hoặc tạm thời.
Agent có tuân theo định dạng bản ghi hiện có của chúng tôi không?
Có. Nếu dự án đã có thư mục bản ghi, agent sẽ theo cách đặt tên và đánh số của thư mục đó.
Nó có thể thay thế một quyết định cũ không?
Có. Skill bao gồm việc viết một bản ghi mới thay thế bản ghi cũ.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 17k
- Vị trí xếp hạng
- #10744
- Giấy phép
- —
- Cập nhật
- 29/10/2026
Bình luận
- …
Skill tương tự
technical-documentation
394kGiúp agent của bạn viết và rà soát tài liệu kỹ thuật cùng file hướng dẫn cho agent, rõ ràng để mọi người và công cụ AI đều dễ làm theo.
architecture-decision-records
280kGiúp agent của bạn ghi lại các quyết định quan trọng về cấu trúc dự án, giúp hiểu lý do đằng sau các lựa chọn và giữ lịch sử thay đổi rõ ràng.
code-tour
280kGiúp agent của bạn tạo các hướng dẫn đọc code từng bước, có tham chiếu chính xác đến file và dòng, hữu ích cho phần giới thiệu, giải thích và rà soát.