SemText

Reference · NPL

<npl-rubric>

NPL element

PromptLingo reference ↗

You write the criteria, their weights, and their scores. The total is shown as given, or worked out from the weights. Wrong or missing numbers are flagged, not hidden.

A scoring table: each row is a criterion with a weight and a score, plus a total. You write the criteria, their weights, and their scores. The total is shown as given, or worked out from the weights. Wrong or missing numbers are flagged, not hidden. (empty). Rendered as the table caption and mirrored to `data-title` (dual-form contract; the mirror is deferred past parse via afterParse so a sem-source snapshot never sees runtime writes). (optional, one) — `value`: number — default: the element's trimmed text (`value` wins when both are present). States the overall score; when absent or non-numeric the component computes the weighted average — sum(weight · score) ÷ sum(weight) over the criteria with a numeric weight AND score (all-zero weights ⇒ no figure). per the global attribute catalog (conventions.md §2) per the global attribute catalog (conventions.md §2) per the global attribute catalog (conventions.md §2)

Example

npl-rubric.html
source
1 <npl-rubric title="Code review">
2 <npl-criterion name="Correctness" weight="3" score="4"></npl-criterion>
3 <npl-criterion name="Style" weight="1" score="5"></npl-criterion>
4 <npl-overall-score value="4.2"></npl-overall-score>
5 </npl-rubric>
render

Live render boots with JavaScript — the authored source is alongside.

variant: computed overall

With no overall-score child the component computes the weighted average — sum(weight · score) ÷ sum(weight) — and marks the figure (computed).

variant: computed overall
npl-rubric-computed.html
source
1 <npl-rubric title="Deployment readiness">
2 <npl-criterion name="Rollback plan" weight="2" score="5"></npl-criterion>
3 <npl-criterion name="Alerting" weight="1" score="4"></npl-criterion>
4 <npl-criterion name="Runbook" weight="1" score="5"></npl-criterion>
5 </npl-rubric>
render

Live render boots with JavaScript — the authored source is alongside.

variant: excluded criteria

A criterion whose weight or score is missing or non-numeric is marked, kept visible, and left out of the average — its empty cell reads as an em dash and a flag sits beside its name.

variant: excluded criteria
npl-rubric-excluded.html
source
1 <npl-rubric title="Triage">
2 <npl-criterion name="Impact" weight="2" score="4"></npl-criterion>
3 <npl-criterion name="Confidence" score="5"></npl-criterion>
4 <npl-criterion name="Urgency" weight="high" score="3"></npl-criterion>
5 <npl-criterion name="Cost" weight="1"></npl-criterion>
6 </npl-rubric>
render

Live render boots with JavaScript — the authored source is alongside.

variant: overall without criteria

A rubric with no criteria still renders — the caption and the stated overall figure stand on their own.

variant: overall without criteria
npl-rubric-overall-only.html
source
1 <npl-rubric title="Sign-off">
2 <npl-overall-score value="4.6"></npl-overall-score>
3 </npl-rubric>
render

Live render boots with JavaScript — the authored source is alongside.

Source: spec/schema/npl/npl-rubric.md