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.
| 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)
Other measured skills in the registry, with their headline benchmark lift.