Chuyển đến nội dung
Skillpedia
Triển khai và đám mây (DevOps)81k · #1646

harness-drift-from-history

Skill này làm gì

Skill này chạy một kiểm toán mới cho harness, so sánh với lần kiểm toán đã lưu gần nhất và báo cáo mức độ trôi lệch. Nó dành cho nhóm kiểm tra harness AI thường xuyên để phát hiện thay đổi bất ngờ.

Khi nào nên dùng

  • ✓Khi bạn muốn biết harness có thay đổi kể từ lần kiểm toán cuối không.
  • ✓Khi một đợt kiểm toán hàng tuần đã chạy và bạn muốn xem có trôi lệch không.
  • ✓Khi bạn muốn được cảnh báo nếu mức thay đổi vượt một ngưỡng đã đặt.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-metaharness/skills/harness-drift-from-history/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Harness của tôi đã trôi lệch từ lần kiểm toán trước chưa? Hãy cảnh báo tôi nếu nó thay đổi quá nhiều.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Skill chọn bản ghi kiểm toán gần nhất đã lưu, có thể bỏ qua những bản rất mới, chạy kiểm toán mới và so sánh hai bên. Nó trả về báo cáo trôi lệch và có thể cảnh báo khi độ tương đồng giảm dưới ngưỡng bạn đặt.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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

Câu hỏi thường gặp

Ngưỡng có tác dụng gì?

Nó đặt mức độ tương đồng mà dưới đó skill phát cảnh báo. Ví dụ trong mã nguồn dùng 0,95.

Nếu chưa có kiểm toán trước đó thì sao?

Skill thoát và gợi ý bạn tạo một kiểm toán trước, thay vì bị lỗi.

Nó có thay đổi harness không?

Không. Nó chỉ chạy kiểm toán và so sánh kết quả.

Chi tiết

Mô tả gốc của tác giả

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

Độ phổ biến

Sao GitHub
81k
Vị trí xếp hạng
#1646
Giấy phép
MIT
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự