knowledge: AST-as-(part_of:is_a)-address design doc#616
Conversation
Consolidates the session's co-developed architecture for sinking compiled semantics into the canonical GUID instead of SurrealQL AST DDL: the structural AST of a transcode source (C#/Python/C++/Ruby) stored AS the (part_of:is_a) GUID address in the lance-graph SoA, with behavior in CausalEdge64 edges keyed by the GUID. Key claims (all CONJECTURE, not built/measured): - An AST has exactly two structural relations (is_a / part_of) and they ARE the two per-tier tile axes (is_a = TISSUE/what byte, part_of = PLACE/where byte). - The class wrapper = OGAR ClassView / ruff_spo_triplet::Model IR; sink the rails-shaped declarative class-body, never a raw CSharpSyntaxTree. - The one missing brick is a deterministic part_of/is_a rank-minter (exact, roundtrip-lossless on a finite known AST — not learned PQ). - ruff-lsp is the natural language-agnostic serve surface (LSP ops ARE part_of/is_a queries). OPEN GATE (flagged, not decided): whether part_of:is_a is path-only (3 pairs / 6 bytes over HEEL/HIP/TWIG, per guid-canon-and-prefix-routing.md) or full-key (6 pairs / 12 slots over the whole GUID, per operator framing). Must be ratified against the V3 mint canon (PR #615 lineage) before any packer is written. Status: CONJECTURE. READ BY: integration-lead, truth-architect, core-first-architect, family-codec-smith, baton-handoff-auditor. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EYvNjD8M8LMNYbRy3gq2FP
|
Warning Review limit reached
More reviews will be available in 13 minutes and 49 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA design document is added describing structural AST identity in ChangesAST address design note
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
.claude/knowledge/ast-as-partof-isa-address.md (2)
20-28: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueAdd
textlanguage specifier to the fenced diagram block.The ASCII art diagram at line 20 lacks a language tag, triggering markdownlint's
MD040. Usetextto silence the warning without affecting rendering.📝 Proposed fix
-``` +```text source (C#/…) ──ruff_*_spo harvest──► SPO triples ──► AR-shaped Model / ClassView │ rank-mint (NEW brick) ▼ (part_of:is_a) GUID ──► lance-graph SoA │ serve ▼ ruff-lsp ──► editor</details> <details> <summary>🤖 Prompt for AI Agents</summary>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/ast-as-partof-isa-address.md around lines 20 - 28, The
fenced ASCII diagram block in ast-as-partof-isa-address.md is missing a language
tag, causing markdownlint MD040. Update the diagram fence to use the text
specifier so the block remains visually unchanged while satisfying lint rules;
this is the fenced block containing the source (C#/…) to ruff-lsp flow.</details> <!-- cr-comment:v1:75a973de51225bb6c044faeb --> --- `73-73`: _📐 Maintainability & Code Quality_ | _🔵 Trivial_ | _⚡ Quick win_ **Escape or restructure the inline code containing `|` in the table.** The inline code `` `family = (po_rank3<<8)|ia_rank3` `` on line 73 contains a raw `|` that markdownlint's table parser misreads as a column delimiter (MD056). Replace with `<code>` tags or rephrase to avoid the pipe inside table cells. <details> <summary>📝 Proposed fix</summary> ```diff -| `basin·leaf` + `identity` (6B) | basin `po_rank` : `ia_rank` (OGAR `family = (po_rank3<<8)|ia_rank3`) | +| `basin·leaf` + `identity` (6B) | basin `po_rank` : `ia_rank` (OGAR <code>family = (po_rank3<<8)\|ia_rank3</code>) |🤖 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/ast-as-partof-isa-address.md at line 73, The markdown table cell in ast-as-partof-isa-address.md contains inline code with a raw pipe character, which markdownlint reads as a column separator. Update the affected table entry by restructuring the text or wrapping the OGAR expression in a form that avoids a literal pipe inside the cell, using the surrounding table row content to keep the meaning clear. Locate the entry by the `basin leaf` / `po_rank : ia_rank` row and adjust only that cell so the table parses correctly.
🤖 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/knowledge/ast-as-partof-isa-address.md:
- Around line 20-28: The fenced ASCII diagram block in
ast-as-partof-isa-address.md is missing a language tag, causing markdownlint
MD040. Update the diagram fence to use the text specifier so the block remains
visually unchanged while satisfying lint rules; this is the fenced block
containing the source (C#/…) to ruff-lsp flow.
- Line 73: The markdown table cell in ast-as-partof-isa-address.md contains
inline code with a raw pipe character, which markdownlint reads as a column
separator. Update the affected table entry by restructuring the text or wrapping
the OGAR expression in a form that avoids a literal pipe inside the cell, using
the surrounding table row content to keep the meaning clear. Locate the entry by
the `basin leaf` / `po_rank : ia_rank` row and adjust only that cell so the
table parses correctly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: d41d6abf-f90f-477b-bc55-3023fa72645a
📒 Files selected for processing (1)
.claude/knowledge/ast-as-partof-isa-address.md
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ee88a6c026
ℹ️ 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".
| CAM-PQ 6×256`, i.e. **3 tiers × 256×256 tile = 3 (part_of:is_a) pairs over | ||
| HEEL/HIP/TWIG**. The 12-slot reading extends part_of:is_a to the *full* GUID | ||
| (classid + cascade + basin), not just the path. Whether part_of:is_a is | ||
| **path-only (3 pairs / 6 bytes)** or **full-key (6 pairs / 12 bytes)** is the |
There was a problem hiding this comment.
Correct the full-key slot count before implementation
If the rank-minter is implemented from this gate, the full-key alternative is internally inconsistent: the canonical key layout is 16 bytes (CLAUDE.md:1288-1295), and this table accounts for classid 4B + HEEL/HIP/TWIG 6B + trailing family/identity 6B, but this line defines full-key as only 6 pairs / 12 bytes. Choosing that branch would either leave 4 bytes unmapped or force classid into a different slot width, so the pair/slot units need to be reconciled before this becomes the packer contract.
Useful? React with 👍 / 👎.
…bstrate The doc was authored without awareness that V3 shipped (#613/#614 FacetCascade, #615 mint_for). Three alignments; the AST-as-(part_of:is_a) idea is preserved: - Slot-count "open gate" CLOSED: facet.rs FacetCascade = facet_classid(4) | 6x(8:8) = 6 tiers (HEEL.HIP.TWIG.LEAF.family.identity), const_-asserted = the full-key 6-pair/12-slot answer; the key carries the 4-tier routing prefix (NiblePath::from_guid_prefix_v3), the complete address is the FacetCascade value facet. Nothing left to ratify. - Carrier NOT missing: FacetCascade is content-blind and already lists (part_of:is_a) as a consumer projection (hi_chain=part_of, lo_chain=is_a). Only the deterministic rank-minter is genuinely new; it writes into existing tiers (no new type/layout). - classid row is 0x1000_0700-shaped (shipped CLASSID_OSINT_V3: marker hi u16, domain on lo u16); its (part_of:is_a) ordering flagged OPEN pending the operator's Canon:Custom correction. Doc-only, CONJECTURE status retained. Claude-Session: https://claude.ai/code/session_01TANd15SECEb1Gm4cpaRVD9
|
V3 substrate alignment + brick 2 is now built Two updates relevant to this doc's Open gate and Next bricks: 1. The slot-allocation gate is settled by what shipped. The open question — path-only (3 pairs / 6 B) vs full-key (6 pairs / 12 slots) — is resolved by the V3 substrate that landed in #613/#614/#615: the carrier is 2. Brick 2 (the deterministic rank-minter) is built.
Still open, deliberately not prejudged: the Net: brick 1 (formal slot-allocation ratification, epiphany-council) becomes a confirm-the-shipped-reality step rather than an open design fork, and brick 3 (the MedCare Generated by Claude Code |
Follow-up to #616. The merged doc stated the *what* (AST as the (part_of:is_a) GUID address); this adds the *why*, grounded in shipped contract code verified this session: - Layer 1 — rails-shaped semantic AST at assembler cost: the four facet.rs SIMD lanes ARE the LSP ops (definition=vpcmpeqd, typeHierarchy=vpxor+tzcnt, ...). Declarative shape is the precondition. - Layer 2 — static OGAR / dynamic ClassView / askama: the class_view.rs XML/XSD/ClassView/XSLT ladder + C2 (presence-never-semantics) and N3 (append-only positions) = how a row view evolves 17 years (Redmine) without breaking persisted rows. View AND conditional classaction are the two projections of ONE ClassView over the N×6×(part_of:is_a) SoA. - Layer 3 — OGAR as importable ERP-primitive stdlib + lance as compiler: ogar_codebook canonical_concept_id (import) + render_classid_for_concept (customize); cost collapses to O(consumer deltas). DO arm is ALSO wireable: ActionDef/ActionInvocation/KausalSpec (OGAR-AST-CONTRACT) is the behavioral IR; the arago/HIRO ActionHandler model (OGIT = almato/arago ontology) transcodes into it. Behavior is conditionalized at the cost of one ClassView classaction dispatch. Three honest boundaries kept explicit: (1) mechanism shipped, stdlib mostly empty; (2) DO wireable but KausalSpec-membrane-governed, and an ActionDef's internal compute is still its content; (3) cheapness requires pull-don't-reconstruct (the consumer-preflight iron rule). Status stays CONJECTURE. Verified this session: facet_mint 8/8 tests green in the zero-dep contract crate; facet.rs/class_view.rs/ ogar_codebook.rs surfaces cited exist on main. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EYvNjD8M8LMNYbRy3gq2FP
…ayoff Integrate the now-merged AST-as-(part_of:is_a)-address arc (#616 "what" + V3 alignment, #617 "why") and the facet_mint rank-minter brick into the V3 value-tenant migration plan (soa-value-tenant-migration-v2.md), as first-class roadmap rather than a side thread. §0–§6 stay operator-locked and untouched. New §7 records the *application* the two-phase sequencing exists to serve: - The why beneath §0's what: once identity is V3 (Phase 1) and the value tenants are the V3-shaped contained facet (Phase 2), a transcode source's structural AST IS its address — so minting an ERP in any consumer collapses to importing pre-minted OGIT class primitives + wiring classaction pointers; the low-code platform self-programs at assembler cost instead of re-transcoding ~500K LOC per consumer. - The arc IS this plan's (part_of:is_a) structure axis made literal — the shipped FacetCascade read as hi_chain=part_of / lo_chain=is_a is the "shadow the V3 key casts" §1 already names; downstream of BOTH phases. - The brick chain mapped onto the phases + gates: brick 1 (slot allocation) LOCKED by the shipped FacetCascade; brick 2 (facet_mint rank-minter) BUILT (360fc72); brick 3 (MedCare ruff_csharp_spo -> mint -> SoA -> typeHierarchy probe, MedCareV2 oracle) PENDING = the single CONJECTURE->FINDING gate. - Canon:Custom is ONE lock shared with §2.2: the minter's facet_classid is a parameter, so resolving canon(hi):custom(lo) settles both the Phase-1 classid entries and the minter's row-0 ordering in one decision. Arc stays [S]->[H] CONJECTURE; gate F-code via brick 3. Header pointer added; cross-refs extended (ast doc, facet_mint, ruff #29). Board: LATEST_STATE note prepended (2026-06-26). Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TANd15SECEb1Gm4cpaRVD9
Session handover for the next session: what shipped (#616 merged, #617 merged, ruff #29 open), the three-layer thesis, the V3 state (OSINT/FMA/ CPIC all wired as of #618 — none by this session), the built-but-unmerged minter (facet_mint @ serene-mayer 360fc72, 8 tests green), and the brick-3 MedCare probe as the single CONJECTURE→FINDING gate. Includes the burn/owl corrections and the sync-first discipline. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EYvNjD8M8LMNYbRy3gq2FP
Cross-links the parallel V3-identity/genome session (614/615/618, q2/cpic NARS prototype, CYP2D6 falsifier) as the companion half of the arc. Three corrections their handover surfaced: - mint OGIT->codebook is a CROSS-REPO arc (ogar-vocab + contract CODEBOOK + lance-graph-ogar parity together), per ISS-OGAR-GENETICS-MIRROR-PENDING / E-CODEBOOK-MINT-IS-A-CROSS-REPO-ARC — not a local wire. - Canon:Custom flip must be atomic over the COMPLETE V3 set (OSINT+FMA+ CPIC), now unblocked by #618 (I-LEGACY-API-FEATURE-GATED). - Board-hygiene debt logged: #616/#617 shipped without same-commit EPIPHANIES/PR_ARC/LATEST_STATE updates; fold into the next PR alongside the companion's outstanding 614/615/618 rows. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EYvNjD8M8LMNYbRy3gq2FP
What
Adds
.claude/knowledge/ast-as-partof-isa-address.md— the consolidated design for storing a transcode source's structural AST as the (part_of:is_a) GUID address itself in the lance-graph SoA, instead of as SurrealQL AST/DDL or a raw syntax tree.This closes the loop from the
ruff_*_spoharvest family (Python/Odoo, Ruby/Rails, C++/Tesseract, and the new C#/Roslynruff_csharp_spo) to the OGAR Core, and makesruff-lspthe natural read/serve surface.The claim (all CONJECTURE — not built, not measured)
is_a(taxonomy/typing) = the TISSUE/what byte;part_of(mereology/membership) = the PLACE/where byte. The harvest'sinherits_from/rdf:typeandhas_field/has_functionmap straight onto them.SURREAL-AST-AS-ADAPTER.md). The (part_of:is_a) GUID + lance SoA is the spine.ruff_spo_triplet::ModelIR. Sink the rails-shaped declarative class body (a bag of typed declarations, each a part_of/is_a edge), never a rawCSharpSyntaxTree.I-VSA-IDENTITIES— it encodes identity positions, never bundles content.CausalEdge64/ActionDef, keyed by the GUID, never encoded in it.ruff-lspis the language-agnostic serve surface —typeHierarchy= walk is_a;documentSymbol= the part_of tree;definition= address lookup.Open gate (flagged in the doc, NOT decided here)
Whether part_of:is_a is path-only (3 pairs / 6 bytes over HEEL/HIP/TWIG, per
guid-canon-and-prefix-routing.md'spath = CAM-PQ 6×256 = 3 tiers) or full-key (6 pairs / 12 slots over the whole GUID, per the operator's "6× part_of:is_a (6 × 2 = 12 slots)" framing). This must be ratified against the V3 mint canon (PR #615 lineage) before any packer is written — building against the wrong allocation is theI-LEGACY-API-FEATURE-GATED/ Frankenstein risk.Next bricks (ordered, each gated on the prior)
ruff_spo_address, pure std).ruff_csharp_spoharvest → mint → lance SoA →typeHierarchy/definitionquery, withMedCareV2as the parity oracle.Scope
Documentation only — one new knowledge doc, Status: CONJECTURE, with
READ BY:header (integration-lead, truth-architect, core-first-architect, family-codec-smith, baton-handoff-auditor). No code, no contract surface touched.🤖 Generated with Claude Code
Generated by Claude Code
Summary by CodeRabbit