write-adr
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWrite ADR Skill
编写ADR技能
Create a well-structured Architecture Decision Record.
创建结构清晰的架构决策记录(ADR)。
Step 1 — Gather Information
步骤1 — 收集信息
Ask the user (if not already provided):
- What decision was made?
- What was the context or problem that prompted it?
- What alternatives were considered?
- What are the trade-offs or consequences of this decision?
询问用户(若未提供相关信息):
- 做出了什么决策?
- 促使该决策产生的背景或问题是什么?
- 考虑过哪些替代方案?
- 该决策的权衡或影响是什么?
Step 2 — Determine the ADR Number
步骤2 — 确定ADR编号
List existing ADRs in and increment the highest number.
If the directory does not exist, create it and start at .
docs/adr/0001列出目录下已有的ADR,将最高编号加1。如果该目录不存在,则创建它并从开始编号。
docs/adr/0001Step 3 — Write the ADR
步骤3 — 编写ADR
Use the template from . Fill every section:
adr-template.md- Title: short, imperative phrase describing the decision
- Status: for a new decision
Accepted - Date: today's date in YYYY-MM-DD format
- Context: the situation that made a decision necessary — be specific about constraints
- Decision: what was decided — use active voice ("We will use X")
- Consequences: both positive and negative outcomes; what becomes easier and harder
The ADR must stand alone — a reader unfamiliar with the decision must understand it fully
from the ADR text without needing to ask follow-up questions.
使用中的模板。填写所有部分:
adr-template.md- 标题:简短的祈使句,描述决策内容
- 状态:新决策填
Accepted - 日期:今日日期,格式为YYYY-MM-DD
- 背景:需要做出决策的具体场景——明确说明约束条件
- 决策:最终做出的决定——使用主动语态(“我们将使用X”)
- 影响:包括积极和消极的结果;哪些事情会变得更简单,哪些会更困难
ADR必须独立成篇——不了解该决策的读者仅通过ADR文本就能完全理解内容,无需进一步提问。
Step 4 — Write the File
步骤4 — 保存文件
Save to .
docs/adr/NNNN-{kebab-case-title}.mdExample:
docs/adr/0003-use-postgresql-as-primary-store.md保存至。
docs/adr/NNNN-{kebab-case-title}.md示例:
docs/adr/0003-use-postgresql-as-primary-store.md