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.
<!-- 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## Summary
Still too little detail.
## Checklist
- [x] Tests added or updated
- [x] Docs updatedpr.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 detailsWrite a real Summary and the run is silent. Silence is the pass.
Run it
npx mediva check pr.md --schema pr.mdv.mdWhen to use it
| Use mediva for | Use something else for |
|---|---|
| PR bodies, issue templates | prose style (Vale) |
| LLM and agent Markdown | spelling |
| changelogs, release notes, ADRs | JSON payloads (JSON Schema) |
Where to go next
Quickstart · Contracts · All rules · Recipes · TypeScript API