mediva is now in public preview.Read the announcement →

Type-check your
Markdown.

Official plugin1/8
<!-- mdv: section required content.words.min=20 content.none=@placeholders -->## DescriptionAdds a token-refresh hook to the auth client so a background request keeps working after the access token expires, instead of silently failing. <!-- mdv: section required -->## Testing<!-- mdv: list required items.all=done-or-na labels.eq=@template -->- [x] Tests pass- [x] Docs updated- [x] No unrelated changes in the diff 
✕ tick-without-evidence"Tests pass" is ticked with no evidence
Why?
20232026

AI mistakes are reaching court.
6 per quarter in 2023. 400+ today.

1 / 9Each stripe is three months of court decisions over AI-invented material · Charlotin, AI Hallucination Cases (CC BY 4.0), to Jun 2026

Every agent says the task was "done".
55% of them were not.

2 / 9Per 100 review runs: 67.9% skipped assigned files, and 80.4% of those misled the user (≈ 55%) · OverclaimBench, 8 frontier agents, arXiv preprint, Sep 2026

So how do you check
what your agents write?

3 / 9

We ran into this too.

Our agents:

  • Ticked Tests added. There weren't any.
  • Cited a source that doesn't exist.
  • Wrote totals that didn't add up.
  • Sent it with [Client name] still in.
  • Tagged someone who shouldn't have seen it.

So we wrote the rules into the Markdown, and built a checker that reads them.

That's mediva.

4 / 9

Same agent. Same tasks.

without mediva

First drafts go out with their errors.

with mediva

The agent fixes what the check reports, before anyone reads it.

5 / 9How we measure generated Markdown · Markdown Crimes benchmark

Plug it into your agent.

import { generateText } from "ai";
import { compile } from "mediva";

const { text } = await generateText({
  model: "openai/gpt-5.5",
  prompt: "Write the release plan",
});
const result = compile(contract).check(text); // result.gate === null when it passes

contract is your plan.mdv.md, as text. One call; result.gate is null when it passes, and result.failing says why when it does not.

6 / 9

Teach your agent.

It then checks every Markdown file it writes against your contracts.

7 / 9Installs the mediva skill where Claude Code (.claude/skills) and Codex (.agents/skills) look for it
8 / 9

What are you going
to do about it?

Send this to someone whose agents write things people rely on.

9 / 9