π 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): ADR-450 and ADR-451 implementation status tables; status lines and index rows brought up to date
ruv632628ca640e
diff --git a/v3/docs/adr/ADR-450-mod-system-threat-model.md b/v3/docs/adr/ADR-450-mod-system-threat-model.mdindex 7118049543..b1fb053820 100644--- a/v3/docs/adr/ADR-450-mod-system-threat-model.md+++ b/v3/docs/adr/ADR-450-mod-system-threat-model.md@@ -1,6 +1,6 @@# ADR 450: Threat model of the mod system (console control, guards, recall, status files)-Status: Proposed+Status: Proposed; first slice and recommendations T1 (partly), T6, T8, T12 implemented, T19 recorded without a fix; T9 and the default confirm mode await a human decision. See section 9.> **Integration note (loop, 2026-10-05).** The worker's commit also changed `ruflo-agentdb/hooks/screen.ts` (wider hidden set + NFKC fold, T3/T5) and `guard.ts` (scan keys, T7) with `ruflo-agentdb/tests/threat.test.ts`. Those files were rebased onto the canonical shared screen (#3711/#3715/guard-hardening) and are **not** in this change; where the ADR says an agentdb fix exists, read it as 'pending in the follow-up'. The guard-hardening branch's shared `textsOf` already scans keys and the soft-hyphen/bidi-isolate/Mongolian set. This change ships the console fixes (T1 truthful classes incl. `dt-term-exec` -> `full`, T3 whole-sequence ANSI/OSC stripping and the wider hidden set in `plain()`, sanitised agentdb status text) and the model-tool spec `threat-model.spec.ts`.@@ -8,6 +8,8 @@ Date: 2026 10 05Builds on: ADR-404 (ruflo as a mod, trust gate), ADR-444 (Claude controls the console), ADR-445 (AgentDB as a mod), ADR-446 (39 plugin mods), ADR-447, ADR-448 (the Room); T19 added from the PR #3737 research+Related: ADR-449 (guidance learning loop), ADR-451 (capability roadmap; its item 4 governor must respect T19), ADR-452 (overnight hardening record)+## 1. WhyMods run with Claude Code's own access. ADR-444 then let the model itself drive the console (`console_state | console_open | console_set | console_run`) and, with `modelConfirm: auto`, confirm its own actions. Text from files, peers, memory and the model flows into prompts and onto the screen. This ADR lists what can be attacked, what stops each attack today (with the line that does it), what was actually attempted for this review, what was fixed, and what is left as a recommendation.@@ -232,3 +234,33 @@ for (const p of readdirSync('plugins')) { const h = join('plugins', p, 'hooks');const bearing = [...reg].filter(n => /(_store|_save|_set|_import|_publish|_send|_broadcast|_execute|_eval|_fill|_type|_create|_exec$|_prompt|_tool$|_write|_update|_learn|_remember|_post|_message|_invite|_grant|_ingest|_add|_record)/.test(n))console.log(bearing.filter(n => !watched.has(n)).sort().join(' '))```++## 9. Implementation status (checked 2026-10-05 against `origin/main`)++Sections 1-8 are left as written; this section records what happened after. The decisions in section 6 did not change. Every PR below was confirmed MERGED with `gh pr view`. "Verified" means I read the code on `origin/main` or the merged PR title; anything else says so. Current versions: console 0.33.11, agentdb 0.4.6.++| T | Recommendation (short) | Status | PR / evidence |+|---|---|---|---|+| T1 | Truthful action classes; a declared `class` per spec | **Partly done.** `classOf` hardened and the shell-run entries fixed. A declared `class` on each `ActionSpec` is **open**: `classOf` in `model-tools.ts` still infers from label, args and note. | #3717 (0.33.3); verified by reading `model-tools.ts` |+| T2 | `lstat`, refuse non-regular status files | Open (not verified: no `lstat` in `plugins/ruflo-console/hooks`) | none |+| T3 | Whole-sequence ANSI/OSC stripping, wider hidden set in `plain()`; sanitised agentdb status text | Done for the console | #3717 (per the ADR's own integration note; not re-run) |+| T4 | `--flag=value` and a `--` before positional text | **Partly.** Several entries (for example `vec-workers-dispatch`, `vec-hooks-route`) pass `--` before the text; a whole-palette audit was not done (not verified) | verified in `data/vector.ts` |+| T5 | Recall poisoning: invisible-character and fullwidth folding, provenance, threshold | **Open.** The integration note says the agentdb screen change was not merged with #3717, and `NFKC` appears nowhere under the agentdb, mods or console hooks on `main` (grep). Recall is still lowest-authority only by framing. | none |+| T6 | One shared guard core; guard the six unwatched tools; fail closed | **Done.** One screen source with a drift check; `browser_fill`, `browser_type`, `x_federation_invite_mint`, `config_import`, `memory_import`, `session_import` now named by guards (verified in `hooks/` of five plugins); truncation fails closed; `memory_import` reads the file it points at, failing open past a size bound. The "known holes" count went 32 to 0. Split-across-calls secrets are still not caught (the guards are stateless). | #3711, #3715, #3706 (tool-name CI check), #3727, #3734, #3745, #3764 |+| T7 | Conformance test that no `additionalContext` source reads `.claude-flow/*-mod/` | Open (no such test found; not verified) | none |+| T8 | `auto` never applies to network and above; secret screen on outgoing text; per-session budgets; install class | **Done.** Auto-confirm never answers network, spend or delete; the secret screen runs on text Claude passes; install action class and per-session budgets per class | #3720 (0.33.4), #3730 (0.33.5) |+| T9 | Default `refuse-risky` for session-written mods | **Human decision, not changed.** `modTrust` still defaults to `observe` (verified in `ruflo-mods` `plugin.json`). Listing mods admitted before the gate is open. | none |+| T10 | Read the policy projection only from user scope or require a signature | Open | none |+| T11 | Per-session nonce in status files | Open | none |+| T12 | Environment override may only lower control | **Done.** `lowerOnly` in `ruflo-console/hooks/register.ts` | #3720 |+| T13 | Exact id for model calls; fuzzy only for people | Open: `runById` still falls back to `filterPalette` (verified in `runner.ts`) | none |+| T14 | Confirmation prompt shows class and level before the quoted payload | Open (not verified) | none |+| T15 | Provenance tag on model-written memory; drop from recall unless promoted | Open (grep found no provenance marker in agentdb hooks) | none |+| T16 | Room as a command channel | Held at review time, no change needed | n/a |+| T17 | Pending slot and take-over | Held at review time, no change needed | n/a |+| T18 | Denial of service by the model | Held for the console; the cap does not span turns (see T8's per-session budgets) | n/a |+| T19 | `http.fetch` hook sees other plugins' requests | **Recorded, no fix**, by design of the entry. ADR-451 item 4's governor is not built. | #3737 (research), #3740 (this entry) |++**Human decisions still open.** (1) Whether `modelConfirm` should default to `ask`: `DEFAULT_AI` in `ruflo-console/hooks/settings.ts` still has `modelConfirm: 'auto'`, with `modelControl: 'off'` so it matters only after the person raises control; T8's always-ask classes bound it. (2) Whether T9's default becomes `refuse-risky`.++**Not verified:** the regression-test counts in section 7 were not re-run for this update; no code or test result was re-measured here, only PR state and the files named above.diff --git a/v3/docs/adr/ADR-451-mod-capability-roadmap.md b/v3/docs/adr/ADR-451-mod-capability-roadmap.mdindex 717460af34..f979ef3b31 100644--- a/v3/docs/adr/ADR-451-mod-capability-roadmap.md+++ b/v3/docs/adr/ADR-451-mod-capability-roadmap.md@@ -1,11 +1,13 @@# ADR 451: Mod capability roadmap: what the Claude Code mod API can do that ruflo does not use yet-Status: Proposed+Status: Proposed; items 1-3 and 5-7 implemented (ruflo-mods 0.3.9), all default off; items 4, 8, 9, 10 not built. See section 8.Date: 2026-10-04Builds on: ADR-404 (ruflo as a mod), ADR-445 (AgentDB as a mod), ADR-446 (the plugin fleet as mods), ADR-447 (guidance observation loop)+Related: ADR-449 (guidance learning loop), ADR-450 (mod-system threat model; its T19 is the risk item 4 must respect), ADR-452 (overnight hardening record)+Evidence: `v3/docs/validation/mod-api-coverage-2026-10.md` (the full coverage table)## 1. Context@@ -267,3 +269,31 @@ lists `tool.describe{tool=/^mcp__(?:plugin_ruflo-core_ruflo|claude-flow|ruflo)__renamed, like the string-matched guards ADR-446 notes. Mitigation: item 5's doctor, and a test thatevery hint key exists in the CLI's tool registry (not written).- This ADR changes no default and enables nothing.++## 8. Implementation status (checked 2026-10-05 against `origin/main`)++This section records what shipped; sections 1-7 are left as written on 2026-10-04 (so "item 1 is prototyped in this change; the rest are not started" in section 2 describes that day, not today). No decision above changed. Every PR below was confirmed MERGED with `gh pr view`; versions are `plugins/ruflo-mods/.claude-plugin/plugin.json` on `origin/main` (now 0.3.9) and the commit that first set each option.++| # | Item | Option | Shipped | PR | First in | Default | Evidence |+|---|---|---|---|---|---|---|---|+| 1 | `tool.describe` hints | `toolHints` | yes | #3716 | 0.3.0 | off | Live: `ruflo-mods-live-2026-10.md` section 1 (hint seen under the 2 asked-about tools, none under an untabled tool; status `6 tool(s) described`). The section 3 A/B (15-point gain in correct first choice, at most 1% more input tokens) was **not run**, so the item is shipped but its stop rule is unevaluated. |+| 2 | `agent.offer` trim | `agentTrim` (+ `agentTrimKeep`) | yes | #3729; live fixes #3733, text #3761 | 0.3.1 (wording 0.3.2, 0.3.6) | off | Live: `ruflo-mods-live-2026-10.md` section 2; measured saving: `ruflo-mods-trim-measure-2026-10.md` (#3760). |+| 3 | `session.receive` / `session.send` screens | `deliveryScreen` | yes | #3741 | 0.3.3 | off | Unit tests (`tests/delivery.test.ts`) and the plugin smoke. No live headless run is recorded on `main`, and the 50 + 50 fixture corpus with its 90% / 2% thresholds in section 3 is not recorded here either (not verified). |+| 4 | Call-time capability governor | none | **no** | none | none | n/a | The two-plugin feasibility test was run for ADR-450 T19 (#3737, #3740): a user-tier hook saw another plugin's `http.fetch` calls. No governor code exists. T19 constrains it: act only on `origin.tier === "user"`, never deny a built-in origin, log host and count only. |+| 5 | Capability probe | `capabilityProbe` | yes | #3763 | 0.3.7 (0.3.6 went to the #3761 wording fix) | off | Unit tests (`tests/probe.test.ts`) and the plugin smoke, which asserts the probe hook never denies or rewrites. No live run recorded. The CI diff of event names against a manifest (section 4, point 3) is **not** built. |+| 6 | `session.end` rollup ledger | `sessionRollup` | yes | #3766 | 0.3.8 | off | Unit tests (`tests/rollup.test.ts`). As built: counters only, last 50 sessions, under 32 KB, user-global (the design said a 200-entry ring in `$.store`); the kill -9 test in section 3 is not recorded (not verified). |+| 7 | `session.compact` carry | `compactCarry` (design name `compactKeep`) | yes | #3768 | 0.3.9 | off | Unit tests (`tests/compact.test.ts`). The canary-swarm-id /compact check in section 3 is not recorded (not verified). |+| 8 | `turn.step` downshift | none | **no** | none | none | n/a | Not started. |+| 9 | `$.model.classify` route fallback | none | **no** | none | none | n/a | Not started. |+| 10 | `$.agent.register` lanes, hash-pinned trust | none | **no** | none | none | n/a | Not started; the feasibility question (no Node in the mod environment) is still open. |++### What the measurements say++- **`agentTrim` saving (measured, `ruflo-mods-trim-measure-2026-10.md`):** 4,236 prompt tokens per request, about 18% of that session's prompt, with 59 of 69 agent types hidden (about 72 tokens per hidden type; haiku, one catalogue, 3 repetitions, spread 139 tokens off and 44 on). That clears the 3,000-token bar in section 3 item 2. The 20-task replay with zero failed `Agent` dispatches was **not** run.+- **Corrected dispatch behaviour (same doc):** an unused type the prompt does not name is **refused at dispatch**, as the design in item 2 says. The earlier live note (`ruflo-mods-live-2026-10.md`, claim 1) that "a hidden type still spawns by name" is right only when the spawn prompt names the type (the `isKept` prompt-name rule keeps it at dispatch). In a headless session a prompt-named type is not added back to the listing, so `agentTrimKeep` is the reliable way to keep one. The option text was corrected in 0.3.2 and 0.3.6; behaviour never changed.+- **Latency:** `mod-hook-latency-2026-10.md` (measured before items 3-7 existed) found about 18-21 microseconds per unrelated `tool.call` across the 40 plugins that register one. It does not cover the later options.+- **Other validation docs on `main`:** `ruflo-mods-live-paths-2026-10.md` (routing, the deny list, the `session.json` heartbeat and `/ruflo-mods`, all proven live) covers the base mod, not the options above.++### Still open from sections 4 and 7++The event-name CI diff, the check that every hint key exists in the CLI tool registry, and the A/B for item 1 are not built or run.diff --git a/v3/docs/adr/INDEX-mod-system.md b/v3/docs/adr/INDEX-mod-system.mdindex cd41ebaac0..71fc5ed8da 100644--- a/v3/docs/adr/INDEX-mod-system.md+++ b/v3/docs/adr/INDEX-mod-system.md@@ -14,8 +14,8 @@ Two files carry the number 430 (the menu's accents, and the menu-design amendmen| 446 | The plugin fleet as mods (39 plugins) | Accepted | 10-04 | 404, 445 | β | #3700 | 39 plugins; 44 plugins have a mod today | per-plugin `claude plugin test`, `smoke-all-plugins` || 447 | Native mod guidance and observation loop | Accepted | 10-04 | 404, 445, 322A | β | #3702 | ruflo-mods 0.2.0 + CLI `guidance` adapter | `guidance.test.ts`, `mods-guidance-e2e.test.ts`, workflow `mod-guidance.yml` || 449 | Guidance learning loop on the mod system | Proposed | 10-04 | 404, 447, 322A/C, 446 | β | #3722 (doc only) | not built: its "New" rows are unimplemented | β |-| 450 | Threat model of the mod system | Proposed | 10-05 (see note) | 404, 444, 445, 446, 447, 448 | β | merged: #3717 (console 0.33.3: T1 truthful classes incl. dt-term-exec, T3 plain()); T8+T12 in #3720 (0.33.4); T19 (`http.fetch` read path, recorded without a fix) in #3740 | ruflo-console `threat-model.spec.ts`, `control-guards.spec.ts` | `threat-model.spec.ts`, `threat.test.ts` |-| 451 | Mod capability roadmap | Proposed (items 1β3 shipped, default off) | 10-04 | 404, 445, 446, 447 | β | #3716 (ADR + `toolHints`, 0.3.0); `agentTrim` item 2 (0.3.1, `33a60c715`); `deliveryScreen` item 3 (0.3.3, `cd01a4aea`); fixes 0.3.2, 0.3.4 | ruflo-mods 0.3.4 | `tests/describe.test.ts` |+| 450 | Threat model of the mod system | Proposed (T1 part, T6, T8, T12 done; T19 recorded; T9 and default confirm await a human) | 10-05 (see note) | 404, 444, 445, 446, 447, 448; related 449, 451, 452 | β | merged: #3717 (console 0.33.3: T1 truthful classes incl. dt-term-exec, T3 plain()); T8+T12 in #3720 (0.33.4), T8 install class in #3730 (0.33.5); T6 guards #3727, #3734, #3745, #3764; T19 (`http.fetch` read path, recorded without a fix) in #3740 | ruflo-console `threat-model.spec.ts`, `control-guards.spec.ts` | `threat-model.spec.ts`, `threat.test.ts` |+| 451 | Mod capability roadmap | Proposed (items 1β3, 5β7 shipped, all default off; 4, 8, 9, 10 not built) | 10-04 | 404, 445, 446, 447; related 449, 450, 452 | β | #3716 (ADR + `toolHints`, 0.3.0); `agentTrim` item 2 (0.3.1, `33a60c715`); `deliveryScreen` item 3 (0.3.3, `cd01a4aea`); `capabilityProbe` item 5 #3763 (0.3.7); `sessionRollup` item 6 #3766 (0.3.8); `compactCarry` item 7 #3768 (0.3.9); agentTrim live fixes #3733 and measurement #3760; fixes 0.3.2, 0.3.4 | ruflo-mods 0.3.9 | `describe`, `agents`, `delivery`, `probe`, `rollup`, `compact` tests || 452 | Mod-system overnight hardening: findings, changes, open items | Accepted (record) | 10-05 | 404, 444, 445, 446, 450, 451 | β | #3735; records #3706, #3711, #3713, #3714, #3715, #3717, #3719, #3727, #3732, #3733, #3734 (all merged) | no code of its own | `probe-mod-guards`, `sync-mod-screen --check` |## Console: mission control and Claude control@@ -70,6 +70,6 @@ Other ADRs outside 404-451 that the mod ADRs lean on: 150 (removable integration- **Dates.** ADRs 444, 445 and 446 were dated 2026 10 05 but were committed on 2026-10-04 (14:36 -0400, merged 19:24 UTC); corrected. ADR 450 is still dated 2026 10 05 in its own header although its file was added on 2026-10-04 (7725b867f); the owner should fix the file.- **ADR 405 and 406** still read "Proposed" although parts shipped (ruflo-ruos 0.1.0 for 405; mission records and the console for 406, which accepted ADRs 408, 409 and 443 build on). Their owners should decide whether to mark them Accepted with the unbuilt parts split out; this index does not change them.-- **Forward links.** 449, 450 and 451 are on `main`. 447 names all three as followers. They do not yet cite each other: 449 cites 404, 446, 447 but not 450 or 451; 450 cites 444 to 448 but not 449 or 451; 451 cites 445 to 447 but not 449 or 450; 452 cites 450 and 451.-- **ADR files whose own Status line differs from this index:** 451 (file: "Proposed"; index adds that items 1β3 shipped). No other row disagrees; 405, 406, 449, 450 are "Proposed" in both, and 450 still reads Proposed although #3717, #3720 and #3740 shipped parts of it.+- **Forward links.** 449, 450 and 451 are on `main`. 447 names all three as followers. They do not yet cite each other: 449 cites 404, 446, 447 but not 450 or 451; 450 cites 444 to 448 but not 449 or 451; 451 cites 445 to 447 but not 449 or 450; 452 cites 450 and 451. As of this update 450 and 451 name 449 and 452 and each other in a `Related`/`Builds on` line; 449 still does not name 450 or 451 (not edited here).+- **ADR files whose own Status line differs from this index:** none for 450 and 451, whose Status lines now carry the same implementation summary (section 9 of 450, section 8 of 451 hold the tables). 405, 406 and 449 are "Proposed" in both.- **ADRs with no stated parent:** 434, 436, 437, 438, 439, 440, 441 carry no `Builds on` or `Extends` line.