Aller au contenu
Skillpedia
Sécurité81k · #1589

witness

Ce qu’il fait

Cette compétence tient à jour une liste signée des corrections d'un projet logiciel et contrôle chaque nouvelle version pour voir si une correction a régressé. Elle s'adresse aux développeurs qui livrent des logiciels et veulent une preuve que leurs corrections tiennent toujours.

Quand l’utiliser

  • ✓Lorsque vous enregistrez une correction de bug pour qu'elle soit vérifiée dans les versions suivantes.
  • ✓Lorsque vous voulez confirmer qu'une nouvelle version n'a pas défait les corrections précédentes.
  • ✓Lorsque vous devez trouver le changement qui a fait réapparaître un bug corrigé.

Lien du skill

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

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-core/skills/witness/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Enregistre mes récentes corrections de bugs et vérifie la nouvelle version pour voir si certaines ont de nouveau échoué.”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

Chaque correction est listée avec un court texte de repère et une empreinte, et la liste est signée. Un fichier d'historique enregistre les changements dans le temps, pour remonter au changement qui a causé un problème.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis 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

Questions fréquentes

La signature prouve-t-elle qui a publié la version ?

Par défaut, non. Elle prouve seulement que le fichier n'a pas été modifié. Pour prouver l'auteur, une clé de signature privée doit être configurée.

Cette compétence est-elle réservée au projet Ruflo ?

Non. Les scripts peuvent être copiés dans votre propre projet et lancés depuis votre processus de publication.

De quoi ai-je besoin pour commencer ?

Lancez une fois le script d'installation dans votre projet, puis listez chaque correction dans le fichier des corrections avec son nom de fichier et son texte de repère.

Détails

Description originale de l’auteur

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

Popularité

Étoiles GitHub
81k
Position au classement
#1589
Licence
MIT
Mis à jour
02/11/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires