MeDiVa
DocsReference

choice

A single- or multi-select choice expressed as checkboxes. `oneChecked` makes it single-select; `maxChecked` bounds a multi-select. Close with `endchoice`.

Leaf tag · open <!-- mdv: choice … --> · close <!-- mdv: endchoice -->

<!-- mdv: choice oneChecked -->
- [ ] recon
- [x] rescue
- [ ] combat
<!-- mdv: endchoice -->

Props

PropSyntaxCategoryDescription
maxCheckedmaxChecked=<option>listChecks that no more than the allowed number of boxes are selected; targets a choice or taskList.
minCheckedminChecked=<option>listChecks that at least the required number of boxes are selected; mirrors maxChecked. Targets a choice or taskList.
oneCheckedoneCheckedlistChecks that exactly one checkbox is selected; targets a choice leaf construct.
exactLabelsexactLabelsstrictnessChecks that the document's checklist contains exactly the items the template lists — every declared item present, and nothing extra. The expected labels are the - [ ] … lines written inside the block in the contract; matching is case-insensitive on trimmed, space-collapsed text. This is the checklist strictness gate (it replaces the former requires/only pair). Without it the checklist is lax (any items). Compose with allChecked to also require the boxes ticked. Targets a taskList/choice leaf.

Prop details

maxChecked

Checks that no more than the allowed number of boxes are selected; targets a choice or taskList.

maxChecked=<option> · category: list · status: stable · also on: taskList · src/rules/list/checked/max-checked.ts

<!-- mdv: choice maxChecked=2 -->
- [x] Repair nav beacon
- [x] Calibrate rover arm
- [ ] Polish droid casing
<!-- mdv: endchoice -->

minChecked

Checks that at least the required number of boxes are selected; mirrors maxChecked. Targets a choice or taskList.

minChecked=<option> · category: list · status: stable · also on: taskList · src/rules/list/checked/min-checked.ts

<!-- mdv: choice minChecked=1 -->
- [x] Launch weather clear
- [ ] Spare antenna packed
- [ ] Droid tools labeled
<!-- mdv: endchoice -->

oneChecked

Checks that exactly one checkbox is selected; targets a choice leaf construct.

oneChecked · category: list · status: stable · src/rules/list/checked/one-checked.ts

<!-- mdv: choice oneChecked -->
- [x] Autopilot approach
- [ ] Manual approach
<!-- mdv: endchoice -->

exactLabels

Checks that the document's checklist contains exactly the items the template lists — every declared item present, and nothing extra. The expected labels are the - [ ] … lines written inside the block in the contract; matching is case-insensitive on trimmed, space-collapsed text. This is the checklist strictness gate (it replaces the former requires/only pair). Without it the checklist is lax (any items). Compose with allChecked to also require the boxes ticked. Targets a taskList/choice leaf.

exactLabels · category: strictness · status: stable · also on: taskList · src/rules/list/labels/exact-labels.ts

<!-- mdv: taskList exactLabels -->
- [ ] Airlock checks added or updated
- [ ] Orbital CI is green
<!-- mdv: endtaskList -->

On this page