TBL-001 Required columns
Overview
Section titled “Overview”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.
Why it matters
Section titled “Why it matters”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.
Options
Section titled “Options”| Field | Type | Required | Description |
|---|---|---|---|
requiredColumns | string[] | Yes | Array of column names that must exist |
section | string | — | Restrict validation to tables under a specific section (substring match on the heading) |
files | string | — | Glob of files this rule applies to |
Bad example
Section titled “Bad example”## 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-001After fix
Section titled “After fix”## Requirements
| ID | Description | Status || ------ | ----------------- | ------ || REQ-01 | User registration | stable |Configuration example
Section titled “Configuration example”{ "rule": "tbl001", "options": { "requiredColumns": ["ID", "Status"], "section": "Requirements", "files": "specs/*.md" }}Related rules
Section titled “Related rules”- TBL-002 Empty cells — Once required columns exist, validates that their cells are not empty
- TBL-003 Allowed values — Validates that column values fall within an allowed list