Skip to content

The endgame: a knowledge graph that reasons about itself (self_directed_graph, no LLM)#756

Merged
AdaWorldAPI merged 2 commits into
mainfrom
claude/happy-hamilton-0azlw4
Jul 19, 2026
Merged

The endgame: a knowledge graph that reasons about itself (self_directed_graph, no LLM)#756
AdaWorldAPI merged 2 commits into
mainfrom
claude/happy-hamilton-0azlw4

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

What

crates/lance-graph/examples/self_directed_graph.rs — the capstone the whole persistent-NARS-KG arc was building toward: a TripletGraph that reasons about itself, with no LLM and no external input after the seed. Additive: one example + board only, no core change.

cargo run -p lance-graph --example self_directed_graph

The loop (autonomous — surprise drives everything)

  1. Introspect — the graph reads its own beliefs into a free energy (open contradiction = high, fillable gap = mid, nothing = rest).
  2. Self-direct — saccades to its highest-surprise locus; its own state feeds the shipped select_tactic.
  3. Think — contradiction → preserve both poles; gap → infer_deductions (NARS 2-hop over its own edges); re-derivation → confirm.
  4. Commitrevise_with_evidence writes the conclusion back into the graph, reshaping the next cycle's surprise.
  5. Halts when nothing surprises it — a coherent fixed point.

The loop IS the cognition; the graph IS the tissue it reads from and writes to.

Measured (8-belief seed, no LLM, 6 KILL-gates green)

  • self-model grew 8 → 14 beliefs by reasoning.
  • ★ the syllogism self-derived — the graph concluded socrates … mortal over its own edges (f=f₁f₂, c=f₁f₂c₁c₂); confidence 0.76 (path via greek) → 0.81 confirmed by a 2nd independent path (via human) — the multi-hop witness, self-applied. No LLM produced that conclusion; the loop did.
  • self-directed order — contradiction (F=0.85) before gaps (0.45) before confirmations (0.25).
  • self-corrected on itself — detected oracle affirmsdenies prophecy, preserved both poles as a committed opinion + stamped a meta-belief (a belief about its beliefs — the self-reference).
  • coherent fixed point — rested, no runaway.

Honest finding (surfaced + worked around in-example)

TripletGraph::infer_deductions does relation-blind transitivity (composes any two edges sharing an entity) — unsound for non-transitive relations (praises, taught): a contradiction node spuriously inherited a whole is_a closure and broke the fixed point on the first cut. The example chains only is_a, isolates non-transitive relations on leaf nodes, and treats a same-(s,o) conflict between two (via …)-derived beliefs as a multi-path confirmation, not a conflict. Debt filed: TD-INFER-DEDUCTIONS-RELATION-BLIND (payoff: give infer_deductions a transitive-relation predicate).

Honest boundary

A small symbolic reasoner over its own edges reaching a fixed point — not general intelligence. The "AGI without LLM" claim is architectural: the cognition lives in the closed loop + the tissue (graph / witness / surprise), with no trained weights in the loop at all. That shape — not this toy's scale — is the endgame.

Board hygiene (same commit)

  • EPIPHANIES.mdE-SELF-DIRECTED-GRAPH-1 (capstone; composes E-SELF-CORRECTING-KG-1 + E-MULTIHOP-WITNESS-CONFIDENCE-1 + E-AWARENESS-INGREDIENTS-1 + E-FOVEATED-AWARENESS-1).
  • TECH_DEBT.mdTD-INFER-DEDUCTIONS-RELATION-BLIND.
  • persistent-nars-kg-v1.md — endgame-capstone note.

🤖 Generated with Claude Code

https://claude.ai/code/session_016b33swuXE23hKtqxsHu9p1


Generated by Claude Code

@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@AdaWorldAPI, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 5 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 reviews.

How do review 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 refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 72e03cbf-6546-417d-aaa3-f4e940ca9f33

📥 Commits

Reviewing files that changed from the base of the PR and between a17484d and 5902bc4.

📒 Files selected for processing (4)
  • .claude/board/EPIPHANIES.md
  • .claude/board/TECH_DEBT.md
  • .claude/plans/persistent-nars-kg-v1.md
  • crates/lance-graph/examples/self_directed_graph.rs

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cursor

cursor Bot commented Jul 19, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_128ec102-3cd7-4d1e-b017-5c01ffcaad75)

@AdaWorldAPI
AdaWorldAPI marked this pull request as ready for review July 19, 2026 10:28
…t itself (no LLM)

