JouleClaw is the 5th TX Science open standard (alongside OpenPay,
Smart Byte, EOC, WAI). Pure-Rust, Apache-2.0, omni-modal AI runtime
that dispatches every operation through an energy-tiered cascade:
L0:Cache (picojoules) → L1:Lawful (nanojoules, deterministic) →
L2:Embed (sub-mJ, Matryoshka + hybrid search) →
L3:Model (joules, local SSM / ternary / multimodal / diffusion) →
L4:Wire (tens of joules, remote frontier as the escape hatch)
Inference is the last resort, not the entry point. Frozen weights are
less trustworthy than fresh provenance-stamped retrieval. Hybrid
nomenclature: L0-L4 tier numbers in the protocol, named tags
(Cache/Lawful/Embed/Model/Wire) in the prose.
Phase 1 foundation (this commit)
jouleclaw-core Ported verbatim from pattern-lang/joule-core
(~2300 LOC, stdlib-only). Tensor, Op, Graph,
Determinism, Energy, Kernel, Backend, Hash,
Blocks. Rust 2024 edition.
jouleclaw-topology Ported from pattern-lang/joule-topology with
one Rust 2024 edition fix: extern "C" blocks
now require `unsafe extern`. Apple Silicon
sysctlbyname FFI for hardware discovery.
jouleclaw-energy NEW. Designed with the load-bearing Provenance
tag the wave-1 energy-telemetry survey
surfaced as essential:
Provenance::HwShunt — real shunt
(RAPL MSR,
NVML cumulative,
Jetson INA3221)
Provenance::ModelBased — vendor estimate
(Apple IOReport,
ROCm-SMI)
Provenance::Estimator — static cost model
Every EnergyReading carries Provenance. The
thermodynamic circuit breaker is only as honest
as the worst counter in a request's span;
resolution_uj() and min_window_ns() let callers
refuse to claim microjoule accuracy on
platforms that cannot deliver it. The original
JouleClaw notes' "microjoules everywhere" line
is wrong on Apple Silicon and NVIDIA — this
crate is honest about the floor.
Per-platform backends are feature-gated:
`rapl`, `nvml`, `ioreport`, `ina3221`, `hwmon`.
Phase 1 ships the trait + Mock; backends land
in Phase 2 with the cascade.
3 lib tests passing. Forbidden-unsafe outside
planned platform FFI feature gates.
Phase 2 (next) will add: jouleclaw-cascade (with L0 cache and 7-axis
coord router from joule-cascade), jouleclaw-runtime, jouleclaw-wire,
jouleclaw-loader-gguf, jouleclaw-pack (.jc.toml sidecar),
jouleclaw-history, jouleclaw-bench.
Root README updated: "five open reference protocols" with a JouleClaw
section.
Co-Authored-By: Claude Opus 4.7 <[email protected]>