diff --git a/plugins/ruflo-mods/.claude-plugin/plugin.json b/plugins/ruflo-mods/.claude-plugin/plugin.json index 60292e5eb8..c0e61ae55a 100644 --- a/plugins/ruflo-mods/.claude-plugin/plugin.json +++ b/plugins/ruflo-mods/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "ruflo-mods", "description": "ruflo as a Claude Code mod (function hooks, ADR-404): in-process prompt routing, edit learning signals, tighten-only tool checks from ruflo policy, the cost-tracker budget ladder, a mod trust gate for newly installed mods, and the $.ruflo noun other mods compose their status with. Opt-in and removable: the classic hook-handler hooks stay the default and take every event back whenever the mod is not loaded.", - "version": "0.17.0", + "version": "0.17.1", "repository": "https://github.com/ruvnet/ruflo", "author": { "name": "ruvnet", diff --git a/plugins/ruflo-mods/CHANGELOG.md b/plugins/ruflo-mods/CHANGELOG.md index 2d1b52badd..40b7eb4ba5 100644 --- a/plugins/ruflo-mods/CHANGELOG.md +++ b/plugins/ruflo-mods/CHANGELOG.md @@ -2,6 +2,9 @@ Newest first. One `## — ` heading per version, then `feat:`, `fix:`, `breaking:` and `chore:` bullets (ADR-478). Built from git history; older versions: `git log -- plugins/ruflo-mods`. +## 0.17.1 — 2026-11-17 +- fix: `claude plugin validate` passes again on Claude Code 2.1.323 and later. `hooks/noun.ts` returned `{ ...added, ...beneath }` from `engine.create`, which the validator refuses ("this engine.create hook is outside its form: a spread of anything but the value of next(e)"); it now returns `{ ...beneath, ruflo }`. No other plugin defines `engine.create`, so `$.ruflo` is unchanged in practice. The mod already loaded and ran on those versions; only validation failed. + ## 0.17.0 — 2026-11-11 - feat: `routeJudge` option (off by default, ADR-530). Each prompt is routed by one no-tools haiku completion that must answer with exactly one of the 11 ADR-391 labels; an off-label reply, a refusal, a timeout (4 s) or an error keeps the keyword route, and slash commands and `<…>` envelopes never reach the model. The route carries `reason: "model-judge"` (the vendored `$.ruflo` route contract is unchanged) and the context box says so. On the ADR-391 dev split it agreed with the labels on 70–71 of 84 prompts, against 27 for the keyword table. diff --git a/plugins/ruflo-mods/hooks/noun.ts b/plugins/ruflo-mods/hooks/noun.ts index 70198f73b2..e680c1fe8f 100644 --- a/plugins/ruflo-mods/hooks/noun.ts +++ b/plugins/ruflo-mods/hooks/noun.ts @@ -60,8 +60,9 @@ export function registerNoun(on: On, state: ModState) { snapshot: async () => snapshotOf(state), } - // Beneath wins: if another step already added `ruflo`, ours never replaces it. - const added = { ruflo } - return { ...added, ...beneath } + // Claude Code's validator (2.1.323+) accepts an engine.create hook only in its form: spread the value of + // next(e), then add this mod's own noun. Reading beneath.ruflo to let an earlier step win is refused too + // ("$.ruflo is used as a value"). No other plugin defines engine.create, so nothing else adds `ruflo`. + return { ...beneath, ruflo } }) } diff --git a/plugins/ruflo-mods/scripts/smoke.sh b/plugins/ruflo-mods/scripts/smoke.sh index 61a4b25339..7bb43fbfc5 100755 --- a/plugins/ruflo-mods/scripts/smoke.sh +++ b/plugins/ruflo-mods/scripts/smoke.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Structural + security smoke for ruflo-mods v0.17.0 (ADR-404, ADR-447). +# Structural + security smoke for ruflo-mods v0.17.1 (ADR-404, ADR-447). # Static only: CI has no Claude Code, so the hooks module's behaviour is held # by v3/@claude-flow/cli/__tests__/mods/*.test.ts and, where function hooks are # on, by `claude plugin test plugins/ruflo-mods`. @@ -12,9 +12,9 @@ ok() { printf "PASS\n"; PASS=$((PASS+1)); } bad() { printf "FAIL: %s\n" "$1"; FAIL=$((FAIL+1)); } HOOKS="$ROOT/hooks" -step "1. plugin.json declares ruflo-mods 0.17.0" +step "1. plugin.json declares ruflo-mods 0.17.1" grep -q '"name": "ruflo-mods"' "$ROOT/.claude-plugin/plugin.json" \ - && grep -q '"version": "0.17.0"' "$ROOT/.claude-plugin/plugin.json" && ok || bad "name/version" + && grep -q '"version": "0.17.1"' "$ROOT/.claude-plugin/plugin.json" && ok || bad "name/version" step "2. hooks.json names exactly one module and no classic hook commands" grep -q '"modules": \["./register.ts"\]' "$HOOKS/hooks.json" && ! grep -q '"command"' "$HOOKS/hooks.json" \