1*61c4878aSAndroid Build Coastguard Worker.. _seed-0001: 2*61c4878aSAndroid Build Coastguard Worker 3*61c4878aSAndroid Build Coastguard Worker====================== 4*61c4878aSAndroid Build Coastguard Worker0001: The SEED Process 5*61c4878aSAndroid Build Coastguard Worker====================== 6*61c4878aSAndroid Build Coastguard Worker.. seed:: 7*61c4878aSAndroid Build Coastguard Worker :number: 1 8*61c4878aSAndroid Build Coastguard Worker :name: The SEED Process 9*61c4878aSAndroid Build Coastguard Worker :status: Accepted 10*61c4878aSAndroid Build Coastguard Worker :proposal_date: 2022-10-31 11*61c4878aSAndroid Build Coastguard Worker :cl: 116577 12*61c4878aSAndroid Build Coastguard Worker :authors: The Pigweed Team 13*61c4878aSAndroid Build Coastguard Worker :facilitator: Unassigned 14*61c4878aSAndroid Build Coastguard Worker 15*61c4878aSAndroid Build Coastguard Worker------- 16*61c4878aSAndroid Build Coastguard WorkerSummary 17*61c4878aSAndroid Build Coastguard Worker------- 18*61c4878aSAndroid Build Coastguard WorkerSEEDs are the process through which substantial changes to Pigweed are proposed, 19*61c4878aSAndroid Build Coastguard Workerreviewed, and decided by community stakeholders to collaboratively drive the 20*61c4878aSAndroid Build Coastguard Workerproject in a favorable direction. 21*61c4878aSAndroid Build Coastguard Worker 22*61c4878aSAndroid Build Coastguard WorkerThis document outlines the SEED process at a high level. Details about how SEEDs 23*61c4878aSAndroid Build Coastguard Workershould be written and structured are described in :ref:`seed-0002`. 24*61c4878aSAndroid Build Coastguard Worker 25*61c4878aSAndroid Build Coastguard Worker---------- 26*61c4878aSAndroid Build Coastguard WorkerMotivation 27*61c4878aSAndroid Build Coastguard Worker---------- 28*61c4878aSAndroid Build Coastguard WorkerAs Pigweed and its community grow, it becomes important to ensure that the 29*61c4878aSAndroid Build Coastguard WorkerPigweed team, Pigweed users, and other community stakeholders align on the 30*61c4878aSAndroid Build Coastguard Workerfuture of the project. To date, development of Pigweed has primarily been 31*61c4878aSAndroid Build Coastguard Workerdriven by the core team, and community feedback has been mostly informal and 32*61c4878aSAndroid Build Coastguard Workerundocumented. 33*61c4878aSAndroid Build Coastguard Worker 34*61c4878aSAndroid Build Coastguard WorkerSEEDs are a formalized process for authoring, reviewing, and ratifying proposed 35*61c4878aSAndroid Build Coastguard Workerchanges to Pigweed. 36*61c4878aSAndroid Build Coastguard Worker 37*61c4878aSAndroid Build Coastguard WorkerThe SEED process has several goals. 38*61c4878aSAndroid Build Coastguard Worker 39*61c4878aSAndroid Build Coastguard Worker- Increase the visibility of proposed changes to Pigweed early on and allow 40*61c4878aSAndroid Build Coastguard Worker interested parties to engage in their design. 41*61c4878aSAndroid Build Coastguard Worker 42*61c4878aSAndroid Build Coastguard Worker- Maintain a public record of design decisions rendered during Pigweed's 43*61c4878aSAndroid Build Coastguard Worker development and the rationales behind them. 44*61c4878aSAndroid Build Coastguard Worker 45*61c4878aSAndroid Build Coastguard Worker- Ensure consistent API design across Pigweed modules through a formal team-wide 46*61c4878aSAndroid Build Coastguard Worker review process. 47*61c4878aSAndroid Build Coastguard Worker 48*61c4878aSAndroid Build Coastguard WorkerActive SEEDs are discussed by the community through Gerrit code review comments 49*61c4878aSAndroid Build Coastguard Workeras well as a SEEDs chatroom in Pigweed's Discord server. Decisions are 50*61c4878aSAndroid Build Coastguard Workerultimately rendered by a review committee of Pigweed team members. 51*61c4878aSAndroid Build Coastguard Worker 52*61c4878aSAndroid Build Coastguard Worker------------------------ 53*61c4878aSAndroid Build Coastguard WorkerWhen is a SEED required? 54*61c4878aSAndroid Build Coastguard Worker------------------------ 55*61c4878aSAndroid Build Coastguard WorkerSEEDs should be written by any developer wishing to make a "substantial" change 56*61c4878aSAndroid Build Coastguard Workerto Pigweed. Whether or not a change is considered "substantial" varies depending 57*61c4878aSAndroid Build Coastguard Workeron what parts of Pigweed it touches and may change over time as the project 58*61c4878aSAndroid Build Coastguard Workerevolves. Some general guidelines are established below. 59*61c4878aSAndroid Build Coastguard Worker 60*61c4878aSAndroid Build Coastguard WorkerExamples of changes considered "substantial" include, but are not limited to: 61*61c4878aSAndroid Build Coastguard Worker 62*61c4878aSAndroid Build Coastguard Worker- Adding a new top-level module. 63*61c4878aSAndroid Build Coastguard Worker 64*61c4878aSAndroid Build Coastguard Worker- Modifying a widely-used public API. 65*61c4878aSAndroid Build Coastguard Worker 66*61c4878aSAndroid Build Coastguard Worker- A breaking update to typical Pigweed user workflows (bootstrap, build setup, 67*61c4878aSAndroid Build Coastguard Worker ``pw`` commands, etc.). 68*61c4878aSAndroid Build Coastguard Worker 69*61c4878aSAndroid Build Coastguard Worker- Changing any data interchange or storage protocol or format (e.g. transport 70*61c4878aSAndroid Build Coastguard Worker protocols, flash layout), unless the change is small and backwards compatible 71*61c4878aSAndroid Build Coastguard Worker (e.g. adding a field to an exchanged Protobuf message). 72*61c4878aSAndroid Build Coastguard Worker 73*61c4878aSAndroid Build Coastguard Worker- Changes to Pigweed's code policy, style guides, or other project-level 74*61c4878aSAndroid Build Coastguard Worker guidelines. 75*61c4878aSAndroid Build Coastguard Worker 76*61c4878aSAndroid Build Coastguard Worker- Whenever a Pigweed team member asks you to write a SEED. 77*61c4878aSAndroid Build Coastguard Worker 78*61c4878aSAndroid Build Coastguard WorkerConversely, the following changes would likely not require a SEED: 79*61c4878aSAndroid Build Coastguard Worker 80*61c4878aSAndroid Build Coastguard Worker- Fixing typos. 81*61c4878aSAndroid Build Coastguard Worker 82*61c4878aSAndroid Build Coastguard Worker- Refactoring internal module code without public API changes. 83*61c4878aSAndroid Build Coastguard Worker 84*61c4878aSAndroid Build Coastguard Worker- Adding minor parallel operations to existing APIs (e.g. 85*61c4878aSAndroid Build Coastguard Worker ``Read(ConstByteSpan)`` vs ``Read(const byte*, size_t)``). 86*61c4878aSAndroid Build Coastguard Worker 87*61c4878aSAndroid Build Coastguard WorkerIf you're unsure whether a change you wish to make requires a SEED, it's worth 88*61c4878aSAndroid Build Coastguard Workerasking the Pigweed team in our Discord server prior to writing any code. 89*61c4878aSAndroid Build Coastguard Worker 90*61c4878aSAndroid Build Coastguard Worker------- 91*61c4878aSAndroid Build Coastguard WorkerProcess 92*61c4878aSAndroid Build Coastguard Worker------- 93*61c4878aSAndroid Build Coastguard WorkerSuppose you'd like to propose a new Pigweed RPC Over Smoke Signals protocol. 94*61c4878aSAndroid Build Coastguard Worker 95*61c4878aSAndroid Build Coastguard Worker#. If you haven't already, clone the Pigweed repository and set it up locally, 96*61c4878aSAndroid Build Coastguard Worker following the :ref:`docs-get-started-upstream` guide. 97*61c4878aSAndroid Build Coastguard Worker 98*61c4878aSAndroid Build Coastguard Worker#. Check out a clean Git branch off of ``main`` for your SEED. 99*61c4878aSAndroid Build Coastguard Worker 100*61c4878aSAndroid Build Coastguard Worker .. code-block:: sh 101*61c4878aSAndroid Build Coastguard Worker 102*61c4878aSAndroid Build Coastguard Worker git checkout -b seed-rpc-smoke-signals 103*61c4878aSAndroid Build Coastguard Worker 104*61c4878aSAndroid Build Coastguard Worker#. From an activated Pigweed environment, run the command ``pw seed create`` to 105*61c4878aSAndroid Build Coastguard Worker interactively create a SEED. 106*61c4878aSAndroid Build Coastguard Worker 107*61c4878aSAndroid Build Coastguard Worker This command will prompt you for a SEED number (use the default it provides 108*61c4878aSAndroid Build Coastguard Worker unless you have a specific reason not to), title, and list of authors. Using 109*61c4878aSAndroid Build Coastguard Worker these, it will generate a SEED document and add it to the build, as well as 110*61c4878aSAndroid Build Coastguard Worker automatically creating two CLs in Gerrit: one claiming your SEED number, and 111*61c4878aSAndroid Build Coastguard Worker the second being the actual CL in which your SEED will be reviewed. 112*61c4878aSAndroid Build Coastguard Worker 113*61c4878aSAndroid Build Coastguard Worker .. code-block:: none 114*61c4878aSAndroid Build Coastguard Worker 115*61c4878aSAndroid Build Coastguard Worker Created two CLs for SEED-5309: 116*61c4878aSAndroid Build Coastguard Worker 117*61c4878aSAndroid Build Coastguard Worker - SEED-5309: Claim SEED number 118*61c4878aSAndroid Build Coastguard Worker <https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/999998> 119*61c4878aSAndroid Build Coastguard Worker 120*61c4878aSAndroid Build Coastguard Worker - SEED-5309: Pigweed RPC Over Smoke Signals 121*61c4878aSAndroid Build Coastguard Worker <https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/999999> 122*61c4878aSAndroid Build Coastguard Worker 123*61c4878aSAndroid Build Coastguard Worker .. warning:: 124*61c4878aSAndroid Build Coastguard Worker 125*61c4878aSAndroid Build Coastguard Worker ``pw seed create`` will create and push Git commits for you. Make sure to 126*61c4878aSAndroid Build Coastguard Worker run it from a clean branch. 127*61c4878aSAndroid Build Coastguard Worker 128*61c4878aSAndroid Build Coastguard Worker#. Open the "Claim SEED number" CL and add GWSQ as a reviewer. Set 129*61c4878aSAndroid Build Coastguard Worker ``Pigweed-Auto-Submit`` to +1. This change will be approved promptly and 130*61c4878aSAndroid Build Coastguard Worker lock in your assigned SEED number. 131*61c4878aSAndroid Build Coastguard Worker 132*61c4878aSAndroid Build Coastguard Worker .. image:: 0001/seed-index-gerrit.png 133*61c4878aSAndroid Build Coastguard Worker 134*61c4878aSAndroid Build Coastguard Worker#. Fill out your proposal document, using the :ref:`SEED template<seed-0002>` as 135*61c4878aSAndroid Build Coastguard Worker a guide. 136*61c4878aSAndroid Build Coastguard Worker 137*61c4878aSAndroid Build Coastguard Worker If your SEED requires additional resources such as images, place them within 138*61c4878aSAndroid Build Coastguard Worker a subdirectory named identically to your document without the ``.rst`` 139*61c4878aSAndroid Build Coastguard Worker extension. These should be listed as ``inputs`` in your SEED's GN doc group 140*61c4878aSAndroid Build Coastguard Worker target. 141*61c4878aSAndroid Build Coastguard Worker 142*61c4878aSAndroid Build Coastguard Worker .. code-block:: 143*61c4878aSAndroid Build Coastguard Worker 144*61c4878aSAndroid Build Coastguard Worker seed/ 145*61c4878aSAndroid Build Coastguard Worker ... 146*61c4878aSAndroid Build Coastguard Worker 5309.rst 147*61c4878aSAndroid Build Coastguard Worker 5309/ 148*61c4878aSAndroid Build Coastguard Worker state-diagram.svg 149*61c4878aSAndroid Build Coastguard Worker 150*61c4878aSAndroid Build Coastguard Worker#. When you feel you have enough substantive content in your proposal to be 151*61c4878aSAndroid Build Coastguard Worker reviewed, push it up to Gerrit and switch the change from WIP to Active. 152*61c4878aSAndroid Build Coastguard Worker This will begin the open comments period. 153*61c4878aSAndroid Build Coastguard Worker 154*61c4878aSAndroid Build Coastguard Worker Congrats! You are now a SEED author. 155*61c4878aSAndroid Build Coastguard Worker 156*61c4878aSAndroid Build Coastguard Worker#. The Pigweed team will now assign your SEED a SEED facilitator. The 157*61c4878aSAndroid Build Coastguard Worker facilitator will leave a comment on your SEED asking you to add their name 158*61c4878aSAndroid Build Coastguard Worker to the ``facilitator:`` entry in the header of your SEED. 159*61c4878aSAndroid Build Coastguard Worker 160*61c4878aSAndroid Build Coastguard Worker The SEED facilitator is a member of the Pigweed team who will help move your 161*61c4878aSAndroid Build Coastguard Worker through the process. The SEED facilitator will be added as a reviewer on 162*61c4878aSAndroid Build Coastguard Worker your SEED and will be your primary point of contact on the Pigweed team. 163*61c4878aSAndroid Build Coastguard Worker 164*61c4878aSAndroid Build Coastguard Worker Update the status of your SEED to ``"Open for Comments"`` and set the 165*61c4878aSAndroid Build Coastguard Worker assigned facilitator in its build target. 166*61c4878aSAndroid Build Coastguard Worker 167*61c4878aSAndroid Build Coastguard Worker .. code-block:: 168*61c4878aSAndroid Build Coastguard Worker 169*61c4878aSAndroid Build Coastguard Worker pw_seed("5309") { 170*61c4878aSAndroid Build Coastguard Worker changelist = 987654 171*61c4878aSAndroid Build Coastguard Worker title = "pw_rpc Over Smoke Signals" 172*61c4878aSAndroid Build Coastguard Worker status = "Open for Comments" 173*61c4878aSAndroid Build Coastguard Worker author = "Your Name" 174*61c4878aSAndroid Build Coastguard Worker facilitator = "Your Facilitator" 175*61c4878aSAndroid Build Coastguard Worker } 176*61c4878aSAndroid Build Coastguard Worker 177*61c4878aSAndroid Build Coastguard Worker#. Create a thread for your SEED in the ``#seed`` channel of Pigweed's 178*61c4878aSAndroid Build Coastguard Worker `Discord server <https://discord.gg/M9NSeTA>`_. 179*61c4878aSAndroid Build Coastguard Worker 180*61c4878aSAndroid Build Coastguard Worker#. Engage with reviewers to iterate on your proposal through its comment period. 181*61c4878aSAndroid Build Coastguard Worker 182*61c4878aSAndroid Build Coastguard Worker#. During the comment period, the facilitator may comment that your proposal has 183*61c4878aSAndroid Build Coastguard Worker received "Approval of Intent" and request in the SEED comments for interested 184*61c4878aSAndroid Build Coastguard Worker reviewers to identify themselves. 185*61c4878aSAndroid Build Coastguard Worker 186*61c4878aSAndroid Build Coastguard Worker The SEED status should be changed to ``Intent Approved``. 187*61c4878aSAndroid Build Coastguard Worker 188*61c4878aSAndroid Build Coastguard Worker At this point, initial implementation of the feature may begin landing in 189*61c4878aSAndroid Build Coastguard Worker Pigweed upstream. Any CLs prior to the SEED landing should CC both the 190*61c4878aSAndroid Build Coastguard Worker facilitator and other commenters who've indictated their interest in 191*61c4878aSAndroid Build Coastguard Worker reviewing. 192*61c4878aSAndroid Build Coastguard Worker 193*61c4878aSAndroid Build Coastguard Worker All code landed during this period should be marked as experimental and 194*61c4878aSAndroid Build Coastguard Worker protected by visibility limitations. 195*61c4878aSAndroid Build Coastguard Worker 196*61c4878aSAndroid Build Coastguard Worker#. When a tentative decision has been reached, the facilitator will comment on 197*61c4878aSAndroid Build Coastguard Worker your proposal with a summary of the discussion and reasoning, moving it into 198*61c4878aSAndroid Build Coastguard Worker its Last Call phase (as described in the 199*61c4878aSAndroid Build Coastguard Worker :ref:`Lifecycle <seed-0001-lifecycle>` section). 200*61c4878aSAndroid Build Coastguard Worker 201*61c4878aSAndroid Build Coastguard Worker#. Following the conclusion of the Last Call period (one week from the start of 202*61c4878aSAndroid Build Coastguard Worker Last Call), the facilitator will sign off on the CL with a +2 vote, allowing 203*61c4878aSAndroid Build Coastguard Worker it to be submitted. Once a +2 has been given, the SEED author should update 204*61c4878aSAndroid Build Coastguard Worker the SEED index and submit the CL. 205*61c4878aSAndroid Build Coastguard Worker 206*61c4878aSAndroid Build Coastguard Worker Before submitting, update your SEED's GN target to point to the local RST 207*61c4878aSAndroid Build Coastguard Worker file and to reflect its final status. 208*61c4878aSAndroid Build Coastguard Worker 209*61c4878aSAndroid Build Coastguard Worker .. code-block:: 210*61c4878aSAndroid Build Coastguard Worker 211*61c4878aSAndroid Build Coastguard Worker pw_seed("5309") { 212*61c4878aSAndroid Build Coastguard Worker sources = [ "5309.rst" ] 213*61c4878aSAndroid Build Coastguard Worker title = "pw_rpc Over Smoke Signals" 214*61c4878aSAndroid Build Coastguard Worker status = "Accepted" 215*61c4878aSAndroid Build Coastguard Worker author = "Your Name" 216*61c4878aSAndroid Build Coastguard Worker } 217*61c4878aSAndroid Build Coastguard Worker 218*61c4878aSAndroid Build Coastguard Worker--------------------------------------- 219*61c4878aSAndroid Build Coastguard WorkerThe relationship between SEEDs and code 220*61c4878aSAndroid Build Coastguard Worker--------------------------------------- 221*61c4878aSAndroid Build Coastguard WorkerSome common questions raised by participants in the SEED process revolve around 222*61c4878aSAndroid Build Coastguard Workerhow SEED proposals relate to implemented code. This section addresses several of 223*61c4878aSAndroid Build Coastguard Workerthose questions. 224*61c4878aSAndroid Build Coastguard Worker 225*61c4878aSAndroid Build Coastguard WorkerWhen should implementation of a SEED proposal begin? 226*61c4878aSAndroid Build Coastguard Worker==================================================== 227*61c4878aSAndroid Build Coastguard Worker.. admonition:: TL;DR 228*61c4878aSAndroid Build Coastguard Worker 229*61c4878aSAndroid Build Coastguard Worker The SEED's author can start writing code as soon as the intent of the 230*61c4878aSAndroid Build Coastguard Worker proposal is approved. 231*61c4878aSAndroid Build Coastguard Worker 232*61c4878aSAndroid Build Coastguard WorkerGenerally speaking, there are two stages of approval for the majority of SEED 233*61c4878aSAndroid Build Coastguard Workerproposals. The first is approval of the *intent* of the SEED --- that is, 234*61c4878aSAndroid Build Coastguard Workerstakeholders agree that it represents a problem that Pigweed should address, 235*61c4878aSAndroid Build Coastguard Workerand the general outline of the solution is reasonable. 236*61c4878aSAndroid Build Coastguard Worker 237*61c4878aSAndroid Build Coastguard WorkerFollowing this comes the approval of the specific details of the proposed 238*61c4878aSAndroid Build Coastguard Workersolution. Depending on the nature of the SEED, this could range 239*61c4878aSAndroid Build Coastguard Workerfrom higher-level component hierarchies and interactions down to concrete API 240*61c4878aSAndroid Build Coastguard Workerdesign and precise implementation details. 241*61c4878aSAndroid Build Coastguard Worker 242*61c4878aSAndroid Build Coastguard WorkerOnce the intent of a SEED is approved, authors are free to begin implementing 243*61c4878aSAndroid Build Coastguard Workercode for their proposal if they wish. This can serve as an additional reference 244*61c4878aSAndroid Build Coastguard Workerfor reviewers to aid their understanding of the proposal, and allow both the 245*61c4878aSAndroid Build Coastguard Workerproposal and implementation to co-evolve throughout the review process. 246*61c4878aSAndroid Build Coastguard Worker 247*61c4878aSAndroid Build Coastguard WorkerCode written alongside an active SEED can be reviewed and even merged into 248*61c4878aSAndroid Build Coastguard WorkerPigweed, hidden behind experimental feature flags. 249*61c4878aSAndroid Build Coastguard Worker 250*61c4878aSAndroid Build Coastguard WorkerAt what point is the code related to a SEED considered usable? 251*61c4878aSAndroid Build Coastguard Worker============================================================== 252*61c4878aSAndroid Build Coastguard Worker.. admonition:: TL;DR 253*61c4878aSAndroid Build Coastguard Worker 254*61c4878aSAndroid Build Coastguard Worker Code written for a SEED is considered experimental and unstable until the 255*61c4878aSAndroid Build Coastguard Worker SEED is fully approved. 256*61c4878aSAndroid Build Coastguard Worker 257*61c4878aSAndroid Build Coastguard WorkerIt is possible for code to be written, reviewed, and committed to Pigweed while 258*61c4878aSAndroid Build Coastguard Workerits SEED is still in the review process. As these changes end up in Pigweed's 259*61c4878aSAndroid Build Coastguard Workermain, it naturally raises the question of whether or not it is usable by other 260*61c4878aSAndroid Build Coastguard Workermodules, or even external projects. 261*61c4878aSAndroid Build Coastguard Worker 262*61c4878aSAndroid Build Coastguard WorkerAny code which is approved and submitted while its SEED remains active will be 263*61c4878aSAndroid Build Coastguard Workertreated as experimental and hidden behind a feature flag. These flags will be 264*61c4878aSAndroid Build Coastguard Workerconfigurable by other modules and downstream projects, allowing dependencies on 265*61c4878aSAndroid Build Coastguard Workerexperimental code. All experimental features are unstable and subject to 266*61c4878aSAndroid Build Coastguard Workerpotentially large changes at any time, so depending on them in non-experimental 267*61c4878aSAndroid Build Coastguard Workercontexts is strongly discouraged. 268*61c4878aSAndroid Build Coastguard Worker 269*61c4878aSAndroid Build Coastguard WorkerThere may be rare circumstances where particularly time-sensitive code is 270*61c4878aSAndroid Build Coastguard Workerrequired by projects with whom Pigweed works in close collaboration before a 271*61c4878aSAndroid Build Coastguard Workerfull SEED approval cycle can be completed. In these instances, the project may 272*61c4878aSAndroid Build Coastguard Workerbegin to depend on experimental code prematurely, and Pigweed will assist them 273*61c4878aSAndroid Build Coastguard Workerwith keeping up-to-date as it evolves. This type of usage is limited to only 274*61c4878aSAndroid Build Coastguard Workerexceptional circumstances. In almost all cases, experimental code should be used 275*61c4878aSAndroid Build Coastguard Workerat a project's own risk. 276*61c4878aSAndroid Build Coastguard Worker 277*61c4878aSAndroid Build Coastguard WorkerWill approved SEEDs be updated in response to code changes? 278*61c4878aSAndroid Build Coastguard Worker=========================================================== 279*61c4878aSAndroid Build Coastguard Worker.. admonition:: TL;DR 280*61c4878aSAndroid Build Coastguard Worker 281*61c4878aSAndroid Build Coastguard Worker Approved SEEDs will not be updated as code evolves. Use module documentation 282*61c4878aSAndroid Build Coastguard Worker as a current reference. 283*61c4878aSAndroid Build Coastguard Worker 284*61c4878aSAndroid Build Coastguard WorkerSEED documents are intended to capture decisions made at a point in time with 285*61c4878aSAndroid Build Coastguard Workertheir justification. They are not living documents which reflect the current 286*61c4878aSAndroid Build Coastguard Workerstate of the codebase. Generally speaking, SEEDs will not be updated following 287*61c4878aSAndroid Build Coastguard Workertheir acceptance and will likely diverge from the actual code as time passes. 288*61c4878aSAndroid Build Coastguard WorkerSome SEEDs may even become entirely obsolete if the team revisited the issue and 289*61c4878aSAndroid Build Coastguard Workerdecided to move in a different direction, becoming purely a historical record of 290*61c4878aSAndroid Build Coastguard Workerdesign decisions. 291*61c4878aSAndroid Build Coastguard Worker 292*61c4878aSAndroid Build Coastguard WorkerThere are exceptions when a SEED may be modified after it has been approved; 293*61c4878aSAndroid Build Coastguard Workertypically, these will occur shortly after the approval if its implementer finds 294*61c4878aSAndroid Build Coastguard Workerthat an important detail was incorrect or missing. 295*61c4878aSAndroid Build Coastguard Worker 296*61c4878aSAndroid Build Coastguard WorkerIf a SEED/s content is obsolete or outdated, it should ideally be marked as 297*61c4878aSAndroid Build Coastguard Workersuch by adding a notice or warning to the top of the SEED. However, these 298*61c4878aSAndroid Build Coastguard Workerindications are marked on a best-effort basis, so SEEDs should not be be used as 299*61c4878aSAndroid Build Coastguard Workerthe primary source of documentation for a Pigweed feature. 300*61c4878aSAndroid Build Coastguard Worker 301*61c4878aSAndroid Build Coastguard WorkerUsers should instead rely on module documentation for up-to-date 302*61c4878aSAndroid Build Coastguard Workerinformation about the state of a Pigweed module or feature. SEEDs can be used as 303*61c4878aSAndroid Build Coastguard Workeran additional resource to learn *why* something was designed the way that it is, 304*61c4878aSAndroid Build Coastguard Workerbut is never necessary to understand functionality or usage. 305*61c4878aSAndroid Build Coastguard Worker 306*61c4878aSAndroid Build Coastguard Worker-------------- 307*61c4878aSAndroid Build Coastguard WorkerSEED documents 308*61c4878aSAndroid Build Coastguard Worker-------------- 309*61c4878aSAndroid Build Coastguard WorkerSEEDs are written as ReST documents integrated with the rest of Pigweed's 310*61c4878aSAndroid Build Coastguard Workerdocumentation. They live directly within the core Pigweed repository, under a 311*61c4878aSAndroid Build Coastguard Workertop-level ``seed/`` subdirectory. 312*61c4878aSAndroid Build Coastguard Worker 313*61c4878aSAndroid Build Coastguard WorkerThe structure of SEED documents themselves, their format, required sections, and 314*61c4878aSAndroid Build Coastguard Workerother considerations are outlined in :ref:`seed-0002`. 315*61c4878aSAndroid Build Coastguard Worker 316*61c4878aSAndroid Build Coastguard WorkerThe first 100 SEEDs (0000-0100) are *Meta-SEEDs*. These are reserved for 317*61c4878aSAndroid Build Coastguard Workerinternal Pigweed usage and generally detail SEED-related processes. Unlike 318*61c4878aSAndroid Build Coastguard Workerregular SEEDs, Meta-SEEDs are living documents which may be revised over time. 319*61c4878aSAndroid Build Coastguard Worker 320*61c4878aSAndroid Build Coastguard Worker.. _seed-0001-lifecycle: 321*61c4878aSAndroid Build Coastguard Worker 322*61c4878aSAndroid Build Coastguard Worker----------------------- 323*61c4878aSAndroid Build Coastguard WorkerThe lifecycle of a SEED 324*61c4878aSAndroid Build Coastguard Worker----------------------- 325*61c4878aSAndroid Build Coastguard WorkerA SEED proposal undergoes several phases between first being published and a 326*61c4878aSAndroid Build Coastguard Workerfinal decision. 327*61c4878aSAndroid Build Coastguard Worker 328*61c4878aSAndroid Build Coastguard Worker:bdg-primary-line:`Draft` **The SEED is a work-in-progress and not yet ready 329*61c4878aSAndroid Build Coastguard Workerfor comments.** 330*61c4878aSAndroid Build Coastguard Worker 331*61c4878aSAndroid Build Coastguard Worker- The SEED exists in Gerrit as a Work-In-Progress (WIP) change. 332*61c4878aSAndroid Build Coastguard Worker- Has an assigned SEED number and exists in the index. 333*61c4878aSAndroid Build Coastguard Worker- Not yet ready to receive feedback. 334*61c4878aSAndroid Build Coastguard Worker 335*61c4878aSAndroid Build Coastguard Worker:bdg-primary-line:`Intent Approved` **The idea behind the SEED has been approved 336*61c4878aSAndroid Build Coastguard Workerfor further investigation.** 337*61c4878aSAndroid Build Coastguard Worker 338*61c4878aSAndroid Build Coastguard Worker- The SEED exists in Gerrit as a Work-In-Progress (WIP) change. 339*61c4878aSAndroid Build Coastguard Worker- Has an assigned SEED number and exists in the index. 340*61c4878aSAndroid Build Coastguard Worker- The main proposal is not yet fully written out, but may start receiving 341*61c4878aSAndroid Build Coastguard Worker preliminary rounds of feedback. 342*61c4878aSAndroid Build Coastguard Worker 343*61c4878aSAndroid Build Coastguard Worker:bdg-primary:`Open for Comments` **The SEED is soliciting feedback.** 344*61c4878aSAndroid Build Coastguard Worker 345*61c4878aSAndroid Build Coastguard Worker- The SEED has sufficient substance to be reviewed, as determined by its 346*61c4878aSAndroid Build Coastguard Worker author. 347*61c4878aSAndroid Build Coastguard Worker- A thread for the SEED is created in Discord to promote the proposal and open 348*61c4878aSAndroid Build Coastguard Worker discussion. 349*61c4878aSAndroid Build Coastguard Worker- Interested parties comment on the SEED to evaluate the proposal, raise 350*61c4878aSAndroid Build Coastguard Worker questions and concerns, and express support or opposition. 351*61c4878aSAndroid Build Coastguard Worker- Back and forth discussion between the author and reviewers, resulting in 352*61c4878aSAndroid Build Coastguard Worker modifications to the document. 353*61c4878aSAndroid Build Coastguard Worker- The SEED remains open for as long as necessary. Internally, Pigweed's review 354*61c4878aSAndroid Build Coastguard Worker committee will regularly meet to consider active SEEDs and determine when to 355*61c4878aSAndroid Build Coastguard Worker advance to them the next stage. 356*61c4878aSAndroid Build Coastguard Worker- Open SEEDs are assigned facilitators in the core Pigweed team, who are 357*61c4878aSAndroid Build Coastguard Worker primarily responsible for engaging with the author to move the SEED through 358*61c4878aSAndroid Build Coastguard Worker its review process. 359*61c4878aSAndroid Build Coastguard Worker 360*61c4878aSAndroid Build Coastguard Worker:bdg-warning:`Last Call` **A tentative decision has been reached, but 361*61c4878aSAndroid Build Coastguard Workercommenters may raise final objections.** 362*61c4878aSAndroid Build Coastguard Worker 363*61c4878aSAndroid Build Coastguard Worker- A tentative decision on the SEED has been made. The decision is issued at the 364*61c4878aSAndroid Build Coastguard Worker best judgement of the SEED's facilitator when they feel there has been 365*61c4878aSAndroid Build Coastguard Worker sufficient discussion on the tradeoffs of the proposal to do so. 366*61c4878aSAndroid Build Coastguard Worker- Transition is triggered manually by its facilitator, with a comment on the 367*61c4878aSAndroid Build Coastguard Worker likely outcome of the SEED (acceptance / rejection). 368*61c4878aSAndroid Build Coastguard Worker- On entering Last Call, the visibility of the SEED is widely boosted through 369*61c4878aSAndroid Build Coastguard Worker Pigweed's communication channels (Discord, mailing list, Pigweed Live, etc.) 370*61c4878aSAndroid Build Coastguard Worker to solicit any strong objections from stakeholders. 371*61c4878aSAndroid Build Coastguard Worker- Typically, Last Call lasts for a set period of 7 calendar days, after which 372*61c4878aSAndroid Build Coastguard Worker the final decision is formalized. 373*61c4878aSAndroid Build Coastguard Worker- If any substantial new arguments are raised during Last Call, the review 374*61c4878aSAndroid Build Coastguard Worker committee may decide to re-open the discussion, returning the SEED to a 375*61c4878aSAndroid Build Coastguard Worker commenting phase. 376*61c4878aSAndroid Build Coastguard Worker 377*61c4878aSAndroid Build Coastguard Worker:bdg-success:`Accepted` **The proposal is ratified and ready for 378*61c4878aSAndroid Build Coastguard Workerimplementation.** 379*61c4878aSAndroid Build Coastguard Worker 380*61c4878aSAndroid Build Coastguard Worker- The SEED is submitted into the Pigweed repository. 381*61c4878aSAndroid Build Coastguard Worker- A tracking bug is created for the implementation, if applicable. 382*61c4878aSAndroid Build Coastguard Worker- The SEED may no longer be modified (except minor changes such as typos). 383*61c4878aSAndroid Build Coastguard Worker Follow-up discussions on the same topic require a new SEED. 384*61c4878aSAndroid Build Coastguard Worker 385*61c4878aSAndroid Build Coastguard Worker:bdg-danger:`Rejected` **The proposal has been turned down.** 386*61c4878aSAndroid Build Coastguard Worker 387*61c4878aSAndroid Build Coastguard Worker- The SEED is submitted into the Pigweed repository to provide a permanent 388*61c4878aSAndroid Build Coastguard Worker record of the considerations made for future reference. 389*61c4878aSAndroid Build Coastguard Worker- The SEED may no longer be modified. 390*61c4878aSAndroid Build Coastguard Worker 391*61c4878aSAndroid Build Coastguard Worker:bdg-secondary:`Deprecated` **The proposal was originally accepted and 392*61c4878aSAndroid Build Coastguard Workerimplemented but later removed.** 393*61c4878aSAndroid Build Coastguard Worker 394*61c4878aSAndroid Build Coastguard Worker- The proposal was once implemented but later undone. 395*61c4878aSAndroid Build Coastguard Worker- The SEED's changelog contains justification for the deprecation. 396*61c4878aSAndroid Build Coastguard Worker 397*61c4878aSAndroid Build Coastguard Worker:bdg-info:`Superseded` **The proposal was originally accepted and implemented 398*61c4878aSAndroid Build Coastguard Workerbut significant portions were later overruled by a different SEED.** 399*61c4878aSAndroid Build Coastguard Worker 400*61c4878aSAndroid Build Coastguard Worker- A newer SEED proposal revisits the same topic and proposal and redesigns 401*61c4878aSAndroid Build Coastguard Worker significant parts of the original. 402*61c4878aSAndroid Build Coastguard Worker- The SEED is marked as superseded with a reference to the newer proposal. 403*61c4878aSAndroid Build Coastguard Worker 404*61c4878aSAndroid Build Coastguard Worker:bdg-secondary-line:`On Hold` **The SEED is temporarily on pause due to other 405*61c4878aSAndroid Build Coastguard Workerpriorities, without a decision being made on its acceptance.** 406*61c4878aSAndroid Build Coastguard Worker 407*61c4878aSAndroid Build Coastguard Worker- The SEED has an assigned number, and a Gerrit CL with previous rounds of 408*61c4878aSAndroid Build Coastguard Worker feedback. The CL is switched to WIP. 409*61c4878aSAndroid Build Coastguard Worker- The SEED is closed to additional feedback during the hold period. 410*61c4878aSAndroid Build Coastguard Worker 411*61c4878aSAndroid Build Coastguard Worker--------- 412*61c4878aSAndroid Build Coastguard WorkerRationale 413*61c4878aSAndroid Build Coastguard Worker--------- 414*61c4878aSAndroid Build Coastguard Worker 415*61c4878aSAndroid Build Coastguard WorkerDocument format 416*61c4878aSAndroid Build Coastguard Worker=============== 417*61c4878aSAndroid Build Coastguard WorkerThree different documentation formats are considered for SEEDs: 418*61c4878aSAndroid Build Coastguard Worker 419*61c4878aSAndroid Build Coastguard Worker- **ReST:** Used for Pigweed's existing documentation, making it a natural 420*61c4878aSAndroid Build Coastguard Worker option. 421*61c4878aSAndroid Build Coastguard Worker- **Google Docs:** The traditional way of writing SEED-like investigation and 422*61c4878aSAndroid Build Coastguard Worker design documents. 423*61c4878aSAndroid Build Coastguard Worker- **Markdown:** Ubiquitous across open-source projects, with extensive tooling 424*61c4878aSAndroid Build Coastguard Worker available. 425*61c4878aSAndroid Build Coastguard Worker 426*61c4878aSAndroid Build Coastguard WorkerSummary 427*61c4878aSAndroid Build Coastguard Worker------- 428*61c4878aSAndroid Build Coastguard WorkerBased on the evaluated criteria, ReST documents provide the best overall SEED 429*61c4878aSAndroid Build Coastguard Workerexperience. The primary issues with ReST exist around contributor tooling, which 430*61c4878aSAndroid Build Coastguard Workermay be mitigated with additional investment from the Pigweed team. 431*61c4878aSAndroid Build Coastguard Worker 432*61c4878aSAndroid Build Coastguard WorkerThe table below details the main criteria evaluated for each format, with more 433*61c4878aSAndroid Build Coastguard Workerdetailed explanations following. 434*61c4878aSAndroid Build Coastguard Worker 435*61c4878aSAndroid Build Coastguard Worker.. list-table:: 436*61c4878aSAndroid Build Coastguard Worker :widths: 55 15 15 15 437*61c4878aSAndroid Build Coastguard Worker :header-rows: 1 438*61c4878aSAndroid Build Coastguard Worker 439*61c4878aSAndroid Build Coastguard Worker * - Criterion 440*61c4878aSAndroid Build Coastguard Worker - ReST 441*61c4878aSAndroid Build Coastguard Worker - Markdown 442*61c4878aSAndroid Build Coastguard Worker - Google Docs 443*61c4878aSAndroid Build Coastguard Worker * - Straightforward integration with existing docs 444*61c4878aSAndroid Build Coastguard Worker - ✅ 445*61c4878aSAndroid Build Coastguard Worker - ❌ 446*61c4878aSAndroid Build Coastguard Worker - ❌ 447*61c4878aSAndroid Build Coastguard Worker * - Indexable on `pigweed.dev <https://pigweed.dev>`_ 448*61c4878aSAndroid Build Coastguard Worker - ✅ 449*61c4878aSAndroid Build Coastguard Worker - ✅ 450*61c4878aSAndroid Build Coastguard Worker - ❌ 451*61c4878aSAndroid Build Coastguard Worker * - Auditable through source control 452*61c4878aSAndroid Build Coastguard Worker - ✅ 453*61c4878aSAndroid Build Coastguard Worker - ✅ 454*61c4878aSAndroid Build Coastguard Worker - ❌ 455*61c4878aSAndroid Build Coastguard Worker * - Archive of review comments and changes 456*61c4878aSAndroid Build Coastguard Worker - ✅ 457*61c4878aSAndroid Build Coastguard Worker - ✅ 458*61c4878aSAndroid Build Coastguard Worker - ❌ 459*61c4878aSAndroid Build Coastguard Worker * - Accessible to contributors 460*61c4878aSAndroid Build Coastguard Worker - ❌ 461*61c4878aSAndroid Build Coastguard Worker - ✅ 462*61c4878aSAndroid Build Coastguard Worker - ✅ 463*61c4878aSAndroid Build Coastguard Worker * - Extensive styling and formatting options 464*61c4878aSAndroid Build Coastguard Worker - ✅ 465*61c4878aSAndroid Build Coastguard Worker - ❌ 466*61c4878aSAndroid Build Coastguard Worker - ✅ 467*61c4878aSAndroid Build Coastguard Worker * - Easy sharing between Google and external contributors 468*61c4878aSAndroid Build Coastguard Worker - ✅ 469*61c4878aSAndroid Build Coastguard Worker - ✅ 470*61c4878aSAndroid Build Coastguard Worker - ❌ 471*61c4878aSAndroid Build Coastguard Worker 472*61c4878aSAndroid Build Coastguard WorkerIntegration 473*61c4878aSAndroid Build Coastguard Worker----------- 474*61c4878aSAndroid Build Coastguard Worker.. admonition:: Goal 475*61c4878aSAndroid Build Coastguard Worker 476*61c4878aSAndroid Build Coastguard Worker SEED documents should seamlessly integrate with the rest of Pigweed's docs. 477*61c4878aSAndroid Build Coastguard Worker 478*61c4878aSAndroid Build Coastguard WorkerAs all of Pigweed's documentation is written using ReST, it becomes a natural 479*61c4878aSAndroid Build Coastguard Workerchoice for SEEDs. The use of other formats requires additional scaffolding and 480*61c4878aSAndroid Build Coastguard Workermay not provide as seamless of an experience. 481*61c4878aSAndroid Build Coastguard Worker 482*61c4878aSAndroid Build Coastguard WorkerIndexability 483*61c4878aSAndroid Build Coastguard Worker------------ 484*61c4878aSAndroid Build Coastguard Worker.. admonition:: Goal 485*61c4878aSAndroid Build Coastguard Worker 486*61c4878aSAndroid Build Coastguard Worker Design decisions in SEEDs should be readily available for Pigweed users. 487*61c4878aSAndroid Build Coastguard Worker 488*61c4878aSAndroid Build Coastguard Worker`pigweed.dev <https://pigweed.dev>`_ has a search function allowing users to 489*61c4878aSAndroid Build Coastguard Workersearch the site for Pigweed-related keywords. As SEEDs contain design discussion 490*61c4878aSAndroid Build Coastguard Workerand rationales, having them appear in these searches offers useful information 491*61c4878aSAndroid Build Coastguard Workerto users. 492*61c4878aSAndroid Build Coastguard Worker 493*61c4878aSAndroid Build Coastguard WorkerThe search function is provided by Pigweed's Sphinx build, so only documents 494*61c4878aSAndroid Build Coastguard Workerwhich exist as part of that (ReST / Markdown) are indexed. 495*61c4878aSAndroid Build Coastguard Worker 496*61c4878aSAndroid Build Coastguard WorkerAuditability 497*61c4878aSAndroid Build Coastguard Worker------------ 498*61c4878aSAndroid Build Coastguard Worker.. admonition:: Goal 499*61c4878aSAndroid Build Coastguard Worker 500*61c4878aSAndroid Build Coastguard Worker Changes to SEED documents should be reviewed and recorded. 501*61c4878aSAndroid Build Coastguard Worker 502*61c4878aSAndroid Build Coastguard WorkerReST and Markdown documents exist directly within Pigweed's source repository 503*61c4878aSAndroid Build Coastguard Workerafter being submitted, requiring any further changes to go through a code 504*61c4878aSAndroid Build Coastguard Workerreview process. 505*61c4878aSAndroid Build Coastguard Worker 506*61c4878aSAndroid Build Coastguard WorkerConversely, Google Docs may be edited by anyone with access, making them prone 507*61c4878aSAndroid Build Coastguard Workerto unintentional modification. 508*61c4878aSAndroid Build Coastguard Worker 509*61c4878aSAndroid Build Coastguard WorkerArchive of discussions 510*61c4878aSAndroid Build Coastguard Worker---------------------- 511*61c4878aSAndroid Build Coastguard Worker.. admonition:: Goal 512*61c4878aSAndroid Build Coastguard Worker 513*61c4878aSAndroid Build Coastguard Worker Discussions during the review of a SEED should be well-archived for 514*61c4878aSAndroid Build Coastguard Worker future reference. 515*61c4878aSAndroid Build Coastguard Worker 516*61c4878aSAndroid Build Coastguard WorkerReST and Markdown documentation are submitted through Gerrit and follow the 517*61c4878aSAndroid Build Coastguard Workerstandard code review process. Review comments on the changes are saved in 518*61c4878aSAndroid Build Coastguard WorkerGerrit and are easily revisited. Incremental updates to the SEED during the 519*61c4878aSAndroid Build Coastguard Workerreview process are saved as patch sets. 520*61c4878aSAndroid Build Coastguard Worker 521*61c4878aSAndroid Build Coastguard WorkerComments in Google Docs are more difficult to find once they are resolved, and 522*61c4878aSAndroid Build Coastguard Workerdocument changes do not exist as clearly-defined snapshots, making the history 523*61c4878aSAndroid Build Coastguard Workerof a SEED harder to follow. 524*61c4878aSAndroid Build Coastguard Worker 525*61c4878aSAndroid Build Coastguard WorkerAccessibility 526*61c4878aSAndroid Build Coastguard Worker------------- 527*61c4878aSAndroid Build Coastguard Worker.. admonition:: Goal 528*61c4878aSAndroid Build Coastguard Worker 529*61c4878aSAndroid Build Coastguard Worker SEEDs should be easy for contributors to write. 530*61c4878aSAndroid Build Coastguard Worker 531*61c4878aSAndroid Build Coastguard WorkerBoth Markdown and Google Docs are easy to write, familiar to many, and have 532*61c4878aSAndroid Build Coastguard Workerextensive tooling available. SEED documents can be written outside of the 533*61c4878aSAndroid Build Coastguard WorkerPigweed ecosystem using authors' preferred tools. 534*61c4878aSAndroid Build Coastguard Worker 535*61c4878aSAndroid Build Coastguard WorkerReST, on the other hand, is an unfamiliar and occasionally strange format, and 536*61c4878aSAndroid Build Coastguard Workerits usage for SEEDs is heavily tied to Pigweed's documentation build. Authors 537*61c4878aSAndroid Build Coastguard Workerare required to set up and constantly re-run this build, slowing iteration. 538*61c4878aSAndroid Build Coastguard Worker 539*61c4878aSAndroid Build Coastguard WorkerFormat and styling 540*61c4878aSAndroid Build Coastguard Worker------------------ 541*61c4878aSAndroid Build Coastguard Worker.. admonition:: Goal 542*61c4878aSAndroid Build Coastguard Worker 543*61c4878aSAndroid Build Coastguard Worker SEED authors should have options for formatting various kinds of information 544*61c4878aSAndroid Build Coastguard Worker and data in their proposals. 545*61c4878aSAndroid Build Coastguard Worker 546*61c4878aSAndroid Build Coastguard WorkerMarkdown intentionally only offers limited control over document formatting, 547*61c4878aSAndroid Build Coastguard Workerwhereas ReST has a wide selection of directives and Google Docs functions as a 548*61c4878aSAndroid Build Coastguard Workertraditional WYSIWYG editor, making them far more flexible. 549*61c4878aSAndroid Build Coastguard Worker 550*61c4878aSAndroid Build Coastguard WorkerSharing between Google and non-Google 551*61c4878aSAndroid Build Coastguard Worker------------------------------------- 552*61c4878aSAndroid Build Coastguard Worker.. admonition:: Goal 553*61c4878aSAndroid Build Coastguard Worker 554*61c4878aSAndroid Build Coastguard Worker Both Google and non-Google contributors should easily be able to write and 555*61c4878aSAndroid Build Coastguard Worker review SEEDs. 556*61c4878aSAndroid Build Coastguard Worker 557*61c4878aSAndroid Build Coastguard WorkerDue to security and legal concerns, managing ownership of Google Docs between 558*61c4878aSAndroid Build Coastguard Workerinternal and external contributors is nontrivial. 559*61c4878aSAndroid Build Coastguard Worker 560*61c4878aSAndroid Build Coastguard WorkerText documentation formats like Markdown and ReST live within the Pigweed 561*61c4878aSAndroid Build Coastguard Workerrepository, and as such follow the standard code contribution process. 562