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.

ADR-26054: JSON as Governance Config Format


title: JSON as Governance Config Format date: 2026-03-23 tags:


ADR-26054: JSON as Governance Config Format

Date

2026-03-23

Status

proposed

Context

Governance configs in .vadocs/ define validation rules, field registries, and tag vocabularies consumed by validation scripts. These configs are machine-consumed artifacts — read by scripts and agents, edited by humans only when governance rules change.

The initial implementation used YAML (conf.yaml, spoke configs). As configs grew beyond simple key-value pairs toward structured validation rules (field formats, block composition, type registries), three friction points emerged:

  1. No native schema language. Adding format constraints for complex fields (e.g., authors as a list of {name, email} objects per the MyST spec) required inventing custom value_format structures — effectively building a bespoke schema language inside YAML. Each new constrained field would repeat this invention.

  2. Parsing ambiguities. YAML’s implicit typing (NO → false), colon-space sensitivity, and multiple syntax forms for the same data create failure modes that don’t exist in stricter formats. The pre-commit config’s : gotcha was already documented in CLAUDE.md as a recurring pitfall.

  3. External dependency. PyYAML is required for YAML parsing. The vadocs package (ADR-26043) would carry this dependency solely for config parsing, while json is Python stdlib. Document frontmatter parsing still requires PyYAML, but config parsing does not need to.

See A-26013: JSON as Governance Config Format for the full format comparison and rejected ideas.

Decision

Adopt JSON with JSON Schema as the serialization format for all governance configs in .vadocs/.

  1. Config files use JSON. Hub config (conf.json) and doc-type spoke configs (types/<doc_type>.conf.json) are JSON. Naming convention: <name>.conf.json.

  2. JSON Schema validates config structure. Each config file may reference a companion .schema.json file via the $schema key. Schema definitions use the JSON Schema standard — no custom schema invention required. Field format constraints (type, required properties, allowed values) are expressed as standard JSON Schema, not bespoke validation structures.

  3. Document frontmatter remains YAML. Frontmatter is embedded in markdown and parsed by MyST. Only .vadocs/ config files migrate to JSON. Validation scripts continue to parse YAML frontmatter from documents.

  4. Convention-based discovery. Scripts discover configs via pyproject.toml [tool.vadocs].config_dir → directory → conf.json (hub) or types/<doc_type>.conf.json (spoke). The paths.get_config_path() utility encodes this convention.

Consequences

Positive

Negative / Risks

Alternatives

References

Participants

  1. Vadim Rudakov

  2. Claude Opus 4.6 (AI Engineering Advisor)