|
| 1 | +# Deprecation Changelog — 2026-02-17 |
| 2 | + |
| 3 | +## Architectural Decision: RISC not CISC |
| 4 | + |
| 5 | +**One binary. Zero JSON on hot path. `&BindSpace` borrows, not HTTP.** |
| 6 | + |
| 7 | +Internal operations between ladybug-rs, crewai-rust, n8n-rs, and neo4j-rs |
| 8 | +must never serialize. They share one process, one memory space. The blackboard |
| 9 | +borrow pattern (`&self` for reads, `&mut self` for writes) replaces all |
| 10 | +inter-crate HTTP/JSON/REST/Arrow Flight communication. |
| 11 | + |
| 12 | +JSON/REST endpoints exist ONLY for external consumers (dashboards, third-party |
| 13 | +integrations). They are exhaust, not engine. |
| 14 | + |
| 15 | +neo4j-rs is being redesigned as a **Cypher parser that emits BindSpace |
| 16 | +operations directly** — not a database, not a service, a query language |
| 17 | +compiler. Like the CISC→RISC transition: stop translating, start executing. |
| 18 | + |
| 19 | +--- |
| 20 | + |
| 21 | +## PR #129 — ladybug-rs |
| 22 | + |
| 23 | +**Branch**: `deprecate/pr127-128-json-hydrate` |
| 24 | +**Merged from**: `main` @ `e2dfd54` |
| 25 | +**URL**: https://github.com/AdaWorldAPI/ladybug-rs/pull/129 |
| 26 | + |
| 27 | +### Files moved to `.deprecated/pr127_128_json_hydrate/` |
| 28 | + |
| 29 | +| File | Lines | Description | |
| 30 | +|------|------:|-------------| |
| 31 | +| `server_hydrate_block.rs` | 406 | Extracted handler code from `src/bin/server.rs` | |
| 32 | +| `README.md` | — | Rationale, salvage notes | |
| 33 | + |
| 34 | +### Changes to `src/bin/server.rs` (−418 lines) |
| 35 | + |
| 36 | +**Removed handlers:** |
| 37 | +- `fn handle_qualia_hydrate()` — POST `/api/v1/qualia/hydrate` (~240 lines) |
| 38 | +- `fn handle_qualia_writeback()` — POST `/api/v1/qualia/write-back` (~100 lines) |
| 39 | +- `fn text_to_container()` — hash-based Container from message text |
| 40 | +- `fn text_to_dn()` — hash-based PackedDn from message text (3-level DN) |
| 41 | +- `fn serde_json_escape()` — JSON string escaper (only used by hydrate response) |
| 42 | + |
| 43 | +**Removed from `DbState` struct:** |
| 44 | +- `qualia_graph: ContainerGraph` — DN-keyed graph for qualia ops |
| 45 | +- `self_dims: SelfDimensions` — mutable self-model persistence |
| 46 | +- Corresponding initializers in `DbState::new()` |
| 47 | + |
| 48 | +**Removed route entries:** |
| 49 | +- `("POST", "/api/v1/qualia/hydrate") => handle_qualia_hydrate(...)` |
| 50 | +- `("POST", "/api/v1/qualia/write-back") => handle_qualia_writeback(...)` |
| 51 | +- Comment line: `// Qualia substrate endpoints (holy grail pipeline)` |
| 52 | + |
| 53 | +**Removed imports (hydrate-only):** |
| 54 | +- `use ladybug::container::{Container, CONTAINER_BITS};` → removed entirely (Container unused elsewhere) |
| 55 | +- `use ladybug::container::adjacency::PackedDn;` |
| 56 | +- `use ladybug::container::graph::ContainerGraph;` |
| 57 | +- `use ladybug::container::record::CogRecord;` |
| 58 | +- `use ladybug::container::geometry::ContainerGeometry;` |
| 59 | +- `use ladybug::qualia::texture::GraphMetrics;` |
| 60 | +- `use ladybug::qualia::agent_state::{AgentState, PresenceMode, SelfDimensions};` |
| 61 | +- `use ladybug::qualia::felt_parse::{GhostEcho, GhostType};` |
| 62 | +- `use ladybug::qualia::volition::CouncilWeights;` |
| 63 | +- `use ladybug::qualia::{felt_walk, volitional_cycle, harvest_ghosts};` |
| 64 | +- `use ladybug_contract::nars::TruthValue as ContractTruthValue;` |
| 65 | +- `use ladybug::cognitive::RungLevel;` |
| 66 | + |
| 67 | +**NOT touched:** |
| 68 | +- PR #126 (`felt_parse.rs`, `agent_state.rs`) — real substrate work, stays |
| 69 | +- All `/api/v1/graph/*` endpoints — unchanged |
| 70 | +- UDP bitpacked Hamming handler — unchanged |
| 71 | +- All existing tests — unchanged |
| 72 | + |
| 73 | +### Why deprecated |
| 74 | + |
| 75 | +1. **JSON forbidden on internal hot path.** `serde_json::to_string` between |
| 76 | + crates in the same binary = bug. `reqwest::post()` between crates in the |
| 77 | + same binary = bug. |
| 78 | +2. **`text_to_dn()` is hash soup.** `DefaultHasher` on message text produces |
| 79 | + meaningless DN positions. SPOQ requires DN paths to encode perspective |
| 80 | + (semantic viewpoint in the tree), not hash collisions. |
| 81 | +3. **Hollow pipeline.** PR #127 constructed `FeltPath { choices: vec![] }` and |
| 82 | + `VolitionalAgenda { acts: vec![] }` — empty structs pretending to be |
| 83 | + computed state. PR #128 improved by calling `felt_walk()` but assigned ghost |
| 84 | + types via `match i % 8` (cycling through types by index = random noise). |
| 85 | +4. **Wrong paradigm.** Assumed crewai-rust calls ladybug-rs via HTTP POST. |
| 86 | + Correct: one binary, `&BindSpace` borrow. |
| 87 | + |
| 88 | +### What to salvage for the rewrite |
| 89 | + |
| 90 | +- `AgentState::compute()` integration pattern (PR #126 has it natively) |
| 91 | +- The route: message → qualia state → preamble for LLM prompt. But as |
| 92 | + `&Container → &Container`, not `JSON → JSON`. |
| 93 | +- INTEGRATION_SPEC Layer A concept (preamble for system prompt injection) |
| 94 | + |
| 95 | +--- |
| 96 | + |
| 97 | +## PR #20 — neo4j-rs |
| 98 | + |
| 99 | +**Branch**: `deprecate/pr19-container-dto` |
| 100 | +**Merged from**: `main` @ `83b80e1` |
| 101 | +**URL**: https://github.com/AdaWorldAPI/neo4j-rs/pull/20 |
| 102 | + |
| 103 | +### Files moved to `.deprecated/pr19_container_dto/` |
| 104 | + |
| 105 | +| File | Lines | Description | |
| 106 | +|------|------:|-------------| |
| 107 | +| `fingerprint.rs` | 333 | `ContainerDto` — reimplements `ladybug_contract::Container` | |
| 108 | +| `ladybug_module/mod.rs` | 450 | `LadybugBackend` struct + `StorageBackend` impl | |
| 109 | +| `ladybug_module/procedures.rs` | 308 | CALL `ladybug.*` procedure dispatch | |
| 110 | +| `README.md` | — | Rationale, salvage notes | |
| 111 | + |
| 112 | +### Changes to `src/storage/mod.rs` |
| 113 | + |
| 114 | +```diff |
| 115 | +-#[cfg(feature = "ladybug")] |
| 116 | +-pub mod ladybug; |
| 117 | ++// DEPRECATED: moved to .deprecated/pr19_container_dto/ |
| 118 | ++// #[cfg(feature = "ladybug")] |
| 119 | ++// pub mod ladybug; // → .deprecated/pr19_container_dto/ladybug_module/ |
| 120 | +``` |
| 121 | + |
| 122 | +Comment added to `StorageConfig::Ladybug` variant: |
| 123 | +```diff |
| 124 | +- /// ladybug-rs local storage |
| 125 | ++ /// ladybug-rs local storage (DEPRECATED: module moved to .deprecated/) |
| 126 | +``` |
| 127 | + |
| 128 | +The `Ladybug` variant stays in the enum behind `#[cfg(feature = "ladybug")]` — |
| 129 | +it won't compile unless the feature is explicitly enabled, which nobody does. |
| 130 | + |
| 131 | +`Cargo.toml` unchanged — `ladybug` feature flag preserved for the RISC rewrite. |
| 132 | + |
| 133 | +**NOT touched:** |
| 134 | +- `src/cypher/` (parser, lexer, AST) — the parser is the keeper |
| 135 | +- `src/execution/` — will be rewritten but stays for now |
| 136 | +- `src/storage/memory.rs` — MemoryBackend stays as test oracle |
| 137 | +- `src/model/` — Neo4j value types stay |
| 138 | +- `src/chess.rs` — feature-gated, has its own `cfg(feature = "ladybug")` block |
| 139 | +- All tests |
| 140 | + |
| 141 | +### Why deprecated |
| 142 | + |
| 143 | +1. **`ContainerDto` duplicates `ladybug_contract::Container`.** 333 lines |
| 144 | + reimplementing `xor()`, `hamming()`, `similarity()`, `random()`, `popcount()`. |
| 145 | + In one-binary model, `use ladybug::container::Container` directly. Zero copy. |
| 146 | +2. **9-layer CISC translation.** Cypher → parser → planner → executor → |
| 147 | + StorageBackend dispatch → LadybugBackend → `id_to_addr` HashMap → |
| 148 | + BindSpace → reconstruct Neo4j `Row`. RISC: parser → BindSpace call → done. |
| 149 | +3. **`PropertyMap` side-HashMap.** `node_props: HashMap<NodeId, PropertyMap>` stores |
| 150 | + original strings alongside fingerprints. In SPOQ model, properties live in DN |
| 151 | + tree as Container values at path positions. |
| 152 | +4. **`NodeId ↔ Addr` BiMap.** Neo4j uses sequential u64 IDs, BindSpace uses |
| 153 | + prefix:slot addressing. The bridge adds a HashMap lookup per operation. |
| 154 | + In RISC model, Cypher variables bind directly to `PackedDn` addresses. |
| 155 | + |
| 156 | +### What to salvage for the RISC rewrite |
| 157 | + |
| 158 | +- **CALL procedures surface** (`ladybug.search`, `ladybug.bind`, `ladybug.similarity`, |
| 159 | + `ladybug.truth`, `ladybug.revise`, `ladybug.spine`, `ladybug.dn.navigate`). |
| 160 | + These become native query semantics, not extension procedures. |
| 161 | +- **Verb resolution via Surface 0x07** — correct pattern, keep it. |
| 162 | +- **NARS truth revision on relationship creation** — the idea that `create_relationship` |
| 163 | + is evidence accumulation is right. |
| 164 | + |
| 165 | +### The RISC target architecture |
| 166 | + |
| 167 | +```rust |
| 168 | +pub struct CypherEngine { |
| 169 | + parser: CypherParser, // keep — good parser |
| 170 | +} |
| 171 | + |
| 172 | +impl CypherEngine { |
| 173 | + pub fn query<'a>(&self, space: &'a BindSpace, cypher: &str) -> QueryResult<'a> { |
| 174 | + let ast = self.parser.parse(cypher); |
| 175 | + execute_ast(space, &ast) // MATCH → traverse(), WHERE → hamming filter |
| 176 | + } |
| 177 | + |
| 178 | + pub fn mutate(&self, space: &mut BindSpace, cypher: &str) -> MutationResult { |
| 179 | + let ast = self.parser.parse(cypher); |
| 180 | + execute_mutations(space, &ast) // CREATE → write(), SET → revise() |
| 181 | + } |
| 182 | +} |
| 183 | +``` |
| 184 | + |
| 185 | +--- |
| 186 | + |
| 187 | +## PR #22 — n8n-rs |
| 188 | + |
| 189 | +**Branch**: `deprecate/pr20-21-json-service` |
| 190 | +**Merged from**: `master` @ `60428ff` |
| 191 | +**URL**: https://github.com/AdaWorldAPI/n8n-rs/pull/22 |
| 192 | + |
| 193 | +### Files moved to `.deprecated/` |
| 194 | + |
| 195 | +| Destination | Source | Lines | Description | |
| 196 | +|-------------|--------|------:|-------------| |
| 197 | +| `.deprecated/pr20_json_workflow/autopoiesis.json` | `n8n-rust/workflows/autopoiesis.json` | ~200 | JSON workflow template with service discovery env vars | |
| 198 | +| `.deprecated/pr20_json_workflow/README.md` | — | — | Rationale | |
| 199 | +| `.deprecated/pr21_service_contracts/COGNITIVE_WORKFLOW_CONTRACTS.md` | `docs/COGNITIVE_WORKFLOW_CONTRACTS.md` | 1,147 | Arrow Flight RPC contracts between services | |
| 200 | +| `.deprecated/pr21_service_contracts/README.md` | — | — | Rationale | |
| 201 | + |
| 202 | +### Files deleted |
| 203 | + |
| 204 | +- `n8n-rust/workflows/autopoiesis.json` |
| 205 | +- `docs/COGNITIVE_WORKFLOW_CONTRACTS.md` |
| 206 | + |
| 207 | +### Files kept (NOT deprecated) |
| 208 | + |
| 209 | +- `docs/AUTOPOIESIS_SPEC.md` — the Maturana & Varela model is sound. Q-value |
| 210 | + routing, MUL as immune system, organizational closure. Theory stays. |
| 211 | +- `docs/INTEGRATION_EXECUTION_PLAN.md` — 5-phase execution plan stays. |
| 212 | +- `docs/COMPATIBILITY_REPORT.md` — stays. |
| 213 | +- All Rust source — unchanged. |
| 214 | + |
| 215 | +### Why deprecated |
| 216 | + |
| 217 | +1. **JSON workflow uses service URLs.** `ADA_URL`, `CREWAI_URL`, `LADYBUG_URL` |
| 218 | + environment variables for HTTP calls between components. One binary = direct |
| 219 | + function calls. |
| 220 | +2. **Arrow Flight RPC contracts.** Defines gRPC surfaces between n8n-rs and |
| 221 | + ladybug-rs. In one-binary model, these become `&self` method calls on shared |
| 222 | + substrate. |
| 223 | + |
| 224 | +### What to salvage |
| 225 | + |
| 226 | +- The autopoiesis workflow sequence: sovereignty check → felt assessment → body |
| 227 | + scan → visceral composite → qualia modulation → hook evaluation → state |
| 228 | + persistence → dream check. Rewrite as a Rust function chain, not JSON nodes. |
| 229 | +- `FreeWillPipeline` 7-step evaluation (type/scope/reversibility/evidence/ |
| 230 | + satisfaction/rate-limit/RBAC) |
| 231 | +- `TopologyChange` enum: PruneEdge, GrowEdge, DeactivateNode, Replicate |
| 232 | +- Q-value routing with MUL-modulated epsilon-greedy |
| 233 | + |
| 234 | +--- |
| 235 | + |
| 236 | +## PR #29 — crewai-rust |
| 237 | + |
| 238 | +**Branch**: `deprecate/pr27-review-doc` |
| 239 | +**Merged from**: `main` @ `28faa74` |
| 240 | +**URL**: https://github.com/AdaWorldAPI/crewai-rust/pull/29 |
| 241 | + |
| 242 | +### Files moved to `.deprecated/pr27_review_doc/` |
| 243 | + |
| 244 | +| File | Lines | Description | |
| 245 | +|------|------:|-------------| |
| 246 | +| `ROADMAP_REVIEW.md` | 1,632 | Cross-ecosystem roadmap review with 22 recommendations | |
| 247 | +| `README.md` | — | Rationale | |
| 248 | + |
| 249 | +### Files deleted |
| 250 | + |
| 251 | +- `docs/ROADMAP_REVIEW.md` |
| 252 | + |
| 253 | +### Files kept (NOT deprecated) |
| 254 | + |
| 255 | +- `docs/INTEGRATION_PLAN_SCHEMA_CHANGES.md` — schema plan is sound ✅ |
| 256 | +- `docs/STRATEGY_INTEGRATION_PLAN.md` — strategy stays ✅ |
| 257 | +- `docs/AGENT_MUL_CONTRACTS.md` — stays |
| 258 | +- `docs/AGENT_ORCHESTRATION_SPEC.md` — stays |
| 259 | +- `docs/INTEGRATION_EXECUTION_PLAN.md` — stays |
| 260 | +- All Rust source — unchanged. |
| 261 | + |
| 262 | +### Why deprecated |
| 263 | + |
| 264 | +1. Analysis document, not code — belongs in docs repo. |
| 265 | +2. References neo4j-rs extensively — wrong repo for this content. |
| 266 | +3. Many recommendations superseded by SPOQ/RISC architectural shift. |
| 267 | + |
| 268 | +### What to salvage |
| 269 | + |
| 270 | +- StorageBackend trait analysis (well-designed integration seam assessment) |
| 271 | +- Effort estimate validation table (realistic LOC/time estimates) |
| 272 | +- Risk #9: BindNode AoS→SoA refactor blocks Phase 4 |
| 273 | +- Risk #10: fingerprint 156→157 word split (silent corruption) |
| 274 | +- Risk #11: CogRecord 256-word redesign changes integration surface |
| 275 | + |
| 276 | +--- |
| 277 | + |
| 278 | +## Summary for Claude Code sessions |
| 279 | + |
| 280 | +### The policy (enforce in all future PRs) |
| 281 | + |
| 282 | +1. **No `serde_json` on internal hot path.** If you see `serde_json::to_string` |
| 283 | + or `serde_json::from_str` between crates in the same binary, reject the PR. |
| 284 | +2. **No `reqwest::post()` between crates in the same binary.** If two crates |
| 285 | + share a `Cargo.toml` workspace, they communicate via borrows. |
| 286 | +3. **No DTO types that duplicate `ladybug-contract`.** `Container`, `CogRecord`, |
| 287 | + `PackedDn`, `TruthValue` — use directly, never reimplement. |
| 288 | +4. **No `HashMap<NodeId, PropertyMap>` side storage.** Properties live in the DN |
| 289 | + tree as Containers at path positions. |
| 290 | +5. **neo4j-rs = Cypher parser + BindSpace caller.** No executor, no StorageBackend |
| 291 | + trait, no intermediate Row representation. |
| 292 | + |
| 293 | +### What's still in each repo after deprecation |
| 294 | + |
| 295 | +| Repo | Rust LOC (approx) | Key surviving components | |
| 296 | +|------|-------------------:|--------------------------| |
| 297 | +| ladybug-rs | ~25,000 | BindSpace, Container, SPO Crystal, AVX engine, qualia stack (felt_parse, agent_state, texture, reflection, volition, mul_bridge, dream_bridge), server.rs (graph endpoints + UDP) | |
| 298 | +| neo4j-rs | ~5,000 | Cypher parser/lexer/AST, MemoryBackend (test oracle), model types, execution engine (to be rewritten) | |
| 299 | +| n8n-rs | ~4,800 | Unified executor, workflow engine, cognitive layer stack, LanceDB/Arrow Flight (feature-gated) | |
| 300 | +| crewai-rust | ~60,000 | MetaOrchestrator, Triune persona, flow engine, memory layers, RAG, interface gateway, contract bridge | |
0 commit comments