// rule catalog

Every tag, by example

Pick the construct that matches the Markdown you expect. Each card shows the directive, the failure it rejects, and the smallest valid shape mediva wants instead.

12 / 12 shown
block

Block

structure

The recursive container for a heading plus prose or nested tags; presence and body rules target it.

read the rule →
rejects
<!-- mdv: block required minWords=20 noPlaceholder -->
## Summary
TODO
<!-- mdv: endblock -->
wants instead
<!-- mdv: block required minWords=20 noPlaceholder -->
## Summary
The parser now validates generated Markdown before docs publish, so broken sections fail in CI.
<!-- mdv: endblock -->
document

Document

structure

The root marker for document-scope checks like title, truncation, fence wrappers, and LLM residue.

read the rule →
rejects
<!-- mdv: document title noLLMResidue noTruncation -->
Sure, here's the release note:

## TODO
wants instead
<!-- mdv: document title noLLMResidue noTruncation -->
# fix: validate release notes

The migration completed and every shard reported healthy.
front

Frontmatter

structure

A marker for one YAML frontmatter field; attach required, oneof, pattern, or date rules to that key.

read the rule →
rejects
<!-- mdv: front status required oneof=draft,review,approved -->
---
status: maybe
owner: docs
---
wants instead
<!-- mdv: front status required oneof=draft,review,approved -->
---
status: review
owner: docs
---
prose

Prose

content

A free-prose region with no table, list, or checkbox structure; content rules still apply.

read the rule →
rejects
<!-- mdv: prose minWords=8 noPlaceholder -->
TBD
<!-- mdv: endprose -->
wants instead
<!-- mdv: prose minWords=8 noPlaceholder -->
Describe the user-facing impact in plain language.
<!-- mdv: endprose -->
list

List

content

A bullet or numbered list constrained by item count and per-item word or evidence rules.

read the rule →
rejects
<!-- mdv: list minItems=2 each.minWords=3 -->
- tests
<!-- mdv: endlist -->
wants instead
<!-- mdv: list minItems=2 each.minWords=3 -->
- parser fixtures passed
- CLI smoke test passed
<!-- mdv: endlist -->
taskList

Task List

content

A checkbox checklist of work items; pair with allChecked, minChecked, or maxChecked to gate completion.

read the rule →
rejects
<!-- mdv: taskList required allChecked exactLabels -->
- [x] Tests added or updated
- [ ] Docs updated
<!-- mdv: endtaskList -->
wants instead
<!-- mdv: taskList required allChecked exactLabels -->
- [x] Tests added or updated
- [x] Docs updated
<!-- mdv: endtaskList -->
evidenceList

Evidence List

content

A list of verification items, reproduction steps, manual checks, or citations.

read the rule →
rejects
<!-- mdv: evidenceList required minItems=2 each.minWords=4 -->
- Looks fine
<!-- mdv: endevidenceList -->
wants instead
<!-- mdv: evidenceList required minItems=2 each.minWords=4 -->
- Ran `npm test`; 412 pass, 0 fail.
- Checked the CI run; it is green.
<!-- mdv: endevidenceList -->
choice

Choice

content

A single- or multi-select checkbox choice; oneChecked makes it single-select.

read the rule →
rejects
<!-- mdv: choice oneChecked -->
- [x] feat
- [x] fix
- [ ] docs
<!-- mdv: endchoice -->
wants instead
<!-- mdv: choice oneChecked -->
- [ ] feat
- [x] fix
- [ ] docs
<!-- mdv: endchoice -->
table

Table

table

A Markdown table whose headers, row count, and named-column values can be checked.

read the rule →
rejects
<!-- mdv: table required cols=Area,Owner,Status minRows=1 -->
| Area | Status |
| ---- | ------ |
| Auth | done |
<!-- mdv: endtable -->
wants instead
<!-- mdv: table required cols=Area,Owner,Status minRows=1 -->
| Area | Owner | Status |
| ---- | ----- | ------ |
| Auth | Dana | done |
<!-- mdv: endtable -->
code

Code

code

A fenced code block; checks language info strings and catches unclosed fences.

read the rule →
rejects
<!-- mdv: code required lang=ts codeFenceClosed -->
```
export const ok = true;
<!-- mdv: endcode -->
wants instead
<!-- mdv: code required lang=ts codeFenceClosed -->
```ts
export const ok = true;
```
<!-- mdv: endcode -->
media

Media

media

A visual evidence slot for screenshots or video; requiredOrNA accepts an explicit non-visual note.

read the rule →
rejects
<!-- mdv: media requiredOrNA -->
<!-- mdv: endmedia -->
wants instead
<!-- mdv: media requiredOrNA -->
N/A: this change has no visual surface.
<!-- mdv: endmedia -->
structure-atoms

Structure Atoms

structure

The low-level shape rules: open a tag, close it with the matching end tag, and keep document order stable.

read the rule →
rejects
<!-- mdv: block required -->
## Summary
Ship the validator.
<!-- mdv: endtable -->
wants instead
<!-- mdv: block required -->
## Summary
Ship the validator.
<!-- mdv: endblock -->