Falsification Engine plays two roles with the pre-commit framework: it is both a hook source other repos can consume, and a hook consumer for its own working tree.
Add to your repo's .pre-commit-config.yaml:
repos:
- repo: https://github.com/studio-11-co/falsify
rev: v0.1.0
hooks:
- id: falsify-guard
- id: falsify-doctorThen wire both the pre-commit and commit-msg stages:
pre-commit install
pre-commit install --hook-type commit-msgfalsify-guard— runs on thecommit-msgstage. Blocks commits whose message contradicts any locked verdict. Exit 11 on violation.falsify-doctor— runs onpre-commit. Invokesfalsify doctor --specs-onlyto validate everyspec.yamland check that locks are consistent. Exit 2 on schema or lock problems.falsify-stats— informational. Prints a one-line summary of verdict states on every commit. Never blocks.
This repo also uses pre-commit — see
.pre-commit-config.yaml. It
combines the standard
pre-commit-hooks
hygiene hooks (trailing whitespace, EOF fixer, check-yaml,
check-json, merge-conflict, large-file guard) with three local
hooks pulled straight from the working tree:
falsify-guard-local— same as the consumer hook but usespython3 falsify.pydirectly (no install required).falsify-doctor-local— same fordoctor --specs-only.unittest-fast— runs a subset of the unittest suite (test_lock,test_run,test_verdict) on every commit.
Maintainers should run pre-commit install once after cloning.
.pre-commit-hooks.yamlis the manifest consumed by other repos that point at us as a hook source. It declares the language, entry point, stage, and arguments for each exported hook id..pre-commit-config.yamlis our own repo's pre-commit configuration, including third-party hooks and our local overrides.
Don't confuse them — the manifest is the product we ship; the config is our internal discipline.