Files
superpowers-zh/.gitignore
AI不止语 1321cc65fb test(audit): 新增工具计数一致性检查;修 bash 3.2 下 CJK 报错信息乱码
审核 v1.7.2 时发现三个问题,一并修掉。

1) 工具计数散落十几处,没有任何检查兜着(audit 新增 Category 5,+24 项)

加一款工具要同步简繁 README(各 6 处)、package.json、CLAUDE.md、
site/build.mjs(三语言 15 处)、3 份 plugin manifest —— 这次全靠人工 grep 才
没漏。现在改为从 installer 的 TARGETS 推导期望值并逐处断言。

口径写进注释:TARGETS 是「安装目标」共 21 个;Copilot CLI 与 CC 共用
.claude/skills(别名 copilot 映射过去)不占独立条目,但文案里作为独立产品
单独计数,所以「文案数 = TARGETS 数 + 1 = 22」。

除逐处计数外还加了两条结构性断言:
- README 工具表的实际表格行数必须等于宣称数(防漏加/多加行)
- Category 2 实际回归测试的工具数必须等于宣称数(宣称了就必须测)

已验证这个检查真的会拦:把标题改成 23 款、删掉一行工具表,两种漂移都被抓到。

2) bash 3.2 下 CJK 报错信息乱码(真 bug,只在检查失败时才暴露)

macOS 自带 bash 3.2.57 解析标识符时不识别多字节字符,`$file「` 会把「的首字节
(0xE3) 吞进变量名,导致变量展开为空且字符被截断 —— 报错信息变成
「计数不一致: ����= ��应为 22」。写检查的人看不到,因为只有失败时才打印。

复现:bash -c 'f=README.md; echo "文件: $f「标签」结束"' -> 文件: ��标签」结束

修法是给紧跟 CJK 标点的变量加花括号。全仓扫描 `$var` 紧跟非 ASCII 字节的模式,
命中 3 处:audit.sh 2 处(本次新增)、verify-release.sh 1 处(上个提交带进来的,
因为检测项一直全通过所以从没暴露)。修后报错信息可读:
  计数不一致: README.md「工具表标题」= 23,应为 22
  检测 .clinerules/ -> 得到「Cline」,期望「错误期望值」

3) .gitignore 漏了新工具的安装产物

.trae/、.qoder/ 等都在忽略列表里,但 .cline/、.clinerules/、.kilocode/ 没加 ——
在本仓库内跑安装器自测会留一堆未跟踪文件。已补上并验证 git status 干净。

验证:audit.sh 154 pass / 0 fail(原 130,+24 为 Category 5)
      verify-release.sh 82 pass / 0 fail
2026-08-07 21:54:48 +08:00

22 lines
329 B
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
.worktrees/
.private-journal/
.claude/
.DS_Store
node_modules/
inspo
triage/
# 官网生成产物(源在 site/build.mjs + site/template/
site/dist/
# 安装器生成的 skills 副本(源在 skills/ 目录)
.cline/
.clinerules/
.kilocode/
.codex/skills/
.gemini/skills/
.hermes/skills/
.opencode/skills/
.qoder/
.trae/