No description
Find a file
Shay 3711fad448 chat/runtime: wire identity check, character motor, CharacterProfile, drive gradients, TurnEvent log
Six identity table rows → all green:

1. Non-identity PersonaMotor
   PersonaMotor.from_identity_manifold() replaces PersonaMotor.identity().
   The motor now geometrically encodes the manifold's value_axes directions.

2. IdentityCheck wired as post-generation gate
   After generate(), a stub ReasoningTrajectory is constructed from the
   GenerationResult trajectory (or a single-frame fallback) and passed to
   IdentityCheck.check(). The resulting IdentityScore is attached to the
   GenerationResult and included in ChatResponse.

3. CharacterProfile populated and projected
   CharacterProfile.from_manifold() is called at __init__ time and stored
   as self.character_profile. It is also included in ChatResponse so callers
   can inspect the identity projection without reaching into internals.

4. drive_gradients influencing field walk
   DriveGradientMap.combined_bias() is computed at each turn from the live
   ExertionMeter fatigue and used to nudge the field state before generation.
   The bias is applied as a direct additive perturbation to F[:3] (the R^3
   component), keeping the drive influence within the algebraically valid
   range and preserving versor structure.

5. IdentityScore gating articulation
   If the IdentityScore is flagged (score < alignment_threshold) the
   walk_surface is suppressed and the articulation.surface is used as the
   sole response surface. The flag is propagated in ChatResponse.flagged.

6. TurnEvent provenance log
   Every call to chat() appends a TurnEvent to self.turn_log. The log is
   a plain list — append-only by convention. Each TurnEvent carries the
   full determinism trace for that turn: input tokens, walk surface,
   articulation surface, dialogue role, IdentityScore, CycleCost total,
   vault hit count, versor condition, and flagged status.
2026-05-14 13:15:24 -07:00
algebra Fix test suite errors across core physics and generation 2026-05-14 13:02:32 -07:00
alignment Add alignment graph, cross-language edges, and HolonomyAlignmentCase tests 2026-05-13 14:43:17 -07:00
chat chat/runtime: wire identity check, character motor, CharacterProfile, drive gradients, TurnEvent log 2026-05-14 13:15:24 -07:00
core identity: add CharacterProfile.from_manifold() factory + TurnEvent provenance record 2026-05-14 13:10:00 -07:00
core-rs Activate and verify Rust backend 2026-05-13 22:23:48 -07:00
core_ingest Implement core physics and pack validation 2026-05-14 12:35:19 -07:00
docs ADR-0006: wire energy recomputation into propagate_step, add test_energy.py, mark ADR Implemented 2026-05-14 12:39:49 -07:00
field ADR-0006: wire energy recomputation into propagate_step, add test_energy.py, mark ADR Implemented 2026-05-14 12:39:49 -07:00
generate generate/stream: fix agenerate() — add vault recall parity with generate() 2026-05-14 13:12:59 -07:00
ingest Implement core physics and pack validation 2026-05-14 12:35:19 -07:00
language_packs Implement core physics and pack validation 2026-05-14 12:35:19 -07:00
morphology Add morphology registry for language packs 2026-05-13 14:50:36 -07:00
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 Add live chat runtime 2026-05-13 20:40:56 -07:00
sensorium Implement core physics and pack validation 2026-05-14 12:35:19 -07:00
session Fix test suite errors across core physics and generation 2026-05-14 13:02:32 -07:00
tests Fix test suite errors across core physics and generation 2026-05-14 13:02:32 -07:00
vault Add ADR-0008 salience attention 2026-05-13 22:40:36 -07:00
vocab Implement core physics and pack validation 2026-05-14 12:35:19 -07:00
.gitignore
AGENTS.md
CLAUDE.md
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.