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。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 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
- 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
常见问题
阈值起什么作用?
它设定一个相似度水平,低于该水平时,这项技能会发出提醒。来源中的示例使用 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
评论
- …
同一仓库的更多技能
agent-adaptive-coordinator
81k帮你的智能体在工作量变化时拆分和重新平衡一组 AI 智能体,并选择适合任务的分工方式。
agent-agent
81k教你的智能体把一个大目标拆成有顺序的行动计划,并在情况变化时重新规划。
agent-agentic-payments
81k帮你的智能体管理 AI 购物的消费授权,包括消费上限、时间窗口、商户规则和签名审批。
agent-analyze-code-quality
81k帮你的智能体检查代码质量,找出代码异味、技术债务和重构建议,且不改动文件。