最近参与一个从零开始的开源项目,开完几次会议后正式分组准备进入第一阶段的功能实现,由于之前对 RFC 流程很有兴趣,就在 Discord 群里推广了下 RFC 流程。
TL;DR: 在没有实际产品前的开发阶段不适合使用 RFC,比较适合在有产品的开源项目里使用,以及大家有共识的工作流程才是好的工作流程。
什么是 RFC#
RFC (Request for Comments) 又称意见请求、意见征求,很多开源项目都能看到有自己的 RFC 工作流程
Rust
Bytecodealliance
Reactjs
VueJS
Ethereum
在开源项目里执行RFC driven development的好处是任何改动可以透明的被讨论与取得共识,最后在根据定义好的 RFC 文件去实现改动。
自己也是第一次实现 RFC 流程,参考了几篇流程文章后,在 Discord 中与大家分享 (推坑 ,团队都对 RFC 流程很有兴趣但不知道该怎么执行,与有在执行 RFC 的朋友讨论跟其他公司的流程分享,最后起草了一份 template 让大家来讨论。
RFC driven development
Gatsby RFC process
起草的 Discussion#
Why use RFC#
"RFC" (request for comments) 过程旨在为产品(如新功能)的变更提供一致和受控的路径,以便所有成员对项目的方向充满信心。
许多变更,包括错误修复和文档改进,可以通过正常的 GitHub 拉取请求工作流程实施和审查。
然而,有些变更是 “实质性的”,我们要求这些变更经过一定的设计过程,并在产品社区中达成共识。
RFC template#
---
name: RFC
about: Suggest an idea for this project
title: "[RFC]"
labels: enhancement
assignees: ''
---
# RFC: [Your Topic Title]
## Summary
A short, concise description of the feature or change proposed. This should be used to provide a high-level understanding of the proposal.
## Motivation
Explain the context and why you're making this proposal. What is the problem that needs solving? What use cases does it support? What is the expected outcome?
## Proposal Sketch / Detailed Design
For early-stage RFCs, provide at least a sketch of how to address the problem to help center the discussion on a concrete starting point.
For more detailed RFCs, this section should contain enough information for others to understand and evaluate the proposal. It should cover the key points and design considerations, including a discussion of the architecture, an explanation of design details, and a reasoning behind your choices.
### Components Diagram
Provide a components diagram if possible.
### Sequence Diagram
Provide a sequence diagram if possible.
### Class Diagram
Provide a class diagram if it adds value and understanding to the proposal.
### OpenAPI Spec
Include an OpenAPI specification if the proposal involves an API.
## Rationale and Alternatives
Discuss the reasons for choosing the proposed design along with the trade-offs it involves. Moreover, describe the alternatives that have been considered and why they were discarded.
## Open Questions
Discuss aspects of the design which are still unresolved or require further discussion. It can be divided into two sections, questions that you hope to answer before finalizing the RFC and questions that would be resolved during the implementation phase.
## Drawbacks
What are the potential downsides of this proposal? What are the implications for users or existing systems?
## Adoption Strategy
If the proposal gets accepted, describe the path for adoption in your current system. What is the integration strategy?
## Action Plans
List the key actions that need to be completed once the RFC is approved. Also include dates for discussions, reviews, and approvals if possible.
- [ ] Design discussion at YYYY-MM-DD
- [ ] RFC review at YYYY-MM-DD
- [ ] RFC approval at YYYY-MM-DD
RFC Draft template#
---
name: RFC
about: Suggest an idea for this project
title: "[RFC]"
labels: enhancement
assignees: ''
---
# RFC Title
## Summary
Provide a brief single-paragraph explanation of the change.
## Motivation
Describe the motivation behind this RFC. What is the current state, and why is this change beneficial? What use cases does it support? What is the expected outcome?
## Proposal Sketch
At this stage, the proposal does not need to be fully formed. A sketch is enough to center the discussion. Detail the proposed solution at a high level. If any new concepts or terms are introduced, define them here.
## Open Questions
What parts of the design are still unclear or need resolving? What do you hope to resolve through discussion with the community before progressing this RFC to a full proposal?
## Trade-offs
What are the potential trade-offs or impacts of this proposal? How does it affect other areas of the system, if any?
## Unresolved Questions
What parts of the proposal are TBD (to be decided)?
Discuss RFC flow#
-
Discussion to RFC: Start with an open discussion thread in the repo's Discussion section. After reaching a consensus, the author of the thread drafts an RFC. Once the RFC is ready, development can commence, ending with a Pull Request.
-
Draft RFC to Pull Request: The proposer initiates the process by creating a draft RFC and submitting it as a draft Pull Request. After discussions and refinements, the Pull Request is formally reviewed and then either merged or closed.
-
Combined Approach: Begin with preliminary discussions in the Discussion section. Once the idea is somewhat clear and specific, move to drafting an RFC and submitting it as a Pull Request for in-depth discussions and formal review. This combines the open nature of discussions with the structured format of the RFC and Pull Request process.
结论#
刚前面有提到,我参与的是从零开始设计讨论的开源项目,我们一开始的开会模式是使用 FigmaJam 做产品构想与讨论,而后面则是使用 google doc 记录了需要开发的功能,由于产品属于准备进入实现时期,大家讨论的点是在 spec 还未正式定案加上已有 google doc 版本的 spec 和 UIUX 对于 github 的操作流程不一定熟悉等的因素,我们做了一次投票,最终大家决定先以 google doc + FigmaJam 为主要开发文件,主要是开发初期要做好 RFC 文件对于大家都有难度,也会使产品的开发周期变得更长;最终大家有共识的工作流程才是最适合的工作流程。