TOOLING-ITD-003: Custom Lint Rules
CONTEXT
Generic markdown linting doesn't understand our document types. An ITD must have specific sections (Context, Problem, Options, Reasoning, Implications). A Data Structure needs an Overview.
PROBLEM
How should we enforce document-type-specific structure?
OPTIONS CONSIDERED
Manual review only - Reviewers check structure
✅ Custom markdownlint rules - Automated validation per doc type
Schema validation - YAML frontmatter with JSON schema
REASONING
Option 1 (Manual): Reviewers forget. Inconsistent enforcement.
Option 2 (Custom rules): Markdownlint supports custom rules in JavaScript. We can validate ITD sections, naming conventions, and required content automatically.
Option 3 (Schema): Adds complexity. Frontmatter is friction. Markdown-native validation is simpler.
IMPLICATIONS
Custom rules implemented:
itd-required-sections- ITDs must have all five sectionsitd-valid-sections- No unexpected sections in ITDsitd-single-selected-option- Exactly one option marked with ✅itd-naming-convention- Title matches folder prefixds-required-sections- Data Structures need Overview
Rules live in tooling/lint-rules/ and run via markdownlint config.
Last updated