Skip to content

Commit 3845935

Browse files
authored
feat(AIP-8) rm appendix, add rationale and history (#1058)
As discussed in #1048, appendix is a bit of a misnomer as a place to put design discussions, and there's a clear need based on internal conversations for consumers of AIPs to understand *why* a change was made. Adding two sections which can provide parts of the story: - rationale introduces a section to explain current design decisions. - history introduces a section to give historical context as needed (e.g. if a major change happens to an AIP).
1 parent cd224b9 commit 3845935

1 file changed

Lines changed: 35 additions & 19 deletions

File tree

aip/general/0008.md

Lines changed: 35 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@ placement:
1010
# AIP Style guide
1111

1212
AIP stands for **API Improvement Proposal**, which is a design document
13-
providing high-level, concise documentation for API development. The goal is
14-
for these documents to serve as the source of truth for API-related
15-
documentation at Google and the way API teams discuss and come to consensus on
16-
API guidance.
13+
providing high-level, concise documentation for API development. The goal is for
14+
these documents to serve as the source of truth for API-related documentation at
15+
Google and the way API teams discuss and come to consensus on API guidance.
1716

1817
AIPs are most useful when they are clear and concise, and cover a single topic
1918
or inquiry well. In the same way that AIPs describe consistent patterns and
@@ -22,8 +21,8 @@ style for use in APIs, they also _follow_ consistent patterns and style.
2221
## Guidance
2322

2423
AIPs **must** cover a single, discrete topic, and **should** fundamentally
25-
answer the question, "What do I do?" with actionable guidance. AIPs **may**
26-
also cover what _not_ to do, but **should not** cover _only_ anti-patterns.
24+
answer the question, "What do I do?" with actionable guidance. AIPs **may** also
25+
cover what _not_ to do, but **should not** cover _only_ anti-patterns.
2726

2827
While the length of AIPs will necessarily vary based on the complexity of the
2928
question, most AIPs **should** be able to cover their content in roughly two
@@ -82,8 +81,8 @@ AIPs **should** then begin with an introduction (with no additional heading),
8281
followed by a `## Guidance` heading. If necessary, the AIP **may** include any
8382
of the following after the guidance, in the following order:
8483

85-
- "Further reading" is a bulleted list of links to other AIPs that are useful
86-
to fully understand the current AIP.
84+
- "Further reading" is a bulleted list of links to other AIPs that are useful to
85+
fully understand the current AIP.
8786
- "Appendices" covering further explanation in the same AIP. These are
8887
relatively rare but are important in cases where an AIP requires a lot of
8988
justification for the decision. Often this is primarily an explanation of
@@ -114,18 +113,34 @@ followed by a bulleted list explaining the example.
114113
Individual subsections can be cited individually, and further elaborate
115114
details.
116115

116+
## Rationale
117+
118+
The "rationale" section is optional, and helps the reader understand the
119+
motivation behind specific guidance within the AIP.
120+
121+
Deeper explanations of design justification and tradeoffs **must** be in the
122+
rationale instead of other sections, to ensure the rest of the document acts as
123+
an easily actionable reference.
124+
125+
## History
126+
127+
The "history" section is optional, and documents events and context around a
128+
significant edit to an AIP. For example, explanation of rewrite would be
129+
included in this section
130+
131+
While the changelog is a dotted list of one-line summaries of changes to an AIP,
132+
the history section should elaborate on significant events in a descriptive
133+
format.
134+
135+
The section **must not** be used to exhaustively enumerate all changes. This
136+
is what the changelog provides.
137+
117138
## Further reading
118139

119140
A bulleted list of (usually) other AIPs, in the following format:
120141

121142
- [AIP-1](./0001.md): AIP purpose and guidelines
122143

123-
## Appendix
124-
125-
An appendix is appropriate when a non-trivial side discussion is necessary. It
126-
may explain historical reasons for the guidance, alternatives considered, or
127-
other issues potentially of interest to the reader.
128-
129144
## Changelog
130145

131146
A bulleted list of changes in reverse chronological order, using the following
@@ -137,8 +152,8 @@ format:
137152

138153
AIPs **should** attempt to follow this overall format if possible, but AIPs
139154
**may** deviate from it if necessary (in particular, if the AIP would be more
140-
difficult to understand, even for a reader already accustomed to reading AIPs
141-
in the usual format).
155+
difficult to understand, even for a reader already accustomed to reading AIPs in
156+
the usual format).
142157

143158
**Note:** Except for the title, AIPs **must** only use the second heading level
144159
(`##`) and above. AIPs **should** only use the second and third heading levels
@@ -167,8 +182,8 @@ examples, a `google.api.http` annotation **should** be included.
167182

168183
When AIPs reference other AIPs, the prosaic text **must** use the format
169184
`AIP-XXXX` without zero-padding (e.g., `AIP-8`, not `AIP-0008`), and **must**
170-
link to the relevant AIP. AIP links **may** point to a particular section of
171-
the AIP if appropriate.
185+
link to the relevant AIP. AIP links **may** point to a particular section of the
186+
AIP if appropriate.
172187

173188
**Important:** AIP links **must** use the relative path to the file in the
174189
repository (such as `./0008.md` for core AIPs, or `../0008.md` for AIPs in a
@@ -182,5 +197,6 @@ branch.
182197

183198
## Changelog
184199

200+
- **2023-03-30**: Removed appendix, added rationale and history to the template.
185201
- **2020-02-18**: Specified reverse chronological ordering for changelog items.
186-
- **2019-08-23**: Added guidance for internal AIP links.
202+
- **2019-08-23**: Added guidance for internal AIP links.

0 commit comments

Comments
 (0)