Skip to content

Rules

contextlint ships 21 rules organized into 7 categories. Each rule is registered by ID in the rules array of contextlint.config.json.

PrefixCategoryWhat it validates
TBLTableTable content: required columns, empty cells, allowed values, patterns, cross-column constraints, cross-file ID uniqueness
SECSectionExistence and order of section headings
STRStructureProject-level file existence
REFReferenceLinks, anchors, cross-file ID references, stability consistency, zone dependencies, image references
CHKChecklistChecklist completion status
CTXContextPlaceholder detection, term consistency
GRPGraphDocument dependency graph: traceability chains, circular references, orphan documents
  1. Overview — what it detects
  2. Why it matters — what problem it prevents
  3. Options — configurable fields
  4. Bad example and fix — Bad → Good
  5. Related rules

Each rule is registered in the rules array of contextlint.config.json.

{
"rules": [
{ "rule": "tbl001", "options": { "requiredColumns": ["ID", "Status"] } },
{ "rule": "ref001" }
]
}

Rule IDs use the form <prefix><number> (3-digit zero-padded). See Configuration for details.