
Witness
FreeTrack and verify code fixes with cryptographic precision.
Free · Opens the source repo
What Witness does
Witness is a toolkit designed for developers who need to ensure the integrity of code fixes over time. By creating a signed manifest that documents each fix alongside a unique identifier and a SHA-256 hash, Witness allows you to maintain a clear record of changes in your codebase. This is particularly useful for projects that require rigorous tracking of regressions, as it enables you to identify the specific commit that introduced an issue rather than just knowing that a problem exists.
The toolkit operates seamlessly within any project. To get started, you simply clone the toolkit, run an initialization script, and register your fixes in a designated JSON file. The regeneration script then creates the signed manifest, which can be integrated into your release pipeline. This ensures that every release is accompanied by a verifiable record of fixes, which can be checked against the live code to confirm that all markers are present.
In addition to its primary function of fix tracking, Witness maintains a temporal history of changes in a JSONL format. This history allows for easy querying to summarize the state of fixes, identify regressions, and track the timeline of specific changes. The ability to generate machine-readable outputs makes it suitable for integration into continuous integration (CI) systems, providing an automated way to enforce code quality standards.
Witness is particularly beneficial for teams that prioritize code reliability and need to quickly address regressions. By using this toolkit, developers can ensure that their codebase remains stable and that any issues can be traced back to their source with minimal effort.
When to use it
Use Witness when you need to track code fixes and ensure their integrity across releases, especially in projects with strict quality requirements.
When not to use it
Witness may not be suitable for smaller projects or teams that do not require detailed tracking of code changes and regressions.
What you can build with it
Integrating into CI/CD Pipelines
Use Witness to automatically verify code fixes during the CI/CD process, ensuring that no regressions are introduced before deployment.
Documenting Fixes for Large Teams
In large teams, use Witness to maintain a clear record of code fixes, making it easier to communicate changes and their impacts.
Analyzing Regression History
Leverage Witness's temporal history features to analyze when and how regressions were introduced, aiding in faster debugging.
How to install Witness
View source1. Install with the skills CLI
npx skills add ruvnet/ruflo/witness --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by ruvnetWitness — cryptographic 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. Anyone with the same git commit can re-derive the public key and verify the signature without a committed private 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
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. Failure modes:
| Failure | Cause |
|---|---|
signatureValid: no | manifest hand-edited; re-run regen |
regressed: > 0 | a documented fix lost its marker since issuance |
missing: > 0 | a cited dist file no longer exists; rebuild or remove the entry |
scope: source-only | signature + source markers checked; generated entries intentionally skipped |
Frequently asked questions about Witness
Similar skills
Release Candidate Preparation
Streamline your OpenAI Agents release process.
Gitmoji
Generate expressive commit messages with emojis.
GitHub Release
Automate your GitHub library release process effortlessly.
Commit Message Storyteller
Generate meaningful commit messages from your git diffs.
Author Contributions
Trace author contributions across branches in Git.
Implementation Kickoff
Streamline your code implementation process with ease.
