Skip to content

Commit bcc3786

Browse files
authored
Merge pull request #435 from AdaWorldAPI/claude/activate-lance-graph-att-k2pHI
feat(odoo) + docs(arm-discovery): op_emitter Phase 2 + streaming ARM→NARS integration plan
2 parents 1186dfd + 718a142 commit bcc3786

7 files changed

Lines changed: 1620 additions & 0 deletions

File tree

.claude/board/AGENT_LOG.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,42 @@
1+
## [Main thread / Opus 4.7] streaming-arm-nars-discovery-v1 — integration plan + handover + #434 corrections (the upstream proposer leg)
2+
3+
**Branch:** claude/activate-lance-graph-att-k2pHI (rebased onto origin/main post PR #434 merge) | **Files:**
4+
- `.claude/plans/streaming-arm-nars-discovery-v1.md` (+766 LOC new) — 18 sections, 12 deliverables, 10 OQs, 5 risks
5+
- `.claude/handovers/2026-05-29-2030-arm-discovery-author-to-impl.md` (+225 LOC new)
6+
- `.claude/board/INTEGRATION_PLANS.md` (prepend new section header)
7+
- `.claude/board/STATUS_BOARD.md` (new D-ARM-1..D-ARM-12 row section)
8+
9+
**Cargo:** not invoked (per session-stability rule + this is a SPEC PR with no code changes).
10+
11+
**D-ids:** D-ARM-1 through D-ARM-12 (**Queued**)
12+
13+
**Outcome:** DONE. Authored the integration plan for the missing **upstream proposer leg** — ARM rule discovery over streaming runtime tabular data (20K-200K rows/window) → translator to NARS-compatible `TruthValue(f,c)` → SpoStore round-trip hypothesis test (revise / commit contradiction per The Click) → council ratification gate (Stage D = the determinism firewall) → `op_emitter` codegen consumes only ratified candidates. Two corrections proposed to PR #434's unified-SoA plan: separate `discovery_arc: [u32; D]` SoA column (D=8 default; for tracking in-flight candidate rules per row, distinct from the witness-arc that tracks committed revisions) + `discovery_origin: u8` per-row provenance byte (2 bits ProvenanceTier + 2 bits proposer-id + 4 reserved; lets council's prior-art-savant tell ArmDiscovered from Curated/Extracted at lookup time).
14+
15+
**Paper anchors:** Karabulut, Groth, Degeler — *Neurosymbolic Association Rule Mining from Tabular Data* (arxiv 2504.19354v1, Apr 2025; ARM truth definitions in §2 map verbatim to NARS `(f,c)`; Algorithm 1 in §3.3 is the Aerial+ rule extraction the optional `arm-aerial` feature wraps via IPC). Abreu, Cruz, Guerreiro — *Ontology-Driven M2M Transformation of Workflow Specifications* (arxiv 2511.13661v1, Nov 2025; §4 "from code-centric to ontology-driven" ratifies the externalize-interpretation-not-code doctrine). The two papers BRACKET the architecture: discovery upstream, codegen downstream, SPO+NARS middle. Candidate epiphany `E-DISCOVERY-CODEGEN-BRACKET-1` (council-pending).
16+
17+
**Iron-rule respect:** I-NOISE-FLOOR-JIRAK (mandatory Stage A threshold via D-ARM-7), I-SUBSTRATE-MARKOV (NARS revision IS the Markov trajectory; bundle math untouched), I-VSA-IDENTITIES (operates on typed `(s,p,o)` triples, never bundles content). E-SOA-IS-THE-ONLY (writes via SpoBuilder only), E-BATON-1 (Stage C emissions are batons riding existing handoff), E-INTERPRET-NOT-STORE-1 (ARM is one interpretation projection of the lossless substrate).
18+
19+
**Plan-writing pattern:** `tee -a` chunked appends (12 chunks) per user instruction — avoids memory pressure for long-form plan writes; each chunk independently verifiable in `wc -l` post-append. Pattern documented in plan §17 decision log.
20+
21+
**Next session entry:** Council ratification of `E-DISCOVERY-CODEGEN-BRACKET-1` + §7 corrections, then Wave 1 (D-ARM-1 + D-ARM-2 contract additions). Full sequencing in handover.
22+
23+
---
24+
25+
## [Main thread / Opus 4.8] op_emitter — Phase 2 bucket-dispatch codegen (SoA → Foundry SoC)
26+
27+
**Branch:** claude/activate-lance-graph-att-k2pHI | **Files:**
28+
- `crates/lance-graph-ontology/src/odoo_blueprint/op_emitter.rs` (+400 LOC new)
29+
- `crates/lance-graph-ontology/src/odoo_blueprint/mod.rs` (+8 lines, `pub mod op_emitter` + comment block)
30+
31+
**Commit:** `63f3e2ca`
32+
**Tests:** 12/12 passed (`bucket_corpus_empty_input_produces_empty_vec`, `bucket_corpus_no_methods_entity_produces_empty_vec`, `bucket_corpus_groups_three_methods_into_correct_kinds`, `bucket_corpus_method_id_matches_entity_dot_method`, `emit_op_dispatch_empty_produces_valid_header_only_rust`, `emit_op_dispatch_produces_struct_and_static_for_each_kind`, `emit_op_dispatch_recipe_const_present_for_each_unique_id`, `emit_op_dispatch_deterministic_across_calls`, `emit_op_dispatch_recipe_dedup_collapses_identical_profiles`, `emit_op_dispatch_ops_sorted_by_recipe_id_then_method_id`, `kind_ord_is_injective_over_all_variants`, `kind_ord_roundtrips_via_from_ord`). Total lance-graph-ontology: 230/230 green.
33+
34+
**D-ids:** D-ODOO-OP-1 (**Shipped**)
35+
36+
**Outcome:** DONE. Phase 2 of the Odoo SoA → Foundry SoC pipeline. `bucket_corpus` groups `OdooStyleRecipe` corpus by semantic `OdooMethodKind` (10-variant: Compute/Inverse/Constrain/Onchange/Action/Cron/ApiModel/ApiModelCreateMulti/Override/Helper). `emit_op_dispatch` emits deterministic compilable Rust: per-unique-recipe_id `RECIPE_<HEX8>: u32` consts + per-kind `<Pascal>Op { method_id, recipe_id }` struct + `static <UPPER>_OPS: &[<Pascal>Op]` slice. Recipe dedup: identical DAtom weight vectors collapse to one `RECIPE_*` const (many-to-one method→recipe mapping preserved in the static slice). Output is zero-dep Rust — no imports needed in the emitted file; consumers write it to `OUT_DIR` and `include!()`. Deterministic by construction: buckets in declaration order, within each bucket sorted by recipe_id then method_id.
37+
38+
---
39+
140
## [SavantPattern / Opus 4.8] style_recipe — D-Atom interpretation step
241

342
**Branch:** claude/activate-lance-graph-att-k2pHI | **Files:**

.claude/board/INTEGRATION_PLANS.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
## 2026-05-29 — streaming-arm-nars-discovery-v1 (upstream proposer leg: 20K-200K rows/window pair-stats + optional Aerial+ neural fan-in → NARS-truth translator → SpoStore hypothesis test → epiphany-council ratification → op_emitter codegen)
2+
3+
**Status:** PROPOSAL / integration plan. Design-spec only, no code. **Plan file:** `.claude/plans/streaming-arm-nars-discovery-v1.md`. **Handover:** `.claude/handovers/2026-05-29-2030-arm-discovery-author-to-impl.md`. **Candidate epiphany:** `E-DISCOVERY-CODEGEN-BRACKET-1` (council-pending).
4+
**Owns:** the missing upstream discovery leg into the SPO substrate. Today's proposers (`D-ODOO-BP-1b` curated, `D-ODOO-EXT-2` AST-extracted) are bounded by literal artifacts; this plan adds runtime-data discovery via streaming pair-stats (deterministic trunk) + optional Aerial+ neural-symbolic fan-in. The two papers (Karabulut 2025 arxiv 2504.19354v1; Abreu 2025 arxiv 2511.13661v1) ratify the architecture: discovery upstream, codegen downstream, SPO+NARS middle. Adds 12 deliverables D-ARM-1…D-ARM-12; one new crate `lance-graph-arm-discovery`; 10 OQs; two corrections proposed to PR #434 (`discovery_arc: [u32; D]` column, `discovery_origin: u8` byte).
5+
**Anchored iron rules:** I-NOISE-FLOOR-JIRAK (mandatory Stage-A threshold), I-SUBSTRATE-MARKOV (NARS revision IS the Markov trajectory), I-VSA-IDENTITIES (operates on typed triples, never content). **Anchored epiphanies:** E-SOA-IS-THE-ONLY (writes via SpoBuilder only), E-BATON-1 (Stage-C emissions are batons), E-INTERPRET-NOT-STORE-1 (ARM is one interpretation projection).
6+
**Predecessors:** PR #433 (style_recipe.rs + epiphany-brainstorm-council + 5 savant cards = the ratification gate), PR #434 (unified-soa-convergence-v1.md = the SoA contract this writes against), op_emitter.rs (this branch = Phase 2 codegen target).
7+
8+
---
9+
110
## 2026-05-29 — unified-soa-convergence-v1 (THE single LE SoA end-to-end across the workspace: 9 half-baked consumers + SoA version gate + Lance 6.0.1/LanceDB 0.29/DataFusion 53 alignment + 4-phase Rubicon kanban + lance-graph-planner DTO overhaul + Libet −550 ms anchor + Staunen×Wisdom plasticity spreader + SPO-W pointer via AriGraph episodic Markov chain)
211

312
**Status:** PROPOSAL / integration plan. Design-spec only, no code. **Plan file:** `.claude/plans/unified-soa-convergence-v1.md`. **Handover:** `.claude/handovers/2026-05-29-1825-soa-convergence-author-to-impl.md`. **Epiphany:** `E-SOA-IS-THE-ONLY` (+ refinements §11.3/4/6 in PR-this-one).

.claude/board/STATUS_BOARD.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,29 @@ PREREQUISITE for `odoo-savant-reasoners-v2` Group F (per `E-SAVANT-COMPOSITION-1
610610
| D-ODOO-BP-1e | Wire DOLCE classifier + FIBU/FIBO alignment to take `&OdooEntity`; closes D-ODOO-SAV-2's `None`-class alignment for stock.* / analytic.distribution.model / account.account.tag over typed input | lance-graph-ontology | 200 | HIGH | **Queued** | blocked on 1b; parallel with 1c/1d |
611611
| D-ODOO-BP-1f | Odoo source extraction tool: tree-sitter Python AST → candidate `OdooEntity` consts with Confidence=Extracted; validates + extends 1b's curated set | tools/odoo-blueprint-extractor/ | 800 | MED | **Queued** | blocked on 1b/c/d/e; conflicts (curated vs extracted) flag for ratification, default to curated |
612612
| D-ODOO-BP-1g | Wire JITson → recipes: `jit::JitCompiler` compiles `Tactic` kernels parameterized by `(&OdooEntity, AtomTouchMask)`; produces DTO-ish NARS that lands in shader-driver | lance-graph-contract::jit + thinking-engine | 400 | MED | **Queued** | blocked on 1c/d/e; proof-of-concept on FiscalPositionResolver, the rest follow in `odoo-savant-reasoners-v2` Group F |
613+
| D-ODOO-STYLE-1 | `style_recipe.rs` — Phase 1 D-Atom interpretation step: typed Odoo SoA → `OdooStyleRecipe` cognitive fingerprints (12 DAtom basis, 7-rule cascade, FNV-1a recipe_id, never stored back as triples) | lance-graph-ontology::odoo_blueprint | 746 | HIGH | **Shipped** | commit `feb8be54` (PR #433 merged); 13/13 tests; DAtom::ALL discriminant-order pinned; OdooStyleRecipe != contract::recipe::StyleRecipe (documented) |
614+
| D-ODOO-OP-1 | `op_emitter.rs` — Phase 2 bucket-dispatch codegen: `bucket_corpus` groups OdooStyleRecipe by OdooMethodKind; `emit_op_dispatch` emits compilable Rust (RECIPE_* consts + per-kind Op structs + static Op slices); deterministic, recipe_id dedup collapses identical DAtom profiles | lance-graph-ontology::odoo_blueprint | 400 | HIGH | **Shipped** | commit `63f3e2ca`; 12/12 tests; zero-dep emitted output; 230/230 existing tests green |
615+
616+
---
617+
618+
## streaming-arm-nars-discovery-v1 — upstream proposer leg into the SPO substrate (20K-200K rows/window pair-stats + optional Aerial+ → NARS-truth → SpoStore hypothesis test → council ratification → op_emitter codegen)
619+
620+
The missing UPSTREAM discovery leg. Today's proposers (curated L-docs + AST-extracted Odoo source) are bounded by the literal artifact; this plan adds runtime-tabular-data ARM discovery, gated through the epiphany-brainstorm-council before reaching the deterministic codegen path. Plan: `.claude/plans/streaming-arm-nars-discovery-v1.md`. Handover: `.claude/handovers/2026-05-29-2030-arm-discovery-author-to-impl.md`.
621+
622+
| D-id | Title | Crate | Lines | Conf | Status | Notes |
623+
|---|---|---|---|---|---|---|
624+
| D-ARM-1 | `ProvenanceTier::{Curated,Extracted,ArmDiscovered,Ratified,Conjecture}` enum + ordering | lance-graph-contract | 50 | HIGH | **Queued** | blocks all other D-ARM-*; additive |
625+
| D-ARM-2 | `Proposer` trait + `CandidateRule` carrier + `WindowMetadata` | lance-graph-contract | 100 | HIGH | **Queued** | blocks D-ARM-3, D-ARM-9 |
626+
| D-ARM-3 | Pair-stats proposer (default trunk, deterministic, k² pair counters per window) | lance-graph-arm-discovery::proposer::pair_stats | 400 | HIGH | **Queued** | depends on D-ARM-1/2/7; blocks D-ARM-12 |
627+
| D-ARM-4 | ARM-truth → NARS-truth translator + Odoo `FeedProjector` impl | lance-graph-arm-discovery::translator | 200 | HIGH | **Queued** | depends on D-ARM-1/2 |
628+
| D-ARM-5 | Hypothesis test: SpoStore round-trip, NARS revision, contradiction commit per The Click | lance-graph-arm-discovery::hypothesis | 350 | MED | **Queued** | depends on D-ARM-4; verifies `spo::truth::Contradiction` primitive exists |
629+
| D-ARM-6 | `RatificationQueue` ring buffer + corrections-to-#434 spec PR (`discovery_arc D=8`, `discovery_origin u8`) | lance-graph-arm-discovery::queue + #434 spec follow-up | 200 + spec | MED | **Queued** | depends on PR #434 D-MBX-A3 landing |
630+
| D-ARM-7 | Jirak-2016 weak-dependence significance thresholds (mandatory Stage A floor) | lance-graph-arm-discovery::jirak | 150 | HIGH | **Queued** | blocks D-ARM-3; cites I-NOISE-FLOOR-JIRAK |
631+
| D-ARM-8 | `Feed` + `FeedProjector` + window-size config + Odoo `account.move` projector example | lance-graph-arm-discovery::feed | 250 | MED | **Queued** | depends on D-ARM-2 |
632+
| D-ARM-9 | Aerial+ IPC client (feature-gated `arm-aerial`, NDJSON over Unix socket) | lance-graph-arm-discovery::proposer::aerial_ipc | 200 | MED | **Queued** | optional; depends on D-ARM-2 |
633+
| D-ARM-10 | `op_emitter::bucket_corpus` ratification filter (`confidence ≥ Ratified`) + 2 tests | lance-graph-ontology::op_emitter | 30 | HIGH | **Queued** | depends on D-ARM-1 |
634+
| D-ARM-11 | `style_recipe.rs` rule 8 — ArmDiscovered backing adds `DAtom::Compute` weight 2 (provisional) | lance-graph-ontology::style_recipe | 80 | MED | **Queued** | depends on D-ARM-1 |
635+
| D-ARM-12 | End-to-end pipeline test + bench (synthetic Odoo feed → all 5 stages → council micro-batch) | lance-graph-arm-discovery::tests + benches | 400 | MED | **Queued** | depends on Waves 1-6; informs OQ-ARM-2 + OQ-ARM-7 |
613636

614637
---
615638

0 commit comments

Comments
 (0)