Severity Levels

Rulebound uses two dimensions to classify rules: severity (how serious a violation is) and modality (how mandatory the rule is). Together they determine validation outcomes and enforcement behavior.

Severity

LevelUse ForDisplay
errorCritical issues that must be fixedRed badge in reports
warningIssues that should be addressedYellow badge in reports
infoInformational guidelinesBlue badge in reports

Set severity in rule front matter:

severity: error

Modality

Modality follows RFC 2119 language and controls validation status:

LevelKeywordMeaningOn Violation
mustMUSTAbsolute requirementStatus: FAILED
shouldSHOULDRecommended but not absoluteStatus: PASSED_WITH_WARNINGS
mayMAYOptional guidanceReported but never blocks

Set modality in rule front matter:

modality: must

Validation Statuses

Each rule in a validation report gets one of three statuses:

StatusMeaning
PASSRule is satisfied
VIOLATEDRule is not satisfied
NOT_COVEREDRule could not be evaluated (insufficient context)

How They Interact

The overall validation status is determined by combining individual rule results:

ConditionReport Status
Any must rule is VIOLATEDFAILED
Any rule is VIOLATED or NOT_COVERED (but no must violations)PASSED_WITH_WARNINGS
All rules PASSPASSED

Enforcement Modes

Enforcement mode adds another layer on top of validation status:

ModeBlocks On
advisoryNever blocks (reports only)
moderateMUST violations or score below threshold
strictAny MUST or SHOULD violation, or score below threshold

Score Calculation

The validation score is calculated as a weighted average:

StatusWeight
PASS1.0
NOT_COVERED0.5
VIOLATED0.0
Score = (PASS * 1.0 + NOT_COVERED * 0.5 + VIOLATED * 0.0) / total_rules * 100

The score threshold (default: 70) is used in moderate and strict modes to block low-quality changes.

Choosing Severity and Modality

ScenarioSeverityModality
Security vulnerability (SQL injection, XSS)errormust
Missing error handlingwarningshould
Naming conventionwarningshould
Performance optimization tipinfomay
Experimental practiceinfomay