feat(arm-discovery): D-ARM-14 Phase 1 — splat-top-k oracle + DOLCE skeleton projector#438
Conversation
…eleton projector The two aerial-side seams the Wikidata-HHTL pipeline needs, verifiable standalone (the real splat + ontology producers stay in heavy workspace crates / jc, which the zero-dep aerial crate can't build against — so they're documented as the consumer-side / offline step). - aerial::TopKDistance: a CodebookDistance backed by a sparse per-node top-k neighbour list — the shape the 10000^2 BLASGraph Gaussian-splat actually emits (keep top-k per node, certified by jc EWA-sandwich; not a dense dim^2 table). Symmetric, nearest-on-duplicate, bounds-checked. - FeatureSpec::checked_slot: shared bounds-checked item->slot mapping. - aerial::ontology: DolceCategory (Endurant/Perdurant/Quality/Abstract + basin nibble + IRI — the HHTL axis template) + OntologyProjector (FeedProjector -> rdfs:subClassOf / rdf:type DOLCE skeleton SPO). End-to-end test: a splat top-k makes each occupation near its DOLCE class; aerial discovers the occupation->class skeleton edge; the projector renders `wd:f0_0 rdfs:subClassOf dolce:Endurant`; an unused facet is never invented. Float stays OFFLINE in jc only (ewa_sandwich + sigma_codebook_probe rho=0.9973 + pflug Le); aerial's online path is integer (the CAM-PQ doctrine end-to-end). Verified: 41/41 tests (37 + 4 new) + clippy -D warnings clean on both default and --features ndarray-simd. Zero-dep preserved. Remaining (documented): real jc/blasgraph splat producing the lists; Wikidata loader; gated on D-ARM-7 Jirak floor (jc::jirak). Map: .claude/knowledge/splat-codebook-aerial-wikidata-compression.md https://claude.ai/code/session_012SorR8UbtEvYmbX8cXftj7
📝 WalkthroughWalkthroughThis PR implements Phase 1 of the D-ARM-14 feature, introducing the aerial-side semantic discovery infrastructure: a DOLCE ontology projector that renders discovered entity-class rules into skeleton triples, a sparse top-k distance oracle for codebook neighbor lookups, and supporting encoding validation with full test coverage. ChangesD-ARM-14 Phase 1 Implementation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bd0e832ae6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| consequent | ||
| .first() | ||
| .and_then(|it| self.class_iris.get(it.category as usize)) | ||
| .cloned() |
There was a problem hiding this comment.
Avoid projecting non-class consequents as DOLCE classes
When projecting an unfiltered extract_rules result, this maps the object using only the consequent category and ignores which feature produced it. extract_rules emits candidates for every non-antecedent feature, and the new top-k oracle symmetrizes occupation↔class edges, so the same discovery pass can include reverse or other-feature rules whose category happens to be 0..3; those would be serialized as DOLCE facets even though their consequent is not the class axis, producing false rdfs:subClassOf/rdf:type skeleton triples. The projector needs to carry/validate the class feature (or the caller-facing API needs to filter before projection) instead of treating every consequent category as a class index.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
🧹 Nitpick comments (2)
.claude/knowledge/splat-codebook-aerial-wikidata-compression.md (1)
97-98: 💤 Low valueConsider aligning "SHIPPED" terminology with STATUS_BOARD conventions.
Line 97 uses "SHIPPED" for Phase 1, but according to STATUS_BOARD's legend (line 17), "Shipped" specifically means "Merged to main." The work is on branch
claude/jolly-cori-clnf9-darm14(not merged), so STATUS_BOARD correctly shows "In progress."The context here makes it clear ("D-ARM-14, branch
..."), so there's no ambiguity in practice. However, for consistency across board docs, consider:- **Phase 1 DONE** (D-ARM-14, branch `claude/jolly-cori-clnf9-darm14`): ...or
- **Phase 1 LANDED** (D-ARM-14, branch `claude/jolly-cori-clnf9-darm14`): ...This matches the AGENT_LOG's "Phase 1 DONE" and avoids overloading "SHIPPED."
The scoped-conjecture revision on line 98 is good—it honestly distinguishes "seams exist" from "full pipeline built."
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.claude/knowledge/splat-codebook-aerial-wikidata-compression.md around lines 97 - 98, Update the Phase 1 status wording to match STATUS_BOARD conventions: replace the header text "Phase 1 SHIPPED" (the line that references D-ARM-14 and branch `claude/jolly-cori-clnf9-darm14`) with either "Phase 1 DONE" or "Phase 1 LANDED" so it aligns with the legend where "Shipped" means merged to main; ensure the surrounding sentence still notes the branch and that the full pipeline is not yet built (the existing scoped-conjecture line can remain)..claude/board/STATUS_BOARD.md (1)
638-638: 💤 Low valueConsider condensing the "In progress" description to match STATUS_BOARD conventions.
The updated D-ARM-14 status is accurate and consistent with the AGENT_LOG, but it's unusually verbose compared to other "In progress" entries in this file. Most follow a terse pattern (e.g., line 540:
**In progress** | branch \...``), while this entry includes ~180 words of technical detail.Suggestion: move the detailed Phase 1 description to the AGENT_LOG entry only (already done) and keep this cell brief:
**In progress (Phase 1)** | branch `claude/jolly-cori-clnf9-darm14`; TopKDistance + DOLCE ontology projector seams landed; remaining: splat list production, Wikidata loader; gates on D-ARM-7The current version is not wrong—just denser than the established pattern. The AGENT_LOG is the canonical place for detailed narrative.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.claude/board/STATUS_BOARD.md at line 638, Condense the D-ARM-14 "In progress" cell in STATUS_BOARD.md to match the terse pattern used elsewhere: replace the long Phase 1 narrative with a short line like "**In progress (Phase 1)** | branch `claude/jolly-cori-clnf9-darm14`; TopKDistance + DOLCE ontology projector seams landed; remaining: splat list production, Wikidata loader; gated on D-ARM-7". Move the detailed Phase 1 text (the parts mentioning aerial::TopKDistance, the sparse splat top-k, aerial::ontology::{DolceCategory, OntologyProjector}, wikidata-hhtl-load.md, CAM-dedup, etc.) into the AGENT_LOG entry so the STATUS_BOARD cell stays concise and consistent with other entries.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In @.claude/board/STATUS_BOARD.md:
- Line 638: Condense the D-ARM-14 "In progress" cell in STATUS_BOARD.md to match
the terse pattern used elsewhere: replace the long Phase 1 narrative with a
short line like "**In progress (Phase 1)** | branch
`claude/jolly-cori-clnf9-darm14`; TopKDistance + DOLCE ontology projector seams
landed; remaining: splat list production, Wikidata loader; gated on D-ARM-7".
Move the detailed Phase 1 text (the parts mentioning aerial::TopKDistance, the
sparse splat top-k, aerial::ontology::{DolceCategory, OntologyProjector},
wikidata-hhtl-load.md, CAM-dedup, etc.) into the AGENT_LOG entry so the
STATUS_BOARD cell stays concise and consistent with other entries.
In @.claude/knowledge/splat-codebook-aerial-wikidata-compression.md:
- Around line 97-98: Update the Phase 1 status wording to match STATUS_BOARD
conventions: replace the header text "Phase 1 SHIPPED" (the line that references
D-ARM-14 and branch `claude/jolly-cori-clnf9-darm14`) with either "Phase 1 DONE"
or "Phase 1 LANDED" so it aligns with the legend where "Shipped" means merged to
main; ensure the surrounding sentence still notes the branch and that the full
pipeline is not yet built (the existing scoped-conjecture line can remain).
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 24489581-507e-418d-ac26-1131b663d997
📒 Files selected for processing (8)
.claude/board/AGENT_LOG.md.claude/board/STATUS_BOARD.md.claude/knowledge/splat-codebook-aerial-wikidata-compression.mdcrates/lance-graph-arm-discovery/src/aerial/codebook.rscrates/lance-graph-arm-discovery/src/aerial/mod.rscrates/lance-graph-arm-discovery/src/aerial/ontology.rscrates/lance-graph-arm-discovery/src/encode.rscrates/lance-graph-arm-discovery/src/lib.rs
… + auto-resolve
User instruction: "create the integration plan as a list of possibilities,
then use the council and brutally honest review to recalibrate, then continue
autoattended autonomous decision making and auto resolve."
Composed `post-438-integration-options-v1.md` with 8 options + 6 combinations.
Spawned 4 council reviewers in parallel (Opus, single main-thread turn) with
identical brief but diverse lenses:
R1 (architectural-fit) — B+C conditional on N1 class_id paired pass + u16
R2 (prior-art / drift) — B+H; REJECTS C as re-litigating user-owned forks;
flags AriGraph hot↔cold bridge as the missing
integration target the options doc never named
R3 (integration-coordination) — B+D; REJECTS C — in-flight collision with #439
on lance-graph-contract (31 commits, unstable,
KanbanMove const _ ≤16B size assertion)
R4 (brutal-critic / bias-hunter)— B+G; REJECTS C as ego-shipping; tier-set spec
disagreement = SPEC FREEZE, not Claude-session;
cites session pattern of 3 prior hallucinations
Auto-resolve per options-doc §5:
- B unanimous (4/4) → EXECUTED (2 stale-citation fixes this commit)
- C: 3/4 reject → NOT EXECUTED
- OD-1/2/3 + canonical-spec-self-disagreement → escalated to ISSUES.md as
explicit SPEC-OWNER decisions (R2+R4 unanimous framing)
- R2's AriGraph-bridge finding → captured as EPIPHANY (new, missed by all
prior session work): the discovery_origin byte's natural home is a column
on the AriGraph hot↔cold bridge, not the mailbox-SoA byte
- G (chess bring-up): 2/4 endorse → queued to STATUS_BOARD as D-CHESS-BRINGUP-1
(NOT executed on this branch per R1 "needs its own branch + freeze-decision
authority"); unblocked by #436's Rust Aerial+ (user-flagged 2026-05-30)
- D (help #439): 1/4 → below threshold, not executed
- H (cargo clean, 3.3G): flagged for user, not auto-executed (workflow not
architecture)
Fixed stale citations in own docs:
- discovery-origin-provenance-reconciliation §8: specs are on main now
(via main commits d1635db, 93ac046, a16d0f4, 45276eb), not on a
separate cognitive-risc-core branch as v1 of the doc claimed pre-rebase
- odoo-blueprint-survival-dossier §7 "Concrete next moves": Wave 1 went
D-ARM-13/14 via #436/#438, not D-ARM-1/2 as originally planned
Documentation only. No code or in-flight contract modified. Contract carrier
work (D-ARM-1/D-ARM-2/D-MBX-A6-P3) explicitly held until the spec owner
reconciles the canonical tier-set disagreement and the user picks
proposer-id width (OD-1).
https://claude.ai/code/session_017gZ6sPRXYPj5n7uJ7NBtRv
… + auto-resolve
User instruction: "create the integration plan as a list of possibilities,
then use the council and brutally honest review to recalibrate, then continue
autoattended autonomous decision making and auto resolve."
Composed `post-438-integration-options-v1.md` with 8 options + 6 combinations.
Spawned 4 council reviewers in parallel (Opus, single main-thread turn) with
identical brief but diverse lenses:
R1 (architectural-fit) — B+C conditional on N1 class_id paired pass + u16
R2 (prior-art / drift) — B+H; REJECTS C as re-litigating user-owned forks;
flags AriGraph hot↔cold bridge as the missing
integration target the options doc never named
R3 (integration-coordination) — B+D; REJECTS C — in-flight collision with #439
on lance-graph-contract (31 commits, unstable,
KanbanMove const _ ≤16B size assertion)
R4 (brutal-critic / bias-hunter)— B+G; REJECTS C as ego-shipping; tier-set spec
disagreement = SPEC FREEZE, not Claude-session;
cites session pattern of 3 prior hallucinations
Auto-resolve per options-doc §5:
- B unanimous (4/4) → EXECUTED (2 stale-citation fixes this commit)
- C: 3/4 reject → NOT EXECUTED
- OD-1/2/3 + canonical-spec-self-disagreement → escalated to ISSUES.md as
explicit SPEC-OWNER decisions (R2+R4 unanimous framing)
- R2's AriGraph-bridge finding → captured as EPIPHANY (new, missed by all
prior session work): the discovery_origin byte's natural home is a column
on the AriGraph hot↔cold bridge, not the mailbox-SoA byte
- G (chess bring-up): 2/4 endorse → queued to STATUS_BOARD as D-CHESS-BRINGUP-1
(NOT executed on this branch per R1 "needs its own branch + freeze-decision
authority"); unblocked by #436's Rust Aerial+ (user-flagged 2026-05-30)
- D (help #439): 1/4 → below threshold, not executed
- H (cargo clean, 3.3G): flagged for user, not auto-executed (workflow not
architecture)
Fixed stale citations in own docs:
- discovery-origin-provenance-reconciliation §8: specs are on main now
(via main commits d1635db, 93ac046, a16d0f4, 45276eb), not on a
separate cognitive-risc-core branch as v1 of the doc claimed pre-rebase
- odoo-blueprint-survival-dossier §7 "Concrete next moves": Wave 1 went
D-ARM-13/14 via #436/#438, not D-ARM-1/2 as originally planned
Documentation only. No code or in-flight contract modified. Contract carrier
work (D-ARM-1/D-ARM-2/D-MBX-A6-P3) explicitly held until the spec owner
reconciles the canonical tier-set disagreement and the user picks
proposer-id width (OD-1).
https://claude.ai/code/session_017gZ6sPRXYPj5n7uJ7NBtRv
…FieldMask::inherit (Wikidata-HHTL slice 1) The downstream 16^n Abstammung bucket router #438 (D-ARM-14 P1) names but did not build: subClassOf nibble path, bit-shift O(1) addressing (root/child/basin/parent/is_ancestor_of). DOLCE-agnostic by construction (basin: u8 = dolce_id 0..3 resolved THROUGH the ontology cache per OD-DOLCE b31464d — never an embedded enum; matches both #441 dolce_id and #438 basin() orderings). + FieldMask::inherit (mask-inherits-as-delta; multi-parent = orthogonal facet bit in the same mask, NOT a 2nd path). Reuses #441 FieldMask; zero-dep preserved. The N4 second-domain falsifier for the D-CLS machinery: the Wikidata D-CLS triple (class_id, shape_hash, presence_bitmask) = (ClassId, StructuralSignature, FieldMask) — all #441. Convergent with D-ARM-14, firewall preserved (aerial = zero-dep proposer; contract/ontology = hub). 4 teeth-tests (bit-shift round-trip, depth cap + out-of-range nibble ignored, prefix reachability, multi-parent-is-a-facet-bit); 501 contract lib green; clippy -D warnings + fmt clean. Board: FINDING D-CLS<->D-ARM-14 reconciliation (EPIPHANIES) + D-WIKI-HHTL-1 row. https://claude.ai/code/session_01R9AWgFa65uPnLyS2my2d2R
Summary
Phase 1 of D-ARM-14 — wire the certified jc splat codebook into
lance-graph-arm-discovery(Aerial+) so it can discover the OWL/DOLCE SPO skeleton that drives thewikidata-hhtl-load.mddeterministic compression.This PR lands the two aerial-side seams the pipeline needs, verifiable standalone. The heavy producers — the blasgraph Gaussian-splat top-k and the
lance-graph-ontologyDOLCE hydrators — live in workspace crates the zero-dep aerial crate can't build against, andjc::ewa_sandwichis a proof, not a table-builder. So they stay the documented consumer-side / offline step; this PR builds exactly what plugs into them.What's in it
aerial::TopKDistanceCodebookDistancebacked by a sparse per-node top-k neighbour list — the shape the 10000² BLASGraph Gaussian-splat actually emits (keep top-k per node, certified by jc's EWA-sandwich Σ-push-forward; not a densedim²table). Symmetric, nearest-wins-on-duplicate, bounds-checked. This is the production oracle shape;MatrixDistanceremains the dense test/reference impl.FeatureSpec::checked_slotItem → slotmapping (fails fast instead of aliasing another feature's block).aerial::ontology::DolceCategory0x0..=0x3) + IRI — the HHTL axis template perogit-owl-dolce-ontology-compartments.md.aerial::ontology::OntologyProjectorFeedProjectorrendering discovered rules as thewikidata-hhtl-load.mdskeleton —rdfs:subClassOf(P279) /rdf:type(P31) SPO, DOLCE facets as the class axis.Verification
Load-bearing test (
ontology::tests::discovers_and_projects_dolce_skeleton): a splat top-k makes each occupation near its DOLCE class → aerial discovers theoccupation → classskeleton edge → the projector renderswd:f0_0 rdfs:subClassOf dolce:Endurant, and an unused facet is never invented. Crate stays zero-dep / standalone.Float discipline (preserved)
Float lives only OFFLINE in jc — the EWA-sandwich Σ-push-forward,
sigma_codebook_probe(ρ=0.9973),pflug(Lε-faithful HHTL). jc emits a frozen integer artifact; aerial's online path is all integers (the splat-top-k lists areu32, evidence countsu32). Build the codebook offline (float OK), address it online with integer codes — the CAM-PQ doctrine end-to-end. No new aerial dependency: the certified lists are passed in through theCodebookDistanceseam.Remaining (Phase 2+, documented)
jc::jirak) before any rule is promoted to a live skeleton.Full wiring map:
.claude/knowledge/splat-codebook-aerial-wikidata-compression.md(finding E-ARM-JC-RESOLVES-BOTH-SEAMS).Board hygiene (same commit)
STATUS_BOARD(D-ARM-14 → In progress, Phase 1) ·AGENT_LOGrun · the wiring knowledge doc's status section.https://claude.ai/code/session_012SorR8UbtEvYmbX8cXftj7
Generated by Claude Code
Summary by CodeRabbit
New Features
Documentation