Gate issue forms
Reject malformed issue reports with precise diagnostics for each missing section.
Mission control can help faster when the distress call has coordinates, expected telemetry, and impact.
Prompt for your coding agentOpen in Claude ↗
Add mediva to this repo (npm i -D mediva). Turn .github/ISSUE_TEMPLATE/bug_report.md into a mediva contract with <!-- mdv: --> rules for its required sections, and add an issues trigger to the mediva GitHub workflow so new issue bodies are checked.
<!-- mdv: document title title.words.min=3 title.none=@placeholders -->
<!-- mdv: section required content.words.min=15 content.none=@placeholders -->
## Summary
What happened, and who is affected?
<!-- mdv: section required content.words.min=15 content.none=@placeholders -->
## Reproduction / Use-case
What steps, inputs, or workflow make this happen?
<!-- mdv: section required content.words.min=10 content.none=@placeholders -->
## Expected
What should have happened instead?
<!-- mdv: section required content.words.min=10 content.none=@placeholders -->
## Impact
How often does this happen, and what does it block?## Summary
Login is broken.
## Reproduction / Use-case
TBD
## Expected
Login works after a password reset, as it did last week.
## Impact
Blocks all users who reset their password today.npx mdv check report.md --schema .github/ISSUE_TEMPLATE/bug_report.md --title "Broken"A short title, two thin sections and a TBD each get a finding. Title rules run only when --title is passed.
# .github/workflows/mdv.yml
name: mediva
on:
pull_request:
types: [opened, edited, synchronize, reopened]
issues:
types: [opened, edited, reopened]
permissions:
contents: read
jobs:
mediva:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: jamespacileo/mediva@v0.2.0
with:
issue-contract: .github/ISSUE_TEMPLATE/bug_report.mdFindings become annotations; to also comment, render one yourself (needs issues: write).
Variations
| Want | Do |
|---|---|
| exactly one impact level | a ## Severity section with list checked. |
| different sections per kind | one contract per issue template |