blob: 0be4d04e7557fe71dc5b66d4119065ddb4e8dd0a [file] [log] [blame]
Gyorgy Szing5c873232019-05-10 23:28:14 +02001Design proposal process
2=======================
3
4:Author: Gyorgy Szing
5:Organisation: Arm Limited
6:Contact: Gyorgy Szing <gyorgy.szing@arm.com>
7
8Purpose and Content
9-------------------
Ken Liuc54a6c92019-12-16 12:18:11 +080010This document describes the steps of adding/changing Trusted Firmware design. It
Gyorgy Szing5c873232019-05-10 23:28:14 +020011specifies:
12
Ken Liuc54a6c92019-12-16 12:18:11 +080013 - The documentation format to be used.
14 - The information which shall be captured.
15 - The steps of the process.
16 - The location where the information shall be captured during the process.
Gyorgy Szing5c873232019-05-10 23:28:14 +020017
18General
19-------
20The Trusted Firmware project uses the
21`reStructuredText <http://docutils.sourceforge.net/rst.html>`_ format with
22`Sphinx <http://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html>`_
23extensions for documentation. Design documents shall be captured in this format.
24
25Design documents are kept under version control at the project's
26`Gerrit server <https://review.trustedfirmware.org>`_. All decisions made and
27important information gathered during the design discussion, which is not part
28of the design document shall be captured as Gerrit comments or notes for
29archiving purposes. To meet this requirement this process encourages the use of
30the Gerrit web UI for communication.
31
32
33Status of a document
34---------------------
35The status of the document is captured in a *reST filed* called *Status*.
36Bibliographic fields like the *Status* shall be kept near to the top of the
37document after the document title.
38
39Example document fragment::
40
41 TF-M Crypto Service design
42 --------------------------
43
44 :Author: Antonio de Angelis
45 :Organization: Arm Limited
46 :Contact: Antonio de Angelis <antonio.deangelis@arm.com>
47 :Status: Draft
48
49Design documents are kept in three different sections of the documentation
50reflecting the status of the document. The status of the document determines
51the section it is in. Open (*Draft* and *Detailed* status) and accepted design
Ken Liuc54a6c92019-12-16 12:18:11 +080052documents shall be put to the ``docs/design_documents`` directory.
53
54.. important::
55 - 'Author' and 'Organization' can be *OPTIONAL* but at least one of them is
56 *MANDATORY*.
57 - 'Contact' is *MANDATORY* and must be valid for contacting with 'Author'
58 or 'Organization'.
59 - 'Status' is *OPTIONAL* if the design document is managed under a version
60 control tool. In this 'Status' field not available case, a guideline can be:
61
62 - No review comments given design is a *Draft* design.
63 - Positive review comments given design is a *Detailed* design.
64 - Merged design is an *Accepted* design.
Gyorgy Szing5c873232019-05-10 23:28:14 +020065
66Preparation
67-------------
68In order to work on TF-M documentation the TF-M git repository has to be
69available locally. Setting up the documentation tools will allow pre-viewing the
70documentation file in preparation.
71For information on what tools are needed please refer to
Minos Galanakise4094012020-06-12 14:25:34 +010072:doc:`sw requirements </docs/getting_started/tfm_sw_requirement>`. To see how to get
Gyorgy Szing5c873232019-05-10 23:28:14 +020073a local copy of the TF-M repository please see
Minos Galanakise4094012020-06-12 14:25:34 +010074:doc:`build instructions </docs/getting_started/tfm_build_instruction>`
Gyorgy Szing5c873232019-05-10 23:28:14 +020075
76Process steps
77-------------
78
79- Write the design proposal in the format that is described in this document
Ken Liuc54a6c92019-12-16 12:18:11 +080080 with the *Status* set to *Draft* if *Status* field is provided. Put it to the
81 ``docs/design_documents`` directory and create a pull request.
Gyorgy Szing5c873232019-05-10 23:28:14 +020082- Start an e-mail thread on the
83 `TF-M mailing list <mailto:tf-m@lists.trustedfirmware.org>`_ for discussing
84 the proposal.
85- Build initial consensus within the community about the proposed design
86 change, rework it according to the feedbacks and identify members who would
87 like to participate in the detailed review.
88- When the "short list" of members who are willing to participate in the
Ken Liuc54a6c92019-12-16 12:18:11 +080089 detailed review is established, set the *Status* field to *Detailed* if
90 *Status* field is provided and push the change to Gerrit.
Gyorgy Szing5c873232019-05-10 23:28:14 +020091- Add the members of the "short list" to the Gerrit review as reviewers.
92- The detailed discussion then takes place in the Gerrit review and gets
93 recorded there.
94 Additional changes are submitted as new commits to the review.
Ken Liuc54a6c92019-12-16 12:18:11 +080095- When the proposal is accepted and *Status* field is provided, the *Status*
96 field is set to *Accepted* and update the change then get merged.
Gyorgy Szing5c873232019-05-10 23:28:14 +020097
98.. uml::
99
100 @startuml
101 !define DRAFT_DIR **docs/design_documents/**
102 !define REJECTED_DIR **docs/design_documents/rejected/**
103 !define GERRIT_URL https://review.trustedfirmware.org
104 !define GERRIT_LINK [[GERRIT_URL trustedfirmware.org]]
Minos Galanakis0f39fa52020-06-08 16:53:53 +0100105 !define MAINTAINER_RST_URL https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git/tree/docs/maintainers.rst
Gyorgy Szing5c873232019-05-10 23:28:14 +0200106 !define TFM_MAILING_LIST mailto:tf-m@lists.trustedfirmware.org
107 !define NO_DECISION **no**
108 !define YES_DECISION **yes**
109 !define STATUS_DRAFT **Draft**
110 !define STATUS_DETAILED **Detailed**
111 !define STATUS_REJECTED **Rejected**
112 !define STATUS_ACCEPTED **Accepted**
113
114 title Design Proposal Process
115
116 start
117 :Create first draft.in [[http://docutils.sourceforge.net/rst.html ReST format]];
Ken Liuc54a6c92019-12-16 12:18:11 +0800118 :Set it's available 'Status' field to STATUS_DRAFT.;
Gyorgy Szing5c873232019-05-10 23:28:14 +0200119
120 :Add your document under DRAFT_DIR.;
121 :Create pull-request at GERRIT_LINK.;
122 partition "Initial review." {
123 :Start an e-mail thread at [[TFM_MAILING_LIST tf-m mailing list]].;
124 repeat
125 :Build initial consensus within the
126 community about the proposed design change.;
127 :Gather developers interested in detailed review.;
128 repeat while (Ready for detailed review?)
129 }
130
131 partition "Detailed review." {
Ken Liuc54a6c92019-12-16 12:18:11 +0800132 :Set available 'Status' field to STATUS_DETAILED.;
Gyorgy Szing5c873232019-05-10 23:28:14 +0200133 :Add reviewers to pull request.;
134
135 repeat
136 :Discuss design in Gerrit comments/notes.;
137 :Log the result of discussions over
138 other communication channels
139 as Gerrit comments/notes.;
140 :Push new document version if needed.;
141 repeat while (Consensus reached?)
142 }
143
Ken Liuc54a6c92019-12-16 12:18:11 +0800144 if (Design is accepted?) then (STATUS_ACCEPTED)
145 :Sets available 'Status' field to STATUS_ACCEPTED.;
146 ://Submit// the pull-request.;
147 else (STATUS_REJECTED)
Gyorgy Szing5c873232019-05-10 23:28:14 +0200148 endif
149
Gyorgy Szing5c873232019-05-10 23:28:14 +0200150 stop
151
152 @enduml
153
154--------------
155
Ken Liuc54a6c92019-12-16 12:18:11 +0800156*Copyright (c) 2019-2020, Arm Limited. All rights reserved.*