Closes Part 1 of ADR-098. Documents the 5 AgentDB controllers
activated in 3.6.23+/3.6.24 (G7 from ADR-095) so end users of
ruflo-agentdb and ruflo-knowledge-graph know they're available.
ruflo-agentdb/README.md:
New "G7 controllers (activated in ruflo 3.6.23+ / 3.6.24)" section
with a 5-row table (controller / role / source). Each entry cites
the dist file inside the agentdb npm package so users can verify
the wiring locally:
gnnService — GNN embeddings + relational scoring
rvfOptimizer — quantize + dedupe vector blocks
mutationGuard — WASM proof generation for state mutations
attestationLog — hash-chained audit log (.swarm/attestation.db)
GuardedVectorBackend — wraps vectorBackend with guard + log
Notes graphAdapter still pending external graph-DB connection.
Pointers to agentdb_controllers / agentdb_health for runtime
inspection.
ruflo-knowledge-graph/README.md:
Targeted G7 section explaining which controllers help this plugin
specifically:
gnnService — augments pathfinder semantic_similarity
with structural relational scoring
rvfOptimizer — collapses near-duplicate entity vectors
(same class re-exported from multiple
modules)
mutationGuard +
attestationLog +
GuardedVectorBackend — proof-gated writes for federated knowledge
import; .swarm/attestation.db audit trail
Notes graphAdapter as a future improvement that would replace the
current flat-causal-edge view with a real graph-DB backend.
Plugin versions:
ruflo-agentdb 0.1.0 → 0.2.0 (minor — capability sync)
ruflo-knowledge-graph 0.1.0 → 0.2.0 (minor — capability sync)
ADR-098 Part 1 complete: 6 plugins now reference recent ADR
capabilities. Acceptance: each affected plugin has a paragraph or
bullet list referencing the relevant ADR — done for the 6 plugins
flagged in the Part 1 table.
Remaining ADR-098 work:
- Part 2: token diet (4 fat agent prompts → ≤ 60 lines)
- Part 5: worker dispatch (≥ 8 work-producing agents)
Adds ADR-097 federation budget circuit breaker references to
ruflo-cost-tracker. The federation_send max_hops / max_tokens /
max_usd surface is exactly the boundary this plugin should track —
flagging it now even though the bus integration (Phase 3) is
deferred.
ruflo-cost-tracker/README.md:
New "Federation budget circuit breaker pairing (ruflo 3.6.25+)"
section with:
- Field table: maxHops (default 8), maxTokens, maxUsd, hopCount,
spent.{tokens,usd}
- Phase 1 (shipped): enforce at send side
- Phase 2 (deferred): peer state machine ACTIVE/SUSPENDED/EVICTED
with $5/24h cost threshold + 50%/1h failure ratio triggers
- Phase 3 (deferred): federation_spend event bus → per-peer
rolling windows aggregated by this plugin → breaker queries
aggregate
- Honest caveat: until Phase 3, federated spend is NOT counted
in cost-report — treat as lower bound when federation is in use
Related Plugins gains a ruflo-federation entry calling out the
ADR-097 dependency.
Plugin version: 0.1.0 → 0.2.0 (minor — capability sync).
ADR-098 Part 1 progress: 3/4 slices done. Last slice covers
ruflo-agentdb + ruflo-knowledge-graph (G7 controllers — gnnService,
rvfOptimizer, mutationGuard, attestationLog, GuardedVectorBackend).
Adds ADR-096 references to ruflo-rag-memory and ruflo-rvf — the two
plugins whose write surfaces (.swarm/memory.db and
.claude-flow/sessions/*.json) are now opt-in encrypted at rest.
ruflo-rag-memory/README.md:
New "Encryption at rest (ruflo 3.6.25+)" section before "Memory
Namespaces". Covers:
- Each .swarm/memory.db write encrypted with fresh 12-byte IV via
writeFileRestricted({encrypt:true})
- Reads use readFileMaybeEncrypted(path, null) — RFE1 magic-byte
sniff for backward compat (legacy plaintext memory.db still works)
- Embeddings encrypted along with the SQLite blob — no separate
column-level encryption needed for Phase 1
- Tamper detection: flipped byte fails GCM auth, throws on read
- ruflo doctor -c encryption reports gate state
ruflo-rvf/README.md:
New section between Features and Commands explaining session
persistence's relationship to the encryption gate:
- Off-by-default: plaintext JSON at mode 0600 (legacy behavior)
- On: AES-256-GCM session saves, transparent decrypt on restore
- Important caveat: when exporting RVF files for cross-machine
transfer, the gate doesn't apply to the exported bytes — that's
transport security, separate from at-rest. Sealed-box backups
are the next phase per ADR-096.
Plugin versions:
ruflo-rag-memory 0.1.0 → 0.2.0 (minor — capability sync)
ruflo-rvf 0.1.0 → 0.2.0 (minor — capability sync)
ADR-098 Part 1 progress: 2/4 slices done. Remaining:
- slice 3: ruflo-cost-tracker — federation budget breaker pairing,
federation_spend events
- slice 4: ruflo-agentdb + ruflo-knowledge-graph — G7 controllers
Adds ADR-095/096 + audit_1776853149979 references to ruflo-aidefence
and ruflo-security-audit. End users installing either plugin now see
the host hardening features that pair with the plugin's threat
detection / scanning, not just the plugin's own surface.
ruflo-aidefence/README.md:
New "Defense-in-depth pairing (ruflo 3.6.25+)" section listing:
- validateEnv() loader-hijack denylist (LD_PRELOAD, NODE_OPTIONS,
DYLD_*, etc.) at the terminal_create MCP boundary
- File mode 0600 / dir mode 0700 on session/terminal/memory stores
via fs-secure
- Encryption at rest (CLAUDE_FLOW_ENCRYPT_AT_REST=1, AES-256-GCM,
RFE1 magic-byte sniff)
Threat scoring should account for whether the host is a denylist-
enforcing / encrypted-at-rest install.
ruflo-security-audit/README.md:
New "Patterns to scan for (audit_1776853149979 follow-up)" section
with six concrete antipatterns + remediation pointers:
- execSync(string) with template-literal args (4 closed sites cited)
- Numeric MCP inputs cast as `number` without runtime check
- Untrusted package specs flowing into npm install
- Loader-hijack env vars
- Plaintext at-rest secrets paired with ADR-096
- MCP stdin DoS (10MB cap reference)
Plus a `ruflo verify` reference confirming 55 witnesses on disk.
Plugin versions:
ruflo-aidefence 0.1.0 → 0.2.0 (minor — capability sync)
ruflo-security-audit 0.1.1 → 0.2.0 (minor — capability sync,
was patch from iter #55 model
fix)
Two more slices remain for Part 1:
- slice 2: ruflo-rag-memory + ruflo-rvf — encryption-at-rest gate
notes
- slice 3: ruflo-cost-tracker — federation budget breaker pairing,
federation_spend events
- slice 4: ruflo-agentdb + ruflo-knowledge-graph — G7 controllers
Drops the security-auditor agent from model:opus to model:sonnet.
Bounded-scope security review (CVE check, dependency audit, input-
validation review, secret scan, severity-ranked report) is sonnet-
tier work in practice — opus's long-context advantage isn't load-
bearing for the audit pattern this agent runs.
Cost delta: ~5x cheaper per token for the model call. Quality delta
expected to be small; documenting the override path so users can
flip back to opus when the audit truly needs deep cross-file taint
tracing or architectural reasoning.
Added a one-line note in the agent prompt explaining the trade-off
and when to override, so the cost-vs-quality decision is visible
to users rather than buried in an ADR.
Plugin version: 0.1.0 → 0.1.1 (patch — model rightsizing only,
no surface change).
Re-audit: 2 of 43 plugin agents on model:opus, both justified —
federation-coordinator (multi-phase trust + audit-grade logging)
and neural-trader/trading-strategist (real-money trading
decisions). Down from 3 of 43.
ADR-098 acceptance-criteria item closed: "ruflo-security-audit/
security-auditor.md is on model: sonnet."
Trial period: monitor security-audit output quality across one
release cycle. Revert to opus if regression detected.
Parts 1 (capability sync), 2 (token diet), and 5 (worker dispatch)
remain.
Closes the 16% gap (7 of 43 plugin agents) flagged by the ADR-098
audit: agents that completed tasks without feeding the SONA learning
loop, costing the system long-term improvement signal.
Each affected agent gets the canonical 5-line tail:
### Neural Learning
After completing tasks, feed the <role-specific-context>:
```bash
npx @claude-flow/cli@latest hooks post-task --task-id "TASK_ID" --success true --train-neural true
```
The "<role-specific-context>" is per-agent so the tail reads native
rather than copy-pasted:
ruflo-daa/daa-specialist adaptive-agent learning loop
ruflo-goals/goal-planner planner trajectory store
ruflo-intelligence/intelligence-spec pattern-discovery learning loop
(next RETRIEVE benefits from this run)
ruflo-iot-cognitum/telemetry-analyz telemetry baseline learning
(Z-score thresholds adapt)
ruflo-ruvllm/llm-specialist router outcome learning
(provider/model picks compound)
ruflo-sparc/sparc-orchestrator phase-quality learning loop
(quality gates self-tune)
ruflo-swarm/coordinator coordination outcome learning
(topology + role choices compound)
Re-audit confirms 0 of 43 plugin agents missing the hook (was 7 of 43).
ADR-098 acceptance-criteria item closed: "All 43 plugin agents include
a `hooks post-task --train-neural true` invocation."
Parts 1 (capability sync), 2 (token diet), 3 (model rightsizing), and
5 (worker dispatch) remain as separate iterations.
Mirrors the federation_send budget envelope work that landed in 7e1cc06
into the user-facing Claude Code plugin so end users can discover and use
the new controls.
Files:
plugins/ruflo-federation/.claude-plugin/plugin.json
Bump 0.1.0 → 0.2.0 (the budget circuit breaker is a meaningful
surface change). Add circuit-breaker / budget / token-quota
keywords. Description gains "and per-call budget circuit breaker
(ADR-097)".
plugins/ruflo-federation/README.md
New "Budget Circuit Breaker (ADR-097)" bullet under What's Included.
Full new section "Budget & Circuit Breaker" with the field table
(maxHops/maxTokens/maxUsd/hopCount/spent), defaults, hard ceilings,
validation behavior, and the Phase 1/2/3 roadmap. Notes constant-
string error responses (HOP_LIMIT_EXCEEDED, BUDGET_EXCEEDED) and
the anti-oracle posture.
plugins/ruflo-federation/commands/federation.md
Add `send <node-id> <message-type> <payload>` subcommand to the
Usage block. Document the seven budget options (--max-hops,
--max-tokens, --max-usd, --hop-count, --spent-tokens,
--spent-usd) with defaults. List the constant-string error codes.
Add the npx invocation step.
plugins/ruflo-federation/agents/federation-coordinator.md
Add responsibility #6 — budget enforcement — to the agent's job
description. Add the `send` invocation under Tools so the agent
knows the new option set.
No code changes — this is the surface that end users actually consume
when they /plugin install ruflo-federation, so it has to track the
underlying plugin's API.
Drove the live-Seed smoke harness from 11/24 to 24/25 covered, then 21/25
passing on link-local HTTP (the remaining 4 are real Seed security
boundaries, not plugin bugs).
Plugin source fixes (cli-commands.ts):
- iot query: handler now accepts --vector "[..]" JSON arg and parses to
number[] (was: passed empty array; result was always nearest-neighbour
to origin)
- iot ingest: handler now accepts --vector "[..]" --metadata "{..}" OR a
JSON array on stdin (was: stub that always passed []; the SDK rejected
empty arrays). Uses the SDK's expected {values, metadata} shape.
- New parseVector helper validates JSON array of numbers.
Smoke harness (__tests__/integration/full-plugin-smoke.mjs):
- Rewrote to 25 commands across 7 tiers (init/lifecycle, read-only,
vector ops, pair round-trip, fleet ops, firmware reads, deregister).
- Pair flow opens pair window via direct API call first (the plugin
doesn't expose pair-window control yet — known gap).
- Bearer-required failures (unpair, ingest write) classified as expected
on link-local; firmware deploy/advance/rollback explicitly skipped
(OTA-can-brick).
- Pass-through dArgs() helper handles cli-commands.ts arg-style
inconsistency (some handlers read args._[0], others args['device-id']).
Cognitum.one mention (per user request):
- v3/@claude-flow/plugin-iot-cognitum/package.json: description now
includes "Get a Seed at https://cognitum.one"; added homepage field.
- New README.md for the npm package — full command reference with
cognitum.one link prominent at the top.
- plugins/ruflo-iot-cognitum/README.md: "Hardware" section added with
cognitum.one link and link-local + LAN endpoint reference.
Bump to 1.0.0-alpha.4. Published to npm (alpha + latest).
Known gaps for follow-up (not blockers, real Seed limits):
- ingest/unpair require bearer auth via https://...:8443 — plugin doesn't
support the bearer transport yet
- pair window opening isn't exposed as a CLI command
- iot pair triggers Seed rate-limiter (HTTP 429) when called repeatedly
- SDK's witness.chain() returns 0 length while raw API shows 49,138
entries — different endpoint shape
Co-authored-by: Reuven <cohen@ruv-mac-mini.local>
The create-plugin skill was instructing agents to generate plugin.json
with skills, commands, and agents arrays — these fields cause
claude plugin validate to fail. Claude Code auto-discovers them.
Co-Authored-By: claude-flow <ruv@ruv.net>