Skip to content

Repository Scripts

Python 3.11+ command-line utilities that validate repository structure and create new ventures/products from templates. All scripts use only the Python standard library — no external dependencies are required to run them.

Validation scripts

Run all of them at once with:

python scripts/check.py
Script Purpose
check.py Runs every validator below in a predictable order; nonzero exit on any failure.
validate_repository.py Checks required root files, directories, entry points, templates, ADRs, and scans for filler text or duplicate IDs.
validate_links.py Checks relative Markdown links resolve to real files/directories.
validate_metadata.py Checks YAML front matter on authoritative Markdown documents against the metadata standard.
validate_registries.py Checks JSON syntax and required fields in portfolio/*.json and venture/product/component JSON records.

Creation scripts

Script Purpose
create_venture.py Scaffolds a new venture from ventures/_template/.
create_product.py Scaffolds a new product inside a venture from that venture's product template.

Both refuse to overwrite existing paths, reject unsafe slugs, and only update a registry file when explicitly asked with a flag. Run either with --help for full usage.

Conventions

  • Exit code 0 means success; any nonzero exit code means at least one check failed. check.py prints a summary of which validator failed.
  • Scripts avoid network access and avoid mutating files outside the paths the user explicitly requested.
  • See ../tests/README.md for how these scripts are tested.

Report an issue about this page