Added scifact-specific RRF weights {dense:1.0, bm25:0.4} to DATASET_RRF_WEIGHTS,
mirroring the nfcorpus pure-dense strategy. Clinical fact verification benefits
from dense semantic matching over lexical noise. Benchmarked on 300 queries,
rank 10/11 on published leaderboard (0.5971 vs SOTA 0.722).
Co-Authored-By: RuFlo <ruv@ruv.net>
Three bugs, one branch — all verified locally before commit.
**#2469** (AriESQ) — \`agent-docs-api-openapi/SKILL.md has malformed markdown\`
The file had two adjacent \`---\` fenced YAML blocks at the top. Only
the first is valid frontmatter; the second renders as \`<hr>\` + raw
YAML text on skills.sh / GitHub web view. Wrapped the legacy agent
YAML in a \`yaml\` code fence so it renders as code instead of leaking
into the page body. Outer Claude Code skill frontmatter untouched.
**#2473** (verification HIGH) — witness manifest drift=8/9/9 on all 3 platforms
My merge of #2468 changed 9 source files; their SHA-256s no longer
matched the signed witness manifests. The Ed25519 seed is derived
from gitCommit alone (\`sha256(gitCommit + ':ruflo-witness/v1')\`), so
signatures generated on any one platform validate everywhere; only
the manifest's \`os\` metadata field differs between the three.
Re-signed all three with current HEAD source hashes — \`drift=0\` on
all 3 platforms (was 8/9/9).
**#2474** (reimon) — ruflo-adr \`adr-index\` stores 0 records on common conventions
Five distinct bugs in \`plugins/ruflo-adr/scripts/import.mjs\`:
1. **(fatal)** Em-dash titles broke \`memoryStore\`: \`npm exec\` rejects
args starting with non-ASCII dash, so every value-with-em-dash
died with \`Records stored: 0/N\`. Use \`--flag=value\` form so npm
sees a single argv token.
2. \`parseStatus\` only matched \`**Status**:\` (colon outside bold) —
missed the widely-used \`**Status:**\` (Nygard / MADR) form. Now
accepts both placements.
3. Body relationship regexes (\`**Supersedes**:\` etc.) had the same
bug. Replaced with a shared \`REL(label)\` builder that accepts
either colon placement and an optional qualifier (\`**Supersedes
(partial):**\`).
4. ID normalization mismatch: \`parseId\` kept \`ADR-0001\`, \`extractAdrRefs\`
pad-then-stripped it to \`ADR-001\` → same ADR dangled. Single
\`normalizeAdrId()\` now governs both paths.
5. \`.claude/worktrees/*\` mirrors the repo; \`SKIP_DIRS\` didn't
exclude \`.claude\`, so every ADR was indexed 2-3x. Added \`.claude\`
to \`SKIP_DIRS\`.
Verified with a synthetic fixture (3 ADRs: 1 zero-padded, 1 mixed,
1 ADR-prefixed; em-dash titles; \`**Status:**\` and parenthetical
qualifiers; \`**Supersedes:**\` / \`**Depends-on:**\` body relations;
decoy worktree dir): \`Records stored: 3/3\`, all status fields
populated, 3 edges parsed, 0 dangling refs, 0 worktree pollution
(was: 0/3, all unknown, 0 edges).
Em-dash fix end-to-end smoke: \`npx @claude-flow/cli@latest memory
store --value="ADR-005 — Repository + Service Pattern"\` succeeds
(was: \`npm error arg Argument starts with non-ascii dash\`).
Reporter @reimon and @AriESQ both filed clear, reproducible bugs with
root-cause analysis — thanks.
Co-Authored-By: RuFlo <ruv@ruv.net>
The no-metaharness-smoke gate asserts every metaharness skill emits a
\`"degraded"\` field when metaharness is unreachable (ADR-150 #3 —
graceful degradation). All other skills did this already; mint did not
because its dry-run path printed the plan without touching the registry.
Result: smoke-without-metaharness reported \`FAIL: mint did not emit
degraded:true payload\`.
Added a fast \`runMetaharness(['--version'])\` probe at the top of main()
so the dry-run also reports degraded:true when the registry is
unreachable. The probe is the same call the --confirm path uses
internally, so we don't add a new failure mode; we just surface the
existing one earlier.
This was the final red check on PR #2468 — all other 112 checks are
green on commit c73c8d96e.
Co-Authored-By: RuFlo <ruv@ruv.net>
Two distinct issues, both downstream of graph-schema-smoke being unblocked.
1. **agentdb_graph-query (4 call sites) — SQLITE_MISMATCH "datatype mismatch"**
After #2431 migrated the graph writer from sql.js to better-sqlite3,
the corresponding *query* paths in agentdb-tools.ts still called
\`db.exec(sql, params)\` (sql.js semantic). better-sqlite3's exec is
a parameterless runner — the second arg is silently ignored, the
\`?\` placeholder in \`LIMIT ?\` binds to nothing, SQLite rejects with
"datatype mismatch" (SQLITE_MISMATCH).
Migrated all 4 sites — k-hop CTE, semantic mode, pagerank mode,
pathfinder — to \`db.prepare(sql).raw().all(params)\`, which gives
the same array-of-arrays shape the downstream code expects.
Reproduced bare-metal:
\`db.exec("SELECT * FROM foo LIMIT ?", [5])\` →
SqliteError: datatype mismatch (SQLITE_MISMATCH)
\`db.prepare("SELECT * FROM foo LIMIT ?").raw().all(5)\` → OK.
2. **trajectory smoke — WAL not checkpointed before sql.js readback**
Same fix pattern as smoke-graph-schema-migration.mjs in this PR.
The trajectory hooks fire-and-forget insertGraphEdge through the
better-sqlite3 writer; without closing the writer connection the
data sits in .db-wal and sql.js (which reads only the main file)
reports count=0. Call _resetBridgeDb() before sql.js readback.
Local results after fixes:
smoke-graph-query-dispatch.mjs → 21/21
smoke-graph-pathfinder.mjs → 20/20
smoke-trajectory-graph-edges.mjs → 10/10
Co-Authored-By: RuFlo <ruv@ruv.net>
graph-schema-smoke unblocked → graph-query-smoke, graph-trajectory-smoke,
graph-plugin-adapter-smoke, and graph-benchmark started running and hit
the same root-resolution hazard as graph-schema-smoke (root
\`better-sqlite3\` installed without \`--ignore-scripts\` rebuild → broken
native binding shadows the v3/pnpm copy). Added \`npm rebuild
better-sqlite3\` between root install and v3 install/build for all four
downstream graph jobs to match graph-schema-smoke's setup.
Co-Authored-By: RuFlo <ruv@ruv.net>
graph-schema-smoke installs root deps with \`--ignore-scripts\` (sane —
it doesn't need every package's prebuild to run), but the smoke script
calls \`insertGraphEdge\` which does \`await import('better-sqlite3')\`.
Node resolves that from the importing module's nearest node_modules.
Because the v3 install lands under .pnpm/, the *root* better-sqlite3
ends up closer in the resolution walk — and it lacks the .node binary
(prebuild-install was skipped). \`_openDb\` returns null,
\`insertGraphEdge\` returns false, tests 2/3/5 all fail.
Added an \`npm rebuild better-sqlite3\` step between the root install
and the v3 build to materialize the native binding. Localized to this
one job — every other smoke that needs the binding either does its own
build or hits the pnpm tree directly.
Co-Authored-By: RuFlo <ruv@ruv.net>
Final ruflo-metaharness smoke contract failure after the count bumps:
test 17o anchors the contract test by enumerating every MCP tool name
and asserting \`tools.length === 9\`. Both lists are deliberately spelled
out so a refactor that drops a tool fails this gate. Added bench/evolve/
security_bench and bumped the count assertion to 12.
Co-Authored-By: RuFlo <ruv@ruv.net>
3 more plugin-contract failures from no-metaharness-smoke, all the same
root cause: ADR-153 added bench/evolve/security_bench MCP tools but the
smoke contract had hardcoded counts pinned to the pre-ADR-153 tool set.
- 17z53: \`runScript('foo.mjs', ...)\` reference count 9 → 12
- 17z9: MCP_SUCCESS_SEMANTIC occurrence count 10 → 13 (1 decl + 12 uses)
- 17z7: \`success: r.success\` handler count 9 → 12
- 17z6: test-mcp-tools.mjs phase-1 \`tools.length === 9\` → 12, plus
the 3 new tool names added to the expectedNames set
These are anchor counts that exist deliberately so a future iter adding
a tool also touches the smoke and CLAUDE.md catalog. Bumping in lockstep
with the 3 new tools.
Co-Authored-By: RuFlo <ruv@ruv.net>
Two plugin-contract failures in the no-metaharness-smoke job for
ruflo-metaharness:
- **17z61** (drift-from-history dispatcher round-trip) used
\`grep -B100\` to walk back from the step to its enclosing job header.
metaharness-ci.yml grew past 100 lines between that step (now line 604)
and its \`metaharness-real-data:\` job header (line 493). Replaced the
fixed-window grep with an awk one-pass that finds the most-recent
top-level job header above the step.
- **17z56** (every MCP tool documented in CLAUDE.md, iter 93) asserted
exactly 9 MCP tools. ADR-153 added 3 more (\`metaharness_bench\`,
\`metaharness_evolve\`, \`metaharness_security_bench\`) without updating
the lock count or the CLAUDE.md catalog. Documented the 3 tools in
CLAUDE.md and bumped the count to 12.
Co-Authored-By: RuFlo <ruv@ruv.net>
The smoke test asserts (a) the writer (better-sqlite3) succeeds and then
(b) re-reads the DB file via sql.js to verify the insert/migration landed.
Since #2431 put the writer in WAL mode (\`journal_mode = WAL\`), inserts
sit in the \`.db-wal\` sidecar until checkpointed; sql.js reads only the
main file and saw nothing. Symptoms: tests 2c, 3b, 5b all asserted false
even though tests 2a, 3a, 5a confirmed the writer succeeded.
Closing the writer connection (\`_resetBridgeDb\` calls
\`better-sqlite3.close()\`, which checkpoints WAL by default) before
each sql.js readback unblocks the verification. This is a smoke-script
bug surfaced by the Build V3 unblock — pre-3.14.2 the build broke before
this code ran, so the latent WAL incompatibility never tripped CI.
Local: 23/23 pass (was 18/23 with 4 WAL-related fails + 1 cascade).
Co-Authored-By: RuFlo <ruv@ruv.net>
Same fix as verification-pipeline.yml — js-yaml 4.x rejects multi-line
flow-style sequences as \"deficient indentation\" because the closing
bracket lines up with the opening key. Converted to plain block style.
Verified: \`node scripts/smoke-workflows-yaml.mjs\` reports
\`ok integration-tests.yml (6 jobs)\`.
Co-Authored-By: RuFlo <ruv@ruv.net>
Two follow-up fixes after first push of fix/ci-greenify:
1. **package-lock.json** — the ws override was bumped from \`>=8.18.4\` to
\`>=8.21.0\` in package.json but the root lockfile was regenerated BEFORE
that bump, so ws@8.20.1 stuck in the lock. CI's \`npm ci\` failed:
npm error Invalid: lock file's ws@8.20.1 does not satisfy ws@8.21.0
Re-ran \`npm install --package-lock-only\` to pull ws@8.21.0 into the lock.
2. **verification-pipeline.yml** — \`Static regression guards\` got past the
js-yaml ESM import fix and surfaced an actual yaml syntax error:
FAIL verification-pipeline.yml 371:5 deficient indentation
The block-flow-mixed style \`needs: [ a, b, c ]\` across multiple lines
was rejected by js-yaml 4.x's stricter indent rules. Converted to plain
block style \`needs: - a - b - c\` — semantically identical, unambiguous.
Local: \`node scripts/smoke-workflows-yaml.mjs\` → exit 0.
Co-Authored-By: RuFlo <ruv@ruv.net>
Stacked fixes to clear the remaining red CI checks on \`main\` that pre-dated
the #2412 lockfile-cascade fix. Each one verified locally before commit.
1. **Build V3 (ubuntu/macos/windows)** — \`graph-edge-writer.ts\` did a static
\`await import('better-sqlite3')\` which forces tsc to resolve the package's
types at build time. \`better-sqlite3\` is in \`optionalDependencies\` (so
CI doesn't install it) — type resolution failed with TS2307 on every
platform. Routed the module name through a variable so the static analyzer
stops trying to resolve it; runtime presence is still gated by the
existing try/catch.
2. **Static regression guards (#2267)** — \`scripts/smoke-workflows-yaml.mjs\`
crashed with \`SyntaxError: The requested module 'js-yaml' does not provide
an export named 'default'\` after js-yaml dropped the synthetic default
from its package exports. Switched to \`import * as yaml from 'js-yaml'\`.
3. **Tool description discoverability (ADR-112)** — two MCP tools regressed
the no-guidance baseline (count went from 0 → 2):
- \`metaharness_bench\` had no Use-when / Prefer / Pair-with hint
- \`testgen_tdd_repair\` had \"Use when …\" in a *later* string
fragment of a concatenated description, which the audit regex
(single-quoted-literal-only) misses
Added explicit \"Use when …\" guidance to the first fragment of each.
Audit now reports 340/340 tools with guidance.
4. **witness verify precondition smoke (#1880)** — Root \`package-lock.json\`
drifted: \`agentdb@3.0.0-alpha.16\` in lock vs \`^3.0.0-alpha.17\` in
package.json (same root cause as #2412 but for the npm lockfile, not the
pnpm one fixed last release). Every job that runs \`npm ci\` was failing
at install. Regenerated via \`npm install --package-lock-only\`. Verified:
\`npm ci --dry-run --legacy-peer-deps\` now exits 0.
5. **Supply-chain audit (#2046)** — \`plugins/ruflo-graph-intelligence\` had
1 HIGH/CRITICAL unaccepted direct-dep finding:
- \`ws@8.20.1\` pulled by \`sublinear-time-solver\` (GHSA-96hv-2xvq-fx4p,
memory exhaustion DoS) — bumped root override \`ws >=8.18.4\` →
\`>=8.21.0\` and added the same override to the plugin's own
package.json so it propagates through the plugin's own npm install
- \`@claude-flow/cli\` peerDep surfaces every HIGH transitive in cli's
own tree inside the plugin's audit report — added a tracked,
expiring accepted-finding (cli ships its own audit pipeline on
every publish; the plugin doesn't redistribute cli's tree).
Audit now reports \`OK: no hard-fail findings\`.
Verified locally:
- \`npm run build\` in v3/@claude-flow/cli: clean
- \`node scripts/smoke-workflows-yaml.mjs\`: exit 0, 53 workflows parsed
- \`node scripts/audit-tool-descriptions.mjs\`: 340/340 with guidance, OK
- \`npm ci --dry-run --legacy-peer-deps\` at repo root: exit 0
- \`node scripts/audit-supply-chain.mjs\`: OK, no hard-fail findings
Co-Authored-By: RuFlo <ruv@ruv.net>
Patch release for #2461 — Windows embedding crash + secondary
\`memory store\` undefined-namespace bug. All three packages bumped
in lockstep per the publishing rules:
@claude-flow/cli@3.14.2
claude-flow@3.14.2
ruflo@3.14.2
Verified against the published npm artifact: 50/50 successful
\`generateLocalEmbedding\` calls with zero crashes from a fresh
\`npm i ruflo@3.14.2\` (was: instant null-dereference crash on
\`memory store\`/\`memory search\` on Windows behind a proxy).
Legacy \`alpha\` and \`v3alpha\` dist-tags repointed to 3.14.2 for
backward-compatibility.
Co-Authored-By: RuFlo <ruv@ruv.net>
Three bugs fixed, all reproduced + verified against the built artifact.
1. \`loadEmbeddingModel()\` aborted on transformers failure. When
\`pipeline('feature-extraction', ...)\` throws (e.g. \`fetch failed\`
on Windows behind a corporate proxy / firewall), the throw escaped
the outer try and returned \`{ success: false }\` BEFORE reaching
the ruvector ONNX fallback that ships in-tree and works offline.
The bundled ruvector embedder returns real 384-dim non-zero vectors;
the user had a working fallback we just never tried. Wrapped the
transformers branch in try/catch so a failure now falls through.
2. \`generateLocalEmbedding()\` crashed with "Cannot read properties of
null (reading 'model')" because (1) left \`embeddingModelState=null\`
and the function used a \`!\` non-null assertion. Replaced with a
null coalescing default so we degrade to the hash fallback instead
of crashing every \`memory store\` / \`memory search\` call.
3. Secondary bug filed in the same issue: \`memory store\` without
\`-n\` stored under the literal namespace "undefined" (silent data
loss for first-time users). Added \`|| 'default'\` on both store
and retrieve.
Verified against the built dist/:
- 100 \`generateLocalEmbedding\` calls with ALL embedding modules
unresolvable → 100/100 success (was: instant crash on call #1)
- \`memory store\` default namespace guard present in compiled JS
Reporter (#2461): Pishro-canadaapply did the root-cause investigation
and proposed the exact fix shape. Thanks.
Co-Authored-By: RuFlo <ruv@ruv.net>
Patch release bundling 4 user-reported bug fixes:
- #2412 CI: regenerate pnpm-lock.yaml to match cli/package.json
- #2450 statusline: detect bare `claude-flow hooks statusline` migration form
- #2426 MCP: blocking stdout in stdio mode for >64KB JSON-RPC frames
- #2422 docs: USERGUIDE consensus modes match what ships
All three packages bumped in lockstep per the publishing rules:
@claude-flow/cli@3.14.1
claude-flow@3.14.1
ruflo@3.14.1
Published to npm. Legacy `alpha` and `v3alpha` dist-tags repointed at 3.14.1
for backward compatibility (CLAUDE.md publishing rules — stable-only series,
alpha/v3alpha tags continue to mirror latest).
Co-Authored-By: RuFlo <ruv@ruv.net>
USERGUIDE.md documented three consensus modes — Majority, Weighted (Queen 3x),
Byzantine — and three queen types — Strategic / Tactical / Adaptive. As
filed in #2422 by @sparkling, none of the weighted-voting behavior is wired:
$ npx @claude-flow/cli@latest hive-mind init -c weighted
[ERROR] Invalid value for --consensus: weighted.
Must be one of: byzantine, raft, gossip, crdt, quorum
And \`calculateRequiredVotes()\` in the shipped hive-mind engine is a pure
equal-vote threshold — no queen multiplier exists in the codebase.
Rewrote 4 USERGUIDE locations (lines ~263, 268, 1693, 2437) to document
the actually-shipped 5 modes: byzantine / raft / gossip / crdt / quorum.
Co-Authored-By: RuFlo <ruv@ruv.net>
The macOS pipe buffer is 64 KiB. Ruflo's MCP \`tools/list\` response with
all 314 tools is 65,747 bytes — just over the limit. Without blocking
writes, \`process.stdout.write()\` on Unix returns after a partial write
when the kernel buffer fills; the truncated frame is unparseable JSON
and Claude Code silently registers zero MCP tools on macOS.
Call \`process.stdout._handle.setBlocking(true)\` (and same for stderr)
at stdio-server init. This is what the official MCP SDK's
StdioServerTransport does for the same reason. Feature-gated so we
degrade gracefully on exotic stdout handles (e.g., tests where stdout
isn't bound to a pipe).
Verified with a direct stdio probe writing 70KB+ to a pipe and reading
in a child process:
baseline (non-blocking) → reader gets exactly 65,536 bytes (truncated)
with setBlocking(true) → reader gets full 83,146 bytes (intact)
Co-Authored-By: RuFlo <ruv@ruv.net>