Rules
contextlint ships 21 rules organized into 7 categories. Each rule is registered by ID in the rules array of contextlint.config.json.
Categories
Section titled “Categories”| Prefix | Category | What it validates |
|---|---|---|
| TBL | Table | Table content: required columns, empty cells, allowed values, patterns, cross-column constraints, cross-file ID uniqueness |
| SEC | Section | Existence and order of section headings |
| STR | Structure | Project-level file existence |
| REF | Reference | Links, anchors, cross-file ID references, stability consistency, zone dependencies, image references |
| CHK | Checklist | Checklist completion status |
| CTX | Context | Placeholder detection, term consistency |
| GRP | Graph | Document dependency graph: traceability chains, circular references, orphan documents |
All 21 rules
Section titled “All 21 rules”TBL — Table (6)
Section titled “TBL — Table (6)”- TBL-001 Required columns
- TBL-002 Empty cells
- TBL-003 Allowed values
- TBL-004 Cell pattern
- TBL-005 Cross-column constraints
- TBL-006 Cross-file ID uniqueness
SEC — Section (2)
Section titled “SEC — Section (2)”STR — Structure (1)
Section titled “STR — Structure (1)”REF — Reference (6)
Section titled “REF — Reference (6)”- REF-001 Broken links
- REF-002 ID definitions and references
- REF-003 Stability consistency
- REF-004 Zone dependencies
- REF-005 Anchors
- REF-006 Image references
CHK — Checklist (1)
Section titled “CHK — Checklist (1)”CTX — Context quality (2)
Section titled “CTX — Context quality (2)”GRP — Graph (3)
Section titled “GRP — Graph (3)”Structure of each rule page
Section titled “Structure of each rule page”- Overview — what it detects
- Why it matters — what problem it prevents
- Options — configurable fields
- Bad example and fix — Bad → Good
- Related rules
How to configure
Section titled “How to configure”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.