Reorganizes the verification system into per-OS bundles, addressing
the cross-platform CI matrix added in c51841590.
Layout
──────
verification/
README.md — tutorial-structure docs (was at root)
witness-fixes.json — input config (OS-independent)
results.md — last-run report (was at root)
inventory.json — capability inventory (was at root)
linux/
manifest.md.json — signed by Linux CI
history.jsonl
macos/
manifest.md.json — signed by macOS CI
history.jsonl
windows/
manifest.md.json — signed by Windows CI
history.jsonl
Why per-OS
──────────
File hashes drift across platforms (LF vs CRLF normalization, path
separators, prebuilt binary differences). Each OS produces its own
truthful snapshot. The cross-platform witness-verify CI job runs
once per OS and writes/verifies that OS's bundle, catching
platform-specific marker drift before it reaches users on that
platform.
linux/ + windows/ initially seeded by copying the macOS-generated
manifests; CI on each OS will regenerate its own per-OS bundle on
first push.
Why JSONL inside, not binary RVF
──────────────────────────────────
@ruvector/rvf-node provides a true RVF binary format with native
bindings on all 3 OSes — but it's optimized for vector similarity
search, not key-value retrieval. The witness use case is structured
key-value lookup (snapshot N's commit + fix statuses), so JSONL is
the better fit inside each container. The folder layout adopts the
RVF *cognitive container* concept (per-OS bundle of manifest +
history + metadata); the file format inside is JSONL.
Script changes
──────────────
- lib.mjs: added osDir() platform mapper + 'os' field on manifest +
'os' field on history entries.
- regen-witness.mjs: defaults to verification/<os>/{manifest,history}
using process.platform → osDir.
- v3-ci.yml: witness-verify reads its OS-specific manifest via
$RUNNER_OS dispatch.
Tutorial README
───────────────
verification/README.md rewritten as a tutorial: bootstrap → register
fix → regen → verify → investigate regressions → wire into CI. Plus
features matrix, daily cheat sheet, schema, anti-patterns, integration
with the broader regression stack (Layer 1/2/3 from the agentic-
validation gist).
Co-Authored-By: RuFlo <ruv@ruv.net>
Closes the gap that ADR-102 left open: snapshot-only manifests can't
answer "when did this fix regress?" Adds a JSONL temporal log + extracts
the witness toolkit into ruflo-core as an optional plugin asset that
any project can adopt — not just ruflo's own monorepo.
What's new
──────────
1. verification-history.jsonl — one append-only line per regen with
{ commit, issuedAt, manifestHash, summary, fixes: { id: {sha256,
markerVerified} } }. Format choices: JSONL for cheap appends and
minimal git diffs; per-fix object for O(1) lookup.
2. plugins/ruflo-core/scripts/witness/ — project-agnostic toolkit
- lib.mjs shared regen + history primitives
- init.mjs bootstrap empty manifest into any repo
- regen.mjs sign + append history
- verify.mjs validate signature + markers (no ruflo CLI dep)
- history.mjs query temporal log (summary, regressions, timeline)
3. plugins/ruflo-core/{skills,commands,agents}/witness*
Slash command + skill doc + curator agent — Claude Code surface area.
4. scripts/regen-witness.mjs — thin wrapper, delegates to plugin lib.
Reads project-specific NEW_FIXES from a committed witness-fixes.json
instead of inline literals. Single source of truth in the plugin.
5. .github/workflows/v3-ci.yml — witness-verify job gains a follow-on
`history.mjs summary` step that surfaces transitions since the last
snapshot (newly regressed / passing / added / removed fixes).
Empirically verified
────────────────────
Before refactor: 81/81 verified, 1 history entry
After refactor: 81/81 verified, 1 history entry, signature reproducible
signature, marker, sha256 all match across the move.
Plugin scripts run standalone without ruflo CLI installed — only
@noble/ed25519 required. Adopters get full witness capability by
copying plugins/ruflo-core/scripts/witness/ into their repo.
Refs #1868 — implementation issue
ADR-103 — design + rationale + residual risk
Co-Authored-By: RuFlo <ruv@ruv.net>
Closes the gap between the two regression layers:
- Behavioral smokes (smoke-install-no-bsqlite, plugin-hooks-smoke)
exercise the user-visible failure path against fresh installs.
- Cryptographic witness manifest (verification.md.json) attests
the marker substring + sha256 of every documented fix.
Both now block `publish`. A regression in either layer fails CI.
Changes
-------
1. scripts/regen-witness.mjs — committed regen tool replacing the
prior inline-script pattern (~/.claude/.../project_verification_process.md).
Loads existing fixes, appends entries from NEW_FIXES, refreshes
sha256 + markerVerified, signs with deterministic Ed25519 seed.
2. NEW_FIXES populated with #1867, #1859, #1862. Witness now covers
81 fixes (was 78) with 81/81 markerVerified, 0 missing.
3. verification.md sidecar refreshed (count + embedded JSON).
4. .github/workflows/v3-ci.yml — new `witness-verify` job that runs
`ruflo verify --manifest verification.md.json --json` against the
local build and exits non-zero on any regressed fix or invalid
signature. `publish` depends on it.
5. v3/@claude-flow/security/dist rebuilt: src had completed the
bcrypt → bcryptjs migration (#1608, PR #1818) but dist still
shipped the pre-migration bcrypt import. Caught by the regen
dry-run as 80/81 verified — fixed by `npm run build` in the
security pkg, restoring 81/81.
Verification
------------
$ node v3/@claude-flow/cli/bin/cli.js verify --manifest verification.md.json
Manifest signature
manifest hash matches: yes
public key reproducible from gitCommit: yes
Ed25519 signature valid: yes
Summary
pass: 81 drift: 0 regressed: 0 missing: 0
[OK] All fixes verified.
Refs #1867#1859#1862
Co-Authored-By: RuFlo <ruv@ruv.net>