ccf_core/lib.rs
1//! # ccf-core
2//!
3//! Contextual Coherence Fields — earned relational trust for autonomous systems.
4//!
5//! Patent pending: US Provisional Application 63/988,438 (priority date 23 Feb 2026).
6//!
7//! ## What This Is
8//!
9//! CCF is a computational architecture for emergent social behaviour in autonomous systems.
10//! Instead of a single emotional state, an agent maintains a *field* of trust states —
11//! one per sensory context — learned continuously from experience.
12//!
13//! Trust earned in a bright quiet room does not transfer to a dark noisy room unless the
14//! field explicitly learns they are similar. The agent remembers the shape of its own
15//! comfort zone.
16//!
17//! ## Patent Claim Map
18//!
19//! | Type | Patent Claims | Description |
20//! |------|--------------|-------------|
21//! | [`SensorVocabulary`] | 1, 8 | Composite sensor context key trait |
22//! | [`ContextKey`] | 1, 8 | Discrete context identifier from quantised sensor signals |
23//! | [`CoherenceAccumulator`] | 2–5 | Per-context trust state with earned floor and asymmetric decay |
24//! | [`CoherenceField`] | 6–7, 13 | Trust field: context-keyed accumulator map with min-gate |
25//! | [`SocialPhase`] | 14–18 | Four-quadrant phase classifier with Schmitt trigger hysteresis |
26//! | [`SinkhornKnopp`] | 19–23 | Birkhoff polytope projector — doubly stochastic mixing matrix |
27//! | [`MinCutBoundary`] | 9–12 | Stoer-Wagner comfort-zone boundary discovery |
28//! | [`Personality`] | 3 (modulators) | Dynamic modulators: curiosity, startle sensitivity, recovery |
29//!
30//! ## no_std
31//!
32//! This crate is `no_std` by default. Enable the `std` feature for persistence helpers.
33//! Enable the `serde` feature for serialisation support (required for CCF_SEG / RVF).
34//!
35//! ## License
36//!
37//! Business Source License 1.1. Free for evaluation and non-production use.
38//! Change date: 23 February 2032 — Apache License 2.0.
39//! Commercial production use requires a license from Flout Labs (cbyrne@floutlabs.com).
40
41#![no_std]
42#![deny(unsafe_code)]
43#![deny(missing_docs)]
44#![cfg_attr(docsrs, feature(doc_cfg))]
45
46// Pull in std when the feature is enabled (for persistence helpers, etc.)
47#[cfg(feature = "std")]
48extern crate std;
49
50// Placeholder modules — populated by Phase 9 stories #48–#52
51pub mod vocabulary; // #48: SensorVocabulary trait + ContextKey
52pub mod accumulator; // #49: CoherenceAccumulator + CoherenceField
53pub mod phase; // #49: SocialPhase + Personality
54pub mod sinkhorn; // #50: SinkhornKnopp projector
55pub mod boundary; // #51: MinCutBoundary / Stoer-Wagner
56pub mod mbot; // mBot2 reference vocabulary (MbotSensors, 6-dim)