Joule Code reference consumer — energy-metered, federated, no-phone-home agentic coding editor (hard fork of Zed). See JOULE_CODE.md.
  • Rust 94.7%
  • JSON-with-Comments 2.9%
  • Inno Setup 0.5%
  • Python 0.4%
  • Tree-sitter Query 0.4%
  • Other 0.9%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
David Charlot cfe83c48a5 joule_core: Cache changes that span more than one file
joule-bench's `real` suite drew the cache's boundary exactly: every
single-file L4 close came back free on the repeat, and neither multi-file
close ever did — both paid the cloud in full again. Multi-file changes
are 53-66% of real commits, so the cascade's economics stopped at the
larger share of real work.

The open standard was never the obstacle. `Edit` has always carried its
own `path`, and SPEC §2 defines an op's `prior` as "the tree state this op
builds on". The single-file limit was ours, in three places:

- `ClaudeL4` snapshotted only `target`. For a fix with no single target
  it read an empty string before and after, concluded nothing changed,
  and returned `None` — so nothing was recorded even though the agent had
  fixed the files. That is why the benchmark graded those tasks as passed
  while the cascade cached nothing. It now snapshots the tree and records
  every changed file as one op.

- A target-less request was keyed on an empty path, giving every such
  request the same "prior". It is now keyed on the tree state.

- Replay ignored `edit.path` and spliced every edit into the one document
  in hand. A multi-file op reaching L0 would have written one file's bytes
  into another at the wrong offsets. It never happened only because no
  multi-file op had ever been recorded.

Replay onto the tree is refused unless the tree is the one the op was
recorded against, and every new file body is computed before any file is
written. A refusal costs one cloud call; a replay at the wrong offsets
would corrupt several files silently.

The tree state excludes `.joule`, the cascade's own ledger. It grows on
every close, so including it would have given each pass a different tree
and nothing could ever have hit the cache — the change would have looked
correct and never fired. Toolchain caches are excluded for the same
reason.

Proved end to end through the engine: a fix spanning two files goes to L4
once; with the tree reset, the identical request closes at L0, replays
both files, and the agent is not called again. Plus the two failure modes
that matter — a moved tree is refused with nothing written, and a
multi-file op is never spliced into a single document.

