ruflo-mods

Reviewed at commit 13af5f1 New version, not yet reviewed

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…

Made by
ruvnet
What we checked

In projects with a .claude-flow folder, adds an agent suggestion, ruflo memory notes and learned lessons to prompts, and saves edits, turn outcomes with a prompt excerpt and, before compaction, screened transcript text to files there. Everywhere, it denies commands like rm -rf / and can tighten tool calls from ruflo policy. Opt-in settings add budgets, agent trimming and Haiku file extracts. No network calls; runs nothing.

Review details

Static review of the source at the pinned commit; not run. Full re-review of version 0.16.2 (the diff since d7fcaf3 is 163k characters, too large for a delta review). One module (register.ts) registers plugin.register (mod trust gate, default observe: logs what a newly admitted user-tier module's host scan says it can do; refuse-risky refuses risky ones unless allow-listed by provenance, and now also refuses a <name>@ruflo copy that ~/.claude-flow/mods/plugin-verify.json marks modified or bad-signature, a read-only check), engine.create (adds the $.ruflo noun, takes over ui.status drawing and binds the shared toast policy), session.start (reads $.session.root and $.settings.read; checks project, $HOME and %USERPROFILE% copies of .claude/helpers/hook-handler.cjs for a handshake marker; sets RUFLO_MODS_OWNS with $.env.set, now also announcing learning-loop; registers /ruflo-mods; writes a heartbeat to .claude-flow/mods/session.json only when .claude-flow exists), prompt.submit (when it owns route: a static keyword-router box and up to five entries from .claude-flow/data/ranked-context.json, now labelled as notes, not instructions), tool.check (tighten-only: denies Bash commands on a fixed dangerous list, applies deny/require_approval rules from the ruflo policy projection in enforce mode, asks once on the first web call of an active research run; its asks are now marked decider person so auto mode cannot answer them; an unreadable policy or internal failure turns an allow into an ask), tool.call (edit paths to .claude-flow/data/pending-insights.jsonl), session.measure, agent.spawn, turn.complete, session.end and command.run for /ruflo-mods and the mods subcommand of /ruflo and /ruflo-console. New since the previous review: learningLoop (on by default, only where .claude-flow exists) records each main-loop turn's tool names, recognised test/build/lint commands and their exit status, edited project-relative source paths and the prompt cut to 300 characters (control characters removed, e-mail addresses replaced, redacted when a secret shape is found) to .claude-flow/data/verified-trajectories.jsonl (500 lines), and adds up to three validated, screened lessons from .claude-flow/data/learned-lessons.json to matching prompts; compactSnapshot (on by default, only where .claude-flow exists) writes the transcript about to be compacted (role, text cut to 2,000 characters per message, tool names and ids, never tool inputs or outputs; lines with a secret shape or injection phrase stored as [redacted]; 400 messages, 2 MiB, ten rotating slot files) to .claude-flow/sessions/compactions/ beside the compaction without blocking it, then adds one screened state block to the next prompt; costLedger (on by default) takes a session budget from .claude-flow/cost/budget.json, splits measured cost over subagent types and tools into .claude-flow/cost/attribution.jsonl at session end (ruflo projects only) and, for a turn that ended on an API error, reads the last transcript message via $.session.messages to detect a gateway budget refusal and toast once; agentModels (off by default) sets a model on agent spawns that chose none; contextDelegation (off by default) in observe mode logs to .claude-flow/metrics/context-delegation.json and in enforce mode sends a whole 14-120 KB file the model Read to a no-tools haiku completion via $.model.complete (uses tokens on your own account), verifies every quote against the file and replaces the Read result with the cited passages, falling back to the full file on any failure. Toasts go through toast/policy.ts (masks secrets, e-mails and home paths, rate-limits). The default-on self-check reads known_marketplaces.json, installed_plugins.json and the ruflo marketplace clone under CLAUDE_CONFIG_DIR or ~/.claude. Other off-by-default options are unchanged (grounding, sessionAttention, rureOffer, toolHints, agentTrim, deliveryScreen, compactCarry, capabilityProbe, sessionRollup with $.store). All file writes go through $.fs.write under the session root. No fetch, $.http, $.process, eval, MCP servers, commands, skills or agents; most hooks fail open except the guard, which fails closed by one step, and the trust gate under refuse-risky. Read in full: the bundle header, plugin.json, hooks.json, register.ts, options.ts, session.ts, state.ts, trust.ts, noun.ts, every feature index.ts, the new compact-snapshot, context-delegate, cost attribution and budget-file, loop (lessons, record, status, taint, verifier) and agents/models files, files.ts and compact/block.ts, plus the git diff of guard policy, research, verdict, probe, register, session and ranked-context. Covered by targeted search for network, processes, dynamic code, writes, environment and settings: the unchanged helpers (toast policy, selfcheck, grounding, dangerous-command, guidance screens, projection, observations, attention, protector, ownership, describe hints, route format). hooks/loop/transcript.ts and scripts/learning-loop-helper.ts and build-learning-loop-helper.mjs are not loaded by the plugin (they build a helper for ruflo's classic hooks); smoke.sh and native-guidance-smoke.sh are test scripts; none were reviewed beyond confirming that.

What it uses
  • Reads your prompts: yes
  • Sees tool calls: yes
  • Blocks or changes tool calls: yes
  • Reads or writes files: yes
  • Runs programs on your machine: no
  • Calls the model (uses tokens): yes
  • Sends data over the network: no
  • Stores data: yes
  • Shows something on screen: yes

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.

Made this mod? Add a badge to your README

modsforClaude badge for ruflo-mods

Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.

[![Listed on modsforClaude](https://modsforclaude.com/badge/ruflo-mods.svg)](https://modsforclaude.com/mods/ruflo-mods/)

← All mods