Expose two of the built primitives as client-callable control methods, proven the
same way the fabric router was:
- codemod_rename (deterministic, no model): handle_codemod_rename runs a repo-wide
identifier rename over the worker root via joule_core::codemod and returns
{files_changed, occurrences, changed_paths}. PROVEN over a live socket:
`serve --root … --sock …` then `ctl codemod_rename --params '{"from":"old_name",
"to":"new_name"}'` → renamed 3 occurrences across 2 files, and the string
"old_name keep" in a source file was preserved (whole-word, strings skipped).
- review_diff (l3-gated, model-backed): handle_review runs the code-review panel
(dimensions → verify → filter-FP → severity-rank) over a client diff using the
loaded L3 model; clones the Arc<L3Model> out of the worker so no lock is held
during the review. Returns the confirmed findings as JSON, or a clear error when
no --model is loaded (a live run needs a GGUF model; the panel itself is unit-
tested with a scripted model).
main.rs gets two dispatch arms; the handlers live in route.rs. joule_core loop
hooks (#1,#3,#4,#5,#6,#7,#9-tool,#10) were already live via run_agent_loop.
Co-Authored-By: Claude Opus 4.8 <[email protected]>