Joint Embedding Predictive Architecture for code

j3

The next coding agent should understand a repository as a world, predict what edits will do, and verify each action before it writes.

  • Predict latent repo consequences
  • Act through structured patches
  • Verify against executable signals

The thesis

Coding agents need world models, not longer prompts.

Today’s agents mostly read text, sample patches, run tools, and try again. j3 explores a different primitive: learn the dynamics of a codebase, then choose edits by predicted effect.

  • LLM agents Generate source text first, then discover consequences by running tests after the fact.
  • JEPA agents Predict latent future states first, then spend execution on edits likely to move the repo forward.
  • Human role Provide goals, tests, constraints, and review; the engine plans within a verifiable action space.
  • End state Local coding infrastructure that improves by observing real transitions, not by buying more tokens.

Architecture

Joint embeddings make code change a prediction problem.

A Joint Embedding Predictive Architecture learns compact representations of repo state, edit actions, and target outcomes. The agent asks which action moves this code world toward the desired future.

Why it matters

The best coding agent will be cheaper, more local, and more causal.

LLMs are powerful language interfaces. But the patch engine should be trained on how repositories actually change, how tests respond, and which actions repair behavior.

1

Less token churn

Cache repo embeddings, rank compact actions, and reserve expensive reasoning for places where language is actually needed.

2

More reliable edits

A constrained patch space can be inspected, replayed, diagnosed, and improved without pretending raw text sampling is planning.

3

Native local learning

Public repos, synthetic break/fix transitions, and local test outcomes become training signal for the next repair attempt.

Agent primitive

Language can describe intent. JEPA should choose the edit.

The long-term architecture keeps LLMs where they are strongest: translating messy human requests into objectives, constraints, and tests. The repair engine remains predictive and verifiable.

Layer LLM-first JEPA-first Goal
Planning Sample text Predict effects Fewer blind trials
Memory Prompt context Repo embeddings Persistent code state
Safety Review generated diff Validate action outcomes Trust through execution

The claim is architectural: LLMs can remain useful adapters, but the core patch planner should be a code-world predictor.

Where j3 is going

A local repair engine that compounds with every repo transition.

The destination is not another chat wrapper. It is open-source infrastructure for coding agents that learn action dynamics, preserve human control, and run on developer hardware.

Near

Broader structured action space

Imports, attributes, call shapes, guards, conditions, signatures, and narrow exception repairs become first-class actions instead of accidental text edits.

Next

Trainable candidate ranker

Positive and negative validation traces teach the system which repo-state, failure-signal, and action combinations are likely to pass.

Later

Full neural repo JEPA

A compact local model predicts future repository embeddings, searches structured edit trajectories, and validates only the most promising futures.

Open source invitation

Help build the agent that predicts code change before it writes code.

j3 is a bet that the future of coding agents is local, world-model-driven, and validated by execution.

View source