Closes the relevance gap exposed by ADR-077: cosine-only neural_patterns
search was returning plausible-but-off-topic results because the bridge ONNX
bi-encoder gets distracted on small corpora by IDF-cheap shared tokens.
Three changes, one release:
1) Hybrid retrieval (src/memory/hybrid-retrieval.ts) — BM25 (k1=1.5,b=0.75)
+ cosine + MMR diversity (λ=0.5). Pure functions, no deps, 21 unit tests.
Wired into neural_patterns search via {mode:'hybrid'|'cosine', alpha,
mmrLambda, limit}. Cosine path preserved for A/B.
2) Pattern.content persistence — adds source text (cap 4096 chars) to the
neural store so BM25 has tokens to score against. Backwards compatible:
pre-3.10.18 patterns fall back to `name`.
3) Outcome signal in pretrain harvester — detects reverted (Revert "<X>"
pattern) and hotfixed (≥50% file overlap with later fix commit) commits,
surfacing the verdict mix in summary + recording original outcome in
trajectory metadata.
Measured (N=385, 10 queries, this checkout):
| Metric | Cosine | Hybrid | Δ |
|-----------------------|-------:|-------:|--------:|
| Top-1 hit rate | 0% | 50% | +50pp |
| Top-3 hit rate | 0% | 70% | +70pp |
| MRR@3 | 0.000 | 0.583 | +0.583 |
| Top-1 diversity | 100% | 80% | -20pp |
| Avg query latency | 28.7ms | 40.6ms | +11.9ms |
Cosine was returning 0% relevant top-3 results — finding "something" but
never the right thing. Hybrid lands relevant top-1 50% / top-3 70% with a
12 ms latency cost.
Co-Authored-By: RuFlo <ruv@ruv.net>
Ships a deterministic one-shot harvester so a fresh ruflo install can
bootstrap its self-learning system from the repo's own GitHub history
(git commits + gh issues) instead of starting empty.
Each item flows through the same code paths real-time learning uses —
distillAndSerialise (ADR-076) → recordTrajectory (ADR-074) → neural
store seed. Closes the ADR-075 consistency note "globalStats moved but
neural store stayed empty" by writing to both stores from the same script.
Measured (this checkout):
• 80/80 trajectories trained from 50 commits + 30 issues
• +95 trajectoriesRecorded, +85 patternsLearned, +80 neuralPatternCount
• 3.36 ms avg per trajectory
• 100% retrieval match rate across 10 sample queries
• 7.67 ms avg query latency at N=95
Adds:
- scripts/pretrain-from-github.mjs (harvester, env-configurable)
- scripts/benchmark-pretrained-retrieval.mjs (after-pretrain validator)
- __tests__/pretrain-from-github.test.ts (CI guard, embedded fixture,
no git/gh shell-outs — auto-picked-up by v3-ci.yml line 610)
- v3/docs/adr/ADR-077-pretrain-from-history.md (decision + measured
proof + honest limits)
- v3/docs/learning/self-learning-usage.md (copy-paste guide for all
three learning paths plus this pretrain flow)
Co-Authored-By: RuFlo <ruv@ruv.net>
From the deep-research map of NousResearch/Hermes-Agent vs ruflo (3 small,
high-confidence, in-repo adoptions; the rest were SKIP/ADR-gated).
- #8 Prompt caching: agent_execute's direct Anthropic call (agent-execute-core.ts
— the path the cli actually uses) now marks the system prompt as an ephemeral
cache breakpoint (~90% discount on cached input tokens, 5-min TTL). Also applied
the system+trailing-message breakpoint strategy to @claude-flow/providers'
anthropic-provider (separate package; gated by new config.promptCache, default on).
- #14 Reasoning-tag scrub: scrubReasoningBlocks() strips <think>/<thinking>/
<reasoning>/<REASONING_SCRATCHPAD> blocks from trajectory action/result before
DISTILL, so extended-thinking tokens don't contaminate pattern embeddings.
Boundary-gated (leaves prose that merely mentions the tags untouched).
- #6 Tool-loop circuit breaker: new tool-loop-guardrail.ts; post-command records
(command, success), pre-command warns at 3 / blocks at 5 consecutive failures of
the same command with a recovery hint. Orthogonal to the security
tool-output-guardrail (injection). Advisory by default.
Note: @claude-flow/providers is NOT consumed by the cli (separate published
package), so the cli-effective #8 fix is in agent-execute-core.ts; the providers
change ships on its own cadence.
Verification: cli + providers build clean; 29/29 targeted tests pass
(hermes-tier1 6 + bandit 8 + bug-cluster 15). Deep-research map also produced 5
corrections to ADR-113 (#1907).
Completes the intelligence-audit punch-list with the fixable items, and
documents the honest ceilings for the rest.
FIXED
- Per-task bandit priors (ADR-142): model-router Beta priors are now keyed by
complexity bucket (low/med/high) instead of global-per-model, so failures on
one task type no longer suppress a model for ALL types. Backward-compatible
schema migration (v1 flat -> seed all buckets, version:2). +isolation +migration
tests; router-bandit suite made bucket-aware (8/8).
- EWC++ honesty: header doc clarifies F_i is a heuristic embedding-importance
proxy (embedding_i^2), not true gradient-curvature Fisher.
- HNSW backend label: getStatus().backend -> 'ruvector-native' vs
'ruvector-stub-search-disabled'. isWasm()===true means the broken stub
(search returns []), not acceleration, so a regression is now visible.
- MicroLoRA: fixed the genuine applyUpdates() signature bug (passed Float32Array
where the WASM runtime wants a scalar learning rate).
HONEST CEILINGS (re-confirmed NOT fixable in-repo, documented in the audit ledger)
- WASM-accelerated HNSW: no WASM HNSW build exists in the stack; native NAPI is
already fastest (~1.9-6.5x at N=20k); 150x-12,500x unreachable here.
- WASM MicroLoRA apply(): empirically still inert after the flush (delta=0); we
do NOT fabricate a gradient from scalar quality to fake adaptation.
Verification: cli build clean; 23/23 targeted tests pass (bandit 8 + bug-cluster 15).
* feat(workflows): add native Workflow JS orchestration surface (ADR-0002)
ruflo-workflows now documents both workflow surfaces: the existing 10
workflow_* MCP tools and the native Claude Code Workflow JS capability
(.claude/workflows/*.js — agent/parallel/pipeline/phase fan-out).
- ADR-0002 (Accepted): adopts native orchestration alongside the MCP surface
- Reference workflow .claude/workflows/plugin-contract-audit.js (fans smoke
contracts across all plugins, diagnoses failures in parallel)
- README: native orchestration section + four-hook API + surface decision table
- workflow-create/workflow-run skills, workflow-specialist agent, /workflow
command made surface-aware
- plugin.json 0.3.0 -> 0.4.0; native-workflow keywords + component block
- smoke.sh reconciled (stale version + ADR-0001 status) and extended 11 -> 15
checks; smoke-gaia.sh version assertion bumped to 0.4.0
Co-Authored-By: RuFlo <ruv@ruv.net>
* fix(routing): #bugB stale route cache + #bugC --explore false (3.10.8)
Two routing-learning correctness bugs from the intelligence audit's remaining
punch-list (docs/reviews/intelligence-system-audit-2026-05-29.md §Remediation).
- Bug B (stale route cache): QLearningRouter.update() only invalidated the
whole route cache every 50 updates, so a freshly-learned Q-update stayed
hidden behind a stale cached decision — feedback appeared to have no effect
on routing in-process until 50 updates accumulated. Now update() invalidates
the updated state's cache entry immediately (new invalidateCacheEntry).
Verified: learned route flips coder→researcher within 10 updates (was 50+).
- Bug C (--explore false ignored): boolean flags dropped an explicit space-form
value, forcing a default-true boolean (explore) to true even with
, so exploitation could never be forced. parser.ts now
consumes a true/false literal for boolean flags (--explore false / -e false),
while --explore=false and --no-explore keep working. Verified deterministic.
+4 regression tests (15/15 bug-cluster pass); 52/52 parser tests pass; cli
build clean. Audit doc updated with full remediation status (3.10.7 + 3.10.8
shipped; SONA-default/MicroLoRA/EWC-Fisher/per-task-bandit deferred with
honest rationale — the latter two need an ADR/upstream fix, not a patch).
Co-Authored-By: RuFlo <ruv@ruv.net>
* fix: #2219#2221#2222#2215#2226 — memory/routing/statusline bug cluster (3.10.6)
Five reproducible bugs reported by external contributors (pacphi, casparml,
HF-teamdev), each verified against source and covered by a regression test.
#2219 (silent write loss, Node 24/26) — agentdb pins better-sqlite3 as an
OPTIONAL dep at ^11.8.1, which has no Node 24/25/26 prebuild; the native
build fails silently and AgentDB drops to a non-persistent backend. Override
better-sqlite3 to >=12.8.0 (ships Node 20–26 prebuilds) in BOTH the root
umbrella and the ruflo wrapper (#2112: root overrides don't reach the
wrapper). New CI guard audit-better-sqlite3-override.mjs prevents regression.
#2226 (pattern store/search backend mismatch) — agentdb_pattern-store and
agentdb_pattern-search hit disjoint backends, so stored patterns were never
found. Two paths fixed: (a) when the ReasoningBank controller is present,
bridgeSearchPatterns now reads LocalReasoningBank.findSimilar/getAll (the
same backend store writes to); (b) when the controller is absent (the common
real-world state), the memory-store-fallback search Tier-2 now hydrates entry
content via getEntry — listEntries returns metadata only (see #2014), so the
substring scan previously matched nothing.
#2222 (route feedback no-op) — `route feedback` applied the Q-update in memory
but the CLI exits before the Q-learner's autoSaveInterval fires, so learning
never persisted. Add an explicit awaited router.saveModel() after feedback.
#2221 (statusline shows V3.6 on global installs) — getPkgVersion() never probed
the global npm root, so `npm i -g ruflo` fell back to the hard-coded default.
Derive the global node_modules dir from process.execPath (no npm spawn) and
probe it; covers nvm/mise and Windows layouts. Regenerated statusline.cjs.
#2215 (flashAttention contradictory state) — system_info emitted a hard-coded
`flashAttention: false` while hooks_intelligence reported the live probe.
system_info now runs the same getFlashAttention() probe as the authoritative
path so the two tools can't disagree.
Tests: __tests__/bug-cluster-2219-2226.test.ts (5/5), statusline drift guard
still byte-identical (8/8), tsc clean, targeted sweep 120/120.
Co-Authored-By: RuFlo <ruv@ruv.net>
* fix(deps): #2219 — sync package-lock to better-sqlite3@12.10.0 override
npm ci validates lockfile against package.json; the override bumped the
resolved version but the committed lockfile still pinned 11.10.0, failing
'npm ci' in CI. Regenerated with --package-lock-only.
Co-Authored-By: RuFlo <ruv@ruv.net>
Bumps @claude-flow/cli, claude-flow, ruflo to 3.7.0-alpha.72 carrying
the fix for #2073 (memory export returned null values; new --value-only
pipe-friendly retrieve flag).
Published:
- @claude-flow/cli@3.7.0-alpha.72 (tags: alpha, latest, v3alpha)
- claude-flow@3.7.0-alpha.72 (tags: alpha, latest, v3alpha)
- ruflo@3.7.0-alpha.72 (tags: alpha, latest, v3alpha)
Verified against the published artifact: `npx @claude-flow/cli@3.7.0-alpha.72
memory export -o out.json -f json -n test` now writes the real entry
value as a parseable JSON string (was null in alpha.71).
Refs #2073
Co-Authored-By: RuFlo <ruv@ruv.net>
agentic-flow@2.0.13 moves the onnxruntime-node native binding load out of
module-import time and into an on-demand `loadOrt()` helper called from
`initializeSession()`. This fixes ruflo#2048 — `import('agentic-flow/reasoningbank')`
on Windows crashed with "OS cannot run %1" because router/providers/onnx-local.ts
used a top-level `await import('onnxruntime-node')` which forced the native binding
to load before any user code ran, even when the consumer never intended to run
local ONNX inference.
Upstream PR: ruvnet/agentic-flow#155
Upstream release: agentic-flow@2.0.13 (now `latest` on npm)
Changes
- root package.json + package-lock.json: ^2.0.12 → ^2.0.13
- v3/@claude-flow/browser/package.json + package-lock.json: ^2.0.12 → ^2.0.13
- v3/pnpm-lock.yaml: regen → resolves 2.0.13
- .github/supply-chain/follow-ups.md: mark #2048 as fixed, link upstream PR + this PR
- .github/supply-chain/accepted-findings.json: add fixedDirectly entry for 2.0.13
Verification
- root npm audit: 0 vulnerabilities
- supply-chain audit (5 layers): OK, no hard-fail findings
- @claude-flow/browser tests: 230 passed | 12 skipped
- ruflo-graph-intelligence tests: 104 passed
- Acceptance test (run against published 2.0.13):
node -e "import('agentic-flow/reasoningbank').then(()=>console.log('OK'))"
node -e "import('agentic-flow/router').then(()=>console.log('OK'))"
Both succeed under default install AND under --omit=optional.
Follow-up CI guard (separate PR):
- Add Windows-runner smoke job that imports agentic-flow/reasoningbank under
--omit=optional to lock the lazy-load contract.
Co-Authored-By: RuFlo <ruv@ruv.net>
Upstream agentic-flow@2.0.12 shipped today (PR ruvnet/agentic-flow#154,
commit 2c10eb9) moving @xenova/transformers from `dependencies` to
`optionalDependencies`. Five of six call sites in agentic-flow already
used dynamic import; the sixth (src/reasoningbank/utils/embeddings.ts)
was converted to dynamic with try/catch + graceful fallback to the
existing hash-based embedding path.
This commit:
1. ADR-124 — full architectural record of the upstream fix +
downstream impact + rollout plan.
2. Bump agentic-flow ^2.0.11 → ^2.0.12 in:
- package.json (root)
- v3/@claude-flow/browser/package.json
3. Regenerate lockfiles:
- package-lock.json (root npm)
- v3/@claude-flow/browser/package-lock.json
- v3/pnpm-lock.yaml (v3 workspace)
4. Update .github/supply-chain/accepted-findings.json:
- Add entry to `fixedDirectly[]` documenting the 2.0.12 ship
- Replace the previous "blocked by upstream" CVE entry with a
"moot finding" entry. The vulnerable code is no longer installed
when consumers use `npm install --omit=optional`; `npm audit`
still reports it because it reads the lockfile graph (which
includes optionals) — a known npm limitation. Tracking now
points at the merged upstream PR + ADR-124.
After this commit:
- Root npm audit: 0 vulnerabilities (was 0 already after PR #2050; still 0)
- Browser tests: 230/230 passing
- Graph-intel tests: 104/104 passing
- Supply-chain audit: 0 hard-fail findings (1 accepted, moot)
- Consumers of @claude-flow/browser who pass `--omit=optional` get a
fully CVE-clean install profile
Closes the upstream half of #2046. ADR-121 Phase 4 still tracks the
long-term Xenova retirement.
Co-Authored-By: RuFlo <ruv@ruv.net>
Before:
Root npm audit: 13 HIGH/CRITICAL across 25 vulns
@claude-flow/browser fresh install: similar transitive chain
Audit script reported 0 unaccepted only because it correctly scopes
to direct deps — but transitive surface was hostile
Changes:
1. Bump agentdb to 3.0.0-alpha.14 (was alpha.10/13 across repo)
- 3.0.0-alpha.14 dropped @opentelemetry/sdk-node from its
dependencies block (still in optionalDependencies; overrides handle
that). Eliminates the @opentelemetry/sdk-node CVE chain via direct
dep replacement.
- Updated: v3/@claude-flow/memory, v3/@claude-flow/cli, root.
2. Bump agentic-flow 2.0.7 → 2.0.11 (root) and ^2.0.3 → ^2.0.11
(v3/@claude-flow/browser). Latest 2.x; closer to a Xenova-clean
release when upstream ships it.
3. Add npm overrides at the root + at v3/@claude-flow/browser package
(overrides do not cascade across separate npm projects, so browser
needs its own block for standalone publish):
@opentelemetry/sdk-node >= 0.218.0 (was <0.217.0 CVE)
@opentelemetry/auto-instrumentations >= 0.75.0
@opentelemetry/exporter-prometheus >= 0.217.0
axios >= 1.13.2
fast-uri >= 3.1.0
vite >= 6.4.6
ws >= 8.18.4
Plus the existing browser-package overrides for hono / undici / tar /
minimatch / picomatch / flatted / etc. — copied from root to keep
the standalone npm-published install clean.
After:
Root npm audit: 0 vulnerabilities (13 HIGH/CRITICAL → 0)
Supply-chain audit: PASS (0 unaccepted direct-dep findings)
Browser tests: 230/230 passing
Graph-intel tests: 104/104 passing
One CVE remains in v3/@claude-flow/browser's STANDALONE fresh install
(end-user `npm install`): @xenova/transformers via agentic-flow direct
dependency. Cannot fix without upstream agentic-flow shipping a Xenova-
free release. agentic-flow@3.0.0-alpha.2 still has it. Documented in
accepted-findings.json under cve[] with:
tracking: ADR-121 Phase 4
expiresAt: 2026-08-19 (audit re-fails if upstream still hasn't shipped)
rationale: browser package does not invoke embedding code paths
This is the right level of triage. The audit doesn't lie about it — it
just doesn't block our shipping while we wait for upstream.
Co-Authored-By: RuFlo <ruv@ruv.net>
Phase 0 bumped v3/@claude-flow/browser to agent-browser@^0.27.0 but the root
lockfile wasn't regenerated. CI's `npm ci` then failed with EUSAGE on missing
@opentelemetry/* transitives. This commit runs `npm install --legacy-peer-deps`
at the root to bring the lockfile back in sync.
Co-Authored-By: RuFlo <ruv@ruv.net>
* fix(#1916): register agent_logs MCP tool + resolve hive-spawned workers
`ruflo agent logs <id>` called `callMCPTool('agent_logs', …)` against a tool
that was never registered → `MCP tool not found: agent_logs`. Registered it
in agent-tools.ts. Today it returns the agent's createdAt + lastResult as
synthetic entries (per-agent activity logging lands with hive worker execution
wiring — #1916 items 3/4, a tracked follow-up) with the documented shape
`{ agentId, entries: [{timestamp,level,message,context?}], total }`.
Also: `hive-mind_spawn` writes workers to `.claude-flow/agents.json`, a
different file from the canonical `.claude-flow/agents/store.json` that
agent_status/agent_list/agent_logs read — so `agent status <hive-worker-id>`
returned `not_found`. Added `loadAllAgents()` (canonical store ∪ hive store,
canonical wins on collision) and routed those three tools through it.
NOT in this PR: the task-execution dispatch (#1916 items 3/4 — `task_assign`
transitions state but doesn't run a worker; hive metrics stay 0). That needs
a design decision (which executor) and is a separate change.
CI guard: scripts/audit-cli-mcp-tools.mjs — scans every `callMCPTool('<name>')`
in src/commands/*.ts and fails if `<name>` isn't registered in src/mcp-tools/*.ts
(the `MCP tool not found` class). Monotone-decreasing baseline at
verification/cli-mcp-tool-baseline.json — surfaces 20 *other* CLI subcommands
with the same dangling-tool bug (`memory export`, `task retry`, `workflow
validate`, `session export`, …; agent_logs is now fixed and not in the list).
Wired into v3-ci.yml `tool-descriptions-audit` job (already in witness-verify
needs[]). Behavioral guard: __tests__/agent-logs-hive-resolution.test.ts.
Witness markers for #1916 + #1916-guard.
Co-Authored-By: RuFlo <ruv@ruv.net>
* fix(#1916): register the 16 missing CLI↔MCP tools — cli-mcp-tool-baseline → 0
The #1916-guard (scripts/audit-cli-mcp-tools.mjs) surfaced 20 `ruflo <cmd>`
subcommands that callMCPTool() a tool that was never registered (would die
with `MCP tool not found`). Cleared all of them:
- Renamed the coverage tools `hooks/coverage-{route,suggest,gaps}` →
`hooks_coverage-{route,suggest,gaps}` (the handlers already existed; the
slash names just didn't match the CLI's underscore calls).
- Pointed `ruflo swarm stop` / `ruflo stop` at the existing `swarm_shutdown`
tool instead of a non-existent `swarm_stop`.
- Registered 16 new MCP tools (each with ADR-112 "use when … is wrong" guidance):
task_retry, workflow_stop, workflow_validate,
session_current, session_export, session_import,
memory_detailed-stats, memory_cleanup, memory_compress, memory_export, memory_import,
hive-mind_optimize-memory, hooks_teammate-idle, hooks_task-completed,
mcp_start, mcp_stop
Real where the operation maps cleanly to an existing store/backend
(task_retry clones into a fresh pending task; memory_export/import dump &
re-store entries; memory_cleanup prunes expired TTLs dry-run-by-default;
workflow_validate structurally checks a JSON workflow; session_export/import
round-trip the session record; memory_detailed-stats reshapes memory_stats).
Honest no-ops with the correct return shape + a `note` where the underlying
capability genuinely isn't wired yet (memory_compress — sql.js has no on-disk
compression; hive-mind_optimize-memory — structural compaction only,
pattern-quality consolidation is the intelligence pipeline's job; hooks_*
team hooks — auto-assignment/pattern-learning delegated; mcp_start/stop — the
MCP toolset runs in-process, there's no separate server to start/stop).
cli-mcp-tool-baseline.json is now 0. tool-descriptions-audit still passes
(all 16 new tools carry guidance, ≥80 chars, unique). Full cli test suite
green (48 files / 1977 tests). Witness #1916-cli-tools marker added →
ruflo verify 107 verified, 0 regressed. mcp-tools-deep.test.ts exception
list updated for mcp_start/mcp_stop.
Co-Authored-By: RuFlo <ruv@ruv.net>
* fix(#1916): register coverageRouterTools + harden the CLI↔MCP audit; bump 3.7.0-alpha.26
Validating the alpha.25 publish caught a gap: `ruflo hooks coverage-route`
(and -suggest / -gaps) still failed with `Tool not found: hooks_coverage-route`.
Root cause: the coverage tools were defined in ruvector/coverage-tools.ts but
their array was never imported into mcp-client.ts's TOOL_REGISTRY — renaming
the slash→underscore name didn't help because the file wasn't registered at all.
- mcp-client.ts: import + `...coverageRouterTools` in registerTools([…]).
- coverage-tools.ts: category 'coverage' → 'hooks' (matches the hooks_* names).
- scripts/audit-cli-mcp-tools.mjs: now derives the "registered" set from what
mcp-client.ts ACTUALLY spreads into registerTools([…]) (resolving each
`...xTools` to its `import { xTools } from '<path>'` and scanning that file),
instead of "any src file with a name: definition". So an unregistered
tool-source file now correctly produces a dangling-reference flag — this is
exactly the gap that let hooks_coverage-* slip through.
Version bumped to 3.7.0-alpha.26 (alpha.25 shipped the still-broken coverage
tools). Witness manifest regenerated. cli-mcp-tool-baseline.json still 0;
audit + mcp-tools-deep + mcp-client tests green.
Co-Authored-By: RuFlo <ruv@ruv.net>
---------
Co-authored-by: Reuven <cohen@ruv-mac-mini.local>
All 3 packages on alpha+latest+v3alpha = 3.7.0-alpha.24:
@claude-flow/cli@3.7.0-alpha.24
claude-flow@3.7.0-alpha.24
ruflo@3.7.0-alpha.24
Ships #1906 (merged #1908) — agent_execute model aliases now map to
current Claude 4.x ids (claude-haiku-4-5-20251001 / claude-sonnet-4-6 /
claude-opus-4-7) instead of the deprecated claude-3-*-latest that the
Anthropic API 404s. Two CI guards added (unit test + witness marker).
Co-Authored-By: RuFlo <ruv@ruv.net>
All 3 packages on alpha+latest+v3alpha atomically:
@claude-flow/cli@3.7.0-alpha.23
claude-flow@3.7.0-alpha.23
ruflo@3.7.0-alpha.23
Includes:
- #1863 — guard undefined arrays in `task status` (no more TypeError)
- #1863 — new cli-no-crash CI smoke (task create→status + list formatters)
- #1899 — ruflo-core hooks call `npx ruflo@alpha` not `npx claude-flow@alpha`
(in-tree; marketplace republish of ruflo-core@0.2.2 still pending)
Co-Authored-By: RuFlo <ruv@ruv.net>
* fix(release): add missing cli runtime deps to umbrella package.json
The published `claude-flow` umbrella tarball bundles
`v3/@claude-flow/cli/dist/**` and ships it as the runtime CLI, but the
umbrella's `dependencies` only declared `semver` and `zod`. This caused
a fatal `ERR_MODULE_NOT_FOUND` on first run for users who installed via
`npx claude-flow@latest`:
Cannot find package '@claude-flow/cli-core' imported from
.../v3/@claude-flow/cli/dist/src/output.js
Add the required runtime deps that the bundled cli dist imports
(mirrored from `v3/@claude-flow/cli/package.json`):
- @claude-flow/cli-core ^3.7.0-alpha.5
- @claude-flow/mcp ^3.0.0-alpha.8
- @claude-flow/neural ^3.0.0-alpha.8
- @claude-flow/shared ^3.0.0-alpha.7
- @noble/ed25519 ^2.1.0
- @ruvector/rabitq-wasm ^0.1.0
Bump umbrella version 3.7.0-alpha.8 -> 3.7.0-alpha.9.
Verified locally on Windows: npx claude-flow@latest --version and
--help both run cleanly with no module-resolution errors.
Co-Authored-By: RuFlo <ruv@ruv.net>
* chore(lockfile): regenerate package-lock for added cli runtime deps
Adds entries for the six runtime deps introduced in the previous
commit so `npm ci` no longer fails with EUSAGE in CI.
Co-Authored-By: RuFlo <ruv@ruv.net>
`npm ci` was failing on every PR's CI for ~3 commits, blocking the
Security & Code Quality, Test Suite, smoke, Setup Verification, and
Integration Test Setup checks. Root cause: cc114c8db (#1756, v3.6.30)
bumped several `>=` ranges in package.json (uuid, minimatch, picomatch,
brace-expansion, balanced-match, protobufjs, etc.) without regenerating
package-lock.json.
Fix: `npm install --package-lock-only --legacy-peer-deps` updates the
lockfile to match package.json constraints. Verified with `npm ci
--legacy-peer-deps` in a clean dir — 817 packages installed in 10s,
no EUSAGE errors. pnpm-lock.yaml untouched (it tracks workspace deps
separately and was already in sync).
Net diff: -232 / +56 lines (lockfile is smaller after dedup).
Notable resolved version changes (all in `>=` ranges from package.json):
picomatch 2.3.1 → 4.0.4
minimatch 3.1.5 → 10.2.5
brace-expansion 1.1.12 → 5.0.5
balanced-match 1.0.2 → 4.0.4
flatted 3.3.3 → 3.4.2
ip-address 10.0.1 → 10.1.0
express-rate-limit 8.2.1 → 8.5.0
protobufjs 6.11.4 removed (package.json wants >=7.5.5)
Reproducible by checking out main and running:
npm ci --legacy-peer-deps # fails on main
npm install --package-lock-only --legacy-peer-deps # fix
npm ci --legacy-peer-deps # passes after fix
Co-authored-by: Reuven <cohen@ruv-mac-mini.local>
CI was failing with ERR_PNPM_OUTDATED_LOCKFILE because the lockfile
referenced typescript ^5.3.0 while several v3/@claude-flow/*
package.json files specified ^5.9.3. Running `pnpm install
--no-frozen-lockfile` regenerates the lockfile.
Should clear the V3 CI/CD pipeline (Type Check V3, Test V3 Packages)
which both fail at the install step before running any actual tests.
Rewrites claudemd-generator.ts from ~577 to ~280 lines (~50% token reduction).
Adds agent comms (SendMessage pipeline) as core section in every template.
Updates root CLAUDE.md to v3.6.10 with comms-first agent teams section.
Co-Authored-By: claude-flow <ruv@ruv.net>
Plugin entries with undefined tags, keywords, categories, or permissions
arrays caused .some()/.includes()/.filter() to crash with "Cannot read
properties of undefined". Added || [] fallback across all array accesses
in search.ts.
Co-Authored-By: claude-flow <ruv@ruv.net>
- microlora_adapt: zero-pad input to MICROLORA_WASM_MIN_DIM (768) so
smaller inputDim values work without user intervention
- system_info: search both ../.. and ../../.. for package.json to find
the real version from compiled dist/ paths
Co-Authored-By: claude-flow <ruv@ruv.net>
Tier A (6 bugs):
- #1647: trajectory-start now persists pending record to disk; intelligence_stats wrapped in try/catch
- #1646: guidance capability catalog referenced 'memory_import' instead of 'memory_import_claude'
- #1617: getProjectCwd() rejects CLAUDE_FLOW_CWD when set to $HOME or '/'
- #1619: system_health checks for agentdb.sqlite and store.rvf, not just legacy store.json
- #1614: RvfBackend persistToDisk uses write queue instead of silently dropping concurrent writes
- #1610: ControllerRegistry.initialize() now receives vectorBackend: 'auto' config
Tier B (7 issues):
- #1636: worker-dispatch returns honest 'scheduled' status instead of faking completion via setTimeout
- #1637: daemon-state.json uses atomic write (tmp + rename) to prevent corruption from concurrent writes
- #1620: init 'Next steps' uses brand-aware binary name (ruflo vs claude-flow)
- #1635/#1633: Windows tasklist command improved with /NH flag and 3s timeout
- #1631: neural_train response includes platformNote when ONNX embeddings unavailable
Co-authored-by: Reuven <cohen@ruv-mac-mini.local>
* fix: resolve Tier A blockers #1596, #1567, #1556#1596 — CLI lazy-command routing:
`ruflo daemon start` was mis-routed to the top-level `start` command
because the parser only registered the 10 core sync commands and its
greedy Pass 1 walk happily matched `start` as the command with `daemon`
left as a positional. Teach the parser about lazy command names via
`registerLazyCommandName()`, stop Pass 1 at the first non-flag
positional, and recognize lazy names in Pass 2 so commandPath becomes
`['daemon', 'start']`. The existing positional-based subcommand
fallback in CLI.run() then dispatches correctly. Affects every
lazy-loaded command (daemon, doctor, embeddings, neural, config,
workflow, hive-mind, ...).
#1567 — agent_spawn Zod field mismatch:
validate-input.ts was passing `{ agentType, name }` to
@claude-flow/security's SpawnAgentSchema, which expects `{ type, id }`,
so every MCP agent_spawn call failed with `type: Required`. Align the
field names. Also swallow `invalid_enum_value` issues because the
schema enumerates only 15 built-in agent types — we support custom
types and the inline identifier validator already gated unsafe input.
#1556 — AutoMemoryBridge destroys hand-curated MEMORY.md:
`curateIndex()` fired on every Stop hook tick and overwrote MEMORY.md
with a single-line title stub whenever none of the files in memoryDir
matched the 7 hardcoded DEFAULT_TOPIC_MAPPING filenames — which is
exactly the situation for any project using Claude Code's native
`<type>_<topic>.md` memory convention. Skip the write entirely when
there are no sections to curate and emit `index:skipped` instead;
`curate` must be non-destructive when there's nothing to curate.
Tests:
- __tests__/parser.test.ts: 4 new cases cover lazy command routing,
bare lazy commands, and global flags before a lazy command.
- __tests__/validate-input-agent-spawn.test.ts: built-in type, custom
type, bad identifier, and no-domain cases.
- src/auto-memory-bridge.test.ts: new #1556 case + updated empty-file
case to assert the new non-destructive semantics.
All 120 CLI + 74 memory tests pass locally.
Co-Authored-By: claude-flow <ruv@ruv.net>
* chore: bump to 3.5.80 / memory 3.0.0-alpha.14 for Tier A fixes
- @claude-flow/cli 3.5.78 → 3.5.80
- @claude-flow/memory 3.0.0-alpha.13 → 3.0.0-alpha.14
- claude-flow umbrella 3.5.78 → 3.5.80
- ruflo umbrella 3.5.78 → 3.5.80
Also fixes memory package's prebuild script to clean
tsconfig.tsbuildinfo so tsc --incremental produces fresh
output after rm -rf dist.
Matches published npm artifacts for issues #1596, #1567, #1556.
Co-Authored-By: claude-flow <ruv@ruv.net>
---------
Co-authored-by: Reuven <cohen@ruv-mac-mini.local>
ruvllm's TrainingPipeline.saveCheckpoint() is a no-op that writes nothing to disk.
Added fs.existsSync check after ruvllm call so the JS JSON fallback activates and
writes real checkpoint data (5811 bytes).
Co-Authored-By: claude-flow <ruv@ruv.net>
- neural.ts: quantize now performs actual Float32→Int8 conversion with
scale/offset params, reports measured file size ratio instead of
hardcoded 3.92x
- security.ts: CVE command honestly reports no database configured
instead of returning fabricated vulnerability data; threat modeling
labeled as STRIDE reference template, not analysis output
- agent-tools.ts: agent_spawn returns status 'registered' with note
that actual execution requires Task tool or claude -p
- agent-tools.ts: validates agentType/agentId/domain via new
validate-input.ts before processing
- memory-tools.ts: rejects path traversal and shell metacharacters
in keys and namespaces
- validate-input.ts: new input validation utility for MCP tools with
optional @claude-flow/security Zod schema integration
- package.json: added @claude-flow/security to optionalDependencies
Published as v3.5.69 across @claude-flow/cli, claude-flow, ruflo.
Co-Authored-By: claude-flow <ruv@ruv.net>
CI failed with EUSAGE: lockfile had router@0.1.28 but package.json
wants ^0.1.30. Regenerated with npm install --package-lock-only.
Co-Authored-By: claude-flow <ruv@ruv.net>
- #1499: ReasoningBank missing embedder param — added createEmbeddingService()
call in controller-registry.ts, matching pattern used by other controllers
- #1490: SQLite database path relative to CWD — changed path.join to
path.resolve for all swarmDir/dbPath computations, preventing data loss
when MCP server CWD changes
- #1489: memory_search defaults to 'default' namespace — when namespace is
not explicitly provided, now searches across ALL namespaces instead of
silently filtering to 'default'
- #1484: init --full hooks disconnected — writeSettings now merges hooks
into existing settings.json instead of skipping the file entirely when
it already exists (which it does in most projects)
All 1725 tests pass, 0 failures.
Co-Authored-By: claude-flow <ruv@ruv.net>
- Parser: scoped alias resolution (two-pass) fixes global -t flag collision
- Neural: --pattern-type flag now recognized, predict threshold lowered for hash-fallback
- Hooks: pre-task --task-id optional, added notify subcommand
- Agent metrics: real data from .swarm/ state instead of hardcoded demo
- Security audit: dynamic timestamps from file state instead of 2024 demo data
- Settings generator: Windows-compatible %CLAUDE_PROJECT_DIR% env var
- ADR-063: documents all findings from deep capability audit
Co-Authored-By: claude-flow <ruv@ruv.net>
Replace relative paths and $(git rev-parse --show-toplevel) with
$CLAUDE_PROJECT_DIR in all hook commands. Fixes hooks breaking when
Claude Code changes working directory to a subdirectory.
- .claude/settings.json: 15 hook paths updated
- v3/@claude-flow/cli/.claude/settings.json: 9 hook paths updated
- settings-generator.ts: hookHandlerCmd, autoMemoryCmd, statusline fixed
- All three packages bumped to 3.5.15 and published
Co-Authored-By: claude-flow <ruv@ruv.net>