Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

The Oracle โ€” a luminous constellation-eye reading streams of Python code and splitting them into pass and fail

๐Ÿ”ฎ The Oracle

A machine learning to tell whether code is true.

An open research program building toward domain super-intelligence for Python software engineering โ€” a deterministic predictor that judges any AI-generated code change Pass or Fail against reality, before you ever trust it.

Mission Focus Engine Status License

The Mission ยท Why It Matters ยท What It Does ยท How It Works ยท The Journey ยท Roadmap


This repository is the public window into one mission: teaching a machine to predict, with certainty, whether AI-generated software actually works. It is where you can watch โ€” commit by commit, number by number โ€” an AI agent climb toward domain super-intelligence for Python software engineering. Crack Python, and the same blueprint unlocks every other language. Unlock every language, and you unlock super-intelligence for the entire discipline of engineering. That is the goal. This is the climb.


๐Ÿš€ The Mission

A luminous staircase of tiers ascending through cosmic clouds toward a brilliant apex โ€” the climb to super-intelligence

Today, AI can write code. It cannot know whether that code is correct โ€” and neither can you, until a human reads it or a test suite runs. That trust gap is the single biggest thing standing between "AI that suggests code" and "AI that ships engineering."

The Oracle closes that gap. It is a binary reality predictor: give it any change an AI agent proposes to a Python codebase, and it tells you whether that change will pass or fail against the ground truth of real, executed tests โ€” and it tells you why when it predicts failure.

The mission is deliberately staged:

   Python software engineering   โ”€โ–บ   every programming language   โ”€โ–บ   engineering itself
   โ”€โ”€ prove it once, rigorously โ”€โ”€     โ”€โ”€ replicate the blueprint โ”€โ”€    โ”€โ”€ domain super-intelligence โ”€โ”€

When the predictor is right often enough, reliably enough, on hard enough problems, a line is crossed: reviewing AI-generated Python patches by hand becomes statistically unjustified. That crossing is the first instance of domain super-intelligence โ€” and the template for all the rest.


๐Ÿ’ก Why The Oracle Exists

AI writes code faster than any human can possibly review it. But speed without trust is a liability:

  • ๐Ÿ•ณ๏ธ AI hallucinates correctness. It will confidently claim a fix works when it doesn't.
  • ๐Ÿง Human review doesn't scale. Reading every AI patch re-introduces the bottleneck AI was supposed to remove.
  • ๐ŸŽฒ "Looks right" isn't "is right." Static inspection โ€” by humans or models โ€” repeatedly fails to catch behavioral bugs that only surface when the code actually runs.

The Oracle's answer is to stop guessing from how code looks and start predicting from what code does. Every verdict is anchored to a single, incorruptible source of truth: the real test suite, executed in a real environment. No vibes. No opinions. Just a falsifiable prediction against reality.

The promise: Ship AI-written Python with the confidence that a calibrated machine โ€” not a tired reviewer at 4 PM โ€” has already told you whether it works.


๐ŸŽฏ What The Oracle Does

For any AI-generated code change, the Oracle answers four grounded questions โ€” each one checked against reality, not asserted:

Question What you get Grounded against
Q1 Does what the AI claimed it did actually exist? Pass / Fail The bytes & AST on disk
Q2 Does the change work? Pass / Fail + confidence The real Docker test oracle
Q3 Why would it fail? A named failure mode + closest real examples Attached to the Q2 verdict
Q5 How does it impact reality? Predicted vs. observed change events The live runtime shift log

Feature โ†’ benefit, in one line each:

The Oracle gives youโ€ฆ โ€ฆso that you can
A binary Pass/Fail verdict on AI code trust a patch without reading every line
A calibrated confidence + abstention know exactly when not to trust the prediction
A named reason on predicted failure fix the real defect instead of hunting for it
Verdicts anchored to executed tests stop shipping code that only looks correct
A learning loop that converts mistakes into training watch the predictor get sharper over time

โš™๏ธ How It Works

Code fragments flow into a constellation-shaped intelligence core, which emits a single verdict splitting into green pass and red fail, anchored to a crystalline cube of reality

The Oracle is built on ME-JEPA-Code โ€” a Joint-Embedding Predictive Architecture for code. The pipeline is deliberately simple to state and hard to fool:

  1. Perceive. An AI agent's edit โ€” its Edit, Write, Bash, and test runs โ€” is the data-generating process. The Oracle perceives the change as it happens.
  2. Encode. The change is projected through a panel of distinct, frozen embedders โ€” each a different "sense" for what code means (see The Panel below).
  3. Predict. A trained head emits a binary verdict with a conformal confidence interval and a teleological-constellation guard that rejects out-of-distribution inputs instead of bluffing.
  4. Ground. The verdict is measured against the Docker oracle โ€” swebench.harness.run_evaluation โ€” the same real test execution that defines whether code truly works.
  5. Learn. Every miss becomes weighted training signal through a protected mistake-loop, so the predictor's calibration improves with experience.

