Skip to content

TBL-001 Required columns

Validates that the header row of a table includes every required column. If any of the column names listed in requiredColumns is missing, an error is reported.

Even when teams agree that columns such as ID, Status, or Owner must exist in requirement tables, API specs, or data definitions, mistakes happen: a new table is added without those columns, or an existing table is partially rewritten and one column is dropped. This rule prevents that.

FieldTypeRequiredDescription
requiredColumnsstring[]YesArray of column names that must exist
sectionstringRestrict validation to tables under a specific section (substring match on the heading)
filesstringGlob of files this rule applies to
## Requirements
| ID | Description |
| ------ | ---------------- |
| REQ-01 | User registration |

With requiredColumns: ["ID", "Status"], the missing Status column triggers a violation.

docs/requirements.md
line 3 error Missing required column "Status" in table TBL-001
## Requirements
| ID | Description | Status |
| ------ | ----------------- | ------ |
| REQ-01 | User registration | stable |
{
"rule": "tbl001",
"options": {
"requiredColumns": ["ID", "Status"],
"section": "Requirements",
"files": "specs/*.md"
}
}