Validate docs across a monorepo

Use schema-beside-file contracts so one CI job validates every package README.

One scanner pass across the fleet beats one hand-written command per ship.

Prompt for your coding agentOpen in Claude ↗

Add mediva to this monorepo (npm i -D mediva) and a GitHub workflow that runs npx mediva check on pull requests touching **/*.md or **/*.mdv.md. Keep each contract next to the document it checks.

packages/api/README.md
packages/api/README.mdv.md
packages/web/README.md
packages/web/README.mdv.md
packages/worker/README.md
packages/worker/README.mdv.md
packages/api/README.mdv.md
<!-- mdv: section required content.words.min=15 content.none=@placeholders -->

## Overview

The api package owns the public HTTP routes and request validation; other packages depend on it only through its typed client.

<!-- mdv: section required content.words.min=10 content.none=@placeholders -->
## Development

Run `npm run dev` to start the server on port 3000 with hot reload against the local database.

<!-- mdv: section required -->
## Commands

<!-- mdv: list required items.min=2 -->
- Run `npm test` from this package before opening a pull request.
- Run `npm run build` from this package before publishing it.
## Overview

The api package.

## Development

TBD

## Commands

- Run `npm test` from this package before opening a pull request.

One npx mediva check from the repo root pairs every X.mdv.md with its X.md and reports all four problems above.

.github/workflows/docs.yml
on:
  pull_request:
    paths:
      - "**/*.md"
      - "**/*.mdv.md"
jobs:
  docs:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm install -D mediva
      - run: npx mediva check

Variations

WantDo
explicit pathslet the shell expand: npx mediva check packages/*/README.md --schema docs/readme.mdv.md (the CLI does not expand globs)
skip fixtures or vendored codedrop a .mdvignore containing * in the folder (the scan)

On this page