#!/bin/sh
# Keeps docs/index.md and docs/collectors/*.md in sync with catalog() on
# every commit, per docs/CLAUDE.md's "Regenerate collector docs" rule —
# these files are generated by scripts/build_schema.py and must never be
# hand-edited or left to drift.

set -e

python scripts/build_schema.py

# Re-stage the generated docs so any change build_schema.py made is
# included in this commit rather than left as an uncommitted diff.
git add docs/index.md docs/collectors/ docs/storage/