Also: the hardware energy test is now ignored by default. It read 124.9 J
and 150.4 J on an idle host and 0 J three times out of three, alone, at a
load average of 120 from unrelated builds. The doc comment previously
blamed parallel test load; the measurement says any heavy load.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-09-17 07:09:34 -04:00
.agents/skills Rebrand Zed -> Joule across UI, docs, embedded assets, and legal 2026-07-03 02:23:35 -04:00
.cargo Baseline: hard fork of zed@e2e7a67 2026-05-30 08:20:23 -04:00
.cloudflare Baseline: hard fork of zed@e2e7a67 2026-05-30 08:20:23 -04:00
.config Baseline: hard fork of zed@e2e7a67 2026-05-30 08:20:23 -04:00
.factory Rebrand Zed -> Joule across UI, docs, embedded assets, and legal 2026-07-03 02:23:35 -04:00
.github fix(release): build every platform from the tag, not the dispatch branch 2026-08-27 13:17:46 -04:00
.zed Baseline: hard fork of zed@e2e7a67 2026-05-30 08:20:23 -04:00
assets Rebrand: swap the Zed brand mark, zed.dev domain, Zeta model, and zed:// scheme 2026-07-04 20:10:29 -04:00
ci Baseline: hard fork of zed@e2e7a67 2026-05-30 08:20:23 -04:00
crates joule_core: Cache changes that span more than one file 2026-09-17 07:09:34 -04:00
dev-docs Rebrand Zed -> Joule across UI, docs, embedded assets, and legal 2026-07-03 02:23:35 -04:00
docs Rebrand: swap the Zed brand mark, zed.dev domain, Zeta model, and zed:// scheme 2026-07-04 20:10:29 -04:00
extensions Clear the workspace-wide lint debt left by the Rust 1.98 upgrade 2026-08-30 16:56:06 -04:00
legal Rebrand Zed -> Joule across UI, docs, embedded assets, and legal 2026-07-03 02:23:35 -04:00
nix Baseline: hard fork of zed@e2e7a67 2026-05-30 08:20:23 -04:00
script fix(deb): Homepage -> joule.transaction.science; az.transaction.science (the pre-rename 'Agent Zed' host) has no DNS record, so every shipped package pointed at a dead link 2026-08-01 20:29:08 -04:00
tooling Clear the workspace-wide lint debt left by the Rust 1.98 upgrade 2026-08-30 16:56:06 -04:00
.git-blame-ignore-revs Baseline: hard fork of zed@e2e7a67 2026-05-30 08:20:23 -04:00
.gitattributes Baseline: hard fork of zed@e2e7a67 2026-05-30 08:20:23 -04:00
.gitignore Baseline: hard fork of zed@e2e7a67 2026-05-30 08:20:23 -04:00
.mailmap Baseline: hard fork of zed@e2e7a67 2026-05-30 08:20:23 -04:00
.prettierrc Baseline: hard fork of zed@e2e7a67 2026-05-30 08:20:23 -04:00
.rules docs: restore .rules (my prior commit wrote it empty) + correct the arm64 build matrix 2026-07-15 10:17:43 -04:00
AGENTS.md Baseline: hard fork of zed@e2e7a67 2026-05-30 08:20:23 -04:00
Cargo.lock Remove 19 unused dependencies, and make script/clippy exit clean 2026-08-31 23:05:20 -04:00
Cargo.toml Remove 19 unused dependencies, and make script/clippy exit clean 2026-08-31 23:05:20 -04:00
CLAUDE.md Baseline: hard fork of zed@e2e7a67 2026-05-30 08:20:23 -04:00
clippy.toml Baseline: hard fork of zed@e2e7a67 2026-05-30 08:20:23 -04:00
CODE_OF_CONDUCT.md Baseline: hard fork of zed@e2e7a67 2026-05-30 08:20:23 -04:00
compose.yml Baseline: hard fork of zed@e2e7a67 2026-05-30 08:20:23 -04:00
CONTRIBUTING.md Rebrand Zed -> Joule across UI, docs, embedded assets, and legal 2026-07-03 02:23:35 -04:00
debug.plist Baseline: hard fork of zed@e2e7a67 2026-05-30 08:20:23 -04:00
default.nix Baseline: hard fork of zed@e2e7a67 2026-05-30 08:20:23 -04:00
Dockerfile-collab Baseline: hard fork of zed@e2e7a67 2026-05-30 08:20:23 -04:00
Dockerfile-collab.dockerignore Baseline: hard fork of zed@e2e7a67 2026-05-30 08:20:23 -04:00
Dockerfile-cross.dockerignore Baseline: hard fork of zed@e2e7a67 2026-05-30 08:20:23 -04:00
Dockerfile-distros Baseline: hard fork of zed@e2e7a67 2026-05-30 08:20:23 -04:00
Dockerfile-distros.dockerignore Baseline: hard fork of zed@e2e7a67 2026-05-30 08:20:23 -04:00
flake.lock Baseline: hard fork of zed@e2e7a67 2026-05-30 08:20:23 -04:00
flake.nix Baseline: hard fork of zed@e2e7a67 2026-05-30 08:20:23 -04:00
GEMINI.md Baseline: hard fork of zed@e2e7a67 2026-05-30 08:20:23 -04:00
JOULE_CODE.md docs: last dead link - the standard's browse URL pointed at the flagged GitHub org (404 to anonymous readers) 2026-08-03 06:14:45 -04:00
LICENSE-APACHE Baseline: hard fork of zed@e2e7a67 2026-05-30 08:20:23 -04:00
LICENSE-GPL Baseline: hard fork of zed@e2e7a67 2026-05-30 08:20:23 -04:00
livekit.yaml Baseline: hard fork of zed@e2e7a67 2026-05-30 08:20:23 -04:00
lychee.toml Baseline: hard fork of zed@e2e7a67 2026-05-30 08:20:23 -04:00
PRIVACY_HARDENING.md Rebrand Zed -> Joule across UI, docs, embedded assets, and legal 2026-07-03 02:23:35 -04:00
Procfile Baseline: hard fork of zed@e2e7a67 2026-05-30 08:20:23 -04:00
Procfile.all Baseline: hard fork of zed@e2e7a67 2026-05-30 08:20:23 -04:00
Procfile.web Baseline: hard fork of zed@e2e7a67 2026-05-30 08:20:23 -04:00
README.md Rebrand Zed -> Joule across UI, docs, embedded assets, and legal 2026-07-03 02:23:35 -04:00
renovate.json Baseline: hard fork of zed@e2e7a67 2026-05-30 08:20:23 -04:00
REVIEWERS.conl Baseline: hard fork of zed@e2e7a67 2026-05-30 08:20:23 -04:00
rust-toolchain.toml Move to Rust 1.98 and refresh the dependency graph 2026-08-26 07:48:02 -04:00
rustfmt.toml Baseline: hard fork of zed@e2e7a67 2026-05-30 08:20:23 -04:00
shell.nix Baseline: hard fork of zed@e2e7a67 2026-05-30 08:20:23 -04:00
SIGNING.md Rename Agent-Zed to Agent-Joule 2026-06-20 13:22:58 -04:00
typos.toml Baseline: hard fork of zed@e2e7a67 2026-05-30 08:20:23 -04:00

