Three reproducible bugs reported by @grym3s, batched in the style of #2346. #2352 — hooks post-edit: Windows paths rejected, failure printed as [OK] - validatePath used the general SHELL_META set which includes `\`, so every absolute Windows path (E:\Repos\...) failed with "shell metacharacters". Claude Code hook events deliver absolute paths in tool_input.file_path, so all Windows users had silent learning loss. Path-specific PATH_SHELL_META drops `\` (still rejects ; & | ` $ etc.) and the sanitized output normalizes to forward slashes. - CLI post-edit action printed `Outcome recorded for ...` whenever the MCP call returned at all, ignoring `{success:false}`. Now checks result.success, surfaces the error, and exits non-zero. #2351 — trajectory-end: step-less feedback never distilled - When `trajectory-end` is called with `feedback` but no recorded steps, the feedback was persisted with the trajectory but never embedded as a searchable pattern — patternsExtracted always reported 0 and pattern-search never surfaced it. Step-less trajectories are the common case for LLM agents. Now routes feedback through the same bridge.bridgeStorePattern / store-fallback path that pattern-store uses, with modest default confidence (0.6 success / 0.4 failure) since step-less feedback hasn't been validated by execution evidence. Best-effort: distillation failures do not fail the trajectory-end call. #2350 — init hooks: subcommand writes no hooks block - settings-generator (#1744 fix) only emits the `hooks` block when `components.helpers` is true, because hooks point at the helper handler script. The `init hooks` subcommand was setting helpers:false, so the one subcommand whose purpose is "Initialize only hooks configuration" produced settings.json with no `hooks` key while reporting "N hooks enabled". Helpers must ship with hooks. Tests - v3/@claude-flow/cli/__tests__/validate-input-path-2352.test.ts (22 tests): pins Windows-path acceptance, POSIX-path acceptance, and rejection of shell metacharacters, traversal, empty/non-string/oversized input. - All existing validate-input, init-wizard-bugs, hooks-intelligence, and hooks-post-task tests still pass.
@claude-flow/cli-core
Status: alpha (pre-release). Tracking ADR-100. Don't depend on this in production yet.
Lightweight core CLI surface for Claude Flow — memory + hooks commands only. Designed to load fast on a cold npx cache so plugin skills don't race Claude Code's 30 second MCP-startup timeout.
Why a separate package?
Issue #1748 #3 documented a silent failure mode for new users: npx claude-flow@latest mcp start from a cold npx cache regularly exceeds 30 seconds (1.8 MB / 999 files), Claude Code's MCP startup timeout fires, zero tools register, and the user observes "Ruflo is broken — no MCP tools available."
@claude-flow/cli-core is a ≤250 KB packed subset containing only what plugin skills actually call: memory store/list/retrieve/search/delete/init and the hooks family (route, model-outcome, post-edit, pre-task, etc.). On a cold cache, npx @claude-flow/cli-core@alpha memory store ... should complete in under 5 seconds — well under the timeout.
Install
# Pre-release alpha
npm install @claude-flow/cli-core@alpha
# Or just npx-invoke directly from a plugin Bash block
npx @claude-flow/cli-core@alpha memory store --key x --value 1 --namespace patterns
What's included
| Category | Commands |
|---|---|
memory |
store, list, retrieve, search, delete, init, migrate, stats, configure, cleanup, compress, export, import |
hooks |
route, pre-task, post-task, pre-edit, post-edit, pre-command, post-command, model-outcome, model-route, model-stats, worker-*, intelligence_*, plus 12 background-worker dispatchers |
What's NOT included (use @claude-flow/cli for these)
swarm,hive-mind,agent,task,coordination— multi-agent orchestrationneural,embeddings,intelligence— full ML surfacefederation,claims,aidefence— cross-installation featuresbrowser,wasm,rvf— sandbox + browser automationinit,migrate,doctor,daemon,deployment— lifecycle managementperformance,security,providers,plugins,config— admin surface
For any of these, install @claude-flow/cli@alpha (the metapackage that re-exports cli-core and lazy-loads everything else).
Compatibility
@claude-flow/cli-core@3.7.0-alpha.x ships in lockstep with @claude-flow/cli@3.7.0-alpha.x. Once promoted from alpha → latest, the two packages will continue to share the major.minor line.
Verification
# Cold cache test — clear npx cache first
rm -rf ~/.npm/_npx
time npx @claude-flow/cli-core@alpha memory store --key smoke --value test --namespace test
# Expected: <5 seconds wall-time on typical broadband
Documentation
- ADR-100 — cli-core split — design rationale
- MIGRATION.md — concrete diff + env-flag pattern for switching plugin scripts
- Issue #1748 — the bug this package addresses
- Issue #1760 — alpha tracking issue (status, benchmarks, fire-by-fire progress)
- Main
@claude-flow/cliREADME — full feature list
License
MIT