A TripletGraph runs one closed autonomous loop with no external input after the
seed: INTROSPECT (read its own beliefs into a free energy) -> SELF-DIRECT
(saccade to the highest-surprise locus) -> THINK (its own state feeds the shipped
select_tactic; contradiction -> preserve both poles, gap -> infer_deductions,
re-derivation -> confirm) -> COMMIT (revise_with_evidence writes the conclusion
back into itself, reshaping the next cycle's surprise) -> repeat until F < floor.
The loop IS the cognition; the graph IS the tissue.

Measured (8-belief seed, no LLM, 6 KILL-gates green):
- self-model grew 8 -> 14 beliefs by reasoning.
- the syllogism self-derived: the graph concluded `socrates ... mortal` via NARS
  2-hop over its own edges (f=f1*f2, c=f1*f2*c1*c2); confidence 0.76 (via greek)
  -> 0.81 confirmed by a 2nd independent path (via human) — multi-hop witness.
- self-directed order: contradiction (F=0.85) before gaps (0.45) before confirms.
- self-corrected on itself: detected oracle affirms/denies prophecy, preserved
  both poles + stamped a meta-belief (a belief about its beliefs).
- reached a coherent fixed point (rested, no runaway).

Honest finding, worked around in-example: infer_deductions does relation-blind
transitivity (composes any two edges sharing an entity), unsound for
non-transitive relations (praises/taught) — chained only is_a and isolated the
contradiction on leaf nodes. Debt: TD-INFER-DEDUCTIONS-RELATION-BLIND.

Boundary: a small symbolic reasoner over its own edges — the "AGI without LLM"
claim is architectural (cognition in the loop, no weights), not scale.

Board: E-SELF-DIRECTED-GRAPH-1 (capstone), TD-INFER-DEDUCTIONS-RELATION-BLIND,
persistent-nars-kg-v1 endgame-capstone note.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016b33swuXE23hKtqxsHu9p1
@AdaWorldAPI
AdaWorldAPI force-pushed the claude/happy-hamilton-0azlw4 branch from 60d5f51 to 92489b3 Compare July 19, 2026 10:30

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 60d5f51f38

ℹ️ 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".

Comment on lines +154 to +160
let confirmations: Vec<Triplet> = all_deduced
.iter()
.filter(|t| {
concluded(&g, &t.subject, &t.object)
&& !applied_confirm
.contains(&(t.subject.to_lowercase(), t.object.to_lowercase()))
})

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Require distinct evidence before confirming paths

When a previously derived edge is recomputed in the next loop, this treats it as a confirmation solely because the (subject, object) pair already exists; it does not check that the inferred relation/path differs from the one that created the edge. In a seed with only one route to socrates→mortal, the same 2-hop deduction would still enter this branch, get revised upward, and satisfy the multi-hop witness KILL gate, so the example can report independent confirmation without an independent witness.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — fixed in 5902bc4f. The confirmation branch now requires a genuinely distinct path: a deduction only counts as an independent-witness confirmation if the graph already holds that (s,o) via a different derivation relation; a same-path recompute is rejected. A single-route seed would now correctly fail the multi-hop-witness gate instead of spoofing it. socrates→mortal stays confirmed because its two paths are edge-disjoint (via greek vs via human); the spurious same-path "confirmations" (socrates→human, philosopher→mortal, plato→human) are gone. All six KILL-gates still green.


Generated by Claude Code

…756 P2)

Codex r3610377133 (P2): the confirmation branch treated any re-derived
(subject, object) as an independent-witness confirmation solely because the
pair already existed — it never checked the confirming derivation used a
DIFFERENT path than the one that created the edge. A single-route seed would
re-derive its one 2-hop fact, enter the confirm branch, revise up, and satisfy
the multi-hop-witness KILL gate without any independent witness.

Fix: a deduction only counts as a confirmation if the graph already holds that
(s,o) via a DIFFERENT relation (path); a same-path recompute is rejected. Now
only genuinely distinct-path re-derivations lift confidence. socrates→mortal
remains confirmed (edge-disjoint: via greek vs via human, 0.76→0.81); the
spurious same-path "confirmations" (socrates→human, philosopher→mortal,
plato→human) are gone. All 6 KILL-gates still green; a single-route seed would
now correctly FAIL the witness gate instead of spoofing it.

Board: E-SELF-DIRECTED-GRAPH-1 witness-gate hardening note.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016b33swuXE23hKtqxsHu9p1
@AdaWorldAPI
AdaWorldAPI merged commit c74fe23 into main Jul 19, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants