🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
TypeScript agentic-aiagentic-frameworkagentic-workflowagentsai-agentsai-assistantai-skillsautonomous-agentsclaudecodexdsh-pluginharnessmcp-servermulti-agentmulti-agent-systemsnpmskillsswarmswarm-intelligencetypescript
docs(adr): correct stale claims in ADR-404/444/445/446/448 per the capability review
ruv0c7b152c314d
diff --git a/v3/docs/adr/ADR-404-claude-code-mods-function-hooks.md b/v3/docs/adr/ADR-404-claude-code-mods-function-hooks.mdindex 7e9efe74c9..25c54cc64e 100644--- a/v3/docs/adr/ADR-404-claude-code-mods-function-hooks.md+++ b/v3/docs/adr/ADR-404-claude-code-mods-function-hooks.md@@ -83,6 +83,8 @@ The upstream reference pattern is a hybrid `hooks.json` holding classic command| `engine.create` | none | Adds the `$.ruflo` noun, and takes the status-line drawer from the `$` beneath. || `ui.status` (op) | statusline | One line: ruflo's own parts (skipped where the ruflo `statusline.cjs` runs) followed by other mods' segments. Only measured facts: an unmatched route says "no route (30%)", and nothing is estimated (#3567/#3572). |+The table above is the original behaviour. Later work added three things it does not list: a research guard (`hooks/guard/research.ts`), `command.run` events (the `/ruflo-mods` command and the `/…-mod` commands of the plugin mods), and the guidance observation loop (ADR 447, off by default). See ADR 447.+`/ruflo-mods` is namespaced. The mod never registers a built-in's name such as `/diff`, or another plugin's (`/ruos*`, `ruflo-swarm-*`), so it composes with Claude Code's built-in mods instead of shadowing them.### The `$.ruflo` noun (contract: `plugins/ruflo-mods/types/index.d.ts`)@@ -146,7 +148,7 @@ Middleware order is nesting, the first registered wrapping the rest. Every ruflo- **Tighten only.** `tool.check` merges by rank; a tie returns the chain's own object, so the `rule` `sec-default` reads is never rewritten. A property test covers every chain verdict, five policy states and seven inputs. A kit test covers two tighten-only mods side by side (ruflo plus a ruOS-style guard): a deny from either holds.- **Fail closed, by one step, where ruflo guards something.** An unreadable or invalid policy projection, or a failure in the chain beneath, turns `allow` into `ask`. "Missing" means ENOENT only.- **Input validation.** Every event field the mod reads is type-checked before use. Segments are sanitized as above. The projection is schema-validated rule by rule.-- **No network, process, model or MCP calls; no secrets.** The smoke contract enforces this statically. The only environment variable written is `RUFLO_MODS_OWNS`; the only one read is `HOME`. No command is ever built from event input.+- **No network, process, model or MCP calls; no secrets.** The smoke contract enforces this statically (step 8 is a regex for a literal `key = "…"` assignment: it catches a hard-coded key, not every way a secret could reach a hook; `ruflo-mods` has no runtime secret guard). The only environment variable written is `RUFLO_MODS_OWNS`; the only one read is `HOME`. No command is ever built from event input.- **Policy projection.**- **Why it exists.** A module cannot read `state.json`, whose receipt ledger is 43 MB here and over the 4 MiB limit. So `policy-runtime.ts` writes `.claude-flow/policy/claude-code.json` after each successful state write, owner-only and atomically.- **What it holds.** The mode and only the rules whose `actions` name `claude-code.` explicitly. Rules with no actions or `*` keep their MCP-only meaning, and the engine's default-deny never applies to Claude Code tools.@@ -163,7 +165,7 @@ Middleware order is nesting, the first registered wrapping the rest. Every ruflo### Scaffolding: governed mods for ruflo users-`ruflo-plugin-creator` 0.3.0 adds a `create-mod` skill and `templates/mod/`. The template is a working mod:+`ruflo-plugin-creator` 0.3.0 (0.4.0 on 2026 10 05) adds a `create-mod` skill and `templates/mod/`. The template is a working mod:- a hybrid `hooks.json` whose classic fallback exits while the module runs (`MY_MOD_ACTIVE`);- a host adapter over literal `$` calls, refusal-tolerant;@@ -176,12 +178,12 @@ It is validated, kit-tested and live-loaded on 2.1.287. The skill carries the ru| Suite | Where | Result ||---|---|---|-| Engine kit (`claude plugin test`), Claude Code 2.1.287 | `plugins/ruflo-mods/tests` | 15/15 |+| Engine kit (`claude plugin test`), Claude Code 2.1.287 | `plugins/ruflo-mods/tests` | 15/15 when written; 39 in 8 files on 2026 10 05 || Engine kit, mod template | `plugins/ruflo-plugin-creator/templates/mod/tests` | 1/1 |-| Declaration-faithful harness (vitest, what CI runs) | `v3/@claude-flow/cli/__tests__/mods` | 99/99 |+| Declaration-faithful harness (vitest, what CI runs) | `v3/@claude-flow/cli/__tests__/mods` | 99/99 when written; about 147 `it(` calls in 12 files on 2026 10 05 || Typecheck against the 2.1.287 generated types | `plugins/ruflo-mods`, the template | clean || `claude plugin validate` (2.1.287) | plugin, template, marketplace | pass |-| Smoke contracts | ruflo-mods 10/10, ruflo-plugin-creator 11/11 | pass |+| Smoke contracts | ruflo-mods 10/10, ruflo-plugin-creator 11/11 when written; 11/11 and 14/14 on 2026 10 05 | pass || Existing CLI suite | `v3/@claude-flow/cli` | Same 4 memory failures as `origin/main` in the same environment, plus `helper-signing` until the manifest is re-signed |The engine-kit files import `claude-code/testing`, which the root vitest cannot resolve, so they are listed in `scripts/ci-test-baseline.txt` as #3605 and #3607 do.diff --git a/v3/docs/adr/ADR-444-claude-controls-the-console.md b/v3/docs/adr/ADR-444-claude-controls-the-console.mdindex 16cf2588f9..fb41d668bb 100644--- a/v3/docs/adr/ADR-444-claude-controls-the-console.md+++ b/v3/docs/adr/ADR-444-claude-controls-the-console.md@@ -14,7 +14,7 @@ The console sends commands and guidance to Claude Code. The reverse is as useful## 2. What was checked (and found)-A throwaway mod registered a tool with `$.tool.register` and answered it from a `tool.call` hook. In this Claude Code build (2.1.x) the tool is listed to the model as `mcp__<plugin>__<name>` even in `claude -p`, and the call ran. The result must be a **string** (an object is refused by the tool's schema check). `scripts/e2e-control.sh` (live, gated by `RUFLO_E2E_LIVE=1`, a few cents with haiku) then ran four real sessions: control off (no tool exists for the model), read (state and open work, a field is refused naming the level), write with auto-confirm (the goal is set and planned, Claude's own call creates the mission) and write with ask (the same action waits for the person and Claude does not confirm it). The live runs found three real problems that unit tests had not: the classifier read "spends nothing" as spending, so creating a mission was refused at `write`; a goal's follow-up (a billed guidance turn) is queued asynchronously after the call returns, so it must not run when Claude is the one driving (the console now skips the offer for 60 s after any tool call); and Mission Control reports its own actions on `last`, not on the generic outcome, so a result was reported without its detail. The last live run then showed that Claude was told "Ran" before the mission existed: the runner deliberately does not wait for an action that brings its own `run` (so a long harness run does not hold a person's buttons), so `confirm()` returns early. The runner now exposes `finished()`, the model tools wait on it for up to 90 s (after that the answer is "Started… still running; call console_state later"), and a person's clicks behave as before. An audit of all 270 palette entries then found `stop the swarm`, `memory cleanup` and `memory migrate` classed as plain writes; they are `delete` now (105 entries read, 101 write, 27 network, 2 spend, 4+ delete).+A throwaway mod registered a tool with `$.tool.register` and answered it from a `tool.call` hook. In this Claude Code build (2.1.x) the tool is listed to the model as `mcp__<plugin>__<name>` even in `claude -p`, and the call ran. The result must be a **string** (an object is refused by the tool's schema check). `scripts/e2e-control.sh` (live, gated by `RUFLO_E2E_LIVE=1`, a few cents with haiku) then ran four real sessions: control off (no tool exists for the model), read (state and open work, a field is refused naming the level), write with auto-confirm (the goal is set and planned, Claude's own call creates the mission) and write with ask (the same action waits for the person and Claude does not confirm it). The live runs found three real problems that unit tests had not: the classifier read "spends nothing" as spending, so creating a mission was refused at `write`; a goal's follow-up (a billed guidance turn) is queued asynchronously after the call returns, so it must not run when Claude is the one driving (the console now skips the offer for 60 s after any tool call); and Mission Control reports its own actions on `last`, not on the generic outcome, so a result was reported without its detail. The last live run then showed that Claude was told "Ran" before the mission existed: the runner deliberately does not wait for an action that brings its own `run` (so a long harness run does not hold a person's buttons), so `confirm()` returns early. The runner now exposes `finished()`, the model tools wait on it for up to 90 s (after that the answer is "Started… still running; call console_state later"), and a person's clicks behave as before. An audit of all 270 palette entries then found `stop the swarm`, `memory cleanup` and `memory migrate` classed as plain writes; they are `delete` now (105 entries read, 101 write, 27 network, 2 spend, 4+ delete: these sum to 239 of the 270, the rest were not itemised, and no test pins the split).## 3. Decisiondiff --git a/v3/docs/adr/ADR-445-agentdb-as-a-mod.md b/v3/docs/adr/ADR-445-agentdb-as-a-mod.mdindex f1106d51b0..7b4ef13ae3 100644--- a/v3/docs/adr/ADR-445-agentdb-as-a-mod.md+++ b/v3/docs/adr/ADR-445-agentdb-as-a-mod.md@@ -55,7 +55,7 @@ Settings are the plugin's `userConfig`, which the console's Settings page alread## 6. Result (2026-10-04)-- Implemented as designed: `hooks/{options,screen,recall,tools,guard,command,status,register}.ts`, all under 120 lines; `claude plugin validate` lists the hooks (`session.start`, `prompt.submit`, `tool.call`, `command.run`) and only `$.clock`, `$.command`, `$.fs.write`, `$.mcp.call`, `$.session.root`, `$.tool.list` as calls: no `$.http`, no `$.process`.+- Implemented as designed: `hooks/{options,screen,recall,tools,guard,command,status,register}.ts`, each under 300 lines (`register.ts` is 195, `screen.ts` 282; the first draft was under 120); `claude plugin validate` lists the hooks (`session.start`, `prompt.submit`, `tool.call`, `command.run`) and only `$.clock`, `$.command`, `$.fs.write`, `$.mcp.call`, `$.session.root`, `$.tool.list` as calls: no `$.http`, no `$.process`.- **The mod reads memory with `$.mcp.call`** on the connected server (the name is split out of `$.tool.list()`), so it needs no CLI and is not blocked by a permission prompt; `hooks_recall` / `agentdb_hierarchical-recall` / `agentdb_pattern-search` take `query` and `topK` (checked against the tool schemas).- 26 tests under `claude plugin test` (screening, parsing, the guard, the prompt hook with a mocked tool, the deadline, the cache, `/agentdb-mod`). The console adds a status parser spec and the Memory page section; the console's own results are unchanged (165/39 under `claude plugin test` before and after; the 39 need the CI kit).- Cost of the mod's own work (`scripts/bench.mjs`, median of 7): scan of 2 KB 8.8 µs; guard on a clean memory write 5.5 µs; parse + screen + frame of 5 results 22 µs; 20 KB adversarial input (ReDoS probe) 0.53 ms, linear. All negligible beside the read it wraps.diff --git a/v3/docs/adr/ADR-446-plugins-as-mods.md b/v3/docs/adr/ADR-446-plugins-as-mods.mdindex 1cebc606d0..b51f25bb05 100644--- a/v3/docs/adr/ADR-446-plugins-as-mods.md+++ b/v3/docs/adr/ADR-446-plugins-as-mods.md@@ -20,6 +20,8 @@ Not done, on purpose: per-prompt context (ADR-445 piece 1) is not added to any oEight headless workers, each in its own git worktree and branch from main, each owning 4 to 7 plugins and nothing else; merged into one branch with no conflicts. Checked by the integrator, not taken from the workers' reports: every branch touches only its assigned plugin directories; `claude plugin validate` passes for all 39; each plugin's own smoke passes (fleet-wide `smoke-all-plugins`: 46 of 46 plugins); no hook file makes a network or process call (`$.http`, `$.process`, `child_process`, `fetch`); every hook file is under 500 lines. `claude plugin test` passes for every mod's own tests; for four plugins (agntcy, arena, graph-intelligence, plugin-creator) the harness also tries to load files that are not mod tests (their existing vitest suites, the plugin-creator mod template) and reports them as failed to load; those files are unchanged and run under their own runners.+Count note (2026 10 05, from the tree): `plugins/` has 46 plugin directories, each with a manifest, and 44 of them ship a function-hook mod. 35 have a `hooks/status.ts`. "39" is the number of plugins this ADR's eight workers added a mod to; the other mods are the five existing ones (`ruflo-mods`, `ruflo-console`, `ruflo-swarm`, `ruflo-ruos`, `ruflo-agentdb`). The "46 of 46" smoke figure was a run result on the day, not re-run for this note.+## 3. Consequences and follow-ups- Each mod carries its own copy of the small secret screen from ADR-445 (`screen.ts`): plugins install as separate directories, so there is nowhere shared to import from. A fix to the screen must be applied in each copy. Since PR #3711, `scripts/sync-mod-screen.mjs` regenerates the shared region of each copy from one source and the all-plugins smoke runs it with `--check`.diff --git a/v3/docs/adr/ADR-448-console-the-room-shared-activity-feed.md b/v3/docs/adr/ADR-448-console-the-room-shared-activity-feed.mdindex a2b480cb0c..6b84f4c96f 100644--- a/v3/docs/adr/ADR-448-console-the-room-shared-activity-feed.md+++ b/v3/docs/adr/ADR-448-console-the-room-shared-activity-feed.md@@ -4,7 +4,7 @@ Status: Accepted (implemented in ruflo-console 0.33.0; §3.2, the expiry event,Date: 2026 10 04-Scope: `plugins/ruflo-console`: new `hooks/views/room.ts`, `hooks/data/room.ts`, `hooks/room.ts`; edits to `hooks/state.ts` (`ViewId`, `VIEWS`, `Pending`), `hooks/views/pane.ts` (`BODIES`), `hooks/runner.ts` (`ask`), `hooks/palette.ts` (three new ids), `hooks/model-tools.ts` (`console_state` reads the new feed).+Scope: `plugins/ruflo-console`: new `hooks/views/room.ts`, `hooks/data/room.ts`, `hooks/room.ts`; edits to `hooks/state.ts` (`ViewId`, `VIEWS`, `Pending`), `hooks/views/pane.ts` (`BODIES`) and `hooks/runner.ts` (`ask`). As built, `hooks/palette.ts` and `hooks/model-tools.ts` carry no room code: the three senders are wired in `hooks/room.ts`, and Claude reads the feed by opening the `room` page and calling `console_state`. The feed lives in memory, per console session.Builds on: ADR 407 (cockpit), ADR 416 (Timeline and Events — read-only, per-page), ADR 444 (Claude controls the console — the model tools and the pending-confirm contract this ADR extends).@@ -81,4 +81,4 @@ An expired confirm must leave a trace. `confirm()` (`runner.ts:147-150`) gains o- **What the person said** is kept (at most 50) with the label its confirm showed; its state (waiting for your yes, sent, not sent: why, not confirmed) is derived from the pending action and the last outcome, never assumed.- **Limits that hold:** draft 500 chars, find text 80, feed 200 items after a merge of at most ~600, every text from every source passes `plain()` (control and bidi characters stripped, length cut), and nothing in the feed is an action: an instruction inside an event is only text. Measured: merging 300 events, 200 Claude actions and 50 sayings takes well under 5 ms (asserted in `tests/room.spec.ts`).- **Checked live:** a real Claude (haiku) opened the page through `console_open` and read its four sections through `console_state`.-- **Tests:** `tests/room.spec.ts` (13), plus the page is covered by the dead-button sweep, the every-affordance-refused sweep, the guide, ask, nav, boot-log and self-check suites (kit suite 211/0, vitest 871).+- **Tests:** `tests/room.spec.ts` (13), plus the page is covered by the dead-button sweep, the every-affordance-refused sweep, the guide, ask, nav, boot-log and self-check suites (kit suite 211/0, vitest 871 at the time; about 990 `it(`/`test(` calls in 103 files on 2026 10 05).