Skip to content

Commit a9b8a09

Browse files
committed
fixup: Update doc guideliness for clarity and lessons learned
Change-Id: Ie3cbb167e0ba8aaecf7c000213aaba825f372f4a
1 parent b533975 commit a9b8a09

1 file changed

Lines changed: 39 additions & 12 deletions

File tree

docs/documentation-guidelines.md

Lines changed: 39 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ after the current task or PR is finished.
7878

7979
## A four-layer framework
8080

81-
A useful default is to think about repository documentation in four layers:
81+
One way to think about repository documentation is in four layers:
8282

8383
1. **Why does this exist?**
8484
- what problem does it solve
@@ -116,13 +116,12 @@ layer 3 occasionally, and layer 4 rarely. It is also the layer where LLMs can be
116116
the most helpful because an LLM working with you already has much of the context
117117
needed to write it.
118118

119-
Layer 4 should not be interpreted narrowly as only "validation steps" or
120-
"current invariants." It also includes enough preserved decision context that a
121-
future maintainer can understand why a different change may be wrong, or why it
122-
might only become appropriate under changed assumptions. Repository
123-
documentation should usually preserve enough context around meaningful
124-
alternatives that a future reader can understand why the current choice was
125-
made.
119+
Layer 4 is not just about validation steps or current invariants. It also
120+
includes enough decision context that a future maintainer can understand why a
121+
different change may be wrong, or why it might only become appropriate under
122+
changed assumptions. Repository documentation should preserve enough context
123+
around alternatives that a future reader can understand why the current choice
124+
was made.
126125

127126
### What this looks like in practice
128127

@@ -188,6 +187,11 @@ This guide deliberately does not prescribe:
188187
The details of drafting, checking for drift, and using session history can
189188
evolve over time.
190189

190+
This guide can help preserve the right information and catch common problems,
191+
but it cannot replace judgment. A document can be correct and still be clumsy,
192+
repetitive, or hard to use. Clarity, proportion, and restraint have to be
193+
learned through practice and review.
194+
191195
## When to add or expand documentation
192196

193197
The definition above explains what repository documentation is. This section
@@ -257,7 +261,7 @@ Do not use repository documentation as:
257261

258262
Some explored paths are worth preserving, but only after they are translated
259263
into a stable explanation such as a trade-off, rejected alternative, or
260-
important discovered constraint.
264+
constraint that still matters.
261265

262266
When deciding whether to keep rationale from an explored path, ask whether a
263267
future maintainer would understand the trade-off, rejected alternative, or
@@ -288,7 +292,7 @@ include:
288292
repository
289293

290294
The exact filename matters less than making the document easy to find and
291-
interpret.
295+
understand.
292296

293297
## Discoverability
294298

@@ -324,8 +328,19 @@ looking for.
324328

325329
Start simple. A single document is often enough.
326330

327-
One useful default is to structure a document around the [four-layer
328-
framework](#a-four-layer-framework) above, often with sections such as:
331+
A good document is not just complete; it is usable. Write so a future reader
332+
can skim the document and find what they need, not just so the right facts
333+
appear somewhere in the text. In practice, that usually means:
334+
335+
- front-load the principles or mental model
336+
- use headings that clearly describe what a section is doing
337+
- prefer plain language over jargon when the simpler wording is accurate
338+
- state the default guidance clearly, then explain exceptions briefly
339+
- use examples when a rule would otherwise stay abstract
340+
- remove repetition that restates a point without sharpening it
341+
342+
A useful default is to structure a document around the [four-layer framework](#a-four-layer-framework)
343+
above, often with sections such as:
329344

330345
1. **Overview**
331346
2. **Usage**
@@ -397,3 +412,15 @@ maintainers will still need. The updated document does not need every detail
397412
from the original, but it should preserve the reasoning that still matters for
398413
future changes, including important constraints, relevant alternatives, and why
399414
those alternatives were not chosen.
415+
416+
When revising a document that has grown by accretion, check whether the result
417+
is still easy to use. Questions like these may help:
418+
419+
- Is the opening section really an overview, or is it principles, usage, or
420+
maintainer guidance?
421+
- Are the main rules explained by a small number of reasons a reader can
422+
remember?
423+
- Are the important exceptions concrete enough, or do they need examples?
424+
- Is any section repeating itself instead of helping the reader decide or act?
425+
- Have useful points from review discussion been folded back into the durable
426+
document rather than left only in PR comments?

0 commit comments

Comments
 (0)