docs: apply architecture review pass 2 fixes
Clarify null scalars, marker handling in frontmatter, the Decision Outcome prose rule, section extent wording and link rule scope. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4cdc29bf3f
commit
f8a76a9ab0
1 file changed
+6
-6
+6
-6
@@ -25,7 +25,7 @@ A record file is named `YYYYMMDDTHHMMSSmmmZ-slug.md`, for example `20261023T2045
|
||||
|
||||
Every record starts with a YAML frontmatter block: the first line is exactly `---`, and the block ends at the next line that is exactly `---`. The block MUST be a mapping containing exactly the keys listed for the record type, no more, no fewer, each once. Key order is free. Empty lists are written `[]`. A key with no value (null) is an error.
|
||||
|
||||
Scalar values are read as their literal text, whether quoted or not; for example, `date` may be quoted or unquoted, and `title: 2026` is the string `2026`. Anchors, aliases, explicit tags and multiple YAML documents are errors. "Single line" means the parsed value contains no line break.
|
||||
A plain `~`, `null`, `Null` or `NULL` is null, the same as an empty value, and is an error. Every other scalar is a string with no type resolution: its parsed text, whether quoted or not. For example, `date` may be quoted or unquoted, `title: 2026` is the string `2026`, and `title: "null"` is the string `null`. A block scalar (`|`, `>`) is its parsed text. Anchors, aliases, explicit tags and multiple YAML documents are errors. "Single line" means the parsed value contains no line break.
|
||||
|
||||
### 3.1 ADR keys
|
||||
|
||||
@@ -116,7 +116,7 @@ Plan `status`:
|
||||
|
||||
## 6. Body
|
||||
|
||||
The body is Markdown (CommonMark) after the frontmatter. Headings inside fenced code blocks or HTML comments do not count. Required section headings are matched case-sensitively and exactly, at level 2 (`##`). A section runs until the next heading of level 2 or lower, so its subsections belong to it. A required section MUST appear exactly once and contain non-empty prose: at least one paragraph (including paragraphs inside blockquotes), list item or table cell of text. HTML comments and code (fenced, indented or inline) do not count as prose. Extra sections are allowed anywhere.
|
||||
The body is Markdown (CommonMark) after the frontmatter. Headings inside fenced code blocks or HTML comments do not count. Required section headings are matched case-sensitively and exactly, at level 2 (`##`). A section runs until the next heading of level 1 or 2, so its subsections belong to it. A required section MUST appear exactly once and contain non-empty prose: at least one paragraph (including paragraphs inside blockquotes), list item or table cell of text. HTML comments and code (fenced, indented or inline) do not count as prose. Extra sections are allowed anywhere.
|
||||
|
||||
Heading text is the raw source after the `#` markers, trimmed, with any closing `#` run removed; it is compared byte for byte, with no inline-markup rendering. Setext headings are read as the equivalent ATX heading.
|
||||
|
||||
@@ -124,7 +124,7 @@ Heading text is the raw source after the `#` markers, trimmed, with any closing
|
||||
|
||||
- The first heading is an H1 whose heading text equals `title`. There is one H1.
|
||||
- Required H2 sections: `Context and Problem Statement`, `Considered Options`, `Decision Outcome`.
|
||||
- `Decision Outcome` MUST contain exactly one `### Consequences` (H3) subsection with non-empty prose, and prose of its own outside that subsection. A level-2 `## Consequences` is an error.
|
||||
- `Decision Outcome` MUST contain exactly one `### Consequences` (H3) subsection with non-empty prose, and at least one prose block before its first H3 subsection. A level-2 `## Consequences` is an error.
|
||||
- Optional MADR sections (for example `Decision Drivers`, `Pros and Cons of the Options`, `More Information`) MAY be added.
|
||||
|
||||
### 6.2 Plan
|
||||
@@ -135,11 +135,11 @@ Heading text is the raw source after the `#` markers, trimmed, with any closing
|
||||
|
||||
### 6.3 Placeholders
|
||||
|
||||
A record is invalid if it still contains the exact marker `{{docs:todo}}` anywhere outside code. `docs new` writes this marker into each section it leaves for you to fill; replace it with content. No other text is treated as a placeholder, so words like TODO or TBD are fine. To mention the marker itself, put it in inline or fenced code.
|
||||
A record is invalid if it still contains the exact marker `{{docs:todo}}` anywhere outside code, including inside a frontmatter string value or list item (write it quoted there: `summary: "{{docs:todo}}"`). A list item equal to the marker reports only the marker error, not the format error for its key. `docs new` writes this marker into each field and section it leaves for you to fill; replace it with content. No other text is treated as a placeholder, so words like TODO or TBD are fine. To mention the marker itself, put it in inline or fenced code.
|
||||
|
||||
## 7. References and links
|
||||
|
||||
A reference is either a repo-root path or a URL. This applies to frontmatter reference lists and to every Markdown link and image destination in the body (inline, reference-style and autolinks; bare URLs in text are not checked). Link rules apply only to Markdown link destinations: forge autolink shortcuts in plain text (`#123`, `owner/repo#123`, `@user`, commit SHAs) and raw HTML (`<a href>`, `<img src>`) are not inspected. Every link reference definition is checked, whether or not it is used.
|
||||
A reference is either a repo-root path or a URL. This applies to frontmatter reference lists and to every Markdown link and image destination in the body (inline, reference-style and autolinks; bare URLs in text are not checked). In the body, link rules apply only to Markdown link destinations: forge autolink shortcuts in plain text (`#123`, `owner/repo#123`, `@user`, commit SHAs) and raw HTML (`<a href>`, `<img src>`) are not inspected. Every link reference definition is checked, whether or not it is used.
|
||||
|
||||
Repo-root path:
|
||||
|
||||
@@ -148,7 +148,7 @@ Repo-root path:
|
||||
- The destination is percent-decoded before the existence check (`%20` is a space). A `?query` is an error.
|
||||
- The target MUST exist as a regular file inside the repository. Symlinks that resolve outside the repository are rejected.
|
||||
- In body links only, a `#fragment` suffix is allowed; the fragment is not verified. In frontmatter, a fragment is an error.
|
||||
- Rejected: relative paths (`foo.md`, `./foo.md`), any `..` segment and backslashes. Other non-existent targets, including machine paths such as `/Users/...`, `/home/...` or `C:\...`, fail the existence rule; `file:` URLs fail the scheme rule.
|
||||
- Rejected: relative paths (`foo.md`, `./foo.md`), any `..` segment and backslashes. Other non-existent targets, including machine paths such as `/Users/...` or `/home/...`, fail the existence rule; `file:` URLs fail the scheme rule.
|
||||
|
||||
URL:
|
||||
|
||||
|
||||
Reference in new issue
Block a user