跳到正文
Skillpedia
部署与云(DevOps)81k · #1646

harness-drift-from-history

它能做什么

这项技能对运行框架运行新的审计,将其与最近一次保存的审计结果进行比较,并报告偏离程度。适合定期检查 AI 运行框架是否出现意外变化的团队。

适用场景

  • ✓当你想知道运行框架自上次审计以来是否有变化时。
  • ✓当每周审计已运行,你想看看是否有偏离时。
  • ✓当变化超过设定阈值时,你希望收到提醒时。

技能链接

https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-metaharness/skills/harness-drift-from-history/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-metaharness/skills/harness-drift-from-history/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我的运行框架自上次审计以来有没有偏离?如果偏离太大,请提醒我。”

每周 5 个新技能,1 分钟读完。

工作原理

这项技能选取最近一次保存的审计记录,可选择跳过非常近期的记录,运行新的审计并比较两者。它返回偏离报告,并且当相似度低于你设定的阈值时可以发出提醒。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

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

  1. Lists records from metaharness-audit namespace via audit-list.mjs
  2. Picks the most recent record by startedAt (or --baseline-since 7d skips anything newer than 7 days)
  3. Runs a fresh oia-audit against the current path
  4. Diffs the two via audit-trend, applying --alert-on-distance-below ${threshold}
  5. 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

scripts/drift-from-history.mjs

常见问题

阈值起什么作用?

它设定一个相似度水平,低于该水平时,这项技能会发出提醒。来源中的示例使用 0.95。

如果没有更早的审计怎么办?

这项技能会提示你先创建一次审计然后退出,而不会失败。

它会改动运行框架吗?

不会。它只运行审计并比较结果。

详情

作者的原始描述

One-command drift detection: run a fresh metaharness audit, diff it against the latest stored audit by ADR-152 similarity, and alert when the distance crosses `--threshold`. Use when checking whether a harness has drifted since its last audit.

repo: ruvnet/ruflo

热度

GitHub 星标
81k
排名
#1646
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能