Contract Integrity
Contract integrity means every public or release-relevant use of the word
contract is a checked guarantee, not a promise about future work.
For beginners, read a contract as a guarantee with proof. A checked boundary is
the line where 0x0 proves that guarantee through source, tests, diagnostics,
documentation, release evidence, and an owner. If a page does not need that
formal meaning, it should use a simpler word such as guarantee, schema,
policy, profile, or boundary.
Formal Meaning
The formal taxonomy is docs/contract-taxonomy.tsv. A production contract must
be one of these kinds:
abi-contract;api-contract;package-contract;runtime-contract;source-contract;tooling-contract;test-fixture-contract, for test-only fixtures.
Every non-test contract must point to:
- implementation;
- valid examples;
- invalid examples or negative tests;
- stable diagnostics or failure behavior;
- documentation;
- release evidence;
- compatibility or versioning policy;
- maintenance owner.
Test fixture contracts are allowed only under test-scoped paths and cannot be
used as production evidence.
Evidence Files
The repository-wide evidence is:
docs/contract-taxonomy.tsv;release/contract-inventory.tsv;release/contract-rename-ledger.tsv;release/contract-integrity-artifacts.tsv;release/contract-integrity-closure.tsv;release/contract-compatibility.tsv;tools/contract-inventory-generate.py;tools/contract-integrity-check.py;tests/contract-integrity.sh.
Specialized evidence is owned by the surface being proved:
- ABI:
abi/contract-inventory.tsvand
release/abi-contract-evidence.tsv;
- API:
api/contract-inventory.tsvand
release/api-contract-evidence.tsv;
- package:
package/contract-inventory.tsvand
release/package-contract-evidence.tsv;
- runtime:
runtime/contract-inventory.tsvand
release/runtime-contract-evidence.tsv;
- source and tooling:
source/contract-inventory.tsv,
tooling/contract-inventory.tsv, and
release/source-tooling-contract-evidence.tsv;
- library naming:
release/library-contract-name-inventory.tsv,
release/library-contract-rename-ledger.tsv,
libs/symbol-aliases.tsv, and libs/symbol-deprecations.tsv.
Gate
Run the bounded gate:
make contract-integrity-check
The gate validates taxonomy kinds, inventory rows, ownership, fixture scope,
generated inventory drift, rename ledger coverage, release artifact reports,
compatibility notes, and staged ADR/RFC plus documentation-impact requirements
for new contract terminology.
It does not run heavy compiler builds, self-hosting, release packaging, remote
deployment, external services, or hardware probes.
Writing Rule
Use contract in reference documentation only when the page links to
docs/contract-taxonomy.tsv or to this page. In beginner documentation, explain
the guarantee first, then introduce contract only when the formal term helps.
Do not use contract for:
- a roadmap item;
- an idea without implementation;
- an interface-only library;
- a pure constructor that implies runtime behavior;
- a test fixture presented as production behavior;
- a domain value that should be named
schema,policy,profile,
descriptor, layout, or boundary.
Related References
docs/documentation.html: documentation terminology rules.docs/governance-review.html: reviewer rules for contract terminology.docs/library-contract-naming.html: library source naming cleanup.docs/contract-production-roadmap.html: production closure plan.docs/release-compat.html: upgrade, downgrade, and compatibility policy.docs/final-release-discipline.html: final release decision input.