Start with the contracts
The public release centers on five YAML contract families:
- Page type contracts
- Enrichment stage contracts
- Link graph rules
- Snapshot boundary rules
- Sprint contracts
These files are written before the implementation they govern. The contract describes the conditions for publication and the boundaries each agent must respect.
The quickest adoption path
git clone https://github.com/jamesfgibbons/constitutional-cms.git
cd constitutional-cms
python3 scripts/validate_contracts.py --contracts-dir ./contracts
After that:
- Copy the
contracts/directory into your project. - Rename the sample entities and thresholds to match your domain.
- Make every agent read the relevant contract before generating code.
- Validate both the contract structure and the live output.
What the validator does
The included validator checks that the contract files are internally coherent:
- required files exist
- tier assumptions do not contradict each other
- required link rules are present
- write and read boundaries stay separate
It does not replace your live evaluation harness. The validator catches structural mistakes in the rules. Your own checks still need to confirm that the deployed site is behaving the way the contracts say it should.
What stays out of the public repo
The public repository is not meant to be a dump of the underlying operating model. It leaves out:
- private registries and route maps
- ranking and compression heuristics
- enrichment prompt packs
- internal eval baselines
- source coverage and anomaly-response runbooks
That boundary is part of the product.