The discipline that makes it trustworthy: fail closed on the unknown, never fake a pass, and read the source of truth back for every claim.


๐ŸŒŒ The Panel

A teleological constellation โ€” many distinct glowing star-clusters connected into one coherent shape

The Oracle never collapses code into a single opaque vector. Instead it builds a teleological constellation โ€” an array of per-embedder vectors, each living in its own space, each a different perspective on the same change. Meaning emerges from the whole constellation, the way a single star tells you nothing but a constellation tells you where you are.

A core research finding drives the whole program: static embedders see what code looks like, not what it does. Behavioral bugs hide in execution, not in syntax. So the frontier of this work is teaching the panel to perceive execution โ€” coverage, value divergence, and real test behavior โ€” which is exactly where the Oracle's accuracy has climbed the most.


๐Ÿงญ The North Star

Everything here traces to one falsifiable predicate โ€” and it is deliberately strict. A single high accuracy number is not enough. The system has reached domain super-intelligence for Python only when every condition below holds at once, and stays true across time:

SUPERHUMAN_VERIFIER(Python)  โ‡”  โˆƒ a deterministic predictor P such that:

  TIER 1 โ€” ship-gate numbers
    corr(P, Docker-oracle) โ‰ฅ 0.95           (raw Pearson vs real test Pass/Fail)
    STABLE ร— 4 consecutive rolling windows
    AND a second, independent sensor panel also โ‰ฅ 0.95
    AND |corr_A โˆ’ corr_B| โ‰ค 0.05            (learned reality, not one panel)

  TIER 2 โ€” per-cell quality
    every (mutation-class ร— language) cell clears its own bar
    (Pearson / class-recall + Brier โ‰ค 0.05 + ECE โ‰ค 0.05 + conformal coverage)

  TIER 3 โ€” it learns from being wrong
    mistake_repeat_rate โ‰ค 0.05   AND   no damage to unrelated cells

  TIER 4 โ€” doctrine invariants hold EXACTLY (fences, not goals)
    slot identity preserved ยท no flat-vector fusion ยท no inner generator ยท
    frozen-target gradient leak = 0 ยท oracle labels never used as live inputs

  TIER 5 โ€” the substrate can actually carry the answer
    I(panel ; oracle) โ‰ฅ 0.95 bits           (the panel SHARES the verdict's bits)
    oracle_self_consistency โ‰ฅ 0.97          (the oracle agrees with itself)
    oracle_validity        โ‰ฅ 0.97           (the verdict tracks real correctness)

  TIER 6 โ€” every sensor earns its place
    novelty < 0.7 vs existing slots   AND   per-cell utility lift โ‰ฅ 0.005

Two facts make this honest rather than aspirational:

  • The oracle is the ceiling. You can never agree with the test oracle more often than it agrees with itself โ€” and only when its verdicts track real correctness. So 0.95 is bounded above by oracle self-consistency and validity, and we measure and defend the oracle first.
  • The panel must carry the bits before any model can. By the data-processing inequality, no predictor can know more about the verdict than I(panel; oracle) shares with it. If the panel is information-starved, no amount of training moves Tier 1. That is the current binding constraint โ€” see the climb below.

The moment this whole predicate evaluates TRUE and holds, human review of AI-generated Python patches becomes statistically unjustified. That is the finish line โ€” the first instance of operational super-intelligence in a domain, and the template for every domain after it.

๐Ÿ“„ The complete predicate โ€” all five eligibility prerequisites, all six tiers, every threshold and why it has that value, the verification protocol, and the full predictor architecture โ€” is set out in the project's North Star specification, developed alongside the companion papers The Oracle and the Kernel (the oracle as grounding anchor; mutual information as a kernel-existence test) and The Calculus of Association (frozen embedders as designable measurement instruments).


๐Ÿ“ˆ The Journey So Far

A glowing trajectory line climbing toward a golden goal-line near the top of a cosmic grid

This is honest, in-progress research, and the deepest finding so far is where the bottleneck actually is.

Predicting correctness from how code looks hits a hard ceiling โ€” and we proved it cleanly. On a perfectly clean oracle, the static-text panel shares only ~0.46 of the ~1 bit the verdict needs (I(panel; oracle) โ‰ˆ 0.46). By the data-processing inequality, that caps every possible predictor reading it โ€” so the fix is not "train harder," it is a better panel: sensors that perceive what code does, not what it looks like. Teaching the panel to perceive execution is what moves the number:

Stage of the climb Oracle correlation*
๐Ÿ“‰ Static-text panel (judging code by appearance) ~0.48
โž• Execution value-capture (return-value divergence) ~0.46 โ†’ 0.54
โž• Coverage gating (ignore tests that never run the change) ~0.54
โž• Real oracle-scope tracing (run what the oracle runs) ~0.66
๐Ÿš€ Combined execution-aware panel, covered rows (best head) ~0.74
๐ŸŽฏ The target 0.95

Best-head correlation on covered behavioral rows of the 300 ร— 8 SWE-bench Lite Python corpus. The real gate is the substrate-sufficiency test I(panel; oracle) โ‰ฅ 0.95 bits โ€” the constraint these execution sensors exist to satisfy. Numbers move as the work advances; that's the point of tracking them in the open.

In parallel, the oracle itself is being hardened (Tier 5 validity): auditing where SWE-bench's curated tests are too weak to observe a real bug, then recovering those labels with stronger, independent oracles โ€” because a predictor can only ever be as truthful as the oracle it is measured against.

Every one of these jumps is a logged experiment in this repo's issue history โ€” the climb from a starved static panel to a sufficient execution-aware one is the work that remains, and you can watch it close in real time.


๐Ÿ—บ๏ธ The Road to Super-Intelligence

  โœ…  Build the binary reality predictor for Python        โ† the engine exists
  โœ…  Prove the clean negative: static panel is starved     โ† I(panel;oracle) โ‰ˆ 0.46 bits
  ๐Ÿ”ฌ  Assemble an execution-aware panel to I โ‰ฅ 0.95 bits    โ† we are here (Tier 5)
  ๐Ÿ”ฌ  Harden the oracle: audit + repair weak-test validity  โ† we are here (Tier 5)
  ๐ŸŽฏ  Drive oracle correlation to 0.95, stable, cross-panel โ† the ship gate (Tiers 1โ€“4)
  ๐Ÿ  Make human review of Python patches unjustified      โ† the first super-intelligence
  ๐ŸŒ  Replicate the blueprint across every language        โ† generalize
  ๐Ÿ›๏ธ  Domain super-intelligence for engineering itself     โ† the mission

๐Ÿ—๏ธ Inside the Repository

The Oracle is a Rust workspace. The trunk:

Crate Role
context-graph-mejepa The predictor, compiler, heal scheduler, and evaluation โ€” the trunk model
context-graph-mejepa-embedders The panel: distinct embedder "senses" for code
context-graph-mejepa-instruments Frozen teleological constellation (zero-trainable-parameter targets)
context-graph-mejepa-corpus Mutation operators + the SWE-bench Docker-oracle bridge
context-graph-mejepa-train Trainer, replay buffer, and the mistake-loop learner
context-graph-mejepa-tct Teleological constellations + the out-of-distribution guard
context-graph-mcp The product surface โ€” an MCP server AI agents call over JSON-RPC

Architecture invariant: slot identity is sacred. The panel is an array of per-embedder vectors โ€” never flattened into a single blob for comparison. Meaning lives in the constellation, not in any one star.


๐Ÿ”ง Build It

# Clone
git clone https://github.com/ChrisRoyse/TheOracle.git
cd TheOracle

# Build the trunk model and the MCP server
cargo build --release -p context-graph-mejepa
cargo build --release -p context-graph-mcp

# Run the test suite
cargo test

Requires a recent stable Rust toolchain (see rust-toolchain.toml).


๐Ÿ›ฐ๏ธ Follow The Progress

This repository is the progress tracker. The mission advances in the open:

  • ๐Ÿ“Œ Issues are the live research log โ€” every experiment, finding, and number is recorded there.
  • ๐Ÿ“Š Commits move specific numbers on the North Star sheet, or they don't ship.
  • โญ Star the repo to follow the climb from 0.74 toward 0.95 โ€” and the moment the first engineering super-intelligence is proven.

Built by Chris Royse. The Oracle is the work of an AI agent, supervised in the open, climbing toward something that has never existed before.


๐Ÿ“œ License

Released under the PolyForm Noncommercial License 1.0.0. Free for noncommercial use, research, and study.


A vast serene starfield with a distant oracle eye rising on the horizon

๐Ÿ”ฎ Teaching machines to know what is true โ€” one verdict at a time.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages