witness
Skill này làm gì
Skill này giữ một danh sách có chữ ký các bản sửa lỗi trong một dự án phần mềm, và kiểm tra từng bản phát hành mới để xem có bản sửa nào bị hồi quy không. Phù hợp với lập trình viên phát hành phần mềm và muốn có bằng chứng rằng các bản sửa vẫn giữ nguyên.
Khi nào nên dùng
- ✓Khi bạn đăng ký một bản sửa lỗi để nó có thể được kiểm tra trong các bản phát hành sau.
- ✓Khi bạn muốn xác nhận một bản phát hành mới không làm mất các bản sửa trước đó.
- ✓Khi bạn cần tìm thay đổi nào đã làm một bản sửa bị hỏng trở lại.
Liên kết skill
https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-core/skills/witness/SKILL.mdSao 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
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Đăng ký các bản sửa lỗi gần đây của tôi và kiểm tra bản phát hành mới xem có bản nào bị hỏng trở lại không.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Mỗi bản sửa được liệt kê với một đoạn văn bản đánh dấu ngắn và một dấu vân tay (fingerprint), và danh sách được ký. Một file lịch sử ghi lại thay đổi theo thời gian, nên một vấn đề có thể được truy về thay đổi gây ra nó.
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.
Witness — tamper-evident fix-regression tracking
The witness toolkit lets you ship every release with a signed manifest
that lists every documented fix in your codebase along with a sha256 +
marker substring. By default the signing seed is derived from the public
git commit, so anyone can reproduce the signature: this is an integrity
checksum, not proof of authorship. For authenticity, sign with a 32-byte
RUFLO_WITNESS_SEED and verify with a pinned RUFLO_WITNESS_PUBLIC_KEY.
A temporal history (JSONL) tracks how the fix population evolves across releases — so when a regression appears, you can pinpoint the commit that introduced it, not just "it's broken now."
This skill works two ways:
- Inside ruflo — used by ruflo's own CI to gate publishes (see
.github/workflows/v3-ci.ymljobwitness-verify). - In your own project — copy
plugins/ruflo-core/scripts/witness/into your repo, runinit.mjs, register your fixes inwitness-fixes.json, and callregen.mjsfrom your release pipeline.
Quick start (any project)
# One-time bootstrap — creates verification.md.json,
# verification-history.jsonl, and witness-fixes.json template
node plugins/ruflo-core/scripts/witness/init.mjs --root .
# Edit witness-fixes.json: add { id, desc, file, marker } per fix.
# A "marker" is a distinctive substring that MUST appear in `file`
# while the fix is present. If someone reverts the fix, the marker
# disappears and `verify` reports it as `regressed`.
# Regenerate the manifest (signing requires @noble/ed25519)
npm i @noble/ed25519
node plugins/ruflo-core/scripts/witness/regen.mjs \
--manifest verification.md.json \
--history verification-history.jsonl \
--fixes witness-fixes.json
# Verify markers are present in the live tree
node plugins/ruflo-core/scripts/witness/verify.mjs \
--manifest verification.md.json
# Or authenticate the manifest and check source markers in a clean clone.
# Generated dist/ entries are explicitly reported as skipped.
node plugins/ruflo-core/scripts/witness/verify.mjs \
--manifest verification.md.json --source-only
# For a CI hash tripwire, also fail when a file changes but its marker remains.
node plugins/ruflo-core/scripts/witness/verify.mjs \
--manifest verification.md.json --source-only --strict
# Authenticity: pin a release public key (the flag wins over the env var).
node plugins/ruflo-core/scripts/witness/verify.mjs \
--manifest verification.md.json --public-key <64-hex-public-key>
Without --strict, marker-preserving SHA drift is reported but exits 0.
--strict makes that drift exit 1 without changing signature or missing-file checks.
Temporal queries (ADR-103)
# Latest snapshot vs. previous
node plugins/ruflo-core/scripts/witness/history.mjs \
--history verification-history.jsonl summary
# For each currently-regressed fix, find the commit that introduced it
node plugins/ruflo-core/scripts/witness/history.mjs \
--history verification-history.jsonl regressions
# Status timeline for a specific fix
node plugins/ruflo-core/scripts/witness/history.mjs \
--history verification-history.jsonl timeline --id F1
# Machine-readable for CI
node plugins/ruflo-core/scripts/witness/history.mjs \
--history verification-history.jsonl summary --json
summary exits non-zero if any fix newly regressed since the last
snapshot — drop it in CI as a soft pre-merge gate.
Anti-patterns
- Hand-editing
verification.md.json— always regenerate viaregen.mjs, otherwise the signature breaks. - Markers that are too generic (
'function','import') — pick something unique enough thatgrepdoesn't false-positive against unrelated code. - Skipping the history append — without
--history, you lose the ability to bisect when a regression was introduced. - Committing one without the other —
verification.md.jsonandverification-history.jsonlbelong in the same commit; the JSONL is what lets future you verify the signed manifest is the latest in the line.
Files
scripts/witness/lib.mjs— shared regenerate / history logic.scripts/witness/regen.mjs— CLI: sign + append history.scripts/witness/history.mjs— CLI: query the temporal log.scripts/witness/init.mjs— CLI: bootstrap into a fresh project.scripts/witness/verify.mjs— CLI: validate signature + markers.
In ruflo's CI
v3-ci.yml job witness-verify runs after the behavioral smoke tests
and before publish. Failur
Câu hỏi thường gặp
Chữ ký có chứng minh ai đã tạo bản phát hành không?
Mặc định là không. Nó chỉ cho thấy file chưa bị thay đổi. Để chứng minh tác giả, cần đặt một khóa ký riêng.
Đây có chỉ dành cho dự án Ruflo không?
Không. Các script có thể được sao chép vào dự án của bạn và chạy từ quy trình phát hành của bạn.
Tôi cần chuẩn bị gì để bắt đầu?
Chạy script thiết lập một lần trong dự án, rồi liệt kê từng bản sửa trong file fixes kèm tên file và đoạn văn bản đánh dấu.
Chi tiết
Mô tả gốc của tác giả
Sign, verify and track fix-marker regressions over time with an Ed25519 witness manifest. Use when registering fixes or checking a release for regressed fixes. The default seed proves integrity only; set RUFLO_WITNESS_SEED/RUFLO_WITNESS_PUBLIC_KEY for authorship.
repo: ruvnet/ruflo
Độ phổ biến
- Sao GitHub
- 81k
- Vị trí xếp hạng
- #1589
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
agent-adaptive-coordinator
81kGiúp agent của bạn chia và cân bằng lại một nhóm agent AI khi khối lượng công việc thay đổi, chọn bố cục phù hợp với tác vụ.
agent-agent
81kDạy agent của bạn biến một mục tiêu lớn thành kế hoạch hành động có thứ tự, và lập lại kế hoạch khi điều kiện thay đổi.
agent-agentic-payments
81kGiúp agent của bạn quản lý ủy quyền chi tiêu cho mua sắm bằng AI, với hạn mức chi, khung thời gian, quy tắc người bán và phê duyệt có chữ ký.
agent-analyze-code-quality
81kGiúp agent của bạn rà soát chất lượng mã, tìm code smell, nợ kỹ thuật và gợi ý tái cấu trúc mà không thay đổi các file.
Skill tương tự
reverse-engineer-anything
422kGiúp agent của bạn xem bên trong các app và package đã phát hành để giải thích tính năng, so sánh phiên bản hoặc hướng dẫn dựng lại bằng công cụ REA.
1password
394kGiúp agent của bạn cài đặt CLI của 1Password, đăng nhập, và đọc hoặc đưa thông tin bí mật vào mà không in giá trị ra cuộc trò chuyện.
healthcheck
394kGiúp agent của bạn rà soát bảo mật máy tính hoặc máy chủ đang chạy OpenClaw, như SSH, tường lửa, cập nhật và sao lưu, rồi đề xuất cách sửa an toàn.