Skip to content

Commit 60eca42

Browse files
committed
feat: Phase 0 — promote SPO from extensions/ to top-level src/spo/
SPO, BNN, and CLAM are no longer experimental. They are the core cognitive substrate, always-on with no feature gates. Moves: - src/extensions/spo/*.rs → src/spo/ (6 core files) - src/extensions/{context_crystal,meta_resonance,nsm_substrate, codebook_training,deepnsm_integration,cognitive_codebook, crystal_lm,sentence_crystal}.rs → src/spo/ (8 spo-gated modules) Updates: - lib.rs: add `pub mod spo`, remove "spo" from extensions cfg gate - extensions/mod.rs: strip all #[cfg(feature = "spo")] entries - Cargo.toml: rename "spo" feature to "spo_jina" (only reqwest needs gating) - Fix crate::extensions::spo:: → crate::spo:: in shift_detector + crystal_lm - Fix super::spo::jina_embed_curl → super::jina_embed_curl in sentence_crystal Zero compilation errors. All SPO tests pass (40+ tests green). Note: sentence_crystal.rs and grammar.rs flagged as future promotion candidates to rustynum — their encoding logic overlaps with what the SPO harvest pipeline now provides natively at the BNN level. https://claude.ai/code/session_0152b2NJYnjCJjvMAmgsTx3p
1 parent e5c7f57 commit 60eca42

20 files changed

Lines changed: 56 additions & 61 deletions

Cargo.toml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ crate-type = ["cdylib", "rlib"]
2424
# =============================================================================
2525

2626
[features]
27-
default = ["simd", "parallel", "lancedb", "crewai", "spo"]
27+
default = ["simd", "parallel", "lancedb", "crewai", "spo_jina"]
2828

2929
# Core features
3030
simd = [] # AVX-512 SIMD for Hamming operations
@@ -40,9 +40,8 @@ redis = ["dep:redis"] # Redis caching
4040
python = ["pyo3"] # Python bindings
4141
codebook = [] # Cognitive codebook (NSM, NARS, etc.)
4242
hologram = [] # Holographic reduced representations
43-
# spo and rustynum-bnn are OBLIGATORY — always included after rustynum integration.
44-
# Feature flag kept as no-op for backwards compatibility only.
45-
spo = ["reqwest"]
43+
# SPO is always-on (no feature gate). Only the Jina HTTP client needs reqwest.
44+
spo_jina = ["reqwest"]
4645
compress = ["lz4"] # Compression support
4746
quantum = [] # Quantum-inspired operators
4847
bench = [] # Benchmark suite (comparison vs Qdrant/Milvus)
@@ -60,7 +59,7 @@ vendor-crewai = []
6059
# All features
6160
full = [
6261
"simd", "parallel", "python",
63-
"codebook", "hologram", "spo", "compress", "quantum",
62+
"codebook", "hologram", "spo_jina", "compress", "quantum",
6463
"lancedb", "neo4j", "redis"
6564
]
6665

src/extensions/mod.rs

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,14 @@
11
//! Optional Extensions for LadybugDB
22
//!
3-
//! Enable via Cargo features: `codebook`, `hologram`, `spo`, `compress`
3+
//! Enable via Cargo features: `codebook`, `hologram`, `compress`
4+
//!
5+
//! Note: SPO modules have been promoted to `crate::spo` (top-level, always-on).
46
57
#[cfg(feature = "codebook")]
68
pub mod codebook;
79

810
#[cfg(feature = "hologram")]
911
pub mod hologram;
1012

11-
#[cfg(feature = "spo")]
12-
pub mod spo;
13-
14-
#[cfg(feature = "spo")]
15-
pub mod context_crystal;
16-
17-
#[cfg(feature = "spo")]
18-
pub mod meta_resonance;
19-
20-
#[cfg(feature = "spo")]
21-
pub mod nsm_substrate;
22-
23-
#[cfg(feature = "spo")]
24-
pub mod codebook_training;
25-
26-
#[cfg(feature = "spo")]
27-
pub mod deepnsm_integration;
28-
29-
#[cfg(feature = "spo")]
30-
pub mod cognitive_codebook;
31-
32-
#[cfg(feature = "spo")]
33-
pub mod crystal_lm;
34-
35-
#[cfg(feature = "spo")]
36-
pub mod sentence_crystal;
37-
3813
#[cfg(feature = "compress")]
3914
pub mod compress;

src/extensions/spo/mod.rs

Lines changed: 0 additions & 23 deletions
This file was deleted.

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,15 +113,15 @@ pub mod spectroscopy;
113113
pub mod qualia;
114114
pub mod mul; // Meta-Uncertainty Layer (10-layer metacognition)
115115
pub mod cypher_bridge; // Cypher string → BindSpace operations (neo4j-rs bridge)
116+
pub mod spo; // Subject-Predicate-Object — core cognitive substrate (always-on)
116117

117118
// === Unified execution contract (crewai-rust × ada-n8n integration) ===
118119
pub mod contract;
119120

120-
// === Optional extensions ===
121+
// === Optional extensions (codebook, hologram, compress only) ===
121122
#[cfg(any(
122123
feature = "codebook",
123124
feature = "hologram",
124-
feature = "spo",
125125
feature = "compress"
126126
))]
127127
pub mod extensions;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
//! Total: ~230 built-in + ~100 learned ≈ 330 concepts
4646
4747
use crate::core::Fingerprint;
48-
use crate::extensions::cognitive_codebook::{
48+
use crate::spo::cognitive_codebook::{
4949
CognitiveAddress, CognitiveCodebook, CognitiveDomain, NarsCopula, QualiaChannel, ThematicRole,
5050
YamlTemplate, fold_to_48,
5151
};

0 commit comments

Comments
 (0)