harness-similarity
하는 일
이 스킬은 두 하네스 지문을 비교해 유사도 점수와 각 부분의 내역을 보여 줍니다. 기존 하네스를 포크할지 새로 시작할지 정하는 팀을 위한 스킬입니다.
사용하는 경우
- ✓기존 하네스를 포크할지 처음부터 시작할지 결정해야 할 때.
- ✓저장소 프로필에 맞춰 템플릿 순위를 매기고 싶을 때.
- ✓두 팀이 같은 것을 만들었을 수 있어 확인하고 싶을 때.
스킬 링크
https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-metaharness/skills/harness-similarity/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“우리 청구 하네스가 지원 하네스와 얼마나 비슷한지, 어디가 다른지 알려 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
스킬은 세 가지 측정값을 고정 가중치로 결합합니다. 수치 비교, 핵심 범주 일치, 에이전트 유형 겹침입니다. 결과는 전체 점수와 각 부분의 값입니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Surfaces 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)
자주 묻는 질문
전체 점수는 어떻게 계산하나요?
수치 비교에 60퍼센트, 범주 일치에 25퍼센트, 에이전트 겹침에 15퍼센트의 가중치를 줍니다.
추가 패키지가 필요한가요?
아닙니다. 소스는 순수 코드이며 metaharness 패키지가 필요 없다고 설명합니다.
드리프트를 보여 줄 수 있나요?
네. 하네스를 이전 버전과 비교하면 얼마나 멀어졌는지 보여 줄 수 있습니다.
상세 정보
작성자의 원본 설명
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.
repo: ruvnet/ruflo
인기도
- GitHub 스타
- 81k
- 순위
- #1656
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
agent-adaptive-coordinator
81k작업량이 바뀔 때 에이전트 무리를 나누고 재배치해, 작업에 맞는 배치를 고르도록 에이전트를 돕습니다.
agent-agent
81k큰 목표를 순서가 있는 행동 계획으로 나누고, 조건이 바뀌면 다시 계획하도록 에이전트를 가르칩니다.
agent-agentic-payments
81kAI 쇼핑을 위한 지출 위임장을 관리합니다. 지출 상한, 시간 창, 판매자 규칙, 서명된 승인을 포함합니다.
agent-analyze-code-quality
81k에이전트가 파일을 바꾸지 않고, 코드 품질 문제와 코드 냄새, 기술 부채, 리팩터링 아이디어를 찾아 검토하도록 돕습니다.