.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>
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>
- 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>
* 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
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
* 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>
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>
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>
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>
- 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>
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>
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>
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>
#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>
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>
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>
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>
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>
- 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>
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>