create-adr

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
Create a new Architecture Decision Record (ADR) in
doc/adr/
using the Nygard format.
使用Nygard格式在
doc/adr/
目录下创建新的架构决策记录(ADR)。

Steps

步骤

  1. If the user did not provide a decision title as an argument, ask them for one
  2. Convert the title to kebab-case for the filename
  3. Use today's date (YYYY-MM-DD) as prefix:
    doc/adr/YYYY-MM-DD-kebab-case-title.md
  4. Create the file with this template:
markdown
undefined
  1. 如果用户未将决策标题作为参数提供,请向他们索要标题
  2. 将标题转换为kebab-case格式作为文件名
  3. 使用今日日期(YYYY-MM-DD)作为前缀:
    doc/adr/YYYY-MM-DD-kebab-case-title.md
  4. 使用以下模板创建文件:
markdown
undefined

[Title]

[标题]

Status: proposed
状态: 提议中

Context

背景

[What is the issue? What forces are at play? What is the background?]
[存在什么问题?有哪些影响因素?背景信息是什么?]

Decision

决策

[What is the change that we're proposing and/or doing?]
[我们提议或将要做出的变更是什么?]

Consequences

影响

[What becomes easier or more difficult to do because of this change? Include positive, negative, and neutral consequences.]

6. Tell the user the file was created and its path
7. Remind them: "ADRs are immutable once accepted — to change a decision, supersede it with a new ADR."
[由于此变更,哪些操作会变得更容易或更困难? 请包含积极、消极和中性的影响。]

6. 告知用户文件已创建并提供其路径
7. 提醒用户:"ADR一旦被接受便不可变更——若要修改决策,请使用新的ADR替代它。"