Langsung ke konten
Skillpedia
Keamanan81k Β· #1589

witness

Fungsinya

Skill ini menyimpan daftar perbaikan dalam sebuah proyek perangkat lunak yang ditandatangani, lalu memeriksa setiap rilis baru untuk melihat apakah ada perbaikan yang mundur. Skill ini untuk pengembang yang merilis perangkat lunak dan ingin bukti bahwa perbaikannya tetap berlaku.

Kapan dipakai

  • βœ“Saat Anda mendaftarkan perbaikan bug agar bisa diperiksa di rilis berikutnya.
  • βœ“Saat Anda ingin memastikan rilis baru tidak membatalkan perbaikan sebelumnya.
  • βœ“Saat Anda perlu mencari perubahan yang membuat perbaikan yang rusak kembali.

Link skill

https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-core/skills/witness/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-core/skills/witness/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œDaftarkan perbaikan bug terbaru saya dan periksa rilis baru untuk melihat apakah ada yang rusak lagi.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Setiap perbaikan dicantumkan dengan teks penanda singkat dan sidik jari, lalu daftarnya ditandatangani. Berkas riwayat mencatat perubahan dari waktu ke waktu, sehingga masalah bisa ditelusuri ke perubahan penyebabnya.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

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:

  1. Inside ruflo β€” used by ruflo's own CI to gate publishes (see .github/workflows/v3-ci.yml job witness-verify).
  2. In your own project β€” copy plugins/ruflo-core/scripts/witness/ into your repo, run init.mjs, register your fixes in witness-fixes.json, and call regen.mjs from 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 via regen.mjs, otherwise the signature breaks.
  • Markers that are too generic ('function', 'import') β€” pick something unique enough that grep doesn'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.json and verification-history.jsonl belong 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

Pertanyaan umum

Apakah tanda tangan membuktikan siapa pembuat rilisnya?

Secara default tidak. Tanda tangan hanya menunjukkan bahwa berkas belum diubah. Untuk membuktikan penulisnya, kunci penandatanganan pribadi harus diatur.

Apakah ini hanya untuk proyek Ruflo?

Tidak. Skrip bisa disalin ke proyek Anda sendiri dan dijalankan dari proses rilis Anda.

Apa yang saya perlukan untuk memulai?

Jalankan skrip pengaturan sekali di proyek Anda, lalu daftarkan setiap perbaikan di berkas perbaikan dengan nama berkas dan teks penanda.

Detail

Deskripsi asli dari pembuat

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

Popularitas

Bintang GitHub
81k
Peringkat
#1589
Lisensi
MIT
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa