chore(ci): 加 audit 脚本 + workflow 自动检测上游漂移(防回归基建)#31
Merged
Conversation
防回归基建:把本轮全量质量审计的 4 类检查打包成可重复运行的脚本, 每次 PR 自动跑,发现漂移立刻拦下。 scripts/audit.sh: 1. 静态校验:JSON parse、SKILL.md frontmatter、symlink、hook 可执行性 2. Installer 功能:17 款工具装 / 重装(幂等)/ 卸载全跑一遍 3. 上游对齐:hooks 4 文件 + brainstorm scripts 3 文件 + 14 翻译 skill 结构层级(H1-H4 标题数)+ code-reviewer.md self-contained 版结构 4. 交叉引用:README → docs/ 链接、skill 间 superpowers:xxx 引用、 装完后 .claude/skills/using-superpowers/SKILL.md 路径解析 支持 --quick(跳过 installer)和 --no-upstream(跳过对齐)两个开关。 .github/workflows/audit.yml: - 触发:PR + push to main + 手动 dispatch - 步骤:checkout(fetch-depth 0)+ setup node 20 + 加 upstream remote + fetch upstream main 浅克隆 + 跑 audit.sh - FAIL > 0 → 整个 workflow 失败,PR 被卡 设计原则: - 这次"4 个 P0 缺陷漂"事件(hooks-cursor + brainstorm + code-reviewer 引用 + code-reviewer.md 整合)如果当时有这个 audit 在 CI 跑,PR 阶段就会被拦下 - 用 H 数对齐而不是行数 diff 来判断结构漂移(避免翻译造成的假阳性) - WARN(不阻塞)vs FAIL(阻塞)分级:主动扩写算 WARN, 结构性落后上游算 FAIL 本地烟测: - main 分支跑:92 PASS / 2 WARN / 8 FAIL(捕获到所有已知漂移) - chore/sync-upstream-p0-drift(PR #30)跑:97 PASS / 2 WARN / 0 FAIL(PR 修复后全绿) 后续:PR #28 + #30 merge 后,main 上 FAIL 应归零(WARN 只剩 executing-plans 主动扩写一项)。
6 tasks
jnMetaCode
added a commit
that referenced
this pull request
May 12, 2026
跟 PR #28 + #30 + #31 一起构成 v1.4.0 的完整内容。本 PR 仅做发布层 (版本号 bump + plugin manifest 同步 + release notes),不动 skill 内容。 版本号 1.3.0 → 1.4.0: - package.json - .claude-plugin/plugin.json + marketplace.json - .cursor-plugin/plugin.json - .codex-plugin/plugin.json - gemini-extension.json(之前卡在 1.1.6,本次顺带追上) 工具链小修: - scripts/sync-plugin-version.js TARGETS 加入 gemini-extension.json (之前漏掉,是 gemini-extension.json 长期卡在老版本的根因) - package.json 的 version 钩子 git add 列表加上 gemini-extension.json RELEASE-NOTES.zh.md 新增 v1.4.0 段,按"上游同步"性质分组列出 9 项 修复内容,明确标注每项的上游 ref + 本 fork PR 号。 注意:本 PR 应在 #28 + #30 + #31 merge 之后才 merge —— 顺序错了 会导致 release notes 描述的 PR 在 git log 里还没有。 不影响: - 上游 marketplace 安装路径(仍按主站路径正常工作) - 现有 npm 用户向后兼容(npx superpowers-zh 仍可用)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
你要解决什么问题?
本轮全量质量审计发现 4 类 P0 漂移(hooks-cursor.json Windows 回归、brainstorm scripts 落后 v5.0.6、code-reviewer 引用过时、code-reviewer.md 未 v5.1.0 self-contained 化)—— 这些问题如果有自动化漂移检测在 CI 跑,PR 阶段就会被拦下,不会一直累积到用户社区报 bug。
现状:仓库只有
.github/workflows/ci.yml(验证 SKILL.md frontmatter + package.json schema),完全不查上游对齐 / 不查交叉引用 / 不跑 installer 端到端。一行 `hooks-cursor.json` 回归 CI 看不见。这个 PR 做了什么改变?
加两个文件:
scripts/audit.sh(独立运行的全量审计脚本,本地也可跑):4 类共 90+ 项检查:
支持开关:
WARN(不阻塞)vs FAIL(阻塞)分级:
.github/workflows/audit.yml:这个改变适合放在核心库中吗?
适合。本 PR 是 fork 的防漂移基建——其目的恰恰是"自动强制对齐上游",与维护者"主站有的同步,主站没有的暂时不改"的方针精神一致:把 "对齐上游" 这件事自动化、不再靠手工 audit。
虽然 audit.sh 本身是 fork-specific 代码(上游没有同样的脚本),但它的输出是"检查我们 vs 上游是否漂移"——是服务对齐意图的 infrastructure,不是新增功能。
你考虑了哪些替代方案?
这个 PR 是否包含多个不相关的改变?
否。只新增两个文件,scope = "加上游漂移检测 CI"。
已有的 PR
测试环境
本地烟测:
评估
不适用 —— 本 PR 是 CI infrastructure,不改任何 skill 内容、不改安装行为、不影响模型行为。
验证维度:
严格性
人工审核