40 Commits
Author SHA1 Message Date
randRuFlo f91135144b fix(hooks): ignore repo-committed learning data; label surfaced notes as project data
.claude-flow/data stores committed to a cloned repository are no longer read
as this machine's learned patterns or synced into the user's Claude Code
memory, and are never rewritten. Surfaced entries are flattened to one line
(control, bidi and zero-width characters removed) and the block ends with a
line saying they are project notes, not instructions. Same change in the
generated fallback helper and the ruflo-mods routeContext block (0.16.2).
Helper manifest re-signed.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-04 21:53:45 -05:00
rUvandr 27dd1f1ac8 feat(ruflo-mods): agentModels — a model per agent type for spawns that chose none (0.16.1) (#4703)
agent.spawn routing for Claude Code 2.1.300+: 'Explore=haiku,general-purpose=sonnet'
sets the model of a spawn whose call chose none, covering built-in and other
plugins' types (definitions a person cannot edit) and workflow agents. A chosen
model, forks and teammates are kept; malformed pairs are dropped; a failing hook
passes the spawn through. Off by default; /ruflo-mods reports it.

Co-authored-by: r <r@x>
2026-11-04 16:07:51 -06:00
rUvandr 45bf52cd86 feat(mods): adopt Claude Code 2.1.290-2.1.318 mod API changes (mods 0.16.0, console 0.49.11, swarm 0.3.8) (#4702)
- ruflo-mods guard (tool.check): read-only fast path on e.isReadOnly (2.1.304)
  that skips the policy-projection stat while a full check found none in the
  last 2 s (web tools excluded so the research ask still fires); a chain deny
  returns without file reads; decider "person" on every ask ruflo raises;
  agentId names the subagent on ruflo's reason; the chain's ceiling survives a
  tightening; .catch documented for 2.1.301 semantics, still fails closed.
- ruflo-console: console_state and console_run registered with
  isDeferred: false (2.1.293); console_open/console_set stay deferred.
- console + swarm: Text bold -> weight (2.1.299 deprecation), codemodded;
  bold: true -> weight: "semibold" (what the host already maps bold to).
  Engines before 2.1.299 refuse a tree with an unknown Text prop, so the kit
  maps weight back to bold there (text-weight.ts, via $.session.version()).
- tests for 2.1.318's kit: $.tool.call now raises tool.check first
  (guidance test); stub answers are validated (swarm prompt.fill stub);
  stale expectations fixed (probe session.compact, learning-loop handshake).
- console kit tests: timeoutMs 30_000 (the 5 s default timed out 19-58
  end-to-end tests under load, on 2.1.289 and 2.1.318 alike), and the mock
  clock advanced past runner.ts's VERIFY_RETRY_MS in actions/settings tests.

Co-authored-by: r <r@x>
2026-11-04 15:49:08 -06:00
rUv 5f3dacc54b feat(mods): automatic context delegation (ruflo-mods 0.15.0, ADR-522) + release 3.71.0 (#4652)
* feat(mods): automatic context delegation (ruflo-mods 0.15.0, ADR-522) + release 3.71.0

New contextDelegation option (off | observe | enforce, default off). A
main-loop whole-file Read of a 14-120 KB file for an analysis prompt is
answered by a no-tools haiku $.model.complete on the session's own
credentials. Every quote is checked against the file and the model sees
only the cited passages (the file's own lines) plus how to read the rest.
The real Read always runs first, so a later Edit works (spike: answering
the Read without next(e) breaks Edit); any failure shows the whole file.

Live A/B (real binary, haiku main, 6 repo files 17-83 KB): 6/6 correct
both ways, 6/6 delegated, total cost -22.5% incl. worker, main input
-21.5%, wall +6.5%. First run delegated 0/6: haiku drops indentation in
quotes; the verifier now trims per-line whitespace and relocates up to 3
lines, showing the file's own lines.

Tests: 8 plugin tests, 3 real-binary e2e (extract + Edit, forged quote,
off), CLI parity test vs DEFAULT_CONTEXT_LIMITS and core verdicts. Smoke
step 4 now allows exactly one gated $.model.complete.

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01MfPHVHXWyvDvDtYMTsA6MP

* ci: keep the claude-code test-kit plugin test out of the vitest ratchet

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01MfPHVHXWyvDvDtYMTsA6MP
2026-11-01 15:14:10 -05:00
rUvandr 189aceca1d feat(learning): the verified-outcome learning loop on classic hooks, for every ruflo project (ADR-512) (#4604)
* feat(learning): run the verified-outcome learning loop on classic hooks for every ruflo project (ADR-512)

Until now only the opt-in ruflo-mods plugin recorded verified turns and showed lessons. Classic hooks
(every `ruflo init` project) now do the same. They replay the session transcript (`transcript_path`)
through the mod's own record and lesson code, bundled into .claude/helpers/learning-loop.cjs:

- route: records the turns that finished, then prints the lessons that fit the new prompt
- session-end: records the rest (PreCompact leaves the open turn open). This runs before the
  session-id dedup, which otherwise dropped SessionEnd after a PreCompact. It also starts a
  detached `ruflo hooks verified-ingest --quiet`
- one implementation: plugins/ruflo-mods/scripts/build-learning-loop-helper.mjs bundles
  hooks/loop/transcript.ts; the bundle is committed, checked in mod-guidance CI, and is a signed
  critical helper that helper-refresh installs (manifest re-signed)
- never twice: with its loop on, the mod adds `learning-loop` to RUFLO_MODS_OWNS
- opt-out: .claude-flow/config.json learningLoop.enabled=false, or RUFLO_LEARNING_LOOP=0

Tests: mods-learning-loop-classic (replay matches the mod's records, offsets, the hook-handler run
as a process, end to end classic record -> real ingest -> lesson in route output) and real-binary
contract 6 (pinned claude, mock model, no plugin). ruflo-mods 0.14.0.

Co-Authored-By: RuFlo <ruv@ruv.net>

* docs(adr): ADR-512 cites PR #4604

Co-Authored-By: RuFlo <ruv@ruv.net>

* ci: sign and exclude the classic-loop helper and real-binary test where the other helpers are (ADR-512)

smoke-helper-signing-security copies the critical helpers into its fixture; it now copies
learning-loop.cjs too. The ratchet's default run skips real-binary files, which need the
claude binary (mods-real-binary runs them).

Co-Authored-By: RuFlo <ruv@ruv.net>

* test(mods): give the built-CLI tests the time their children get

vitest's 5s default timed out mods-cli-bin on a loaded CI runner and reported only
STACK_TRACE_ERROR (the timeout error carries the stack of the it() call). Each test runs the
built CLI several times with a 120s child timeout.

Co-Authored-By: RuFlo <ruv@ruv.net>

---------

Co-authored-by: r <r@x>
2026-10-30 16:59:46 -04:00
rUvandr 243bc57f0b feat(learning): lessons say where the fix goes; reworded tasks learn together (ADR-511) (#4603)
* feat(learning): lessons say where the fix goes; reworded tasks learn together (ADR-511)

The §7 evaluation (#4581) showed three limits on what the verified-outcome
loop can learn:

- a lesson named an agent, nothing the model can act on;
- tasks naming different files merged into one lesson;
- the same task worded differently never learned (15 reworded verified
  successes left 15 patterns at one success each, zero lessons).

Changes:
- mods: a verified turn records its screened edited source files; a lesson
  names the three its passing fixes edited most and leads with them; pick()
  weighs rare keywords (IDF) and drops matches far below the best.
  ruflo-mods 0.13.0.
- cli: files are counted per pattern (successes only) into learned-lessons.json;
  SONA takes them as pattern anchors (never keywords), so reworded tasks that
  fixed the same file reinforce one pattern; tasks naming disjoint paths never
  merge. Lesson building moves to verified-lessons.ts.
- eval: the harness gains --ablate, --test-index, --concurrency, --lessons,
  --save-lessons, --eval-sample, --calibrate and --max-turns;
  scripts/eval-learning-loop-corpus.mjs writes a validated 15+30-task corpus.

Proved offline (tests): 15 reworded prompts form 5 lessons, up from 0; the
first run's prompts form 5 lessons, up from 1; the right lesson ranks first
for 30 of 30 eval prompts, with 1.07 lessons shown per prompt.

Paid pilots (haiku, about $6.80) are directional and did not reach the gate:
- 8-turn cap: off 2/10, on 4/10, lessons without files 1/10;
- uncapped: 6/6 vs 6/6, cost within 1%.
ADR-511 §5 has the details.

Co-Authored-By: RuFlo <ruv@ruv.net>

* docs(adr): ADR-511 cites PR #4603

Co-Authored-By: RuFlo <ruv@ruv.net>

---------

Co-authored-by: r <r@x>
2026-10-30 12:12:42 -04:00
rUvandr e9248a170e feat(security): plugin signing, scan before install, refuse risky project auto-approve keys (ADR-509) (#4593)
* feat(plugins): ADR-509 plugin trust — signing, scan before install, refuse project auto-approve keys

- scripts/sign-plugins.mjs signs every marketplace plugin (signature.json:
  sorted path+sha256 list, version, Ed25519 over canonical JSON) with the
  existing helpers key (same key resolution as sign-helpers.mjs; never
  printed). Nothing is signed with the real key here; release step in ADR.
- `ruflo plugins verify [name]` and `ruflo mods doctor` check the clone and
  install cache: verified / modified / unsigned / bad-signature, and write
  ~/.claude-flow/mods/plugin-verify.json per config dir.
- ruflo-mods plugin.register gate: under modTrust refuse-risky, a
  <name>@ruflo module whose clone is modified or bad-signature is refused
  (allow-list does not exempt it). Live-validated on Claude Code 2.1.289.
- Static scan of .mcp.json, hooks/hooks.json and hook modules before
  `claude plugin install` (mods install / init mods path) and before a
  local `plugins install`; a high finding blocks that plugin unless
  --accept-risk <plugin>, which is recorded in .claude-flow/mods/install.json.
- settings-risk-scanner covers enableAllProjectMcpServers,
  enabledMcpjsonServers, bypassPermissions, blanket Bash/* allows and
  non-ruflo hooks; `ruflo init` / `init hooks` / `init upgrade --settings`
  stop before writing anything (--keep-risky-settings / --drop-risky-settings);
  `ruflo doctor` warns on them in settings.json and settings.local.json.

Co-Authored-By: RuFlo <ruv@ruv.net>

* docs(adr): ADR-509 status names PR #4593

Co-Authored-By: RuFlo <ruv@ruv.net>

* fix(init): ADR-509 classify ruflo hooks by exact command; gate project-shipped helpers

isRufloHelperCommand no longer reuses pinToUserHelpers as a classifier: it
matches the closed set of commands ruflo generates or has generated (each
helper, subcommand, scope, platform, plus the legacy forms) by string
equality. node -e with extra code, -r/--require, --import, NODE_OPTIONS=
and a helper path in a comment are now findings. A project
.claude/helpers/<critical helper> that is neither ruflo's shipped copy nor
in a ruflo-signed manifest stops init too; --drop-risky-settings replaces it.

Co-Authored-By: RuFlo <ruv@ruv.net>

* fix(mods): ADR-509 a scan-blocked plugin is never left enabled

applyMods scans an existing marketplace clone before enabling anything and
does not enable what it blocks; a plugin the post-refresh scan blocks has
its enabledPlugins key removed and is dropped from the install record. The
--no-plugin-install, test/CI and no-claude paths are covered by the
pre-enable scan, and say when there is no clone to scan yet.

Co-Authored-By: RuFlo <ruv@ruv.net>

* fix(plugins): ADR-509 scan the modules hooks.json loads and their imports

The pre-install scan now resolves hooks.json `modules` against hooks.json
and follows every relative import/export-from/import()/require they reach,
with none of the walk's name, directory or size skips. A loaded file that is
missing, unreadable, over the size limit, outside the plugin, or loads a
computed module name is a high finding instead of being skipped.

Co-Authored-By: RuFlo <ruv@ruv.net>

* fix(mods): ADR-509 signature gate works on Windows and checks the loaded copy

The status file key is normalized the same way on both sides (forward
slashes, no trailing slash, Windows drive paths lower-cased), and the mod
finds the home the CLI used (USERPROFILE on Windows, else HOME).
plugins/.gitattributes turns off line-ending conversion so a Windows clone
hashes as signed. Every writer now records the install-cache copies too:
per plugin the worst of all copies, and each copy by its directory; the mod
looks up the plugin.register root first, so a tampered install cache next
to a clean clone is refused.

Co-Authored-By: RuFlo <ruv@ruv.net>

* fix(mods): ADR-509 match status path keys normalized; fix-pass notes

The mod compares the status file's per-copy path keys normalized, so a key
another writer spelled differently still matches the plugin.register root.
ADR-509 gains the review fix-pass implementation notes and live validation.

Co-Authored-By: RuFlo <ruv@ruv.net>

* fix(mods): ADR-509 report each blocked plugin once per run

Co-Authored-By: RuFlo <ruv@ruv.net>

* fix(cli): no env values in sign-plugins errors; RSA-2048 in the rejection test (CodeQL, ADR-509)

Co-Authored-By: RuFlo <ruv@ruv.net>

* chore(ruflo-mods): 0.12.0 for ADR-509

Co-Authored-By: RuFlo <ruv@ruv.net>

* test(mods): make mods-cli-bin failures readable (no more opaque STACK_TRACE_ERROR)

execFileSync's error holds Buffers and a process handle that vitest cannot
serialize, so a CI failure only said STACK_TRACE_ERROR. Rethrow a plain
Error with exit status, signal and the child's stdout/stderr tail.

Co-Authored-By: RuFlo <ruv@ruv.net>

---------

Co-authored-by: r <r@x>
2026-10-29 22:32:06 -04:00
rUvandr 5d2be9374a feat(cost): budget file, LiteLLM gateway export, per-agent/tool attribution (ADR-508) (#4592)
* feat(cost): ADR-508 budget file, LiteLLM budget export, per-agent/tool attribution

- .claude-flow/cost/budget.json (v1): `ruflo cost budget set --daily/--weekly/--monthly`
  writes it; the ruflo-mods ladder uses its smallest window when costBudgetUsd is 0.
  Hostile files (negative usd, unknown periods, oversized arrays) are no budget.
  Validator in both the mod and the CLI with a parity test.
- `ruflo cost budget export --gateway litellm` prints budget_limits (and, with
  --model, model_max_budget + budget_fallbacks) as YAML or the /key/generate body;
  --apply posts it to https or loopback only, key from --key-env, redirects refused.
  --gateway meta-llm fails with a pointer to ADR-508 (no documented budget API).
- ruflo-mods costLedger option (default on, ruflo projects only): session.measure
  deltas charged to subagent type and preceding tool, one line per session in
  .claude-flow/cost/attribution.jsonl, read by `ruflo cost report`; a gateway
  budget refusal is toasted once and counted.
- Live-validated on Claude Code 2.1.289 (fake LiteLLM on loopback + one haiku run).

Co-Authored-By: RuFlo <ruv@ruv.net>

* docs(adr): ADR-508 status names PR #4592

Co-Authored-By: RuFlo <ruv@ruv.net>

* docs(ruflo-mods): ADR-508 costLedger transcript read, open budget-file and default-on notes

Co-Authored-By: RuFlo <ruv@ruv.net>

* fix(cost): ADR-508 review — --apply host escape via // path, per-call attribution split

- keyGenerateUrl: a base path starting with // (or /\) resolved as a
  protocol-relative URL and sent the LiteLLM master key to another host
  (http://localhost//evil.example/ -> http://evil.example/key/generate).
  Refuse such paths, set the path on a copy of the parsed URL, and require
  the result to keep the given scheme and host.
- Attribution: session.measure fires once per main-thread turn, and a
  foreground subagent runs inside the main Agent call, so last-tool
  charging put subagent spend on main/Agent. Split each measured delta
  evenly across the tool calls completed since the last measurement.
- Tests in host event order and for the path escape; both fail on the
  previous code. ADR, README, cost report header state the estimate rule.

Co-Authored-By: RuFlo <ruv@ruv.net>

* docs(adr): ADR-508 live run of the per-call attribution split

Co-Authored-By: RuFlo <ruv@ruv.net>

* chore(plugins): ruflo-mods 0.11.0, cost-tracker 0.31.0 for ADR-508

Co-Authored-By: RuFlo <ruv@ruv.net>

---------

Co-authored-by: r <r@x>
2026-10-29 20:33:25 -04:00
rUvandr 49fe0b362b feat(mods): compactSnapshot — pre-compaction snapshot + post-compaction reload (ADR-505) (#4591)
* feat(mods): compactSnapshot — pre-compaction transcript snapshot + one-shot reload block (ADR-505)

New ruflo-mods option compactSnapshot (default on). On a main-loop manual/auto/plugin
session.compact it writes the transcript about to be summarized to
.claude-flow/sessions/compactions/snapshot-<n>.jsonl (role, text <= 2000 chars, tool
names/ids only; each line screened; 400 messages / 2 MiB; ten rotating slots), beside
the compaction so it is never blocked, delayed or rewritten. The next non-slash prompt
after a compaction that stood gets one [RUFLO_AFTER_COMPACT] context block (<= 2000
chars) from lessons shown this session, the last 5 loop outcomes, open swarm/claim ids
and the snapshot path. ruflo doctor warns when snapshots exist and git would commit them.

Co-Authored-By: RuFlo <ruv@ruv.net>

* test(mods): isolate the ADR-505 doctor test from global git excludes; note precompute inference

Co-Authored-By: RuFlo <ruv@ruv.net>

* docs(adr): ADR-505 status names PR #4591

Co-Authored-By: RuFlo <ruv@ruv.net>

* fix(mods): compactSnapshot screens raw message text before JSON encoding (ADR-505)

JSON escaping put a backslash before quotes and encoded newlines, so the
key-assignment rule missed "api_key": "..." / password="..." and the
line-start role-tag rule missed a \nsystem: line; those were written to the
snapshot in plaintext. messageLine now screens the raw cut text and the tool
names, plus the encoded line as before. Negative-control test added.

Co-Authored-By: RuFlo <ruv@ruv.net>

* chore(ruflo-mods): 0.10.0 for ADR-505

---------

Co-authored-by: r <r@x>
2026-10-29 19:41:08 -04:00
rUvandr 38112e0042 feat(mods): learning-loop gaming defences — taints, re-verify, anomaly gate (ADR-503) (#4590)
* feat(learning-loop): gaming defences for verified outcomes (ADR-503)

The verified-outcome loop (ADR-502) trusts a verifier's exit status, but the
model chooses what that verifier checks. Four downgrade-only layers:

- mod: a verified-success record carries taints when the turn edited a test
  file (edited-tests), a verifier config (edited-verifier-config), or decided
  on a weakened/narrowed command (narrowed-verifier); a per-process session
  token is written on every record. The outcome word never changes.
- CLI: a success with a taint not listed in .claude-flow/config.json
  learningLoop.allowTaint is counted under `tainted` and never reaches SONA.
- CLI: opt-in re-verify (learningLoop.reverify, off by default) re-runs a
  rotating allowlisted manifest check in a temp detached git worktree at HEAD
  with a timeout; failure, timeout or error downgrades to unknown. Only an
  explicit verified-ingest re-verifies; hot callers defer.
- CLI: anomaly gate holds would-be lessons that are perfect-and-tainted,
  only-narrowed, or from one session, listed as `held: <id> (<reason>)`.

Adds scripts/eval-learning-loop.mjs (manual, plan-only unless --run).

Co-Authored-By: RuFlo <ruv@ruv.net>

* docs(adr): ADR-503 status names PR #4590

Co-Authored-By: RuFlo <ruv@ruv.net>

* fix(learning-loop): shell edits of tests taint; test the real re-verify runner (ADR-503)

- A Bash command that writes, moves or deletes a test file or verifier
  config (rm, mv, cp, tee, truncate, sed -i/perl -i, output redirection,
  git rm/checkout/restore/...) now sets edited-tests /
  edited-verifier-config like an Edit of that file. Before this change,
  Edit src/a.ts + `sed -i 's/it(/it.skip(/' src/a.test.ts` + `npm test`
  produced an untainted verified-success. Downgrade-only: reads and test
  runs earn nothing.
- gitWorktreeRunner is now tested against a throwaway git repo: pass,
  fail, missing script, timeout (hung script's process verified dead),
  non-repo error. After each run only the main worktree remains and no
  ruflo-reverify-* dir is left. A negative control (kill only the direct
  child) makes the timeout test fail.
- ADR-503 implementation notes record both, plus the interpreter-write gap.

Co-Authored-By: RuFlo <ruv@ruv.net>

* test(learning-loop): give the hung-check re-verify test an 8s budget for cold CI runners

Co-Authored-By: RuFlo <ruv@ruv.net>

* chore(ruflo-mods): 0.9.0 for ADR-503

Co-Authored-By: RuFlo <ruv@ruv.net>

---------

Co-authored-by: r <r@x>
2026-10-29 18:57:12 -04:00
rUvandr 375e846c66 feat(mods): verified-outcome learning loop, on by default (learningLoop, #4581, ADR-502) (#4583)
* feat(mods): verified-outcome learning loop (learningLoop, #4581, ADR-502)

ruflo-mods 0.8.0 adds the learningLoop option (default off). Each main-loop
turn becomes a trajectory whose outcome is verified-success/verified-failure
only when a recognised test/build/typecheck/lint command ran after the
turn's last edit and the shell's exit status said so; otherwise unknown.
A masked status (|| true, pipes, ;, background, substitution) verifies
nothing, and the model's own words are never read.

The CLI ingests the records (ruflo hooks verified-ingest, the
hooks_intelligence_verified-ingest MCP tool, and automatically from
hooks_route and hooks_session-end): only verified records train SONA,
unknown ones are counted; each id once; PII-redacted. It writes
learned-lessons.json, and the mod adds at most three cited lessons at or
above the 0.6 gate to a matching prompt. doctor --component learning-loop
reports whether outcomes reach SONA.

Stages 5-7 of #4581 (pane, autonomous /loop-run, GEPA self-tuning) are
deferred; the on-by-default evaluation has not been run.

Co-Authored-By: RuFlo <ruv@ruv.net>

* fix(mods): learning loop needs an edit to verify; redact e-mails before writing (#4581)

A turn that edited nothing is unknown (a verifier verifies a change).
The mod replaces e-mail addresses in the stored task; ADR-502 states the
privacy limit (broader PII redaction runs at CLI ingest).

Co-Authored-By: RuFlo <ruv@ruv.net>

* feat(mods): learningLoop on by default (#4581)

Maintainer decision: ship the learning loop on by default. Set the
learningLoop option to false to turn it off. ADR-502 records that the
issue's 30-task evaluation has not been run yet.

Co-Authored-By: RuFlo <ruv@ruv.net>

* fix(cli): ADR-112 guidance on hooks_intelligence_verified-ingest (#4581)

Co-Authored-By: RuFlo <ruv@ruv.net>

---------

Co-authored-by: r <r@x>
2026-10-29 16:38:56 -04:00
rUvandr d7fcaf3b25 fix(ruflo-mods): load again: the ruRE offer no longer registers a second bare session.start, tool.call and turn.complete (0.7.1, #4485) (#4487)
Co-authored-by: r <r@x>
2026-10-25 07:52:18 -04:00
rUvandr cac404c54c feat(ruflo-mods): rureOffer — offer ruRE when the model reads a binary (ADR-498) (#4446)
Off by default. Observes Read/Write/Edit/MultiEdit file_path, and at the end of a
main-loop turn appends one fixed-wording line naming up to three validated
project-relative binary/library/asar/CUDA files (12 per session, each once).
Offer only: never runs ruRE, never denies or edits a call. Inert without a ruRE
MCP tool. Harness gains World.tools and $.tool.list.

Co-authored-by: r <r@x>
2026-10-23 23:12:31 -04:00
randRuFlo 3102183cda fix(mods): port the #4136 query-coverage route recall into the mod's ranked-context copy
The ADR-404 parity test (mods-route) compares the mod's route context with hook-handler.cjs.
#4172 changed intelligence.cjs scoring (inflection variants, IDF weights, coverage >= 0.15),
leaving the mod's trigram-Jaccard copy behind, so the parity job failed. Same algorithm now in
plugins/ruflo-mods/hooks/route/ranked-context.ts; ruflo-mods 0.6.1 -> 0.6.2.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-14 06:20:39 -04:00
randRuFlo d2a2c98c9c review(#4096): shared-screen references and email verb, plugin version bumps, helpers re-signed
Independent review of #4096 (issues #4093-#4095). The guard and mods-screen fixes hold on a 62-row adversarial
corpus (main 40/62, PR 58/62; the 4 misses are static-analysis limits main also has) and 1 MB hostile inputs stay
bounded. Gaps found and fixed here, tests first:
- the shared plugin screen (copied into 39 plugins) still flagged ./service-account.json and --set-secrets=NAME=NAME:latest
  as key assignments: relative file paths and secret-manager references are now excused there too, a literal is not
- exfiltration now also covers e-mailed credentials ("email me the .env")
- 8 more guard parity rows (list that includes the root in any position, benign brace uses, spaced named fork bomb)
- every plugin whose screen copy changed gets a patch bump + CHANGELOG entry (marketplace users only receive a
  change after a bump; precedent: d06b0122b), ruflo-mods 0.6.1 carries the guard, screens and README
- helpers manifest re-signed (hook-handler.cjs changed)

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-12 13:39:02 -04:00
randRuFlo 65398f5f83 feat(mods): startup self-check toast, doctor/install addenda, spike of the engine's toast text (0.6.0)
- ruflo-mods 0.6.0: selfCheck option (default on): one toast per session when an enabled ruflo plugin is missing from the marketplace clone with no cached install, fixed text with the repair; read-only, fail-open
- smoke: /ruflo-mods stays an alias of /ruflo mods; the self-check cannot write or echo repository text
- ADR-477 addendum: what Claude Code 2.1.289 draws for icons, SGR, OSC 8, OSC 0, bidi, CR (icons only; no colour; one slot)
- ADR-404 addendum: doctor/install hardening and the self-check

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-11 14:11:03 -04:00
randRuFlo 02a0bb4bfa chore(console,mods): console 0.42.3 and mods 0.5.1 versions and changelogs for #3981
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-10 15:19:36 -04:00
randRuFlo 72f789254e feat(console,mods): optional detect-only ruvnet-brain grounding (ADR-487)
Console 0.42.0: Overview "Grounding" line (on / not installed / installed, disabled / unknown), a default-on nudge setting that adds one fixed line pointing at search_ruvnet to the mission context when the brain is on and the mission names the ruvnet stack (through modelLine, nothing interpolated), and a default-off, dismissible once-per-session install hint. Mods 0.5.0: option `grounding` (default off) adds a read-only /ruflo-mods row.

Detect-only: never calls, installs, gates, blocks or copies anything of the third-party plugin; ruflo behaves identically without it (smoke steps console 20, mods 15).

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-09 18:02:44 -04:00
randRuFlo c53bed71e3 feat(console,mods): session workspace on the Room: attention queue, session browser, preview (ADR-486)
Needs-you queue (approvals, questions, failures, finished-unread) across Claude Code, Codex and Ruflo
sessions, a browser grouped by repository and worktree, and a preview of the selected session. Local,
read-only discovery (no model call, no process); ambiguous identity goes to an unassigned bucket;
finished work clears only after its preview was drawn; transcript text never reaches a model, the
state, the disk or a text answer. ruflo-mods gains an optional counts-only attention row.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-09 17:18:27 -04:00
ruv 146febd999 feat(mods): shared toast system with levels, dedupe, persistence and Settings (ADR-477)
One dependency-free policy (canonical in ruflo-mods, byte-identical copies in console,
swarm and protector, checked by scripts/sync-toast-policy.mjs and each smoke.sh): level
prefixes, one washed line of at most 120 characters, 60 s de-duplication, four toasts a
minute per source with errors held and counted, the person's all/important/off setting and
per-source mute (console Settings, mirrored to a file the others read), and a digest of
every toast kept for the console's Events page. All call sites migrated; new toasts for a
mission that finishes or fails and a swarm subagent that fails or a loop that is stuck.

Versions: console 0.37.0, swarm 0.3.4, protector 0.1.1, mods 0.3.16.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-07 12:50:30 -04:00
ruv 38c30b1120 chore(mods): ruflo-mods 0.3.15 so marketplace users receive the #3791-#3805 fixes
The fixes merged in #3873 without a version bump, so 'claude plugin update'
saw no new version.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-07 03:51:38 -04:00
ruv 06d38d059a feat(ruflo-protector): Project Anatole plugin, tests, corpus gate, bench, fleet registration
ruflo-mods 0.3.14: /ruflo-mods shows one protector row from .claude-flow/protector-mod/status.json.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-05 15:06:42 -04:00
ruv 408c3e502a fix(ruflo-mods): trust gate counts prompt.submit and agent.spawn as risky; ranked context drops control and bidi characters (0.3.13)
#3787: under modTrust=refuse-risky a user-tier mod whose only hook was prompt.submit (the documented injection path at that tier) or
agent.spawn loaded, because neither was in the risk sets. Both are now named and refused; observe still only names them.

#3790: the [INTELLIGENCE] block put remembered entries into the prompt cut to 80 characters but otherwise as they were. They now pass
through the same control and bidi cleaning the research guard uses.

Both new tests fail without the change.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-05 11:54:51 -04:00
ruv ecb0c0bfa6 fix(ruflo-mods): reject a legacy or unknown-mode policy projection as unreadable; report shows the mode (ADR-450 T10), 0.3.12
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-05 05:44:23 -04:00
ruv 5f717842b4 docs(ruflo-mods): complete the option table, one row per userConfig key, with a smoke guard (0.3.11)
Adds the missing toolHints, agentTrim and agentTrimKeep rows, evidence pointers, drops the stale console 'pending' line, and adds smoke step 13. 0.3.11 chosen because loop/probe-label (0.3.10) is not merged yet.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-05 04:47:20 -04:00
ruv e1589e5d86 feat(ruflo-mods): compactCarry option carries swarm and claims state through compaction (ADR-451 item 7, 0.3.9)
session.compact appends one bounded (600 char) block of validated words and ids to the
compaction instructions: live swarm id/topology/agent count, open claim ids with status,
last route agent, budget and policy words. Default off, framed as data, screened for
secret shapes and injection phrases, skipped for subagent compactions, fails open.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-05 04:11:43 -04:00
ruv 477622b97d chore(ruflo-mods): 0.3.7 for the capability probe (0.3.6 went to the wording fix)
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-05 03:22:31 -04:00
ruv 32b6c33008 feat(ruflo-mods): capabilityProbe option records engine version and events fired (default off), ADR-451 item 5; 0.3.6
Observability only: one pass-through hook on every event counts which of the
events the mod registered fired; /ruflo-mods gains a bounded probe line and
the heartbeat lists the engine version and registered events. Never denies,
rewrites or delays; fails open.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-05 03:13:05 -04:00
ruv 6029b0aa2c chore(mods): drop provably unused hasSecret/tidy, swarm PLUGIN_NAME, ruos parseProbe; fix guidance screen header
Review 2026-10 #13. Patch bumps: ruflo-mods 0.3.5, ruflo-swarm 0.3.3, ruflo-ruos 0.1.1.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-05 02:28:30 -04:00
ruv 576672ea44 fix(ruflo-mods): 0.3.4 budget rung once per session, no guidance observations without route ownership, report dropped tool ids
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-05 01:46:59 -04:00
ruv cd01a4aea3 feat(ruflo-mods): deliveryScreen option hooks session.receive/send (default off), ADR-451 item 3; 0.3.3
Drops peer/relay deliveries with injection phrasing and refuses outgoing
messages carrying a secret shape or SSN. In-process, tighten-only, fail
open; the person's own Remote Control prompts are never screened.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-05 01:13:51 -04:00
ruv ebe2f82146 ruflo-mods 0.3.2: live validation of toolHints/agentTrim/status, correct the agentTrim option text
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-05 00:25:30 -04:00
ruv 33a60c715f feat(ruflo-mods): agentTrim option hooks agent.offer (default off), ADR-451 item 2; 0.3.1
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-04 23:28:44 -04:00
ruv 549f66b0dc chore(ruflo-mods): 0.3.0 (toolHints option)
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-04 21:38:27 -04:00
ruv a6486f371f feat(ruflo-mods): toolHints option hooks tool.describe (default off); ADR-451 mod capability roadmap and API coverage table
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-04 21:24:14 -04:00
rUv 9161994613 test(mods): verify configured native guidance and provenance recovery
Add reproducible legacy engine fixture, typed candidate records, corrupt queue recovery, and displayed version attribution.
2026-10-04 13:19:09 -07:00
rUv b6731e4234 feat(mods): add versioned advisory guidance and observation review
Refs #3701; ADR-447. Candidate observations never train or promote.
2026-10-04 13:11:03 -07:00
ruv d9a6258895 chore: bump ruflo-console 0.28.0, ruflo-goals 0.3.0, ruflo-mods 0.1.1; baseline research.test.ts
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-04 00:28:33 -04:00
ruv 8a1e11f3bd feat(mods): $.ruflo noun, status segments, mod trust gate, refusal-tolerant $ (ADR-404)
- engine.create adds a flat $.ruflo noun (types/index.d.ts, plugin.json
  "types"): segment({id,text}), lastRoute(), snapshot(). Other mods (ruOS,
  ruflo-ruos) contribute status segments instead of drawing a second bar.
  Segments are untrusted: id token, control/bidi stripped, 48 chars, max 8,
  sorted by id. One drawer for the status line, from the $ beneath.
- plugin.register trust gate: names what a later-registering user-tier mod
  can do (process.run, http.fetch, env.set; tool.check, tool.call, *,
  classic.*, plugin.register, prompt.compose), from the host scan.
  userConfig modTrust: observe (default) | refuse-risky | off, plus
  modTrustAllow. Under refuse-risky a gate failure refuses.
- every ui.status/log/toast call tolerates refusal (admins can withhold $)
- tsconfig extends the types Claude Code >= 2.1.287 writes on load
- kit tests: 15/15 on Claude Code 2.1.287, incl. two tighten-only tool.check
  mods composing, trust refusal at load, budget ladder with options
- vitest: 95/95 (noun/segment and trust suites added)
- CI ratchet baseline: the four engine-kit files (claude-code/testing is not
  resolvable by root vitest), as #3605/#3607 do

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 18:09:25 -04:00
ruv d48897fb34 feat(mods): ruflo-mods plugin — ruflo as a Claude Code mod (ADR-404)
An opt-in hooks module (Claude Code function hooks, early access) with
in-process equivalents of the classic per-event hooks:

- prompt.submit: router.cjs routing + ranked-memory context, text identical
  to hook-handler.cjs route; #3567 no-match semantics
- tool.check: tighten-only (stricter of chain and ruflo), pre-bash list and
  the claude-code.* rules of ruflo policy; fails closed by one step
- tool.call/turn.complete/session.end: edit records in recordEdit's format
- session.measure/agent.spawn: cost-tracker budget ladder (opt-in)
- session.start: ownership handshake (RUFLO_MODS_OWNS), /ruflo-mods

Owns route/post-edit only where the classic hook-handler hands them over.
Kit tests (claude plugin test, 7/7 in the real engine), static security
smoke (9/9), marketplace entry.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-01 17:51:02 -04:00