重要的技术决策应该是深思熟虑、透明且有记录的,而不是在某人的脑子里做出然后被遗忘。一个良好的流程可以展示权衡,建立共识,并留下痕迹,以便未来的工程师理解为什么,而不仅仅是什么。
决策框架
text
1. FRAME the problem and the constraints (cost, time, team skill, scale)
2. LIST the realistic options — usually 2-4, including "do nothing"
3. EVALUATE each against the constraints and trade-offs
4. DECIDE, and state the reasoning explicitly
5. RECORD it (ADR) and communicate it
6. REVISIT if assumptions change
用ADR记录它
Architecture Decision Record 是一个简短、持久的笔记:
markdown
We need a primary datastore. Team knows SQL; data is relational; scale is moderate.
Use PostgreSQL.
Strong consistency, team familiarity, rich querying.
Vertical scaling limits later; revisit if write volume 10x's.
DynamoDB (rejected: relational data, team unfamiliar).
