SemText

Reference · SemText · Knowledge & documents

<sem-guard-rail>

SemText element

You give it a severity and a scope, and write the rule as the content. It renders as a labelled, warning-level item in the guard-rails list.

Shares its schema with <sem-guard-rails> — the option bullets below belong to that element's contract.

One guard rail: a rule the reader should not cross. You give it a severity and a scope, and write the rule as the content. It renders as a labelled, warning-level item in the guard-rails list.

No options beyond the global attribute catalog are stated for this tag.

Example

sem-guard-rail.html
source
1 <sem-guard-rails id="gr-api" kind="api">
2 <sem-guard-rail severity="block" scope="public endpoints">
3 Never return raw provider errors; wrap them in the error envelope.
4 </sem-guard-rail>
5 <sem-guard-rail severity="warn">
6 Pagination defaults to 50 items — page explicitly in production.
7 </sem-guard-rail>
8 </sem-guard-rails>
render
No shipped runtime for this element — the authored example renders as plain HTML.

Source: spec/schema/sem-guard-rails.md