The changelog engine: turn git diffs into a civic changelog
The diff is the product — now literally. generate_changelog.py reads a
git diff of the entity tree between any two refs and says, in plain
language, what changed in the government: entities added / modified /
removed, grouped by type and by jurisdiction, dated from the commit.
CHANGELOG.md is seeded from the real history so far:
- initial load: +11,285 people across 51 states
- institutional gap: +233 bodies, ~532 people enriched
- elections + demographics: +2,494 candidates, +3,494 jurisdictions
(TX +541, FL +396, CA +341 ...)
On an initial load every entity is an addition; on a re-sync of the same
source, only real government changes will surface — which is the whole
point. When nothing changed, it says so.
make changelog [BASE=.. HEAD=..]. No third-party deps.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -9,4 +9,7 @@ build: ## Regenerate the entity tree from raw exports in data/
|
||||
validate: ## Check every entity file: OKF, schema, and link integrity
|
||||
python3 scripts/validate.py
|
||||
|
||||
changelog: ## What changed in the government since the last commit (BASE/HEAD overridable)
|
||||
python3 scripts/generate_changelog.py $(BASE) $(HEAD)
|
||||
|
||||
check: build validate ## Build, then validate — the full gate
|
||||
|
||||
Reference in New Issue
Block a user