Files
ruflo/v3/@claude-flow
ruv 65bb11dc4e fix(doctor): #2437 — MetaHarness plugin locator + severity
Two bugs in checkMetaharnessIntegration():

1. **Path resolution** — only walked up from process.cwd() and checked one
   hard-coded node_modules path. Missed the two installations users actually
   run from:
     (a) `npx @claude-flow/cli@<tag>` → resolves under `~/.npm/_npx/<hash>/...`
     (b) `npm install -g @claude-flow/cli` → lives under `$(npm prefix -g)/lib/...`

   Fix: walk up from this module's own location via `import.meta.url` —
   the plugins/ dir is always a sibling of the package root regardless of
   where it was installed.

2. **Severity** — reported `fail (✗)` when the plugin was genuinely absent.
   But MetaHarness is in optionalDependencies per ADR-150 constraint #2;
   a missing optional dep warrants `warn (⚠)`, not `fail`. The runtime
   path already returns {degraded: true, exit 0} — doctor should reflect
   the same posture so a clean install of the cli alone doesn't report
   "Some checks failed".

   Reserved `fail` for the case where the plugin SHOULD be present but
   has broken/missing required files — that's a genuine misconfiguration.

Also extends the required-files list with the v3.13.0 Darwin Mode surfaces
(ADR-153): _darwin.mjs, evolve.mjs, security-bench.mjs, bench.mjs and
their three skill SKILL.md files. Gates against silent deletion.

Closes #2437.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-06-22 11:40:07 -04:00
..