harness-drift-from-history
One-command drift detection. Composes audit-list + oia-audit + audit-trend into a single primitive — finds the most recent audit in `metaharness-audit` namespace, runs a fresh audit against the current repo, diffs them via ADR-152 §3.1 similarity, and alerts when structural distance crosses `--threshold`. Iter 53 of ADR-150 deep integration.
How do I install this agent skill?
npx skills add https://github.com/ruvnet/ruflo --skill harness-drift-from-historyIs this agent skill safe to install?
- Gen Agent Trust Hubpass
The skill provides a streamlined command for detecting architectural drift by comparing current project audits with historical records stored in the metaharness-audit namespace. It utilizes standard CLI tools and repository-specific logic to alert when structural changes exceed a defined threshold.
- Socketwarn
1 alert: gptAnomaly
- Snykwarn
Risk: MEDIUM · 1 issue
What does this agent skill do?
The natural ops question after running oia-audit weekly is "did anything drift?" Before this skill, the answer required a three-step sequence:
npx ruflo metaharness audit-list --format json # → pick a key by hand
npx ruflo metaharness oia-audit --format json > /tmp/curr.json
npx ruflo metaharness audit-trend \
--baseline-key <picked-key> --current /tmp/curr.json \
--alert-on-distance-below 0.95
This skill collapses it into one command:
npx ruflo metaharness drift-from-history --threshold 0.95
What it does
- Lists records from
metaharness-auditnamespace via audit-list.mjs - Picks the most recent record by
startedAt(or--baseline-since 7dskips anything newer than 7 days) - Runs a fresh
oia-auditagainst the current path - Diffs the two via audit-trend, applying
--alert-on-distance-below ${threshold} - Returns the structured drift report
Architectural constraint inheritance (ADR-150)
| Constraint | How drift-from-history satisfies it |
|---|---|
| Removable | Pure subprocess composition over existing scripts — no new @metaharness/* import |
| Optional | If oia-audit reports degraded:true, this skill exits 3 with a degraded payload |
| Graceful | Empty audit history → exit 2 with hint to seed it; never crashes |
| CI-gate | Smoke step 17z16 anchors the dispatcher entry + subcommand listing |
Exit codes
- 0 — similarity ≥ threshold (or threshold not crossed)
- 1 — drift detected: similarity < threshold (alert fired)
- 2 — config error (no history, audit-list failed)
- 3 — upstream metaharness absent (degraded payload returned)
Example
$ npx ruflo metaharness drift-from-history --threshold 0.95
# drift-from-history
Baseline: audit-2026-06-16T22-58-47-840Z
Current: 2026-06-16T23:05:02.231Z
Structural similarity: 1 (near-identical)
Distance: 0
✓ similarity ≥ 0.95 — OK
Implementation
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/ruvnet/ruflo/harness-drift-from-history">View harness-drift-from-history on skillZs</a>