catopt-graph-graph-calculus.../README.md

49 lines
3.3 KiB
Markdown

# CatOpt-Graph MVP
A minimal, Graph-Calculus-inspired orchestration studio for compositional optimization across edge meshes.
- Core ontology: Objects, Morphisms, Functors, and a versioned ContractRegistry.
- Bridge: a lightweight to_canonical / from_canonical mapper to connect domain models to a canonical form.
- ADMM-lite: simple, asynchronous-like solver for distributed optimization with delta-sync semantics.
- Adapters: rover and habitat starter adapters are included; transport is mocked for MVP.
- Governance: lightweight audit trail scaffolding.
How to run tests
- Ensure Python 3.10+ is installed
- Run: bash test.sh
Notes
- This MVP focuses on minimal, well-scoped components to enable end-to-end interoperability with adapters and the ADMM-lite solver.
- See core/bridge.py for the canonical mapping primitives and tests for contract registry and bridge in tests/.
## MVP Enhancements
- Added EnergiBridge: a minimal bridge to map domain LocalProblem representations to a canonical IR and back, enabling adapters to plug into the CatOpt-Graph core with a consistent interface.
- Exposed EnergiBridge in core as a convenient import (EnergiBridge).
- Added a minimal DSL sketch (docs/dsl_sketch.md) to seed adapters with canonical primitives.
- Introduced a lightweight Graph-of-Contracts scaffold and thread-safe contract registry improvements in core/core modules (see core/graph_of_contracts.py and core/contract_registry.py).
- Created READY_TO_PUBLISH baton for publishing readiness.
- Added a lightweight Graph-of-Contracts in core/graph_of_contracts.py to map adapters to versioned contracts.
- Added a minimal thread-safe enhancement to ContractRegistry (core/contracts.py) for concurrency safety.
- Added a minimal DSL sketch documenting the LocalProblem/SharedVariables/PlanDelta data contracts (docs/dsl_sketch.md).
- Added a minimal in-repo DSL documentation and a sample Graph-of-Contracts scaffold to accelerate adapter onboarding.
- Documentation and a ready-to-publish readiness baton in READY_TO_PUBLISH (to signal MVP stability when publishing).
CatOpt-Graph MVP
=================
Overview
- CatOpt-Graph is a graph-calculus-inspired orchestration studio for compositional optimization across edge meshes. The MVP demonstrates core primitives (Objects, Morphisms, Functors), a versioned contract registry, a bridge layer for canonical data exchange, integral ADMM-lite solver, and plug-in adapters (rover and habitat).
How to run tests
- Install Python 3.10+. Then run:
- bash test.sh
- The test suite includes contract registry conformance, bridge round-trips, and ADMM-lite solver tests.
How to contribute
- Use the provided DAG of modules to extend adapters and add new ones.
- All changes should be backed by tests.
This repo ships a production-like MVP rather than a toy example. Expect incremental exposure of domain adapters and more rigorous conformance tests in future milestones.
## Migration and Evolution
- Contract migration: The contract registry now supports migrating a contract from an older version to a newer version. This enables adapters to evolve data schemas over time while marking the legacy version as migrated. The old version will have a migrated_to field pointing to the new version, and the new version will register its updated schema. This helps maintain backward-compatibility during MVP-driven evolution of the canonical IR.