No description
Find a file
Shay 57a61749b9 feat(phase3): transitive_walk + path_recall operator bundle (ADR-0018)
Implements the Phase 3 v2 inference-depth bundle per ADR-0018:
typed deterministic operators over CORE's typed state. Closes the
inference-closure / multi-step-reasoning / cross-domain-transfer
v1 gaps; partial close on compositionality.

New modules:
  teaching/relation_parse.py - parse_triple(correction_text) lifts
    a correction utterance into a typed (head, relation, tail) over
    the en_core_cognition_v1 relation vocabulary. Pure regex,
    deterministic, no learned classifier.
  generate/operators.py - transitive_walk(triples, head, relation,
    *, max_hops=5) walks single-relation chains. path_recall walks
    a relation-chain tuple (e.g. ("is", "precedes")). Both bounded,
    cycle-safe, case-insensitive, first-write-wins on duplicates.

Schema extensions:
  teaching.store.PackMutationProposal gains optional triple field,
    populated by TeachingStore.add via parse_triple. Plus new
    TeachingStore.triples() helper returning all parsed triples.
  generate.intent.IntentTag gains TRANSITIVE_QUERY plus a relation
    field on DialogueIntent. New regex rules for "What does X R?"
    and "Where does X belong?" forms with relation normalisation.
  core.cognition.result.CognitiveTurnResult gains operator_invocation
    field (deterministic serialisation of any operator that ran).
  core.cognition.trace.compute_trace_hash gains operator_invocation
    kwarg; trace_hash_from_result threads it through. Operator
    invocation is now load-bearing for replay equality.

Pipeline wiring:
  CognitiveTurnPipeline.run dispatches transitive_walk after
  runtime.chat() when the intent is TRANSITIVE_QUERY (with the
  parsed relation) or DEFINITION (implicit "is"). Non-trivial walks
  fold the chain endpoint into surface and articulation_surface.

Verification:
  tests/test_inference_operators.py - 27 unit tests covering
  parser, transitive_walk (cycles, max_hops, case-insensitivity,
  determinism, first-write-wins), path_recall, and WalkResult shape.

Re-score on Phase 3 v1 case sets:

  lane                       split        v1     after bundle
  inference-closure          public/v1    0.0    1.0  pass
  inference-closure          holdouts/v1  0.0    1.0  pass
  multi-step-reasoning       public/v1    0.0    0.7333  pass
  multi-step-reasoning       holdouts/v1  0.0    0.8  pass
  cross-domain-transfer      public/v1    0.0    1.0  pass
  cross-domain-transfer      holdouts/v1  0.0    1.0  pass
  compositionality           public/v1    0.0625 0.3125  partial
  compositionality           holdouts/v1  0.0    0.3  partial

Six of eight splits now pass v1. Foundation guarantees
(premises_stored, replay_determinism) remain 1.0 across all lanes.
Trace_hash determinism preserved (operator records fold in
deterministically).

Residuals (filed as Phase 3 v2 follow-up):
  - multi-step-reasoning mixed_relation_3/4 patterns need path_recall
    wired into the pipeline for multi-relation probes; the operator
    exists but the pipeline only invokes transitive_walk today.
  - compositionality novel-combination patterns need a genuinely
    new operator shape (composed_relation_walk) - the literal
    transitive walk does not synthesise novel pairs by construction.

