|
| 1 | +# RFC: RFC process |
| 2 | + |
| 3 | +The request for comments (RFC) process is intended to provide a consistent and |
| 4 | +controlled path for new features to enter Node.js. The process helps find |
| 5 | +consensus among Node.js community and collaborators on substantial changes to |
| 6 | +the runtime. |
| 7 | + |
| 8 | +## Motivation |
| 9 | + |
| 10 | +Attempting to contribute substantial features to Node.js can result in |
| 11 | +interminable, chaotic, and repetitive conversations with no clear resolution and |
| 12 | +no realistic process for resolution. The intention of this proposal is to |
| 13 | +provide a clearer process. |
| 14 | + |
| 15 | +Examples that may have benefited from an RFC process: |
| 16 | + |
| 17 | +* [Implement window.fetch into core][] |
| 18 | + |
| 19 | +## Guide-level explanation |
| 20 | + |
| 21 | +You need to follow this process if you intend to make substantial changes to the |
| 22 | +Node.js runtime. Substantial changes include: |
| 23 | + |
| 24 | +* Semantic or syntactic changes to Node.js that are not bugfixes. |
| 25 | +* Removing stable Node.js features. |
| 26 | +* New modules. |
| 27 | +* Bundling of new executables or removal of existing bundled executables. |
| 28 | + |
| 29 | +Changes that do not require an RFC are changes that do not meet the preceding |
| 30 | +criteria. These might include: |
| 31 | + |
| 32 | +* Rephrasing text or reorganizing documentation. |
| 33 | +* Refactoring code. |
| 34 | +* Bugfixes. |
| 35 | +* Changes that improve performance benchmarks. |
| 36 | +* Additions that only affect core developers and not end users. |
| 37 | + |
| 38 | +If you submit a pull request to implement a new feature without going through |
| 39 | +the RFC process, it might be closed with a polite request to submit an RFC |
| 40 | +first. |
| 41 | + |
| 42 | +## Reference-level explanation |
| 43 | + |
| 44 | +To get a substantial feature added to Node.js, first get the RFC merged into the |
| 45 | +`rfcs` directory as a markdown file. At that point the RFC is _accepted_ and may |
| 46 | +be implemented with the goal of eventual inclusion into Node.js. |
| 47 | + |
| 48 | +* Fork the RFC repo <https://github.com/nodejs/node> |
| 49 | +* Copy `doc/rfcs/00000-template.md` to `doc/rfcs/00000-my-feature.md` where |
| 50 | + `my-feature` is descriptive. Don't assign an RFC number yet. |
| 51 | +* Fill in the RFC. |
| 52 | +* Submit a pull request. The pull request is where we get review of the |
| 53 | +design from the larger community. |
| 54 | +* Once the pull request is opened, the submitter or a core team collaborator |
| 55 | + should: |
| 56 | + * Update the RFC file name to change `00000` to the pull request identifier. |
| 57 | + * Update `doc/rfcs/README.md` in the pull request to include the RFC in the |
| 58 | + [Accepted RFCs list][]. |
| 59 | +* Build consensus and integrate feedback. RFCs that have broad support are much |
| 60 | +more likely to make progress than those that don't receive any comments. |
| 61 | + |
| 62 | +Eventually, one of the [Node.js core team collaborators][] will either accept |
| 63 | +the RFC by merging the pull request, at which point the RFC is accepted, or |
| 64 | +reject it by closing the pull request. |
| 65 | + |
| 66 | +Once an RFC becomes active then authors may implement it and submit the |
| 67 | +feature as a pull request to the Node.js repository. _Active_ is not a rubber |
| 68 | +stamp, and in particular still does not mean the feature will ultimately be |
| 69 | +merged. It does mean that in principle all the major stakeholders have agreed to |
| 70 | +the feature and are amenable to merging it. |
| 71 | + |
| 72 | +Modifications to active RFCs can be done in subsequent PRs. An RFC that makes it |
| 73 | +through the entire process to implementation is _complete_ and is removed from |
| 74 | +the [Accepted RFCs List][]. |
| 75 | + |
| 76 | +## Drawbacks |
| 77 | + |
| 78 | +* This approach means a formal process for substantial features where we do not |
| 79 | + currently have one. This could be seen as an advantage rather than drawback, |
| 80 | + Nonetheless, all else being equal, it is desirable to have less process. In an |
| 81 | + attempt to address this drawback, this proposal attempts a lightweight |
| 82 | + approach. |
| 83 | + |
| 84 | +## Rationale and alternatives |
| 85 | + |
| 86 | +The current process has resulted in a number of stalemates that have taken a |
| 87 | +toll on participants. It works well for bugfixes but not as well for big new |
| 88 | +features. Defining a process and reconsidering out decision-making process may |
| 89 | +avoid the problem, in the words of one contributor, of "Good ideas die because |
| 90 | +people can't agree on a parameter name." |
| 91 | + |
| 92 | +Alternatives include: |
| 93 | + |
| 94 | +* The _status quo_ may not be ideal, but perhaps it works well enough, or better |
| 95 | + than alternatives can be expected to work. |
| 96 | +* We could consider a more traditional heavyweight RFC process. There do not |
| 97 | + appear to be any advocates whatsoever for such a thing. |
| 98 | +* Instead (or in addition) to an RFC process, we could choose to expand and |
| 99 | + improve the Working Group (WG) model. This (arguably) worked well for ES |
| 100 | + modules. It is, however, harder to imagine it working well for deciding |
| 101 | + whether to implement fetch in Node.js core or whether to bundle package |
| 102 | + managers other than `npm`. |
| 103 | + |
| 104 | +## Prior art |
| 105 | + |
| 106 | +* [Node.js enhancement proposals][] |
| 107 | + * Only a few people wrote enhancement proposals (EPs). A bigger problem may |
| 108 | + have been that only a few people read them. One lesson this proposal tries |
| 109 | + to take from issues with the EP process is that the RFCs need to be visible. |
| 110 | + In general, Node.js information is overly siloed. Rather than placed in a |
| 111 | + separate repository, RFCs will live in the main Node.js core repository. |
| 112 | + * Because the process was, in effect, not mandatory, there were not a lot of |
| 113 | + examples by core team members showing what a good RFC and RFC process look |
| 114 | + like. |
| 115 | +* [Rust RFC process][] |
| 116 | + * This is largely what this proposal is modeled on. |
| 117 | +* [Python Enhancement Proposals][] |
| 118 | + * This is a more detailed (and thus heavyweight) model than what is proposed |
| 119 | + here. |
| 120 | +* [Any interest in an RFC process?][] |
| 121 | + * This TSC issue is what prompted this proposal. It contains more details |
| 122 | + about some background information that is summarized more briefly in this |
| 123 | + proposal. |
| 124 | + |
| 125 | +## Unresolved questions |
| 126 | + |
| 127 | +* This process should be implemented on a trial basis. What is the appropriate |
| 128 | + time period to evaluate how the RFC process is working? What is the process |
| 129 | + for that evaluation? How do we make changes or revoke the process? (TSC |
| 130 | + decision?) |
| 131 | +* Should RFCs (and other things perhaps) be consent-based rather than |
| 132 | + consensus-based? |
| 133 | +* Should RFC discussions be time-boxed? Getting to "no" faster would be good. |
| 134 | + It's not that the RFC process should lead to success all the time or even |
| 135 | + necessarily most of the time. It's that it should never lead to a years-long |
| 136 | + process which never arrives at a clear resolution one way or the other. |
| 137 | +* Should opening a pull request with a minimal implementation could be part of |
| 138 | + the process? This would fail to separate idea from implementation, but it |
| 139 | + would help people who feel they can't determine much with certainty until they |
| 140 | + see how it will be work in practice. (I'm hopeful that the emphasis on |
| 141 | + examples in the template will meet that need.) |
| 142 | +* How will this affect velocity? Is that a concern or out of scope? |
| 143 | + |
| 144 | +[Accepted RFCs list]: ./README.md#accepted-rfcs-list |
| 145 | +[Any interest in an RFC process?]: https://github.com/nodejs/TSC/issues/962 |
| 146 | +[Implement window.fetch into core]: https://github.com/nodejs/TSC/issues/962 |
| 147 | +[Node.js core team collaborators]: ../../README.md#collaborators |
| 148 | +[Node.js enhancement proposals]: https://github.com/nodejs/node-eps |
| 149 | +[Python Enhancement Proposals]: https://www.python.org/dev/peps/pep-0001/ |
| 150 | +[Rust RFC process]: https://github.com/rust-lang/rfcs/blob/HEAD/text/0002-rfc-process.md |
0 commit comments