MeDiVa
DocsReference

document

The document root. Wraps the whole file and is where document-scope rules (`title`, `title.pattern`, …) live. A structural marker — it takes no `end<name>`.

Marker · open <!-- mdv: document … --> · structural marker — no end tag

<!-- mdv: document title title.pattern=/^(LOG|ALERT|REPORT):\s.+/ -->
# LOG: Stardate 47988 — derelict freighter recovered

Props

PropSyntaxCategoryDescription
citations.resolvecitations.resolvedocumentChecks that every citation in the document resolves — an inline text with a real URL, a [text][id] reference whose definition exists, or a [^id] footnote whose definition exists. A dangling citation (placeholder URL, or a ref/footnote with no matching definition) is flagged. Lines with no citation are fine; this only catches the ones that point at nothing.
noFenceWrappernoFenceWrapperdocumentFlags a whole document wrapped in a single code fence (a common LLM failure); a document-scope rule.
noLLMResiduenoLLMResiduedocumentFlags leftover assistant chatter (e.g. "As an AI language model", "Sure, here's"); a document-scope rule.
noTruncationnoTruncationdocumentFlags a document that ends mid-sentence or with an obvious cut marker; a document-scope rule.
title.maxWordstitle.maxWords=<option>documentChecks that the document heading stays under a maximum word count; a document-scope rule.
title.minWordstitle.minWords=<option>documentChecks that the document heading reaches a minimum word count; a document-scope rule.
title.noPlaceholdertitle.noPlaceholderdocumentChecks that the document heading is not placeholder text; a document-scope rule.
title.patterntitle.pattern=<option>documentChecks that the document heading matches a required pattern; a document-scope rule.
titletitledocumentChecks that the document has a title heading; a document-scope rule.

Prop details

citations.resolve

Checks that every citation in the document resolves — an inline text with a real URL, a [text][id] reference whose definition exists, or a [^id] footnote whose definition exists. A dangling citation (placeholder URL, or a ref/footnote with no matching definition) is flagged. Lines with no citation are fine; this only catches the ones that point at nothing.

citations.resolve · category: document · status: stable · src/rules/document/citations-resolve.ts

<!-- mdv: document citations.resolve -->
The probe battery draw dropped after hibernation cycling [1].

[1]: https://example.com/benchmark

noFenceWrapper

Flags a whole document wrapped in a single code fence (a common LLM failure); a document-scope rule.

noFenceWrapper · category: document · status: stable · src/rules/document/no-fence-wrapper.ts

<!-- mdv: document noFenceWrapper -->
# Mission notes
Real Markdown, not the whole captain's log inside one ``` fence.

noLLMResidue

Flags leftover assistant chatter (e.g. "As an AI language model", "Sure, here's"); a document-scope rule.

noLLMResidue · category: document · status: stable · src/rules/document/no-llm-residue.ts

<!-- mdv: document noLLMResidue -->
# Mission notes
Straight to the airlock report, with no "Certainly! Here's the…" preamble.

noTruncation

Flags a document that ends mid-sentence or with an obvious cut marker; a document-scope rule.

noTruncation · category: document · status: stable · src/rules/document/no-truncation.ts

<!-- mdv: document noTruncation -->
# Mission notes
The jump completed and every navigation shard reported healthy.

title.maxWords

Checks that the document heading stays under a maximum word count; a document-scope rule.

title.maxWords=<option> · category: document · status: stable · src/rules/title/title-max-words.ts

<!-- mdv: document title.maxWords=8 -->
# Patch the beacon after docking tests pass

title.minWords

Checks that the document heading reaches a minimum word count; a document-scope rule.

title.minWords=<option> · category: document · status: stable · src/rules/title/title-min-words.ts

<!-- mdv: document title.minWords=3 -->
# Align Europa relay

title.noPlaceholder

Checks that the document heading is not placeholder text; a document-scope rule.

title.noPlaceholder · category: document · status: stable · src/rules/title/title-no-placeholder.ts

<!-- mdv: document title.noPlaceholder -->
# Confirm rover uplink

title.pattern

Checks that the document heading matches a required pattern; a document-scope rule.

title.pattern=<option> · category: document · status: stable · src/rules/title/title-pattern.ts

<!-- mdv: document title.pattern=/^(feat|fix|docs):\s.+/ -->
# feat: tune orbital beacon

title

Checks that the document has a title heading; a document-scope rule.

title · category: document · status: stable · src/rules/title/title.ts

<!-- mdv: document title -->
# Calibrate starship sensors

On this page