Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

vadocs - Documentation Validation Engine

Motivation

Documentation-as-Code treats documentation with the same rigor as software: version control, automated testing, CI/CD pipelines, and structured metadata. This approach enables:

However, implementing Documentation-as-Code requires validation tooling:

vadocs provides this validation infrastructure as a reusable package, eliminating the need to copy scripts between documentation repositories.

Purpose

A reusable Python package for validating structured documentation with YAML frontmatter. Extracted from tools/scripts/ per ADR-26012.

Target Users

Scope

In Scope

Out of Scope

Required Capabilities

Core Models

Validators

ValidatorPurpose
FrontmatterValidatorGeneric YAML frontmatter validation
AdrValidatorADR-specific validation (extends frontmatter)
AdrTermValidatorMyST {term} reference validation

Fixers

FixerPurpose
AdrFixerAuto-fix ADR frontmatter issues
SyncFixerBi-directional YAML ↔ markdown sync

Configuration

Interface Contracts

Validator Protocol

class Validator(ABC):
    name: str

    def validate(self, document: Document, config: dict) -> list[ValidationError]: ...
    def supports(self, document: Document) -> bool: ...

Fixer Protocol

class Fixer(ABC):
    name: str

    def fix(self, document: Document, errors: list[ValidationError], config: dict) -> FixResult: ...
    def supports(self, document: Document) -> bool: ...

Governing ADRs

Version Roadmap

VersionMilestone
v0.1.0Library-only PoC with core validators (current)
v0.2.0CLI + pyproject.toml config loading
v0.3.0Index sync validation
v0.4.0Additional validators (broken links, jupytext)
v1.0.0PyPI release, stable API

Implementation

Repository: packages/vadocs/ (PoC, will move to standalone repo)

Tests: 79 passing

Installation (after move to standalone repo):

uv add "vadocs @ git+https://github.com/<org>/vadocs.git"