Introduction

mediva validates Markdown against a contract — verify generated documents the way you verify typed data.

HAL: I'm sorry, Dave. I'm afraid I can't merge that. Your Summary section is only four words long.

A contract is plain Markdown with hidden <!-- mdv: … --> rules. mediva checks documents against it.

pr.mdv.md
<!-- mdv: section required content.words.min=20 content.none=@placeholders -->
## Summary

<!-- mdv: section -->
## Checklist
<!-- mdv: list required items.all=checked labels.eq=@template -->
- [ ] Tests added or updated
- [ ] Docs updated
pr.md
## Summary
Still too little detail.

## Checklist
- [x] Tests added or updated
- [x] Docs updated
pr.md
  State: what the document claims; clear it by doing the work or saying it is not done
  2  warning  "Summary" has 4 words, needs at least 20  too-few-words
              help: Add the missing specifics, not filler

✖ 1 problem (0 errors, 1 warning)
  mdv explain <rule-id> for details

Write a real Summary and the run is silent. Silence is the pass.

Run it

npx mediva check pr.md --schema pr.mdv.md

When to use it

Use mediva forUse something else for
PR bodies, issue templatesprose style (Vale)
LLM and agent Markdownspelling
changelogs, release notes, ADRsJSON payloads (JSON Schema)

Where to go next

Quickstart · Contracts · All rules · Recipes · TypeScript API

On this page