architecture-decision-records – skill Lập trình cho agent AI
Viết và duy trì Architecture Decision Records (ADR) theo các thực hành tốt nhất để ghi lại quyết định kỹ thuật. Dùng khi ghi nhận các quyết định kiến trúc quan trọng, rà soát lựa chọn kiến trúc trước đây hoặc thiết lập quy trình ra quyết định.
Cài skill architecture-decision-records bằng một lệnh
Chọn công cụ bạn đang dùng, copy lệnh và dán vào terminal. Skill sẽ nằm trong thư mục skills của công cụ đó và sẵn sàng dùng ở phiên làm việc tiếp theo.
Claude Code
mkdir -p ~/.claude/skills && curl -fsSL https://skill.dn1nguoi.com/z/architecture-decision-records-28c36.tgz | tar xz -C ~/.claude/skills
Gọi trong Claude Code: /architecture-decision-records – rồi mô tả công việc bạn muốn làm.
Codex
mkdir -p ~/.codex/skills && curl -fsSL https://skill.dn1nguoi.com/z/architecture-decision-records-28c36.tgz | tar xz -C ~/.codex/skills
Gọi trong Codex: $architecture-decision-records – rồi mô tả công việc bạn muốn làm.
Hermes Agent
mkdir -p ~/.hermes/skills && curl -fsSL https://skill.dn1nguoi.com/z/architecture-decision-records-28c36.tgz | tar xz -C ~/.hermes/skills
Gọi trong Hermes Agent: /architecture-decision-records – rồi mô tả công việc bạn muốn làm.
DeepSeek
mkdir -p ~/.deepcode/skills && curl -fsSL https://skill.dn1nguoi.com/z/architecture-decision-records-28c36.tgz | tar xz -C ~/.deepcode/skills
Gọi trong DeepSeek: /architecture-decision-records – rồi mô tả công việc bạn muốn làm.
Nội dung SKILL.md
Nội dung SKILL.md gốc bằng tiếng Anh.
Architecture Decision Records
Comprehensive patterns for creating, maintaining, and managing Architecture Decision Records (ADRs) that capture the context and rationale behind significant technical decisions.
When to Use This Skill
- Making significant architectural decisions
- Documenting technology choices
- Recording design trade-offs
- Onboarding new team members
- Reviewing historical decisions
- Establishing decision-making processes
Core Concepts
1. What is an ADR?
An Architecture Decision Record captures:
- Context: Why we needed to make a decision
- Decision: What we decided
- Consequences: What happens as a result
2. When to Write an ADR
| Write ADR | Skip ADR |
| -------------------------- | ---------------------- |
| New framework adoption | Minor version upgrades |
| Database technology choice | Bug fixes |
| API design patterns | Implementation details |
| Security architecture | Routine maintenance |
| Integration patterns | Configuration changes |
3. ADR Lifecycle
Proposed → Accepted → Deprecated → Superseded
↓
RejectedBefore drafting a standard, lightweight, or Y-statement ADR, read [decision templates](references/decision-templates.md).
Before drafting a deprecation ADR or RFC, read [deprecation and RFC templates](references/deprecation-rfc-templates.md).
ADR Management
Directory Structure
docs/
├── adr/
│ ├── README.md # Index and guidelines
│ ├── template.md # Team's ADR template
│ ├── 0001-use-postgresql.md
│ ├── 0002-caching-strategy.md
│ ├── 0003-mongodb-user-profiles.md # [DEPRECATED]
│ └── 0020-deprecate-mongodb.md # Supersedes 0003ADR Index (README.md)
# Architecture Decision Records
This directory contains Architecture Decision Records (ADRs) for [Project Name].
## Index
| ADR | Title | Status | Date |
| ------------------------------------- | ---------------------------------- | ---------- | ---------- |
| [0001](0001-use-postgresql.md) | Use PostgreSQL as Primary Database | Accepted | 2024-01-10 |
| [0002](0002-caching-strategy.md) | Caching Strategy with Redis | Accepted | 2024-01-12 |
| [0003](0003-mongodb-user-profiles.md) | MongoDB for User Profiles | Deprecated | 2023-06-15 |
| [0020](0020-deprecate-mongodb.md) | Deprecate MongoDB | Accepted | 2024-01-15 |
## Creating a New ADR
1. Copy `template.md` to `NNNN-title-with-dashes.md`
2. Fill in the template
3. Submit PR for review
4. Update this index after approval
## ADR Status
- **Proposed**: Under discussion
- **Accepted**: Decision made, implementing
- **Deprecated**: No longer relevant
- **Superseded**: Replaced by another ADR
- **Rejected**: Considered but not adoptedAutomation (adr-tools)
# Install adr-tools
brew install adr-tools
# Initialize ADR directory
adr init docs/adr
# Create new ADR
adr new "Use PostgreSQL as Primary Database"
# Supersede an ADR
adr new -s 3 "Deprecate MongoDB in Favor of PostgreSQL"
# Generate table of contents (to a separate file, so the hand-written
# index and guidelines in README.md are not overwritten)
adr generate toc > docs/adr/toc.md
# Link related ADRs
adr link 2 "Complements" 1 "Is complemented by"Review Process
## ADR Review Checklist
### Before Submission
- [ ] Context clearly explains the problem
- [ ] All viable options considered
- [ ] Pros/cons balanced and honest
- [ ] Consequences (positive and negative) documented
- [ ] Related ADRs linked
### During Review
- [ ] At least 2 senior engineers reviewed
- [ ] Affected teams consulted
- [ ] Security implications considered
- [ ] Cost implications documented
- [ ] Reversibility assessed
### After Acceptance
- [ ] ADR index updated
- [ ] Team notified
- [ ] Implementation tickets created
- [ ] Related documentation updatedBest Practices
Do's
- Write ADRs early - Before implementation starts
- Keep them short - 1-2 pages maximum
- Be honest about trade-offs - Include real cons
- Link related decisions - Build decision graph
- Update status - Deprecate when superseded
Don'ts
- Don't change accepted ADRs - Write new ones to supersede
- Don't skip context - Future readers need background
- Don't hide failures - Rejected decisions are valuable
- Don't be vague - Specific decisions, specific consequences
- Don't forget implementation - ADR without action is waste
Skill liên quan
- architecture-patterns – Triển khai các mẫu kiến trúc backend đã được kiểm chứng như Clean Architecture…
- gh-address-comments – Hỗ trợ xử lý các bình luận review/issue trên PR GitHub đang mở của nhánh hiện tại bằng…
- airtable – API REST của Airtable qua curl. CRUD bản ghi, bộ lọc, upsert.
- claude-api – Tài liệu tham khảo cho Claude API / Anthropic SDK — model id, giá, tham số, streaming…
- code-simplification – Đơn giản hóa code để dễ đọc hơn. Dùng khi refactor code cho rõ ràng hơn mà không thay…
- astropy – Thư viện Python cốt lõi cho quy trình thiên văn học và vật lý thiên văn cần dùng API của…
- async-python-patterns – Thành thạo asyncio, lập trình đồng thời và mẫu async/await trong Python cho ứng dụng…
- gh-fix-ci – Kiểm tra trạng thái check của PR GitHub bằng gh, lấy log GitHub Actions lỗi, tóm tắt bối…