
Harness Similarity
FreeAssess similarity between harness fingerprints effectively.
Free · Opens the source repo
What Harness Similarity does
Harness Similarity is a specialized skill designed to compute the weighted similarity between two harness fingerprints, allowing developers and designers to make informed decisions about their projects. By leveraging a combination of cosine similarity, categorical agreement, and Jaccard index, this skill provides a comprehensive scoring system that ranges from 0 to 1. The output includes an overall score along with a detailed breakdown of each component, making it easier to understand the similarities and differences between two harnesses.
The skill is particularly useful in scenarios where teams need to decide whether to fork an existing harness or create a new one from scratch. It can also rank candidate templates against a target repository's genome, helping teams identify the best fit for their needs. Additionally, it aids in diffing harnesses produced by different teams to uncover duplicate work, thus promoting efficiency and reducing redundancy.
Built as a pure TypeScript function, Harness Similarity adheres to strict architectural constraints, ensuring that it does not introduce any unnecessary dependencies. This makes it a lightweight and efficient tool for integration into existing workflows. The skill is designed to handle malformed inputs gracefully, providing clear feedback without crashing, which is essential for maintaining robust development practices.
Overall, Harness Similarity is a valuable addition for teams working with harnesses, especially in environments where collaboration across different teams is common. Its ability to quantify similarity in a nuanced way helps streamline decision-making processes and fosters better project alignment.
When to use it
Use this skill when evaluating whether to fork an existing harness or create a new one, or when you need to compare templates and detect duplicate work across teams.
When not to use it
This skill may not be suitable for scenarios outside of harness comparison or where similarity metrics are not needed.
What you can build with it
Deciding on Forking vs. New Scaffold
When faced with the choice of forking an existing harness or creating a new one, use this skill to evaluate similarities.
Ranking Candidate Templates
Utilize the skill to rank candidate templates against a target repository's genome, ensuring optimal selections.
Detecting Duplicate Work
When two teams produce similar harnesses, this skill can help identify overlaps and reduce redundancy.
How to install Harness Similarity
View source1. Install with the skills CLI
npx skills add ruvnet/ruflo/harness-similarity --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by ruvnetSurfaces the production similarity function from 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 theagent_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:
similarity(X, X) === 1exactlysimilarity(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
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)
Frequently asked questions about Harness Similarity
Similar skills
Spring Boot Testing
Master testing techniques for Spring Boot 4 applications.
GitHub Issues
Manage GitHub issues efficiently with MCP tools.
Geofeed Tuner
Optimize your IP geolocation feeds in CSV format.
Batch Files
Master Windows batch scripting for automation and task management.
Adobe Illustrator Scripting
Automate your Illustrator workflows with ExtendScript.
Plugin Structure
Create and organize Claude Code plugins effectively.
