architecture-decision-records
Skill này làm gì
Công cụ này tạo một bản ghi chính thức về các quyết định quan trọng trong kiến trúc phần mềm của dự án. Nó lưu các quyết định này trong các file văn bản dễ đọc gọi là ADR, được giữ cùng với code.
Khi nào nên dùng
- ✓Khi bạn quyết định dùng công nghệ nào (ví dụ cơ sở dữ liệu hoặc framework).
- ✓Khi thảo luận ưu và nhược điểm của các hướng tiếp cận khác nhau.
- ✓Khi ai đó hỏi tại sao một lựa chọn cụ thể được đưa ra.
Liên kết skill
https://github.com/affaan-m/ECC/blob/main/pi/core/skills/architecture-decision-records/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
“Ghi lại quyết định này: chúng ta sẽ dùng cơ sở dữ liệu PostgreSQL thay vì MongoDB.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Công cụ xác định khi nào một quyết định quan trọng được đưa ra. Sau đó nó thu thập bối cảnh, các phương án đã cân nhắc và hệ quả, rồi định dạng tất cả thành một file văn bản gọi là ADR.
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 Records
Capture architectural decisions as they happen during coding sessions. Instead of decisions living only in Slack threads, PR comments, or someone's memory, this skill produces structured ADR documents that live alongside the code.
When to Activate
- User explicitly says "let's record this decision" or "ADR this"
- User chooses between significant alternatives (framework, library, pattern, database, API design)
- User says "we decided to..." or "the reason we're doing X instead of Y is..."
- User asks "why did we choose X?" (read existing ADRs)
- During planning phases when architectural trade-offs are discussed
ADR Format
Use the lightweight ADR format proposed by Michael Nygard, adapted for AI-assisted development:
# ADR-NNNN: [Decision Title]
**Date**: YYYY-MM-DD
**Status**: proposed | accepted | deprecated | superseded by ADR-NNNN
**Deciders**: [who was involved]
## Context
What is the issue that we're seeing that is motivating this decision or change?
[2-5 sentences describing the situation, constraints, and forces at play]
## Decision
What is the change that we're proposing and/or doing?
[1-3 sentences stating the decision clearly]
## Alternatives Considered
### Alternative 1: [Name]
- **Pros**: [benefits]
- **Cons**: [drawbacks]
- **Why not**: [specific reason this was rejected]
### Alternative 2: [Name]
- **Pros**: [benefits]
- **Cons**: [drawbacks]
- **Why not**: [specific reason this was rejected]
## Consequences
What becomes easier or more difficult to do because of this change?
### Positive
- [benefit 1]
- [benefit 2]
### Negative
- [trade-off 1]
- [trade-off 2]
### Risks
- [risk and mitigation]
Workflow
Capturing a New ADR
When a decision moment is detected:
- Initialize (first time only) — if
docs/adr/does not exist, ask the user for confirmation before creating the directory, aREADME.mdseeded with the index table header (see ADR Index Format below), and a blanktemplate.mdfor manual use. Do not create files without explicit consent. - Identify the decision — extract the core architectural choice being made
- Gather context — what problem prompted this? What constraints exist?
- Document alternatives — what other options were considered? Why were they rejected?
- State consequences — what are the trade-offs? What becomes easier/harder?
- Assign a number — scan existing ADRs in
docs/adr/and increment - Confirm and write — present the draft ADR to the user for review. Only write to
docs/adr/NNNN-decision-title.mdafter explicit approval. If the user declines, discard the draft without writing any files. - Update the index — append to
docs/adr/README.md
Reading Existing ADRs
When a user asks "why did we choose X?":
- Check if
docs/adr/exists — if not, respond: "No ADRs found in this project. Would you like to start recording architectural decisions?" - If it exists, scan
docs/adr/README.mdindex for relevant entries - Read matching ADR files and present the Context and Decision sections
- If no match is found, respond: "No ADR found for that decision. Would you like to record one now?"
ADR Directory Structure
docs/
└── adr/
├── README.md ← index of all ADRs
├── 0001-use-nextjs.md
├── 0002-postgres-over-mongo.md
├── 0003-rest-over-graphql.md
└── template.md ← blank template for manual use
ADR Index Format
# Architecture Decision Records
| ADR | Title | Status | Date |
|-----|-------|--------|------|
| [0001](0001-use-nextjs.md) | Use Next.js as frontend framework | accepted | 2026-01-15 |
| [0002](0002-postgres-over-mongo.md) | PostgreSQL over MongoDB for primary datastore | accepted | 2026-01-20 |
| [0003](0003-rest-over-graphql.md) | REST API over GraphQL | accepted | 2026-02-01 |
Decision Detection Signals
Watch for these patterns in conversation that indicate an architectural decision:
Explicit signals
- "Let's go with X"
- "We should use X instead of Y"
- "The trade-off is worth it because..."
- "Record this as an ADR"
Implicit signals (suggest recording an ADR — do not auto-create without user confirmation)
- Comparing two frameworks or libraries and reaching a conclusion
- Making a database schema design choice with stated rationale
- Choosing between architectural patterns (monolith vs microservices, REST vs GraphQL)
…
Câu hỏi thường gặp
ADR là gì?
ADR là viết tắt của “Architecture Decision Record” (Bản ghi quyết định kiến trúc). Đó là một tài liệu đơn giản ghi lại một quyết định quan trọng về cấu trúc phần mềm.
Các bản ghi này được lưu ở đâu?
Chúng được lưu dưới dạng file Markdown trong thư mục `docs/adr/` của dự án.
Tôi có cần tự tạo các file này không?
Không, công cụ có thể tạo và quản lý các file này cho bạn khi bạn đưa ra quyết định.
Chi tiết
Mô tả gốc của tác giả
Capture architectural decisions as numbered ADR markdown files in docs/adr/ with context, alternatives considered, consequences, and an index README. Use when the user says 'record this decision' or 'ADR this', chooses between frameworks or databases, discusses trade-offs, or asks why the codebase is shaped this way.
repo: affaan-m/ECC
Độ phổ biến
- Sao GitHub
- 280k
- Vị trí xếp hạng
- #139
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
accessibility
280kGiúp agent của bạn tạo giao diện mà ai cũng dùng được, đảm bảo website và app hoạt động tốt với người khuyết tật như người mù hoặc khó vận động.
agent-architecture-audit
280kGiúp agent của bạn kiểm tra xem mọi thứ có hoạt động đúng không, đồng thời tìm và sửa các lỗi trong hệ thống AI để chúng chạy như mong đợi.
agent-eval
280kGiúp agent của bạn so sánh các công cụ lập trình AI khác nhau, đo xem công cụ nào nhanh hơn, rẻ hơn và đáng tin cậy hơn cho từng tác vụ.
agent-harness-construction
280kGiúp agent của bạn hiểu rõ hơn cách thực hiện tác vụ, tối ưu các công cụ và chỉ dẫn mà agent dùng để tăng khả năng thành công.
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.
archify
260kCài đặt Archify, công cụ biến một đặc tả JSON nhỏ thành sơ đồ HTML tương tác đã được kiểm tra, có thể xuất thành ảnh hoặc video.
concept-diagrams
260kTạo sơ đồ giáo dục phẳng, gọn trong một tệp HTML với đồ họa SVG, bao phủ vật lý, sinh học, giải phẫu, mặt bằng và quy trình.