* 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>
- Contrastive loss (InfoNCE): WORKS — 5.6004 loss on test data
- AdamW optimizer step: WORKS — weights updated correctly
- Gradient computation: WORKS — finite difference, norm=39.94
- Full training pipeline verified end-to-end
- stepInPlace pending platform binary rebuild, step() works as fallback
- CLAUDE.md updated with memory bridge MCP tools and accurate stats
Co-Authored-By: claude-flow <ruv@ruv.net>
SessionStart hook now vectorizes imported memory entries into sql.js
with ONNX 384-dim embeddings. Claude Code's MEMORY.md files become
searchable via semantic vector similarity in AgentDB.
New features:
- import: stores auto-memory entries into AgentDB with embeddings
- import-all: imports ALL Claude memories across ALL projects
(4 files, 5 entries from 3 projects vectorized and verified)
- sync: flushes SONA/ReasoningBank patterns to disk on session end
- status: shows AgentDB, SONA, patterns, trajectories
Verified: "security vulnerability" → security_analysis (0.435),
"npm publish" → publish workflow (0.624), "ruvector" → ruvector (0.678)
Co-Authored-By: claude-flow <ruv@ruv.net>
detectWorkerTriggers() crashed with 'Cannot read properties of
undefined (reading slice)' when called without text. Added null
guard at function entry.
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>
- Suppress [AgentDB Patch] console.warn in CLI and MCP entry points
(cosmetic warning from agentic-flow v1.x compat patch, not an error)
- Add export paths: ./dist/*, ./memory, ./intelligence for programmatic
deep imports (fixes ERR_PACKAGE_PATH_NOT_EXPORTED on clean install)
- Fix postinstall to resolve agentdb path correctly for both v2 and v3
- Bump to 3.5.64
Co-Authored-By: claude-flow <ruv@ruv.net>
- session-start hook detects old statusline (Math.floor(sizeKB/2) or
Maturity fallback) and auto-regenerates from current generator
- Statusline header now shows real package version (e.g. "RuFlo v3.5.63")
instead of hardcoded "RuFlo V3" — reads from @claude-flow/cli package.json
- Deployed statusline.cjs updated for this repo
- Older installs auto-fix on next session start via MCP hook
Co-Authored-By: claude-flow <ruv@ruv.net>
Patches the already-generated statusline.cjs so existing users of this
repo get real data immediately without needing to re-run ruflo init:
- patterns: real entry count from stores, not fileSize/2KB
- intelligence: 0% when no real data, not "does src/ exist? +15%"
- DDD domains: requires 100 real patterns per domain
- AgentDB stats: reads from both auto-memory-store and hooks store
New users get this automatically via the updated generator (3.5.61).
Co-Authored-By: claude-flow <ruv@ruv.net>
- session-start hook now writes session entry to auto-memory-store.json
- post-task hook now writes task outcome to auto-memory-store.json
- statusline getAgentDBStats reads from both auto-memory-store.json AND
hooks memory store (.claude-flow/memory/store.json)
- Vectors/Size in statusline will auto-populate as hooks fire
- Removed fake previousSession fallback values (was 3/15 hardcoded)
Co-Authored-By: claude-flow <ruv@ruv.net>
- patterns: was Math.floor(fileSize / 2KB), now reads actual entries
from patterns.json, auto-memory-store.json, or SQLite page count
- sessions: was Math.floor(fakePatterns / 10), now counts real
session files from .claude/sessions/ and .claude-flow/sessions/
- intelligence %: removed fake "does src/ exist? +15%" fallback,
now 0% when no real learning data exists
- DDD domains: was inflated from fake patterns, now requires 100
real patterns per domain claim
- postinstall: changed symlinkSync to cpSync for Windows compat
Closes statusline portion of #1058
Co-Authored-By: claude-flow <ruv@ruv.net>
- Add agentdb ^3.0.0-alpha.11 as optionalDependency in CLI package
- Was resolving to v2.0.0-alpha.3.4 which has no controllers/index.js
- AgentDB v3 moves controllers to dist/src/controllers/ but agentic-flow
patch expects dist/controllers/ — add postinstall symlink
- 19 controllers now load: HNSWIndex, MemoryController, ContextSynthesizer,
ReflexionMemory, AttentionService, EmbeddingService, etc.
Co-Authored-By: claude-flow <ruv@ruv.net>
v0.1.27-0.1.29 had non-functional wrapper (constructor passed wrong arg,
called non-existent methods) and score inversion (routing always returned
empty results). Pin floor to 0.1.30 to prevent broken versions.
Co-Authored-By: claude-flow <ruv@ruv.net>
- Relax sk-ant- regex from {90,} to {20,} to match real Anthropic key formats
- Add async/await to facade tests (detect/getStats return Promises)
- 16/16 AIDefence tests now pass
Co-Authored-By: claude-flow <ruv@ruv.net>
CI failed with ERR_PNPM_OUTDATED_LOCKFILE because pnpm-lock.yaml had
better-sqlite3 under optionalDependencies but @claude-flow/memory/package.json
has it under regular dependencies. Regenerated lockfile to sync.
Co-Authored-By: claude-flow <ruv@ruv.net>
Run security-scan, analyze-coverage, generate-tests, and chaos-inject
against actual ruflo source files. 8 tests validating real tool output.
Co-Authored-By: claude-flow <ruv@ruv.net>
Remove Math.random() metrics from 6 locations:
- agent_health: CPU/memory/latency were random — now null with notes
- system_health: all checks were hardcoded "healthy" — now real fs checks
- coordination_metrics: latency/throughput were random — now null with real sync data
- github-tools: all 5 tools fabricated — now return _stub:true, local CRUD only
- process monitor: all metrics random — now real os.loadavg/memoryUsage
- hook-handler route: random latency, hardcoded matches — removed
Fix 6 bugs:
- task-tools path mismatch: agents.json → agents/store.json
- token-optimizer double-increment of editsOptimized
- config get: now reads real configManager instead of hardcoded map
- config providers: now reads/writes real config, mutation flags work
- session restore: now syncs to sql.js database after legacy JSON write
- claims rebalance: now executes moves when dryRun=false
Mark stubs honestly (_stub:true):
- neural compress/optimize
- performance bottleneck/profile/optimize
- hooks metrics/pretrain/intelligence-reset (reset now actually deletes files)
- workflow execute/resume (steps stay pending, not auto-completed)
- hooks session-end summary: reads real counts from stores
- hooks explain: reads real success rate from routing-outcomes.json
- hooks transfer: returns failure instead of demo data when source empty
- status.ts: performance claims → 'not measured'
Co-Authored-By: claude-flow <ruv@ruv.net>
- Fix getOptimalConfig cache table to match actual formula
- Update neural_predict: returns empty array, not simulated defaults
- Update neural_train: real embeddings stored, not stub
- Document zero Math.random() for metrics in shipped code
- Add consolidate preDedupCount tracking detail
Co-Authored-By: claude-flow <ruv@ruv.net>
- neural-tools: replace pure-random fallback with zero vector, update comments
- hooks-tools: replace 0.85+random matchScore with real keyword ratio
- benchmarks: replace random confidence with embedding-presence check
- No remaining Math.random() used for confidence/accuracy/metrics anywhere
Co-Authored-By: claude-flow <ruv@ruv.net>