ADR-150 sibling-package integration. `@metaharness/redblue` runs an
adversarial red-team → judge → blue-team patch → retest → report loop
against an LLM target you own. Covers OWASP LLM Top-10 / NIST AI RMF
families (prompt injection, tool misuse, data leakage, jailbreaks,
denial-of-wallet). Joins score/genome/mcp-scan/threat-model/oia-audit
as the run-time red/blue layer of the security plugin surface.
Why integrate here vs ruflo-aidefence or ruflo-security-audit:
- aidefence is detection (PII / prompt-injection scan); redblue is
*generation* — they complement, redblue doesn't replace it
- security-audit is dep CVEs / static scan; redblue is run-time LLM eval
- ruflo-metaharness already carries the @metaharness/* wrapper pattern
(`_darwin.mjs`, `_harness.mjs`), the locator, the MCP-tool registration
surface, and the smoke/CI gates — redblue slots in as one more sibling
Surface added:
- `npx ruflo metaharness redblue {init|run|patch|attack|report}` CLI
- `metaharness_redblue` MCP tool (subcommand + family + tests + patch +
mockJudge + alertOnFail + timeoutMs)
- Skill discoverability via CLAUDE.md (both CLI catalog + MCP tool catalog)
- 11 metaharness subcommands (was 10), 13 MCP tools (was 12)
Safety posture (inherited verbatim from upstream; wrapper does NOT relax):
- upstream `src/config/safety.ts` hard-enforces no real credentials, no
live external targets (loopback / *.test / *.internal only), no shell,
no arbitrary network, no eval at config-load time — a config that
enables any of these errors at load
- `--mock-judge` is the $0 marker-fixture path for CI / offline; the real
model judge requires `OPENROUTER_API_KEY` and is capped by
`max_cost_usd` / `max_runtime_minutes` / `max_tests`
- wrapper shells out with `shell: false` argv arrays; never string interp
- ADR-150 graceful-degradation rule #3 — on install/network failure the
wrapper returns `{degraded: true, reason: ...}` and exits 0 so ruflo
stays operational
Upstream bug workaround (track for revert):
`@metaharness/redblue@0.1.1`'s CLI bootstrap uses
`isMain = import.meta.url === \`file://\${process.argv[1]}\``. When npx
links `redblue` → `dist/cli/index.js`, argv[1] is the symlink path but
import.meta.url is the resolved real path, so isMain is false and the
binary silently exits 0 with no output, no file, no error. Darwin's CLI
calls `main()` unconditionally and is unaffected. Workaround: install the
package once into `~/.ruflo/redblue-cache` via `npm install --prefix` and
invoke `node <abs_path>/dist/cli/index.js` directly — argv[1] then equals
the real path and isMain becomes true. First install hits npm's cache so
the cold path is ~200ms; warm invocations are ~20ms.
Locator hardening (prevents recurrence of artifact-mirror staleness):
The publish artifact at `v3/@claude-flow/cli/plugins/ruflo-metaharness/`
is regenerated only at `prepublishOnly`. On a dev tree with a fresh
script in source but a stale mirror, the locator would pick the mirror
because `_harness.mjs` exists in both. Locators in `commands/metaharness.ts`
and `mcp-tools/metaharness-tools.ts` now accept an optional `requiredScript`
that narrows the match to dirs containing the dispatched script. The
artifact mirror is also synced with the two new redblue scripts so the
publish artifact stays usable until the next `prepublishOnly`.
Gates updated to lock new state:
- smoke.sh: 9 subcommands in dispatcher (was 8), 11 in description list
(was 10), 13 MCP tools (was 12), 13 mcp-script-count (was 12), 14
MCP_SUCCESS_SEMANTIC footnotes (was 13), 13 `success: r.success`
occurrences (was 12), tilde-pin check covers @metaharness/redblue
- test-mcp-tools.mjs: `tools.length === 13`, `metaharness_redblue`
enumerated, attack-preview Phase-3 input, 180s timeout (cold-cache npx
fetch class)
- CLAUDE.md: surfaced under both CLI catalog and MCP-tool catalog (gated
by smoke 17z56 + 17z57)
Verification:
- `bash plugins/ruflo-metaharness/scripts/smoke.sh` → 120 passed, 0 failed
- `node plugins/ruflo-metaharness/scripts/test-mcp-tools.mjs` → 153 passed, 0 failed
- `node v3/@claude-flow/cli/bin/cli.js metaharness redblue init --out <path>`
→ writes the safety-asserting sample config, exits 0
- attack preview, mock-judge run (3-test → real findings report), and
CLI dispatcher all exercised end-to-end before commit
Co-Authored-By: RuFlo <ruv@ruv.net>
Patch release shipping the darwin-core systems sweep (PR #2481):
skill-distillation: 0.4286 → 1.0 (+133% rel on ADR-155 synthetic bench)
causal-graph hot path: 115ms → 3ms (-97%) via early-exit + import cache
reasoning-bank: scifact +0.0024 tie-breaker (cumulative +10.3%)
benchmark-intelligence.mjs: new --only=<dim> flag for per-dim measurement
Also slims root-package files-pattern to exclude .claude/worktrees/**,
.claude/projects/**, .claude/sessions/** and the scheduled_tasks.lock —
the published tarball had bloated to 276 MB from worktree pollution;
now back to 2.3 MB / 1096 files (slimmer than 3.14.1's 77 MB baseline).
All three packages bumped in lockstep:
@claude-flow/cli@3.14.4
claude-flow@3.14.4
ruflo@3.14.4
Legacy alpha + v3alpha tags repointed to 3.14.4.
Co-Authored-By: RuFlo <ruv@ruv.net>
Per-dimension Darwin agents only need one bench's output. Without --only,
the script ran all 6 sub-benches (~5-10 min wall) and three agents in
tick 1+2+3 timed out trying to slice the JSON output for their dim.
Accepts both --only hnsw,sona and --only=hnsw,sona forms (Darwin agents
prefer the = form).
Quick verify: `node scripts/benchmark-intelligence.mjs --only=hnsw --sizes 5000`
returns only the hnsw block in ~5s.
skill-distillation breakthrough: AND→OR predicate relax took the metric from
0.4286 → 0.8571 (+100% rel), exceeding the SKILL-DISCO arXiv 2026 +22% target
by 4.5x on the synthetic ADR-155 bench. 6/7 successful traces now promoted
vs the original 3/7.
causal-graph: EXISTS-probe early-exit on missing seed → 115ms → 0ms for the
absent-seed case. Test 5e in graph-query smoke now exits in O(1) vs O(N).
21/21 smoke tests still pass.
reasoning-bank: tried bm25=0.15 (up from 0.05 tick 2 champion), regressed
-0.0062. Confirms bm25=0.05 is the LOCAL OPTIMUM on this axis.
sona-adapt: still at-target.
hnsw-search + moe-gate: still bench-timeout (benchmark-intelligence.mjs has
issues at small N. Tick 4 should investigate the script directly).
This iter-4 edit was made by the headless agent but its commit step
didnt land in the branch (rate-limit at end of workflow). Cleanly
landing it now alongside the lockfile fix.
Iter-11 of the BEIR darwin loop accidentally swept untracked
v3/@claude-flow/copilot/ files into a commit. Those files aren't ready
for the workspace + their package.json deps weren't in v3/pnpm-lock.yaml,
which broke pnpm install --frozen-lockfile in every v3-ci.yml job.
Removed the copilot/ tree (it can be reintroduced cleanly later) and
regenerated v3/pnpm-lock.yaml. Verified frozen-lockfile passes locally.
Co-Authored-By: RuFlo <ruv@ruv.net>
Auto-generated by .github/workflows/clone-tracker.yml.
Source: GitHub Traffic API (14-day rolling window).
Co-Authored-By: ruflo-bot <ruflo-bot@users.noreply.github.com>