Gate PR bodies

Reject pull requests whose description is missing sections or still has placeholder text.

MON MOTHMA: Many Bothans died to bring us these plans. The least the courier can do is fill in the briefing form.

Prompt for your coding agentOpen in Claude ↗

Add mediva to this repo: npm i -D mediva, write .github/pull_request_template.md as below, and add .github/workflows/mdv.yml running jamespacileo/mediva@v0.2.0 on pull_request. Before opening any PR, save its body to body.md and fix every finding from npx mdv check --pr body.md.

Starters are being rebuilt; write this by hand.

.github/pull_request_template.md
<!-- mdv: document title.pattern=/^(feat|fix|docs|chore|refactor|perf|test|build|ci)(\(.+\))?!?:\s.+/ -->

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

## Description

Describe what changed, why, and the impact.

<!-- mdv: section required issue.keyword=[Fixes, Closes, Resolves] -->
## Related Issue

Fixes #

<!-- mdv: section required -->
## Pre-Merge Checklist

<!-- mdv: list required items.all=checked labels.eq=@template -->
- [ ] I reviewed the diff for unrelated changes.
- [ ] I updated docs, or this PR does not require docs.
## Description

Fixes stuff.

## Related Issue

Fixes #

## Pre-Merge Checklist

- [ ] I reviewed the diff for unrelated changes.
- [ ] I updated docs, or this PR does not require docs.
npx mdv check --pr body.md --title "updated things"
gh pr view 123 --json body -q .body | npx mdv check --pr -

A bad title, a thin Description and a bare Fixes # fail. Unticked boxes only warn; items.all=checked error=unchecked-items makes them block.

# .github/workflows/mdv.yml
name: mediva
on:
  pull_request:
    types: [opened, edited, synchronize, reopened]
permissions:
  contents: read
jobs:
  mediva:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: jamespacileo/mediva@v0.2.0

The Action reads the template from the PR's base commit, so a PR cannot loosen its own contract; the first PR that adds it passes with a notice. Inputs are on Mediva CI.

Variations

WantAdd
not every box mandatorychecked.min=1 instead of items.all=checked
a single-select "Type of change"checked.eq=1 on a list leaf in its own section
visual evidence for UI worka media required na leaf: an image or an explicit N/A

On this page