Skip to content
Agent Orchestration
Skill

/harness-similarity

Weighted similarity (ADR-152) between two harness fingerprints (genome + score JSON): an overall score in [0,1] plus per-component breakdown. Use when comparing two harnesses or detecting drift between them. Pure TypeScript; needs no @metaharness package.

From plugin
ruflo
80k200 skills169 agents196 commands3 MCP

Claude Code

$ npx -y skills add ruvnet/ruflo --skill harness-similarity --agent claude-code

SKILL.md

harness-similarity.SKILL.md
name: harness-similarity
description: "Weighted similarity (ADR-152) between two harness fingerprints (genome + score JSON): an overall score in [0,1] plus per-component breakdown. Use when comparing two harnesses or detecting drift between them. Pure TypeScript; needs no @metaharness package."
argument-hint: "(--a a.json --b b.json | --a-key X --b-key Y) [--per-dimension] [--alert-below 0.5] [--format json|table]"
allowed-tools: Bash

Surfaces the production similarity function from [`scripts/_similarity.mjs`](../../scripts/_similarity.mjs) as a callable skill. Use when an agent needs to:

  • decide whether to fork an existing harness vs scaffold a new one
  • rank candidate templates against a target repo's genome
  • diff two harnesses produced by different teams to find duplicate work
  • generate the confidence number that ADR-151 §3.2's Recommender wraps

Algorithm (from ADR-152 §Decision)

overall = 0.60·cosine + 0.25·categorical + 0.15·jaccard
  • **cosine** — over a 9-dim numerical vector of normalized scorecard + genome dims
  • **categorical** — fraction of 4 enum fields that match (`repo_type`, `archetype`, `template`, `recommendedMode`)
  • **jaccard** — `|A ∩ B| / |A ∪ B|` over the `agent_topology[]` array

The 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.

Reference outputs (iter-35 spike fixtures)

| 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: 1. `similarity(X, X) === 1` exactly 2. `similarity(LEGAL, DEVOPS) < similarity(LEGAL, SUPPORT)` (vertical affinity)

Architectural constraint inheritance (ADR-150)

  • **Removable** — pure-TS function, zero static `@metaharness/*` imports.
  • **Optional** — no new dep in `package.json`.
  • **Graceful** — malformed inputs emit `{ degraded: true, reason }` with exit code 2; never throws.
  • **CI-gate** — smoke step 17y locks the contract: module exports, spike fixtures reproduce, CLI dispatcher entry registered, MCP tool registered.

Usage

# 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

Implementation

Production module: [`scripts/_similarity.mjs`](../../scripts/_similarity.mjs) CLI skill: [`scripts/similarity.mjs`](../../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`](../../scripts/_spike-similarity.mjs) (regression suite — invariants locked here)

Read more
@ruvnet
Ships withruflo

📖 RuFlo Explained — Build an AI Team That Plans, Remembers, Tests, and Improves A 14-chapter guide: from the basic idea to a first useful task, then memory, agent teams, plugins, cost and verification. Agent = Model + Harness.

80k200 skills169 agents3 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
80.4k
Star history of ruvnet/ruflo on GitHub, a chart by star-history.com

Other skills on ruflo.

agentdb-advanced

agentdb-advanced

Master advanced AgentDB features including QUIC synchronization, multi-database management, custom distance metrics, hybrid…

@ruvnet@ruvnetInstall Skill
agentdb-learning

agentdb-learning

Create and train AI learning plugins with AgentDB's 9 reinforcement learning algorithms. Includes Decision Transformer,…

@ruvnet@ruvnetInstall Skill
agentdb-memory-patterns

agentdb-memory-pattern…

Implement persistent memory patterns for AI agents using AgentDB. Includes session memory, long-term storage, pattern learning,…

@ruvnet@ruvnetInstall Skill
agentdb-optimization

agentdb-optimization

Optimize AgentDB performance with quantization (4-32x memory reduction), HNSW indexing (150x faster search), caching, and batch…

@ruvnet@ruvnetInstall Skill
agentdb-vector-search

agentdb-vector-search

Implement semantic vector search with AgentDB for intelligent document retrieval, similarity matching, and context-aware…

@ruvnet@ruvnetInstall Skill
agentic-jujutsu

agentic-jujutsu

Quantum-resistant, self-learning version control for AI agents with ReasoningBank intelligence and multi-agent coordination

@ruvnet@ruvnetInstall Skill

More skills from other plugins.

1password

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

clawdis2w393k
@steipete@steipeteInstall Skill
computer-use

computer-use

Drives the GUI of a visible local app window through `orca computer`: accessibility tree, clicks, typing, menus, dialogs, and…

orca2w111k
@stablyai@stablyaiInstall Skill
agentmail

agentmail

Use your assigned AgentMail inbox to read email tasks, explicitly send or reply, and check delivery. Provided automatically by…

paperclip2w109k
@paperclipai@paperclipaiInstall Skill
bmad

bmad

Answers BMad questions and recommends the next skill from what is installed. Use when the user asks bmad for help, what to do…

@bmad-code-org@bmad-code-orgInstall Skill

Questions about harness-similarity.

Which coding agents can use harness-similarity?
harness-similarity installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.