- 复制
adr-template.md文件。使用以下文件名模式:adr-next_number-title.md - 如果你希望尽早获得反馈,请创建一个草稿 Pull Request,并向负责治理的团队征求意见。
- 确保问题、上下文以及推荐解决方案清晰且有完整文档记录。务必记录备选解决方案空间,并说明它们被舍弃的原因。
- 在 README 文件的列表中添加一项:目录。
- 创建一个 Pull Request 来提议新的 ADR。
ADR 生命周期
ADR 的创建是一个迭代式过程。我们不应试图在单个 ADR pull request 中解决所有决策,而是必须先通过 GitHub Issue 理解问题并收集反馈。- 每个提案都应当从一个新的 GitHub Issue 开始,或者基于现有 Issue 推导而来。Issue 只需包含简要的提案摘要。
-
一旦动机得到验证,就创建一个 GitHub Pull Request(PR),其中包含一个基于
adr-template.md的新文档。 -
ADR 不必在单个 PR 中以 accepted 状态进入
main。如果动机清晰且解决方案合理,我们应当能够将其合并并保留 proposed 状态。相比长期未合并的 Pull Request,迭代式方式更可取。 - 如果一个 proposed ADR 被合并,那么它应当在 ADR 文档备注或 GitHub Issue 中清晰记录尚未解决的问题。
- PR 应当始终被合并。即使 ADR 有缺陷,我们仍然倾向于以 rejected 状态将其合并。唯一不应合并 ADR 的情况是作者放弃了它。
- 已合并的 ADR 不应被删除。
ADR 状态
状态由两部分组成:Implemented 或 Not Implemented。
共识状态
DRAFT:[可选] 表示仍在进行中的 ADR,尚未准备好进行广泛评审。用于以 Draft Pull Request 的形式展示早期工作并获取早期反馈。PROPOSED:表示已覆盖完整解决方案架构、但仍处于评审中的 ADR,项目相关方尚未达成一致。LAST CALL <最后征求意见日期>:[可选] 明确通知当前已接近接受更新。将状态改为LAST CALL表示社会性共识(Cosmos SDK 维护者之间)已经达成,但仍希望留出时间让社区作出反馈或分析。ACCEPTED:表示将代表当前已实现或即将实现的架构设计的 ADR。REJECTED:如果项目相关方达成共识,ADR 可以从 PROPOSED 或 ACCEPTED 变为 rejected。SUPERSEEDED by ADR-xxx:表示该 ADR 已被新的 ADR 所取代。ABANDONED:表示原作者不再继续推进该 ADR。
ADR 中使用的语言
- 上下文/背景应使用现在时书写。
- 避免使用第一人称的个人化表达。
- Copy the
adr-template.mdfile. Use the following filename pattern:adr-next_number-title.md - Create a draft Pull Request and solicit input from the stewarding team, if you want to get an early feedback.
- Make sure that the problem, the context and a recommended solution is clear and well documented. Be sure to document alternate solution spaces and give reasons why they have been discarded.
- Add an entry to a list in the README file Table of Contents.
- Create a Pull Request to propose a new ADR.
ADR life cycle
ADR creation is an iterative process. Instead of trying to solve all decisions in a single ADR pull request, we MUST firstly understand the problem and collect feedback through a GitHub Issue.- Every proposal SHOULD start with a new GitHub Issue or be a result of existing Issues. The Issue should contain just a brief proposal summary.
-
Once the motivation is validated, a GitHub Pull Request (PR) is created with a new document based on the
adr-template.md. -
An ADR doesn’t have to arrive to
mainwith an accepted status in a single PR. If the motivation is clear and the solution is sound, we SHOULD be able to merge it and keep a proposed status. It’s preferable to have an iterative approach rather than long, not merged Pull Requests. - If a proposed ADR is merged, then it should clearly document outstanding issues either in ADR document notes or in a GitHub Issue.
- The PR SHOULD always be merged. In the case of a faulty ADR, we still prefer to merge it with a rejected status. The only time the ADR SHOULD NOT be merged is if the author abandons it.
- Merged ADRs SHOULD NOT be deleted.
ADR status
Status has two components:Implemented or Not Implemented.
Consensus Status
DRAFT: [optional] an ADR which is work in progress, not being ready for a general review. This is to present an early work and get an early feedback in a Draft Pull Request form.PROPOSED: an ADR covering a full solution architecture and still in the review - project stakeholders haven’t reached an agreement yet.LAST CALL <date for the last call>: [optional] clear notify that we are close to accept updates. Changing a status toLAST CALLmeans that social consensus (of Cosmos SDK maintainers) has been reached and we still want to give it a time to let the community react or analyze.ACCEPTED: ADR which will represent a currently implemented or to be implemented architecture design.REJECTED: ADR can go from PROPOSED or ACCEPTED to rejected if the consensus among project stakeholders will decide so.SUPERSEEDED by ADR-xxx: ADR which has been superseded by a new ADR.ABANDONED: the ADR is no longer pursued by the original authors.
Language used in ADR
- The context/background should be written in the present tense.
- Avoid using a first, personal form.