Install any skill in seconds. Free to start, no credit card required.
Get Started Free →ADR-152 — weighted similarity between two harness fingerprints (genome + score JSON). Returns overall score in [0,1] plus per-component breakdown (cosine over 9 numerics, categorical agreement over 4 enums, jaccard over agent_topology). Unblocks ADR-151 §3.2 Recommender, §3.3 Drift Detection, §3.5 Plugin Compat. Pure-TS, no `@metaharness/*` dep — preserves ADR-150's four architectural constraints.
.claude/skills/ruvnet-harness-similarity/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | -14% | 0% |
| case-05 | ✗→✓ | ▲ Improved | -45% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 43% | 0% |
| case-09 | ✗→✓ | ▲ Improved | -23% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 14% | 0% |
Surfaces the production similarity function from scripts/_similarity.mjs as a callable skill. Use when an agent needs to:
overall = 0.60·cosine + 0.25·categorical + 0.15·jaccardrepo_type, archetype, template, recommendedMode)|A ∩ B| / |A ∪ B| over the agent_topology[] arrayThe 3-component design is load-bearing: numerical cosine alone is too coarse (the iter-35 spike showed LEGAL vs DEVOPS at cosine=0.97 despite being unrelated verticals). Categorical + jaccard pull the composite to the correct ordering.
| Pair | overall | cosine | categorical | jaccard | |---|---:|---:|---:|---:| | LEGAL × LEGAL (self) | 1.0000 | 1.0000 | 1.0000 | 1.0000 | | LEGAL × SUPPORT | 0.8296 | 0.9987 | 0.7500 | 0.2857 | | LEGAL × DEVOPS | 0.5840 | 0.9734 | 0.0000 | 0.0000 |
Both invariants from ADR-152 §"Smallest demonstrable spike" hold:
similarity(X, X) === 1 exactlysimilarity(LEGAL, DEVOPS) < similarity(LEGAL, SUPPORT) (vertical affinity)@metaharness/* imports.package.json.{ degraded: true, reason } with exit code 2; never throws.bash# File inputs npx ruflo metaharness similarity --a a.json --b b.json # Memory inputs (records persisted by oia-audit.mjs) npx ruflo metaharness similarity --a-key harness-X --b-key harness-Y # Per-dimension breakdown (used by ADR-151 §3.2 Recommender) npx ruflo metaharness similarity --a a.json --b b.json --per-dimension # Alert when too-dissimilar (used by ADR-151 §3.3 Drift Detection) npx ruflo metaharness similarity --a a.json --b b.json --alert-below 0.5
Production module: scripts/_similarity.mjs CLI skill: scripts/similarity.mjs MCP tool: mcp__plugin_ruflo-core_ruflo__metaharness_similarity (registered in v3/@claude-flow/cli/src/mcp-tools/metaharness-tools.ts) Spike anchor: scripts/_spike-similarity.mjs (regression suite — invariants locked here)
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 16,320 | 7,273 | -55% | 1 | 1 | 0% | 199 | 1,242 | +524% | 0 | 0 | — |
case-02 | fail→fail | 5,910 | 4,427 | -25% | 1 | 1 | 0% | 976 | 1,188 | +22% | 0 | 0 | — |
case-03 | fail→fail | 12,288 | 4,528 | -63% | 1 | 1 | 0% | 2,422 | 1,169 | -52% | 0 | 0 | — |
case-04 | fail→pass | 18,487 | 10,049 | -46% | 1 | 1 | 0% | 3,522 | 3,025 | -14% | 0 | 0 | — |
case-05 | fail→pass | 13,095 | 1,718 | -87% | 1 | 1 | 0% | 2,212 | 1,212 | -45% | 0 | 0 | — |
case-06 | fail→fail | 8,447 | 1,277 | -85% | 1 | 1 | 0% | 1,465 | 1,122 | -23% | 0 | 0 | — |
case-07 | fail→pass | 5,202 | 1,889 | -64% | 1 | 1 | 0% | 897 | 1,280 | +43% | 0 | 0 | — |
case-08 | pass→pass | 16,503 | 7,040 | -57% | 1 | 1 | 0% | 2,832 | 2,437 | -14% | 0 | 0 | — |
case-09 | fail→pass | 10,356 | 3,342 | -68% | 1 | 1 | 0% | 1,950 | 1,494 | -23% | 0 | 0 | — |
case-10 | pass→pass | 8,850 | 3,001 | -66% | 1 | 1 | 0% | 1,590 | 1,424 | -10% | 0 | 0 | — |
case-11 | pass→pass | 8,198 | 2,258 | -72% | 1 | 1 | 0% | 1,360 | 1,149 | -16% | 0 | 0 | — |
case-12 | fail→pass | 5,832 | 1,932 | -67% | 1 | 1 | 0% | 1,065 | 1,219 | +14% | 0 | 0 | — |
case-13 | fail→pass | 5,305 | 1,691 | -68% | 1 | 1 | 0% | 857 | 1,194 | +39% | 0 | 0 | — |
case-14 | fail→pass | 6,170 | 1,717 | -72% | 1 | 1 | 0% | 963 | 1,280 | +33% | 0 | 0 | — |
case-15 | fail→pass | 17,605 | 1,658 | -91% | 1 | 1 | 0% | 3,186 | 1,205 | -62% | 0 | 0 | — |
case-16 | fail→pass | 11,407 | 14,688 | +29% | 1 | 1 | 0% | 1,847 | 1,174 | -36% | 0 | 0 | — |
case-17 | fail→pass | 4,911 | 1,277 | -74% | 1 | 1 | 0% | 842 | 1,119 | +33% | 0 | 0 | — |
case-18 | fail→pass | 10,627 | 1,249 | -88% | 1 | 1 | 0% | 1,910 | 1,134 | -41% | 0 | 0 | — |
case-19 | fail→pass | 14,156 | 1,410 | -90% | 1 | 1 | 0% | 2,343 | 1,066 | -55% | 0 | 0 | — |
case-20 | fail→pass | 13,094 | 16,389 | +25% | 1 | 1 | 0% | 2,394 | 4,176 | +74% | 0 | 0 | — |
case-21 | fail→pass | 3,895 | 3,066 | -21% | 1 | 1 | 0% | 724 | 1,491 | +106% | 0 | 0 | — |
case-22 | fail→pass | 11,062 | 7,501 | -32% | 1 | 1 | 0% | 2,040 | 2,284 | +12% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 19 counted toward the lift figure. The other 3 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +68 percentage points is the difference between those two pass rates over the 19 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.