0082. Named checks live in a checks section; reusable blocks are mixin files; step files are dropped
0082. Named checks live in a checks section; reusable blocks are mixin files; step files are dropped
Status
Accepted. Amends ADR-0053 (step files and reusable steps), ADR-0050 and ADR-0051. The line “a project’s own mixin wins over Mesh’s of the same name” in DOM-33 is the lead’s reading, for operator review.
Rows: DOM-04, DOM-28, DOM-33. None is open.
Date
2026-10-11
Deciders
operator (Saulo Vallory), 2026-10-11 (DOM-04 at 07:07; DOM-33 at 07:57).
Context
ADR-0053 planned reusable steps (step :slugify) in their own files. The study (D18) found that what teams repeat is a check, or a block of attributes and actions (timestamps, a version column), and that a step file is a second kind of reuse.
Decision
- Named checks are an entity-level
checkssection, referenced by a barecheck :nameinvalidate(DOM-28). - Importable fragments are
mixinfiles: the root ismixin :name, and an entity includes one withuse :name(DOM-04, DOM-28).useis the include word for all reusable blocks. - Mesh ships
:timestampsand:versionedmixins, and a project may define its own, including ones named like Mesh’s (DOM-33). Lead’s reading, for operator review: the project’s own mixin wins over Mesh’s of the same name. - Step files and reusable steps are dropped (ADR-0053); no DOM row states this. Reuse is a TypeScript helper, or a mixin.
entity :Invoice
use :timestamps
checks
check :dueAfterIssue [
that=({ input }) => input.dueOn >= input.issuedOn
code="invalid_dates"
message="the due date cannot be before the issue date"
]
actions
create :issue
validate
check :dueAfterIssue
Options considered
The study’s D18: (a) named checks as an extension-host run-time point written in TypeScript, after the host exists (the documented form); (b) the ADR-0053 step model, with MX check definition files that extensions can also contribute (recommended). The ruling took neither: named checks are an entity-level checks section (DOM-28), and step files were dropped, with reuse by a TypeScript helper or a mixin. That drop was ruled on 2026-10-11 with the study’s answers; no DOM row states it, so this record is its source.
Trade-off analysis
A checks section keeps a named rule next to the entity that owns it and needs no new file kind. Mixins cover what a helper cannot, since a helper cannot add attributes or actions. The tie-break (project wins) lets a project replace :timestamps with its own, at the cost that a typo in a mixin name shadows Mesh’s silently; a diagnostic noting the shadowing would help.
Consequences
- ADR-0053 and ADR-0050: their lists of “planned” reusable steps are replaced. ADR-0051: there are no step files.
- Named, reusable checks are core, not a run-time extension point; the extension-host page and the overview say so.
- User docs: Entities needs the
checkssection and a page for mixins when built.
Action items
- Build
checks,mixinanduse, with:timestampsand:versioned. - Operator: confirm the project-wins tie-break.