agent-joule — Joule Code reference consumer

agent-joule is the reference editor for Joule Code, the Transaction Science open standard for energy-attributed, federated, no-phone-home agentic coding. It is a hard fork of the Zed editor, stripped of its cloud ties and rebuilt around the Joule Code commitments: drive vendors' own logged-in coding agents over ACP, meter every turn in joules, and never phone home.

It is not a paid coding tool with a token markup. The protocol is owned by no one; agent-joule is one (SOTA) implementation of it.

What it does

  • Federates frontier coding agents. Connect Claude Code, Gemini, or Codex from one panel. agent-joule launches the vendor's own logged-in CLI over the Agent Client Protocol (ACP) — the vendor's client owns its credential; agent-joule never sees or transports a token. These agents are the Joule Code cascade's L4 (Wire) tier.
  • Meters energy. Every session surfaces a real joule-code-receipt::Receipt: ⚡ N J this session (est.) · L4. The number is computed from the agent's actual reported token usage; the est. is honest — it is an Estimator reading because no hardware energy interface is in the path yet (Joule Code SPEC §6). When a metered backend is present, the same surface shows a measured figure.
  • Does not phone home. Sign-in, telemetry, crash upload, and auto-update are removed; a build-level egress backstop makes Joule-host URLs unreachable; the ACP-registry auto-fetch is off. Startup is network-silent — verified by packet capture. See PRIVACY_HARDENING.md.

Joule Code conformance

agent-joule implements the Joule Code v0.1 commitments it is positioned to carry — the no-capture posture (verified) and a live receipt surface — and binds the federation legs as the cascade's L4 tier. The full clause-by-clause map (what is implemented, partial, and pending) is in JOULE_CODE.md. The standard's lean reference library (joule-code-rs) and conformance suite live in the open-standards repository; agent-joule consumes it as a dependency rather than vendoring a copy.

Build and run

cargo build --bin agent-joule
./target/debug/agent-joule

Open the federation panel with ctrl-cmd-a. Connecting an agent requires that vendor's CLI to be installed and logged in (e.g. claude, gemini); registry agents are fetched via npx on first connect. A local OpenAI-compatible model (e.g. vLLM at localhost:8000) is registered as a direct provider — the cascade's L3 (local model) tier.

For building on each platform, the upstream Joule development guides still apply: macOS, Linux, Windows.

Licence

agent-joule inherits Joule's GPL-3.0-or-later licence (LICENSE-GPL; portions Apache-2.0, LICENSE-APACHE). The Joule Code standard it consumes is separately and permissively licensed (Apache-2.0 reference code, CC-BY-4.0 spec text); a GPL reference editor consuming a permissive standard is intentional.

License information for third-party dependencies must be correctly provided for CI to pass; agent-joule retains Joule's cargo-about setup under script/licenses/.

Upstream

agent-joule is a hard fork of zed-industries/zed, a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter, developed by Zed Industries, Inc. All credit for the editor foundation is theirs. agent-joule diverges in one direction: removing the cloud dependencies and building the Joule Code substrate in their place. Upstream documentation, contribution guidance, and community links live at zed.dev and the upstream repository.