Universal Measurement Contract Protocol (UMCP): Interconnected contract-first validation framework with GCD and RCFT. Core Axiom: What Returns Through Collapse Is Real. Features bidirectional cross-references, closure registries, and full reproducibility.
Project description
UMCP: Universal Measurement Contract Protocol
UMCP transforms computational experiments into auditable artifacts based on a foundational principle:
Core Axiom: "What Returns Through Collapse Is Real"
Reality is defined by what persists through collapse-reconstruction cycles. Only measurements that returnโthat survive transformation and can be reproducedโreceive credit as real, valid observations.
# Encoded in every UMCP contract
typed_censoring:
no_return_no_credit: true
UMCP is a production-grade system for creating, validating, and sharing reproducible computational workflows. It enforces mathematical contracts, tracks provenance, generates cryptographic receipts, and validates results against frozen specifications.
๐ Quick Start (5 Minutes)
Prerequisites
- Python 3.11+ (3.12+ recommended)
- pip (Python package installer)
- git (version control)
Installation
# 1. Clone the repository
git clone https://github.com/calebpruett927/UMCP-Metadata-Runnable-Code.git
cd UMCP-Metadata-Runnable-Code
# 2. Create and activate virtual environment
python3 -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# 3. Install production dependencies (includes numpy, scipy, pyyaml, jsonschema)
pip install -e ".[production]"
Optional installations:
# Install test dependencies (adds pytest, coverage tools)
pip install -e ".[test]"
# Install extension dependencies (adds streamlit, fastapi, uvicorn)
pip install -e ".[extensions]"
# Install everything (production + test + extensions)
pip install -e ".[test,extensions]"
Verify Installation
# System health check (should show HEALTHY status)
umcp health
# Run test suite (should show 344 tests passing)
pytest
# Quick validation test
umcp validate casepacks/hello_world
# Check installed version
python -c "import umcp; print(f'UMCP v{umcp.__version__}')"
Expected output:
Status: HEALTHY
Schemas: 11
344 passed in ~13s
Launch Interactive Tools
# Visualization dashboard (port 8501)
umcp-visualize
# REST API server (port 8000)
umcp-api
# List extensions
umcp-ext list
๐ฏ What is UMCP?
UMCP is a measurement discipline for computational claims. It requires that every serious claim be published as a reproducible record (a row) with:
- โ Declared inputs (raw measurements)
- โ Frozen rules (mathematical contracts)
- โ Computed outputs (invariants, closures)
- โ Cryptographic receipts (SHA256 verification)
Operational Terms
Core Invariants (Tier-1: GCD Framework):
| Symbol | Name | Definition | Range | Purpose |
|---|---|---|---|---|
| ฯ | Drift | ฯ = 1 - F | [0,1] | Collapse proximity |
| F | Fidelity | F = ฮฃ wแตขยทcแตข | [0,1] | Weighted coherence |
| S | Entropy | S = -ฮฃ wแตข[cแตข ln(cแตข) + (1-cแตข)ln(1-cแตข)] | โฅ0 | Disorder measure |
| C | Curvature | C = stddev(cแตข)/0.5 | [0,1] | Instability proxy |
| ฮบ | Log-integrity | ฮบ = ฮฃ wแตข ln(cแตข,ฮต) | โค0 | Composite stability |
| IC | Integrity | IC = exp(ฮบ) | (0,1] | System stability |
| ฯ_R | Return time | Re-entry delay to domain Dฮธ | โโช{โ} | Recovery measure |
Extended Metrics (Tier-2: RCFT Framework):
| Symbol | Name | Range | Purpose |
|---|---|---|---|
| D๊ฐ | Fractal dimension | [1,3] | Trajectory complexity |
| ฮจแตฃ | Recursive field | โฅ0 | Self-referential strength |
| B | Basin strength | [0,1] | Attractor robustness |
๐๏ธ System Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ UMCP WORKFLOW โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ 1. INPUT โ
โ โโ raw_measurements.csv (experimental data) โ
โ โ
โ 2. INVARIANTS COMPUTATION โ
โ โโ ฯ (drift) โโ F (fidelity) โ
โ โโ S (entropy) โโ C (curvature) โ
โ โ
โ 3. FRAMEWORK SELECTION โ
โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โ
โ โ GCD (Tier-1) โ OR โ RCFT (Tier-2) โ โ
โ โโโโโโโโโโโโโโโโโโโค โโโโโโโโโโโโโโโโโโโโค โ
โ โ โข Energy (E) โ โ โข Fractal (D๊ฐ) โ โ
โ โ โข Collapse (ฮฆ) โ โ โข Recursive (ฮจแตฃ) โ โ
โ โ โข Flux (ฮฆ_gen) โ โ โข Pattern (ฮป, ฮ) โ โ
โ โ โข Resonance (R) โ โ + all GCD โ โ
โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ 4. VALIDATION โ
โ โโ Contract conformance (schema validation) โ
โ โโ Regime classification (Stable/Collapse/Watch) โ
โ โโ Mathematical identities (F = 1-ฯ, IC โ exp(ฮบ)) โ
โ โโ Tolerance checks (within tol_seam, tol_id) โ
โ โ
โ 5. OUTPUT โ
โ โโ invariants.json (computed metrics) โ
โ โโ closure_results.json (GCD/RCFT outputs) โ
โ โโ seam_receipt.json (validation status + SHA256) โ
โ โโ CONFORMANT or NONCONFORMANT status โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ฆ Framework Selection Guide
GCD (Generative Collapse Dynamics) - Tier-1
Best for: Energy/collapse analysis, phase transitions, basic regime classification
Closures (4):
energy_potential: Total system energyentropic_collapse: Collapse potentialgenerative_flux: Generative fluxfield_resonance: Boundary-interior resonance
Example:
umcp validate casepacks/gcd_complete
RCFT (Recursive Collapse Field Theory) - Tier-2
Best for: Trajectory complexity, memory effects, oscillatory patterns, multi-scale analysis
Closures (7 = 4 GCD + 3 RCFT):
- All GCD closures +
fractal_dimension: Trajectory complexity (D๊ฐ โ [1,3])recursive_field: Collapse memory (ฮจแตฃ โฅ 0)resonance_pattern: Oscillation detection (ฮป, ฮ)
Example:
umcp validate casepacks/rcft_complete
Decision Matrix
| Need | Framework | Why |
|---|---|---|
| Basic energy/collapse | GCD | Simpler, faster, foundational |
| Trajectory complexity | RCFT | Box-counting fractal dimension |
| History/memory | RCFT | Exponential decay field |
| Oscillation detection | RCFT | FFT-based pattern analysis |
| Maximum insight | RCFT | All GCD metrics + 3 new |
๐ Extension System
UMCP features auto-discovery extensions with 4 built-in plugins:
1. Visualization Dashboard
umcp-visualize
# Opens http://localhost:8501
# Features: Phase space plots, time series, regime tracking
2. REST API
umcp-api
# Opens http://localhost:8000
# Endpoints: /health, /latest-receipt, /ledger, /stats, /regime
3. Continuous Ledger
# Auto-logs every validation run
cat ledger/return_log.csv
4. Contract Auto-Formatter
umcp-format --all
๐ See: EXTENSION_INTEGRATION.md | QUICKSTART_EXTENSIONS.md
๐ Documentation
Core Protocol
- AXIOM.md โ Core axiom: "What returns is real"
- TIER_SYSTEM.md โ Tier-0/1/1.5/2 boundaries, freeze gates
- KERNEL_SPECIFICATION.md โ Formal definitions (19 lemmas)
- PUBLICATION_INFRASTRUCTURE.md โ Publication standards
- CASEPACK_REFERENCE.md โ CasePack structure
Indexing & Reference
- GLOSSARY.md โ Authoritative term definitions
- SYMBOL_INDEX.md โ Symbol table (collision prevention)
- TERM_INDEX.md โ Alphabetical cross-reference
Framework Documentation
- GCD Theory โ Tier-1 specification
- RCFT Theory โ Tier-2 mathematical foundations
- RCFT Usage โ Practical examples
Governance
- UHMP.md โ Universal Hash Manifest Protocol
- FACE_POLICY.md โ Boundary governance
- PROTOCOL_REFERENCE.md โ Master navigation
Developer Guides
- Quickstart โ Get started in 10 minutes
- Python Standards โ Development guidelines
- Production Deployment โ Enterprise setup
- PyPI Publishing โ Release workflow
๐ Repository Structure
UMCP-Metadata-Runnable-Code/
โโโ src/umcp/ # All Python code (API, CLI, extensions)
โโโ tests/ # Test suite (344 tests)
โโโ scripts/ # Utility scripts
โโโ contracts/ # Frozen contracts (GCD, RCFT)
โโโ closures/ # Computational functions (7 closures)
โ โโโ gcd/ # 4 GCD closures
โ โโโ rcft/ # 3 RCFT closures
โโโ casepacks/ # Reproducible examples
โ โโโ hello_world/ # Zero entropy example
โ โโโ gcd_complete/ # GCD validation
โ โโโ rcft_complete/ # RCFT validation
โโโ schemas/ # JSON schemas
โโโ canon/ # Canonical anchors
โโโ ledger/ # Validation log (continuous append)
โโโ integrity/ # Integrity metadata (SHA256)
โโโ docs/ # Documentation
โโโ pyproject.toml # Project configuration (v1.4.0)
๐งช Testing
# All tests (344 total)
pytest
# Verbose output
pytest -v
# Specific framework
pytest -k "gcd" # GCD tests
pytest -k "rcft" # RCFT tests
# Coverage report
pytest --cov
# Fast subset
pytest tests/test_00_schemas_valid.py
Test Structure: 344 tests = 142 original + 56 RCFT + 146 integration/coverage
๐ Production Features
- โ 344 tests passing (100% success rate)
- โ
Health checks:
umcp healthfor system monitoring - โ Structured logging: JSON output for ELK/Splunk/CloudWatch
- โ Performance metrics: Duration, memory, CPU tracking
- โ Container ready: Docker + Kubernetes support
- โ Cryptographic receipts: SHA256 verification
- โ Zero technical debt: No TODO/FIXME/HACK markers
- โ <5s validation: Fast for typical repositories
๐ See: Production Deployment Guide
๐ Integrity & Automation
# Verify file integrity
sha256sum -c integrity/sha256.txt
# Update after changes
python scripts/update_integrity.py
# Check merge status
./scripts/check_merge_status.sh
Automated:
- โ 344 tests on every commit (CI/CD)
- โ Code formatting (ruff, black)
- โ Type checking (mypy)
- โ SHA256 tracking (12 files)
๐ What's New in v1.4.0
Complete Protocol Infrastructure:
- โ 8 major protocol documents (~5,500 lines)
- โ Formal specification (19 lemmas, kernel definitions)
- โ Publication standards (CasePack structure)
- โ 344 tests passing (GCD + RCFT frameworks)
- โ Production ready (manuscript-aligned)
๐ See: CHANGELOG.md | IMMUTABLE_RELEASE.md
๐ค Contributing
- Fork the repository
- Create feature branch (
git checkout -b feature/name) - Add tests for new functionality
- Ensure all tests pass (
pytest) - Validate code quality (
ruff check,mypy) - Commit changes (
git commit -m 'feat: Description') - Push to branch (
git push origin feature/name) - Open Pull Request
๐ See: Python Coding Standards | CONTRIBUTING.md
๐ License
MIT License - see LICENSE for details.
๐ Support & Resources
- Issues: GitHub Issues
- Documentation: docs/
- Examples: casepacks/
- Immutable Release: IMMUTABLE_RELEASE.md
๐ System Status
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ UMCP PRODUCTION SYSTEM STATUS โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ฏ Core Axiom: "What Returns Through Collapse Is Real"
๐ Canon: UMCP.CANON.v1
๐ Contract: UMA.INTSTACK.v1
๐ DOI: 10.5281/zenodo.17756705 (PRE)
10.5281/zenodo.18072852 (POST)
10.5281/zenodo.18226878 (PACK)
โ๏ธ Tier-1: p=3 ฮฑ=1.0 ฮป=0.2 ฮท=0.001
๐ฏ Regimes: Stable: ฯ<0.038 F>0.90
Collapse: ฯโฅ0.30
๐ Status: CONFORMANT โ
๐งช Tests: 344 passing
๐ฆ Casepacks: 3 validated
๐ Integrity: 12 files checksummed
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
"No improvisation. Contract-first. Tier-1 reserved."
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ Citation
Framework: UMCP (Universal Measurement Contract Protocol)
Author: Clement Paulus
Version: 1.4.0
Release: January 23, 2026
Tests: 344 passing
Integrity: SHA256 verified
Frameworks:
- Tier-1: GCD (Generative Collapse Dynamics) - 4 closures
- Tier-2: RCFT (Recursive Collapse Field Theory) - 7 closures
Built with โค๏ธ for reproducible science
"What Returns Through Collapse Is Real"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file umcp-1.4.5.tar.gz.
File metadata
- Download URL: umcp-1.4.5.tar.gz
- Upload date:
- Size: 78.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b28caca6cd0fa4f22ff47e4c914df537c5a6c59d4053ac4a5100f891090f902
|
|
| MD5 |
a3db7b9748b199cf86687ba0e5e55264
|
|
| BLAKE2b-256 |
ebeeb32c1f4862ae12f9320ce2b216e874d09b6fe4280bd21e100b30827b5410
|
File details
Details for the file umcp-1.4.5-py3-none-any.whl.
File metadata
- Download URL: umcp-1.4.5-py3-none-any.whl
- Upload date:
- Size: 37.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc87079694bffadf95e3c6b76161ea3e44907c622dc6d5107c06c9bb73617e82
|
|
| MD5 |
5ca76d14eba144801b7f7cc8402adf10
|
|
| BLAKE2b-256 |
7cf54f1eef78ba20169ca9f73de0f01764a9768b3ccd09bd813fb28d4ca01d82
|