|
| 1 | +# Typst Community RFCs |
| 2 | +[Typst RFCs]: #typst-rfcs |
| 3 | + |
| 4 | +The "RFC" (request for comments) process is intended to provide a consistent and controlled path for changes to Typst community standards and widely used features, so that all stakeholders can be confident about the direction of these. |
| 5 | + |
| 6 | +Many changes, including bug fixes and documentation improvements can be implemented and reviewed via the normal GitHub pull request workflow. |
| 7 | + |
| 8 | +Features specific to individual community projects can be done without an RFC. |
| 9 | +The RFC process should be used when more than one such project wants to establish a standard for the rest of the community. |
| 10 | + |
| 11 | +Some changes though are "substantial", and we ask that these be put through a bit of a design process and produce a consensus among the Typst community and community developers. |
| 12 | +We believe that this process makes the experience of using various community projects more consistent for the end user. |
| 13 | + |
| 14 | +However, note that this is not an authoritative process at the moment. |
| 15 | +It is used to explore the feasibility of RFCs for Typst as a whole and "substantial" changes, especially to the compiler itself, may be made outside of this repository. |
| 16 | + |
| 17 | + |
| 18 | +## Table of Contents |
| 19 | +[Table of Contents]: #table-of-contents |
| 20 | + |
| 21 | +- [Opening](#typst-rfcs) |
| 22 | +- [Table of Contents] |
| 23 | +- [Glossary] |
| 24 | +- [When you need to follow this process] |
| 25 | +- [Before creating an RFC] |
| 26 | +- [What the process is] |
| 27 | +- [The RFC life-cycle] |
| 28 | +- [Reviewing RFCs] |
| 29 | +- [Implementing an RFC] |
| 30 | +- [License] |
| 31 | +- [Contributions] |
| 32 | + |
| 33 | + |
| 34 | +## Glossary |
| 35 | +[Glossary]: #glossary |
| 36 | + |
| 37 | +- Typst: |
| 38 | + The open source Typst compiler ([typst/typst][typst]). |
| 39 | + |
| 40 | +- Typst Community: |
| 41 | + The community around the aforementioned compiler at large, as well as the unofficial [typst-community][self] organization. |
| 42 | + |
| 43 | +- Community Forge: |
| 44 | + A forum thread found under `#forge` > `Community` on the [official Typst community Discord][discord]. |
| 45 | + |
| 46 | +- Typst Forum: |
| 47 | + The [official Typst forum (forum.typst.app)][forum]. |
| 48 | + |
| 49 | +- Community Projects: |
| 50 | + Any Typst-adjacent project that is not officially maintained by the Typst GitHub organization. |
| 51 | + For example, the Typst compiler and its Rust dependencies are not community projects, but the [elembic] or [oxifmt] packages by one of the maintainers are. |
| 52 | + This can include but is not limited to language servers, formatters, test runners, package managers, packages, templates, or plugins. |
| 53 | + |
| 54 | +- Ecosystem Team (@typst-community/ecosystem): |
| 55 | + A team consisting of various active community members, some of which maintain community projects. |
| 56 | + |
| 57 | +- RFC: |
| 58 | + A **r**equest **f**or **c**omments is a public document with the intent to gather input regarding a feature or change of substantial impact. |
| 59 | + In the context of the Typst community this impact is mostly restricted to community project, but may also impact the Typst compiler itself. |
| 60 | + |
| 61 | +- FCP: |
| 62 | + The **f**inal **c**omment **p**eriod of an RFC is a period of 10 calendar days after the final decision to merge, close or postpone an RFC in which final concerns can be brought up. |
| 63 | + |
| 64 | + |
| 65 | +## When you need to follow this process |
| 66 | +[When you need to follow this process]: #when-you-need-to-follow-this-process |
| 67 | + |
| 68 | +You need to follow this process if you intend to make "substantial" changes to interfaces or standards used by multiple community projects, or the RFC process itself. |
| 69 | +What constitutes a "substantial" change is evolving based on community norms and varies depending on what part of the ecosystem you are proposing to change, but may include the following. |
| 70 | + |
| 71 | +- Any semantic or syntactic change to the community defined standards or conventions that is not a bug fix. |
| 72 | +- Removing language features widely used by community projects. |
| 73 | +- Changes to the interface between the Typst compiler and community projects. |
| 74 | + |
| 75 | +Some changes do not require an RFC: |
| 76 | + |
| 77 | +- Rephrasing, reorganizing, refactoring, or otherwise "changing shape does not change meaning". |
| 78 | +- Additions that strictly improve objective, numerical quality criteria (warning removal, speedup, better platform coverage, more parallelism, trap more errors, etc.) |
| 79 | +- Additions only likely to be _noticed by_ other developers-of-typst, invisible to users-of-typst. |
| 80 | +- Changes to Typst which have been discussed at length on the [Typst issue tracker][typst] and/or [community discord][discord]. |
| 81 | + |
| 82 | +If you submit a pull request to implement a new feature without going through the RFC process, it may be closed with a polite request to submit an RFC first. |
| 83 | + |
| 84 | + |
| 85 | +## Before creating an RFC |
| 86 | +[Before creating an RFC]: #before-creating-an-rfc |
| 87 | + |
| 88 | +A hastily-proposed RFC can hurt its chances of acceptance. |
| 89 | +Low quality proposals, proposals for previously-rejected features, or those that don't fit into the near-term road map, may be quickly rejected, which can be demotivating for the unprepared contributor. |
| 90 | +Laying some groundwork ahead of the RFC can make the process smoother. |
| 91 | + |
| 92 | +Although there is no single way to prepare for submitting an RFC, it is generally a good idea to pursue feedback from community project developers beforehand, to ascertain that the RFC may be desirable; |
| 93 | +having a consistent positive impact on community projects requires concerted effort toward consensus-building. |
| 94 | + |
| 95 | +The most common preparations for writing and submitting an RFC is discussing the topic in the [Community Forge][discord] or on the [Typst Forum][forum]. |
| 96 | +You may file issues on this repository for discussion too, but using the [official community Discord][discord] is generally the best way to get immediate feedback by the maintainers and community members. |
| 97 | + |
| 98 | +As a rule of thumb, receiving encouraging feedback from long-standing community developers, and particularly members of the relevant projects is a good indication that the RFC is worth pursuing. |
| 99 | + |
| 100 | + |
| 101 | +## What the process is |
| 102 | +[What the process is]: #what-the-process-is |
| 103 | + |
| 104 | +In short, to get a major feature added to multiple projects, one must first get the RFC merged into the RFC repository as a markdown file. |
| 105 | +At that point the RFC is "active" and may be implemented with the goal of eventual inclusion into these projects. |
| 106 | + |
| 107 | +- Fork the RFC repository [RFC repository][rfcs] |
| 108 | +- Copy `0000-template.md` to `text/0000-my-feature.md` (where "my-feature" is descriptive). |
| 109 | + Don't assign an RFC number yet; |
| 110 | + this is going to be the PR number and we'll rename the file accordingly if the RFC is accepted. |
| 111 | +- Fill in the RFC. |
| 112 | + Put care into the details: RFCs that do not present convincing motivation, demonstrate lack of understanding of the design's impact, or are disingenuous about the drawbacks or alternatives tend to be poorly-received. |
| 113 | +- Submit a pull request. |
| 114 | + As a pull request the RFC will receive design feedback from the larger community, and the author should be prepared to revise it in response. |
| 115 | +- Now that your RFC has an open pull request, use the issue number of the PR to rename the file: update your `0000-` prefix to that number. |
| 116 | + Also update the "RFC PR" link at the top of the file. |
| 117 | +- Each pull request will be labeled with the most relevant `T-*` labels, which aids in understanding the scope of an RFC. |
| 118 | +- Build consensus and integrate feedback. |
| 119 | + RFCs that have broad support are much more likely to make progress than those that don't receive any comments. |
| 120 | + Feel free to reach out to the RFC assignee in particular to get help identifying stakeholders and obstacles. |
| 121 | +- The ecosystem team will discuss the RFC pull request, as much as possible in the comment thread of the pull request itself. |
| 122 | + Offline discussion will be summarized on the pull request comment thread and are generally done within the Community Forge. |
| 123 | +- RFCs rarely go through this process unchanged, especially as alternatives and drawbacks are shown. You can make edits, big, and small, to the RFC to clarify or change the design, but make changes as new commits to the pull request, and leave a comment on the pull request explaining your changes. |
| 124 | + Specifically, do not squash commits after they are visible on the pull request if they meaningfully change the semantics of the RFC. |
| 125 | + Squashing typos or formatting changes is OK. |
| 126 | +- At some point, a member of the ecosystem team will propose a "motion for final comment period" (FCP), along with a *disposition* for the RFC (merge, close, or postpone). |
| 127 | + - This step is taken when enough of the tradeoffs have been discussed that the ecosystem team is in a position to make a decision. |
| 128 | + That does not require consensus amongst all participants in the RFC thread (which is usually impossible). |
| 129 | + However, the argument supporting the disposition on the RFC needs to have already been clearly articulated, and there should not be a strong consensus *against* that position outside of the ecosystem team. |
| 130 | + Ecosystem team members use their best judgment in taking this step, and the FCP itself ensures there is ample time and notification for stakeholders to push back if it is made prematurely. |
| 131 | + - For RFCs with lengthy discussion, the motion to FCP is usually preceded by a *summary comment* trying to lay out the current state of the discussion and major tradeoffs/points of disagreement. |
| 132 | + <!-- TODO: Should this instead just be a majority? --> |
| 133 | + - Before actually entering FCP, *all* members of the ecosystem team must sign off; |
| 134 | + this is often the point at which many ecosystem team members first review the RFC in full depth. |
| 135 | +- The FCP lasts ten calendar days, so that it is open for at least 5 business days. |
| 136 | + <!-- |
| 137 | + TODO: We don't have this yet, or rather, there is an unmaintained repository for this. |
| 138 | + We could potentially ask these to be posted on the discord and post them on the forum. |
| 139 | + --> |
| 140 | + It is also advertised widely, e.g. in [This Week in Rust](https://this-week-in-rust.org/). |
| 141 | + This way all stakeholders have a chance to lodge any final objections before a decision is reached. |
| 142 | +- In most cases, the FCP period is quiet, and the RFC is either merged or closed. |
| 143 | + However, sometimes substantial new arguments or ideas are raised, the FCP is canceled, and the RFC goes back into development mode. |
| 144 | + |
| 145 | + |
| 146 | +## The RFC life-cycle |
| 147 | +[The RFC life-cycle]: #the-rfc-life-cycle |
| 148 | + |
| 149 | +Once an RFC becomes "active" then authors may implement it and submit the feature as a pull request to the community project repositories. |
| 150 | +Being "active" is not a rubber stamp, and in particular still does not mean the feature will ultimately be merged; |
| 151 | +it does mean that in principle all the major stakeholders have agreed to the feature and are amenable to merging it. |
| 152 | + |
| 153 | +Furthermore, the fact that a given RFC has been accepted and is "active" implies nothing about what priority is assigned to its implementation, nor does it imply anything about whether a developer has been assigned the task of implementing the feature. |
| 154 | +While it is not *necessary* that the author of the RFC also write the implementation, it is by far the most effective way to see an RFC through to completion: authors should not expect that other project developers will take on responsibility for implementing their accepted feature. |
| 155 | + |
| 156 | +Modifications to "active" RFCs can be done in follow-up pull requests. |
| 157 | +Such PRs should update the RFC to include the new PR link. |
| 158 | +We strive to write each RFC in a manner that it will reflect the final design of the feature; |
| 159 | +but the nature of the process means that we cannot expect every merged RFC to actually reflect what the end result will be at the time of the next major release of community projects or the Typst compiler itself. |
| 160 | + |
| 161 | +In general, once accepted, RFCs should not be substantially changed. |
| 162 | +Only very minor changes should be submitted as amendments. |
| 163 | +More substantial changes should be new RFCs, with a note added to the original RFC. |
| 164 | +Exactly what counts as a "very minor change" is up to the ecosystem team to decide. |
| 165 | + |
| 166 | + |
| 167 | +## Reviewing RFCs |
| 168 | +[Reviewing RFCs]: #reviewing-rfcs |
| 169 | + |
| 170 | +While the RFC pull request is up, the ecosystem team may schedule meetings with the author and/or relevant stakeholders to discuss the issues in greater detail. |
| 171 | +A summary from the meeting will be posted back to the RFC pull request. |
| 172 | + |
| 173 | +The ecosystem team makes final decisions about RFCs after the benefits and drawbacks are well understood. |
| 174 | +These decisions can be made at any time, but the ecosystem team will regularly issue decisions. |
| 175 | +When a decision is made, the RFC pull request will either be merged or closed. |
| 176 | +In either case, if the reasoning is not clear from the discussion in thread, the ecosystem team will add a comment describing the rationale for the decision. |
| 177 | + |
| 178 | + |
| 179 | +## Implementing an RFC |
| 180 | +[Implementing an RFC]: #implementing-an-rfc |
| 181 | + |
| 182 | +Because the RFCs in this repository are primarily for community standards implementations are usually left to the maintainers of community projects. |
| 183 | + |
| 184 | +This means that the author of an RFC is not obligated to implement it. |
| 185 | +Of course, the RFC author (like any other developer) is welcome to post an implementation for review after the RFC has been accepted. |
| 186 | + |
| 187 | +If you are interested in working on the implementation for an "active" RFC, but cannot determine if someone else is already working on it, feel free to ask (e.g. by leaving a comment on the associated issue). |
| 188 | + |
| 189 | + |
| 190 | +## License |
| 191 | +[License]: #license |
| 192 | + |
| 193 | +This repository is currently licensed under either of: |
| 194 | + |
| 195 | +- Apache License, Version 2.0, ([LICENSE.Apache-2.0] or https://www.apache.org/licenses/LICENSE-2.0) |
| 196 | +- MIT license ([LICENSE.MIT] or https://opensource.org/licenses/MIT) |
| 197 | + |
| 198 | +at your option. |
| 199 | + |
| 200 | +### Contributions |
| 201 | +[Contributions]: #contributions |
| 202 | + |
| 203 | +Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions. |
| 204 | + |
| 205 | + |
| 206 | +[self]: https://github.com/typst-community |
| 207 | +[rfcs]: https://github.com/typst-community/rfcs |
| 208 | + |
| 209 | +[elembic]: https:github.com/PgBiel/elembic |
| 210 | +[oxifmt]: https:github.com/PgBiel/typst-oxifmt |
| 211 | + |
| 212 | +[typst]: https://github.com/typst/typst |
| 213 | +[forum]: https://forum.typst.app |
| 214 | +[discord]: https://discord.com/invite/y4Fhb6mvDa |
| 215 | + |
| 216 | +[LICENSE.Apache-2.0]: ../LICENSE.Apache-2.0 |
| 217 | +[LICENSE.MIT]: ../LICENSE.MIT |
0 commit comments