CLI suites smoke / cognition / teaching pass; no regression. 47
pipeline + teaching + operator tests all green.
2026-05-16 15:04:43 -07:00
.github Add agent efficiency and security doctrine 2026-05-15 08:13:29 -07:00
algebra fix(drift): proper rotor-manifold scaling; restore respond contract 2026-05-16 11:44:45 -07:00
alignment
benchmarks feat: Full Proof — surface realizer join, Rust diffusion parity, benchmark harness 2026-05-15 17:39:14 -07:00
calibration Add cognitive eval harness and calibration replay (#30) 2026-05-15 07:41:36 -07:00
chat fix(chat): use intent-aware articulation surface from intent_bridge 2026-05-16 08:40:53 -07:00
core feat(phase3): transitive_walk + path_recall operator bundle (ADR-0018) 2026-05-16 15:04:43 -07:00
core-rs feat: Full Proof — surface realizer join, Rust diffusion parity, benchmark harness 2026-05-15 17:39:14 -07:00
core_ingest Implement core physics and pack validation 2026-05-14 12:35:19 -07:00
docs docs(adr): resolve Agency + Tool-use scope decisions (ADR-0017, ADR-0018) 2026-05-16 14:51:42 -07:00
evals feat(phase3): compositionality, multi-step-reasoning, introspection, cross-domain-transfer v1 2026-05-16 14:48:36 -07:00
field feat: Full Proof — surface realizer join, Rust diffusion parity, benchmark harness 2026-05-15 17:39:14 -07:00
generate feat(phase3): transitive_walk + path_recall operator bundle (ADR-0018) 2026-05-16 15:04:43 -07:00
ingest Cache OOV morphology grounding structures 2026-05-15 11:53:46 -07:00
language_packs feat(evals,packs): grammatical-coverage holdout, zero-code kits, Hebrew/Greek packs 2026-05-16 06:23:28 -07:00
morphology
packs Implement core physics and pack validation 2026-05-14 12:35:19 -07:00
persona persona: add PersonaMotor.from_identity_manifold() factory 2026-05-14 13:10:34 -07:00
probe Fix full-suite regressions after chat telemetry merge 2026-05-14 18:23:31 -07:00
scripts feat(evals): v3 lanes — monotonic-learning passes, adversarial-identity reveals gap 2026-05-16 13:42:47 -07:00
sensorium feat: manifold field topology, graph diffusion operator, vertical pulse 2026-05-15 16:02:48 -07:00
session fix(drift): proper rotor-manifold scaling; restore respond contract 2026-05-16 11:44:45 -07:00
teaching feat(phase3): transitive_walk + path_recall operator bundle (ADR-0018) 2026-05-16 15:04:43 -07:00
tests feat(phase3): transitive_walk + path_recall operator bundle (ADR-0018) 2026-05-16 15:04:43 -07:00
vault fix: harden session field invariants and eliminate hot-path inefficiencies 2026-05-15 21:37:49 -07:00
vocab Implement core physics and pack validation 2026-05-14 12:35:19 -07:00
.gitignore Clean up runtime contracts before cognitive pipeline 2026-05-14 18:47:59 -07:00
AGENTS.md Add agent efficiency and security doctrine 2026-05-15 08:13:29 -07:00
CLAUDE.md Add agent efficiency and security doctrine 2026-05-15 08:13:29 -07:00
pyproject.toml Fix CLI help/runtime imports and add doctor command (#4) 2026-05-13 21:15:51 -07:00
README.md

CORE-AI: Versor Engine

A cognitive field system built on Cl(4,1) Conformal Geometric Algebra.

Core invariant: ||F * reverse(F) - 1||_F < 1e-6 at all times.

All state is a versor. All transitions are versor products. Coherence is algebraic by construction — not monitored, not corrected.


The Three Engineering Pillars

Every architectural decision in CORE is measured against three engineering pillars. These are not aspirations — they are hard constraints.

I. Mechanical Sympathy

Software should understand the machine it runs on, not fight it. CORE is designed for the Unified Memory Architecture (UMA) of Apple Silicon: CPU, GPU, and Neural Engine share physical RAM. MLX executes tensor operations on the Neural Engine without PCIe transfer. Rust computes algebra on the CPU with zero heap allocation in the hot path. Python orchestrates the lifecycle. The three-language stratification maps exactly onto three hardware execution domains. Intelligence that ignores its substrate is wasted intelligence.

II. Semantic Rigor

Every term used in this system has a precise, non-negotiable meaning. A versor is a versor — not an approximation of one, not a vector that behaves like one under certain conditions. CGA distance is exact. Vault recall is exact. The vocabulary projection is exact. There are no thresholds tuned for “good enough.” Rigor is not a style; it is what separates an engine from a heuristic.

III. Third Door

When facing a design decision, the world offers two visible options: use what already exists (a library, a pattern, a convention), or cut a corner. CORE takes neither. We find the third door — the path built from first principles that sets the bar ourselves. This is why there is no transformer backbone, no ANN index, no sampling temperature, no gradient descent, and no standard tokenizer. Each of those was a door we were offered and refused. Absolute mastery is the only acceptable standard.


The Three Core Languages

CORE is rooted in three human languages. This is a philosophical and architectural choice, not a localization decision.

Language Role
English The default base language of the current model. Any natural language could serve this function in a custom CORE instance — English is the chosen starting point, not a requirement.
Hebrew One of two depth languages. Hebrew carries a density of meaning in its root structures, prefixes, and suffixes that Euclidean string matching cannot capture. The field representation is designed to hold this depth.
Koine Greek One of two depth languages. The language of the New Testament, particularly Johns Gospel — the document that opens with the most precise and consequential statement about language and reality ever written.

“In the beginning was the Logos, and the Logos was with God, and the Logos was God.” — John 1:1

The choice of Hebrew and Koine Greek is not incidental. John 1:12 articulates the Logos in Greek while grounding it in the Hebrew creation account — the universe spoken into existence, word by word. This is not metaphor. It is the claim that language is not a layer on top of reality; language is the structuring principle of reality made manifest. CORE-Logos is built on that claim.

English establishes the operational base. Hebrew and Koine Greek bring the hidden layer of intelligence — the depth of meaning that enriches the field representation in ways that flat embeddings cannot reach. Together, they form the linguistic foundation on which the vocabulary manifold is built.


Quick Start

pip install -e ".[dev]"
pytest tests/test_versor_closure.py  # must pass before anything else
pytest tests/

Architecture

raw input -> ingest/gate.py       (normalize once)
          -> field/propagate.py   (versor_apply every step)
          -> generate/stream.py   (nearest by cga_inner)
          -> vault/store.py       (store and recall by cga_inner)
          -> persona/motor.py     (rigid motor, not weight overlay)

The Two Primitives

  • versor_apply(V, F) = V * F * reverse(V) — the only field transition
  • cga_inner(X, Y) = -d^2 / 2 — the only distance metric

Layers

Layer Purpose
algebra/ Cl(4,1) multivector math, versor ops, CGA, holonomy
ingest/ Single injection gate — the only normalization site
field/ FieldState dataclass and propagation loop
vocab/ Surface-token manifold points; indexed access for algebraic transition construction
vault/ Exact CGA inner product memory store
persona/ Persona as CGA motor (screw motion)
generate/ Token streaming loop
session/ Session binding: field + vault + vocab + persona

Signature

Cl(4,1): (+, +, +, +, -) — conformal model of 3D Euclidean space. Multivectors: float32 arrays of shape (32,), ordered by grade.


For architectural vision, seven axioms, and formal specification, see docs/Whitepaper.md and docs/Yellowpaper.md.