Four precision primitives closing the loop on wave-24 + adopting two
from the Lovable / Mickey Marsden talks.
- jclaw contract { verify, hash } — CLI surface for jouleclaw-contract.
verify reads contract + evidence JSON, runs the §16.5 verifier, prints
the verdict JSON, exits 0 / 1 / 2 for pass / bad input / failed
verdict so CI scripts branch on the code. hash re-seals (catches
duplicate ids + dangling claims) and prints the BLAKE3 content hash.
- jouleclaw-contract-receipt — new crate. ContractVerdict → JCR-1-shaped
signed receipt (sibling schema "verdict-receipt/1"). Same canonical
det-CBOR + COSE_Sign1 (alg=-8 EdDSA) envelope the cascade and policy
streams use, under the same steward identity. Verdict carried as a
JSON-string field with a sibling verdict_hash inside the signed core
so it stays in the JCR-1 canonical subset (which forbids bools).
Closes the SPEC.md §16.5 promise that "the verdict is the artifact a
receipt links to". SPEC.md §16.7 documents the wire schema.
- jouleclaw-source — new crate. PackageSpec { ecosystem, name, version,
subpath? } over npm/PyPI/crates.io/GitHub/URL; pluggable SourceFetcher
trait; in-tree StaticBundleFetcher is the deterministic reference
(no network in the trusted core). materialise() drops bundles onto
a workspace under repos/<eco>/<name>/<version>[/<subpath>]/... with
a bundle-hash + ClaimProvenance ready to push onto a receipt.
Implements JouleClaw's "fresh > frozen" doctrine for third-party
code — agents read the source their tools actually call, not the
model's training of it.
- jouleclaw-revise — new crate. Scored review-revise loop. Composes
(artifact, Reviser, jouleclaw-bounded::Scored, threshold, max_iters)
with optional stall detector; emits a typed RevisionLog whose
exit_reason is Accepted | BudgetExhausted | Stalled. The /grebloop
shape made first-class; no model invocation in the trusted core.
Drive-by: jouleclaw-jcr1 gained pub fn cbor_to_json so sibling-receipt
bridges (policy, verdict, future ones) stop reinventing CBOR parsers.
Purely additive; 32/32 jcr1 tests still pass.
Tests: cli 10/10 (+2), contract-receipt 8/8 new, source 9/9 new,
revise 8/8 new, jcr1 32/32 unchanged. No regressions across the
existing test surface.
Co-Authored-By: Claude Opus 4.7 <[email protected]>