Tags & rules
Open a tag, attach rules as flags or options, close it. A small, composable grammar — not regex.
On the assembly deck, a droid is built from a small set of standard parts — chassis, sensor, manipulator — and each part gets QA stamps before it leaves the line. mediva works the same way: tags are the parts, rules are the stamps.
Tags are the constructs; rules are the checks you attach.
Tags
| Tag | Kind |
|---|---|
section | owns a heading; the only tag that nests |
list table code line media | leaves: one headingless construct inside a section |
document front | markers, no end tag |
list covers bullets, checklists, choices and evidence lists; its props pick which (items., checked.).
<!-- mdv: section required -->
## Systems
<!-- mdv: table -->
| System | Status |
| --------- | ------ |
| Hyperdrive| ? |Every tag has a page under section; every rule is on All rules.
Rules
A flag (required) or an option (content., columns.). Stack as many as needed:
<!-- mdv: section required content.words.min=20 content.none=@placeholders -->
## SummaryCounts take ranges: content., items.. A rule on the wrong tag is a compile error.
Content rules
content. demands something present, content. demands it absent. Values are a construct name, a /, or a "literal".
<!-- mdv: section required content.blocks.has=[table, /because/] content.none=/tbd|tba/i -->
## Decision
State the call, justify it with the word "because", and back it with a table.## Decision
Ship it. Rollout date TBD.## Decision
Ship it, because the table shows no regressions.
| Option | Cost |
| --- | --- |
| Ship | low |Strictness
Closure rules (strict, labels.) turn "must contain" into "exactly this": Strictness. Retune severity with Overrides.
Plugins add rules and tags
A plugin adds namespaced rules (compliance/) and tags, never a heading owner.
Why not regex?
/## Checklist\s+[-*] \[x\] Tests added or updated\s+[-*] \[x\] Docs updated(?!\s+[-*] \[[ x]\])/m<!-- mdv: section required -->
## Checklist
<!-- mdv: list required items.all=checked labels.eq=@template -->
- [ ] Tests added or updated
- [ ] Docs updated## Checklist
- [x] Tests added or updated
- [ ] Docs updated
- [x] Shipped itRules read structure, so failures point at a line, not a byte offset.
Next: Strictness, Overrides, Frontmatter, Evidence lists, Glossary.