51 lines
1.5 KiB
Markdown
51 lines
1.5 KiB
Markdown
---
|
||
title: "Architecture Decision Record"
|
||
type: concept
|
||
tags: []
|
||
last_updated: 2026-05-01
|
||
---
|
||
|
||
## Definition
|
||
Architecture Decision Record(架构决策记录)是一种轻量级文档,用于捕获架构决策的上下文、选项和理由。ADR 记录的是"为什么这样做",而不仅仅是"做了什么"。
|
||
|
||
## ADR Format
|
||
|
||
```markdown
|
||
# ADR-001: [Decision Title]
|
||
|
||
## Status
|
||
Proposed | Accepted | Deprecated | Superseded by ADR-XXX
|
||
|
||
## Context
|
||
What is the issue that we're seeing that is motivating this decision?
|
||
|
||
## Decision
|
||
What is the change that we're proposing and/or doing?
|
||
|
||
## Consequences
|
||
What becomes easier or harder because of this change?
|
||
```
|
||
|
||
## Key Elements
|
||
- **Status**:Proposed(提议中)/ Accepted(已接受)/ Deprecated(已废弃)/ Superseded(被替代)
|
||
- **Context**:驱动决策的问题或背景
|
||
- **Decision**:具体的决策内容
|
||
- **Consequences**:决策的后果——什么变得更容易,什么变得更难
|
||
|
||
## Core Principles
|
||
- **记录 WHY,而非 WHAT**:代码已经说明了"做了什么",ADR 应该说明"为什么这样做"
|
||
- **可追溯性**:随着系统演进,ADR 提供了决策的历史脉络
|
||
- **知识共享**:新成员可以通过 ADR 理解架构决策的背景
|
||
|
||
## Related Concepts
|
||
- [[SoftwareArchitect]]:ADR 是 Software Architect Agent 的核心工具之一
|
||
- [[DomainDrivenDesign]]:ADR 常用于记录领域模型的边界决策
|
||
|
||
## Sources
|
||
- [[engineering-software-architect]]
|
||
|
||
## Aliases
|
||
- ADR
|
||
- Architecture Decision Record
|
||
- 架构决策记录
|