跳到正文
cccskills
免费在 GitHub 公开中文介绍

witness

将标识代码修复的字符串与文件哈希写入带签名的清单,通过各次发布的历史记录检查修复是否丢失,并追踪修复丢失或问题复发所关联的提交。

原文查看原文说明

Sign, verify, and track fix-marker regressions over time using an Ed25519 witness manifest. The default seed is public-commit-derived (integrity only); set RUFLO_WITNESS_SEED/RUFLO_WITNESS_PUBLIC_KEY for authorship. Works in any project — clone the toolkit, run init, register fixes, regen on each release.

AI 评分100分/ 100查看安装方法

适用场景

  • 发布前检查既有修复是否保留
  • 查找问题复发关联的提交
  • 在持续集成中验证带签名的修复记录
  • 查看特定修复的状态历史

中文介绍

功能

通过带签名的记录及其历史,检查代码修复是否在后续修改中丢失。为每项修复登记目标文件和用作标记的独特字符串,并将这些信息与SHA256哈希一起写入清单。验证时检查签名、文件是否存在以及标记是否消失。还可通过历史记录追踪修复状态的变化,查找问题复发所关联的提交。

适用场景

适合在发布前确认以往的修复是否仍然保留,或在持续集成中检测问题复发。也可查看特定修复的变化过程,检查相较上一次记录有哪些修复新近丢失。

使用示例

  • “为此项目完成初始化,并登记修复标记。”
  • “根据历史记录,查找当前已复发问题所关联的提交。”
  • “使用--source-only --strict进行验证。”

注意事项

使用Node.js运行,签名需要@noble/ed25519。标记应选择独特的字符串。清单应重新生成,不要手动编辑,并与历史记录放在同一次提交中。文件发生变化但标记仍保留时,通常只作报告;指定--strict后会判定为失败。

本介绍由 AI(OpenAI Codex)根据公开的 SKILL.md 撰写。准确的规格请查看下方原文。

客观评估

AI 仅根据 SKILL.md 的内容,从 4 个方面进行了评估。星标数和热度不计入评估。

指令清晰度能否看出何时使用、做什么
A良好明确说明将修复标记写入带签名的清单,并通过验证和历史记录追踪问题复发。
步骤具体性步骤、输入输出和示例是否具体
A良好提供init、regen、verify和history的执行示例、登记字段及生成文件名。
安全性发送数据、删除文件、执行命令等是否有说明
A良好明确列出生成和更新的文件、签名验证步骤,以及严格模式下的失败条件。
安装难易度所需工具和 API 密钥是否少且有说明
A良好说明了脚本放置、初始化及@noble/ed25519的安装步骤。

总分按每项 A=25 分、B=15 分、C=5 分相加。 由 AI(OpenAI Codex)于 2026年10月21日 评估。仅供参考,安装前请同时查看原文。

如果您认为评估有误,请申请复核

请写明哪一项有误以及原因。无需登录。我们会对照 SKILL.md 重新评估,并在此处更新结果。

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

包含的文件(1)

  • SKILL.md5.2 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

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. Failure modes:

FailureCause
signatureValid: nomanifest hand-edited; re-run regen
regressed: > 0a documented fix lost its marker since issuance
missing: > 0a cited dist file no longer exists; rebuild or remove the entry
scope: source-onlysignature + source markers checked; generated entries intentionally skipped

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

add-model-descriptions

免费有简介AI 评分 80分

对照HuggingFace router的模型列表与chat-ui配置,研究尚未收录的模型,编写简短英文说明,并同步添加到生产和开发配置。

  • 添加路由中新上线的模型
  • 用简短说明概括模型特点
  • 同步更新生产和开发环境的模型信息
ruvnet/ruflo7.9万2026年10月22日 更新

adr-create

免费有简介AI 评分 80分

为技术选型和设计决策创建ADR文档,沿用现有文件的连续编号,生成模板并登记到AgentDB,同时为找到的相关历史决策添加链接和依赖关系。

  • 记录采用某项技术的理由
  • 记录API或数据模型变更
  • 将基础设施决策形成文档
ruvnet/ruflo7.9万2026年10月22日 更新

adr-index

免费有简介AI 评分 90分

读取记录架构决策及其原因的ADR,创建并更新搜索索引和依赖关系图。支持两种文档格式,并汇总引用与状态的不一致情况。

  • 导入其他项目的ADR后建立索引
  • 同步文件与关系图
  • 为现有代码库开始管理ADR
ruvnet/ruflo7.9万2026年10月22日 更新

adr-reindex

免费有简介AI 评分 70分

删除ADR设计决策记录或关系信息后,清空并重建索引,移除残留的旧条目,再核对当前文件数与索引记录数是否一致;也可预览重建内容而不作更改。

  • 删除ADR文件后重建索引
  • 删除ADR关系后清理残留记录
  • 定期核对并重建ADR索引
ruvnet/ruflo7.9万2026年10月22日 更新

adr-review

免费有简介AI 评分 80分

将代码差异与记录已采纳设计决策的ADR进行核对,整理违反决策、引用过时记录及缺少相关记录的变更,并提出代码修正或决策调整建议。

  • 合并PR前检查设计决策
  • 核对重大变更与设计决策
  • 查找对已被替代ADR的引用
ruvnet/ruflo7.9万2026年10月22日 更新

adr-verify

免费有简介AI 评分 90分

检查已保存的架构决策记录(ADR),报告失效引用、替代关系中的循环和状态不一致问题,适合导入后的校验与发布前的数据检查。

  • 检查ADR导入后的数据一致性
  • 在持续集成中检测不一致问题
  • 发布前检查已保存的ADR数据
ruvnet/ruflo7.9万2026年10月22日 更新

查看 ruvnet 的全部技能

报告此技能的问题