|
1 | 1 | --- |
2 | 2 | summary: >- |
3 | | - Section-schema reference: the entry-shape |
4 | | - vocabulary used in inline `kinds.<name>.schema:` |
5 | | - blocks and `proto.md` files. Covers the |
| 3 | + Section-schema reference for inline |
| 4 | + `kinds.<name>.schema:` blocks. Covers the |
6 | 5 | `heading:` discriminator, the `regex:` matcher |
7 | 6 | (a Go RE2 body with `\#(digits)` and |
8 | 7 | `\#(fmvar(...))` helpers), the |
9 | 8 | `repeat: {min, max}` cardinality field, and the |
10 | | - matching algorithm. |
| 9 | + matching algorithm. `proto.md` files are |
| 10 | + parsed into the same shape by the schema |
| 11 | + package, but MDS020's file-schema check still |
| 12 | + uses its legacy parser; see the proto.md |
| 13 | + section below for what is and is not migrated. |
11 | 14 | --- |
12 | 15 | # Section schema |
13 | 16 |
|
@@ -252,13 +255,24 @@ schema: |
252 | 255 |
|
253 | 256 | ## `proto.md` file syntax |
254 | 257 |
|
| 258 | +> **Migration status.** MDS020's file-schema |
| 259 | +> check still uses the legacy `parseSchema` |
| 260 | +> pipeline today: `## ?` and `## ...` already |
| 261 | +> behave as wildcards, and `{field}` in a |
| 262 | +> heading row matches a non-empty run rather |
| 263 | +> than resolving the frontmatter value via |
| 264 | +> `fmvar(...)`. The mapping below is what the |
| 265 | +> schema package parses. Tests exercise it so a |
| 266 | +> follow-up cutover plan can wire MDS020 |
| 267 | +> through without docs churn. Until then, |
| 268 | +> proto.md authors should treat `{field}` as a |
| 269 | +> wildcard, not a frontmatter substitution. |
| 270 | + |
255 | 271 | Proto.md files use a literal-template surface |
256 | 272 | distinct from the inline `regex:` form. Heading |
257 | 273 | rows in the body act as the schema's |
258 | 274 | `sections:` list. `{n}` and `{field}` survive |
259 | | -here as template placeholders; they desugar to |
260 | | -the same matcher the inline form produces with |
261 | | -`digits` and `fmvar`. |
| 275 | +here as template placeholders. |
262 | 276 |
|
263 | 277 | | Row syntax | Equivalent inline entry | |
264 | 278 | |-------------------|------------------------------------------------| |
|
0 commit comments