diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index fe56233..cb7478d 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -9,7 +9,7 @@ { "name": "superpowers-zh", "description": "AI 编程超能力中文增强版:20 个 skills(14 翻译 + 4 中国原创 + 2 上游历史保留),支持 Claude Code / Hermes Agent / Cursor / Claw Code / Qoder 等 22 款工具", - "version": "1.7.1", + "version": "1.7.2", "source": "./", "author": { "name": "jnMetaCode", diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 7915af2..166c254 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "superpowers-zh", "description": "AI 编程超能力中文增强版:20 个 skills(14 翻译 + 4 中国原创 + 2 上游历史保留),支持 Claude Code / Hermes Agent / Cursor / Claw Code / Qoder 等 22 款工具", - "version": "1.7.1", + "version": "1.7.2", "author": { "name": "jnMetaCode", "url": "https://github.com/jnMetaCode" diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json index d40cb28..b7d004d 100644 --- a/.codex-plugin/plugin.json +++ b/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "superpowers-zh", - "version": "1.7.1", + "version": "1.7.2", "description": "AI 编程超能力中文增强版:头脑风暴、subagent 驱动开发、规划、TDD、调试、代码审查、收尾工作流,附 4 个中文 skills 沉淀。", "author": { "name": "jnMetaCode", diff --git a/.cursor-plugin/plugin.json b/.cursor-plugin/plugin.json index 4b39deb..297f927 100644 --- a/.cursor-plugin/plugin.json +++ b/.cursor-plugin/plugin.json @@ -2,7 +2,7 @@ "name": "superpowers-zh", "displayName": "Superpowers 中文版", "description": "AI 编程超能力中文增强版:20 个 skills(14 翻译 + 4 中国原创 + 2 上游历史保留),支持 Cursor / Claude Code / Hermes Agent / Claw Code / Qoder 等 22 款工具", - "version": "1.7.1", + "version": "1.7.2", "author": { "name": "jnMetaCode", "url": "https://github.com/jnMetaCode" diff --git a/.kimi-plugin/plugin.json b/.kimi-plugin/plugin.json index f5e467b..6eadee6 100644 --- a/.kimi-plugin/plugin.json +++ b/.kimi-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "superpowers-zh", - "version": "1.7.1", + "version": "1.7.2", "description": "AI 编程超能力中文增强版:头脑风暴、subagent 驱动开发、规划、TDD、调试、代码审查、收尾工作流,附 4 个中文 skills 沉淀。", "author": { "name": "jnMetaCode", diff --git a/README.md b/README.md index 2f89ad4..013077d 100644 --- a/README.md +++ b/README.md @@ -16,10 +16,10 @@ Chinese community edition of [superpowers](https://github.com/obra/superpowers) > > 🌍 Also available in [English](https://aiolaola.com/en?utm_source=github&utm_campaign=superpowers) · [日本語](https://aiolaola.com/ja?utm_source=github&utm_campaign=superpowers) · [Español](https://aiolaola.com/es?utm_source=github&utm_campaign=superpowers) · [한국어](https://aiolaola.com/ko?utm_source=github&utm_campaign=superpowers) · [繁體中文](https://aiolaola.com/zh-Hant?utm_source=github&utm_campaign=superpowers) -> 🆕 **v1.7.0 更新亮点**([完整 Release Notes →](RELEASE-NOTES.zh.md)) -> - 🌍 **全局安装** `npx superpowers-zh --global` —— 一次安装、所有项目共享,多项目党告别逐个重装 -> - 🧩 新增 **腾讯 CodeBuddy** 与 **华为云码道 CodeArts** 两款国产 IDE(工具数 18 → 20) -> - 🌐 官网 [sp.aiolaola.com](https://sp.aiolaola.com) + README 新增**繁体中文**(简 / 繁 / EN 三语) +> 🆕 **v1.7.2 更新亮点**([完整 Release Notes →](RELEASE-NOTES.zh.md)) +> - 🧩 新增 **Cline** 与 **Kilo Code** 两款 VS Code 扩展(工具数 20 → 22)—— 按 rules 常驻开销做了专门设计,索引仅 4.5 KB +> - 🔧 检测落空时会扫 PATH 给出**可直接复制的 `--tool` 命令**,不再只报「未检测到」 +> - 📦 README 补上 **Plugin Marketplace 安装方式**(`claude plugin marketplace add`,升级只需一条命令) ### 📊 项目规模 @@ -227,7 +227,7 @@ claude plugin install superpowers-zh@superpowers-zh ``` ❯ superpowers-zh@superpowers-zh - Version: 1.7.1 + Version: <当前版本> Scope: user Status: ✔ enabled ``` diff --git a/README.zh-Hant.md b/README.zh-Hant.md index 1990e89..6160d8a 100644 --- a/README.zh-Hant.md +++ b/README.zh-Hant.md @@ -16,10 +16,10 @@ Chinese community edition of [superpowers](https://github.com/obra/superpowers) > 📖 **免費配套學習** → [從零學會 AI 編程](https://aiolaola.com/?utm_source=github&utm_campaign=superpowers):180 節免費實操課 + 《AI 編程實戰三卷書》線上閱讀 + 實戰社群 · superpowers 裝好後配上方法論效率翻倍 · 永久免費 -> 🆕 **v1.7.0 更新亮點**([完整 Release Notes →](RELEASE-NOTES.zh.md)) -> - 🌍 **全域安裝** `npx superpowers-zh --global` —— 一次安裝、所有專案共享,多專案使用者告別逐個重裝 -> - 🧩 新增 **騰訊 CodeBuddy** 與 **華為雲碼道 CodeArts** 兩款國產 IDE(工具數 18 → 20) -> - 🌐 官網 [sp.aiolaola.com](https://sp.aiolaola.com) + README 新增**繁體中文**(簡 / 繁 / EN 三語) +> 🆕 **v1.7.2 更新亮點**([完整 Release Notes →](RELEASE-NOTES.zh.md)) +> - 🧩 新增 **Cline** 與 **Kilo Code** 兩款 VS Code 外掛(工具數 20 → 22)—— 針對 rules 常駐開銷做了專門設計,索引僅 4.5 KB +> - 🔧 偵測落空時會掃 PATH 給出**可直接複製的 `--tool` 命令**,不再只報「未偵測到」 +> - 📦 README 補上 **Plugin Marketplace 安裝方式**(`claude plugin marketplace add`,升級只需一條命令) ### 📊 專案規模 @@ -227,7 +227,7 @@ claude plugin install superpowers-zh@superpowers-zh ``` ❯ superpowers-zh@superpowers-zh - Version: 1.7.1 + Version: <当前版本> Scope: user Status: ✔ enabled ``` diff --git a/RELEASE-NOTES.zh.md b/RELEASE-NOTES.zh.md index d082e37..f30554f 100644 --- a/RELEASE-NOTES.zh.md +++ b/RELEASE-NOTES.zh.md @@ -6,6 +6,49 @@ --- +## v1.7.2 (2026-08-07) + +### 🆕 新增 Cline 与 Kilo Code 适配(工具数 20 → 22,关 #112、#88) + +两款都是 VS Code 扩展,加载的是 **rules 而非懒加载的 skills** —— rules 会并入**每一轮** system prompt。照搬「把 20 个 SKILL.md 复制进规则目录」会让每轮对话背着 **182 KB** 常驻开销(Cline 官方也提示规则超约 300 行后遵守度下降)。 + +改用仓库既有的 **Trae 模式**:规则目录只放一份索引(核心规则 + 20 个 skill 的名称/触发条件表,实测 **4.5 KB**,比全量塞入小 40 倍),skills 本体放各自 `skills/` 目录由 agent 按需读取。 + +- **Cline**:skills → `.cline/skills/`,索引 → `.clinerules/superpowers-zh.md`。不写 YAML frontmatter —— Cline 目前只支持 `paths` 一个条件字段,无 frontmatter 即始终生效。索引保持在 `.clinerules/` 根层单文件(子目录是否递归扫描官方未说明)。 +- **Kilo Code**:skills → `.kilocode/skills/`,索引 → `.kilocode/rules/superpowers-zh.md`。**有意不走 v7 推荐的 `.kilo/rules/` + `kilo.jsonc`** —— 后者需把路径登记进用户的 `kilo.jsonc`(带注释的 JSONC,安装器安全合并容易改坏用户配置)。官方明确 `.kilocode/rules/` 向后兼容且零配置生效,故选它;docs 里写明了想迁到 v7 该改哪一行,以及万一没生效如何反馈。 +- 两者均**无 `--global`**:Cline 全局 rules 路径随 OS 变(`~/Documents/Cline/Rules`,Linux/WSL 还有 `~/Cline/Rules` 回退),Kilo 全局同样要走 `kilo.jsonc` 登记 —— 不是通用复制机制能可靠命中的,`--global` 明确拒绝并指向 docs,绝不写无效路径。 +- 路径依据:[docs.cline.bot](https://docs.cline.bot/customization/cline-rules)、[kilo.ai](https://kilo.ai/docs/customize/custom-rules)。 + +### 🔧 检测落空时给出针对性建议(关 #48) + +装了 opencode / codex 但项目里没留下标记目录时,原先只报「未检测到任何已知 AI 编程工具」,用户无从判断下一步。 + +- 新增 PATH 探测:检测落空时扫 PATH 找已安装的 CLI,直接打印可复制的 `--tool` 命令。 +- **只提示、不自动安装** —— 自动装错工具正是 #33 修掉的问题:PATH 上装了不代表这个项目要用它。 +- `isOnPath()` 只查文件是否存在,**不 spawn 进程**(不在用户机器上执行探测命令);Windows 下遍历 `PATHEXT`。 +- `--global` 模式只建议支持全局的工具,不推荐装不了的。 +- 健壮性已测:`PATH` 为空 / 含空段 / 未定义三种退化情形均优雅退出 1,无未捕获异常。 + +### 📄 文档 + +- **补充 plugin marketplace 安装方式(关 #39)**:`.claude-plugin/marketplace.json` 从 v1.7.x 起就存在且可用,但 README 从未写过怎么用。已实测 `plugin validate` / `marketplace add jnMetaCode/superpowers-zh`(GitHub 直连克隆)/ `plugin install` 全链路通过,安装缓存内含全部 20 个 SKILL.md。简繁 README 新增「方式二」,原手动安装与配置文件引用顺延为方式三 / 四。 +- **修正 Copilot CLI 在 Windows 的工具面(关 #93)**:`copilot-tools.md` 原先只记 `bash` + `async:true` 一套,但 Windows 实测(Copilot CLI 1.0.69-1)注册的是 `powershell` + `detach`,没有 `bash`/`async` 家族。现拆成两张表并注明「两套不会同时出现」,补充两个坑:`.sh` 需显式走 Git Bash;`stop_powershell` 停不掉 `detach:true` 的进程,需按真实 Windows PID(非 MSYS PID)`Stop-Process`。 +- 新增 `docs/README.cline.md`、`docs/README.kilocode.md`。 +- 修正 installer 报错文案里失效的章节锚点(改为指向父级 `#快速开始`,不再依赖会变的章节编号)。 +- 计数 20 → 22 同步:简繁 README、`package.json`、`CLAUDE.md`、3 份 plugin manifest。 + +### ✅ 验证 + +- `scripts/audit.sh`:**130 pass / 0 fail**(2 项 warn 为既有上游漂移,见 #19) +- 发版前深度验证(比 audit 严,断言实际落盘而非只看退出码):**82 项全通过** + - 22 款工具:装 → 断言 20 个 skill 落盘 → 二次装幂等 → 卸载后零残留;无 `skills/skills` 嵌套 + - 19 个检测标记逐一验证只触发预期工具,既有 20 款检测结果与改动前一致 + - `--global`:7 款成功、14 款明确拒绝且退出码 1;拒绝信息引用的 8 份 docs 均存在 + - bootstrap 索引断言:表行数 = 20、无空 description、Cline 无 frontmatter、路径指向正确 +- **npm 包端到端**:`npm pack` → 从 tarball 装 → 用打包后的二进制真实跑 Cline 自动检测 → 20 skills + 索引生成 → 卸载零残留 + +--- + ## v1.7.0 (2026-07-13) ### 🆕 新增两款国产 IDE 工具支持(工具数 18 → 20) diff --git a/gemini-extension.json b/gemini-extension.json index 7adb4a4..eabaad1 100644 --- a/gemini-extension.json +++ b/gemini-extension.json @@ -1,6 +1,6 @@ { "name": "superpowers-zh", "description": "AI 编程超能力中文版 — TDD、调试、代码审查等经过实战验证的工作方法论", - "version": "1.7.1", + "version": "1.7.2", "contextFileName": "GEMINI.md" } diff --git a/package.json b/package.json index 39bae18..b2082cc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "superpowers-zh", - "version": "1.7.1", + "version": "1.7.2", "engines": { "node": ">=20.0.0" }, diff --git a/scripts/verify-release.sh b/scripts/verify-release.sh new file mode 100755 index 0000000..6f8022f --- /dev/null +++ b/scripts/verify-release.sh @@ -0,0 +1,164 @@ +#!/usr/bin/env bash +# +# verify-release.sh — 发版前深度验证。 +# +# 与 audit.sh 的分工:audit.sh 只看 installer 的退出码,装完到底有没有东西落盘、 +# 卸载有没有留垃圾它都不查。本脚本补上这些断言,发 npm 之前跑一次。 +# +# bash scripts/verify-release.sh +# +# 覆盖: +# A. 22 款工具:装 -> 断言 skill 数落盘 -> 二次装幂等 -> 卸载零残留 + 无嵌套 +# B. 每个检测标记只触发预期工具(防新增工具时误触发既有工具) +# C. --global 白名单成功 / 其余明确拒绝且退出码 1 +# D. --global 拒绝信息引用的 docs 文件真实存在(防死链) +# E. rules 型工具(Cline / Kilo Code)的 bootstrap 索引内容断言 +# F. PATH 探测在 PATH 为空 / 畸形 / 未定义时的健壮性 +set -uo pipefail +REPO="$(cd "$(dirname "$0")/.." && pwd)" +INS="$REPO/bin/superpowers-zh.js" +NODE=$(command -v node) # 绝对路径:F 段要清空 PATH,用裸 node 会 127 +EXPECT_SKILLS=$(ls -d "$REPO"/skills/*/ | wc -l | tr -d ' ') + +PASS=0; FAIL=0 +declare -a FAILURES=() +ok() { PASS=$((PASS+1)); } +bad() { FAIL=$((FAIL+1)); FAILURES+=("$1"); printf ' ❌ %s\n' "$1"; } + +# 工具别名 -> 期望的 skills 目录(相对项目根) +declare -a SPEC=( + "claude:.claude/skills" "cursor:.cursor/skills" "codex:.codex/skills" + "kiro:.kiro/steering" "deerflow:skills/custom" "trae:.trae/skills" + "antigravity:.agents/skills" "vscode:.github/superpowers" "openclaw:skills" + "windsurf:.windsurf/skills" "gemini:.gemini/skills" "aider:.aider/skills" + "opencode:.opencode/skills" "qwen:.qwen/skills" "hermes:.hermes/skills" + "claw:.claw/skills" "copilot:.claude/skills" "qoder:.qoder/skills" + "codebuddy:.codebuddy/skills" "codearts:.codeartsdoer/skills" + "cline:.cline/skills" "kilocode:.kilocode/skills" +) + +echo "═══ 期望每款装入 $EXPECT_SKILLS 个 skill ═══" +echo "" +echo "─── A. 项目级:装 / 落盘断言 / 幂等 / 卸载无残留(22 款)───" +for entry in "${SPEC[@]}"; do + tool="${entry%%:*}"; sdir="${entry#*:}" + T=$(mktemp -d); cd "$T" + + if ! node "$INS" --tool "$tool" >/dev/null 2>&1; then + bad "$tool: 安装退出码非 0"; rm -rf "$T"; continue + fi + n=$(ls -d "$T/$sdir"/*/ 2>/dev/null | wc -l | tr -d ' ') + if [ "$n" != "$EXPECT_SKILLS" ]; then + bad "$tool: $sdir 里是 $n 个 skill,期望 $EXPECT_SKILLS"; rm -rf "$T"; continue + fi + # 嵌套 bug 检查:不应出现 skills/skills 之类 + if find "$T" -type d -path "*/skills/skills" 2>/dev/null | grep -q .; then + bad "$tool: 出现嵌套 skills/skills 目录" + fi + + node "$INS" --tool "$tool" >/dev/null 2>&1 + n2=$(ls -d "$T/$sdir"/*/ 2>/dev/null | wc -l | tr -d ' ') + if [ "$n2" != "$EXPECT_SKILLS" ]; then + bad "$tool: 二次安装后变成 $n2 个(幂等性破坏)"; rm -rf "$T"; continue + fi + + if ! node "$INS" --uninstall >/dev/null 2>&1; then + bad "$tool: 卸载退出码非 0"; rm -rf "$T"; continue + fi + left=$(find "$T" -type f 2>/dev/null | wc -l | tr -d ' ') + if [ "$left" != "0" ]; then + bad "$tool: 卸载后残留 $left 个文件: $(find "$T" -type f | head -3 | tr '\n' ' ')" + else + ok + fi + cd /; rm -rf "$T" +done + +echo "" +echo "─── B. 自动检测:每个标记只触发预期工具 ───" +declare -a DETECT=( + ".claude:Claude Code" ".cursor:Cursor" ".codex:Codex CLI" + ".kiro:Kiro" ".trae:Trae" ".agents:Antigravity" + ".openclaw:OpenClaw" ".windsurf:Windsurf" ".aider:Aider" + ".opencode:OpenCode" ".qwen:Qwen Code" ".hermes:Hermes Agent" + ".claw:Claw Code" ".qoder:Qoder" ".codebuddy:CodeBuddy" + ".codeartsdoer:CodeArts" ".clinerules:Cline" ".kilocode:Kilo Code" + ".kilo:Kilo Code" +) +for entry in "${DETECT[@]}"; do + marker="${entry%%:*}"; want="${entry#*:}" + T=$(mktemp -d); cd "$T"; mkdir -p "$marker" + got=$(node "$INS" 2>&1 | grep -oE '✅ [A-Za-z][A-Za-z ]*(\[|:)' | sed 's/✅ //; s/ *[:[]$//' | sort -u | tr '\n' ',' | sed 's/,$//') + if [ "$got" != "$want" ]; then + bad "检测 $marker/ -> 得到「$got」,期望「$want」" + else + ok + fi + cd /; rm -rf "$T" +done + +echo "" +echo "─── C. --global:7 款应成功,其余应明确拒绝且退出码 1 ───" +declare -a GLOBAL_OK=(claude codex openclaw windsurf opencode qwen qoder) +declare -a GLOBAL_NO=(cursor kiro trae aider deerflow vscode hermes claw gemini antigravity codebuddy codearts cline kilocode) +for tool in "${GLOBAL_OK[@]}"; do + H=$(mktemp -d) + if HOME="$H" node "$INS" --global --tool "$tool" >/dev/null 2>&1; then ok; else bad "--global $tool 应成功但失败"; fi + rm -rf "$H" +done +for tool in "${GLOBAL_NO[@]}"; do + H=$(mktemp -d) + out=$(HOME="$H" node "$INS" --global --tool "$tool" 2>&1); rc=$? + if [ $rc -eq 0 ]; then bad "--global $tool 应拒绝但成功了" + elif ! echo "$out" | grep -q "不支持通用全局安装"; then bad "--global $tool 拒绝信息缺失" + else ok; fi + rm -rf "$H" +done + +echo "" +echo "─── D. --global 拒绝信息里引用的 docs 文件必须存在 ───" +for slug in gemini-cli antigravity trae aider hermes kiro cline kilocode; do + if [ -f "$REPO/docs/README.$slug.md" ]; then ok; else bad "docs/README.$slug.md 不存在(拒绝信息会指向死链)"; fi +done + +echo "" +echo "─── E. 新工具 bootstrap 索引内容断言 ───" +T=$(mktemp -d); cd "$T"; node "$INS" --tool cline >/dev/null 2>&1 +R="$T/.clinerules/superpowers-zh.md" +[ -f "$R" ] && ok || bad "Cline 索引文件未生成" +head -1 "$R" | grep -q '^---' && bad "Cline 索引不该有 YAML frontmatter(Cline 只支持 paths 字段)" || ok +rows=$(grep -cE '^\| [a-z][a-z0-9-]+ \|' "$R") +[ "$rows" = "$EXPECT_SKILLS" ] && ok || bad "Cline 索引表 $rows 行,期望 $EXPECT_SKILLS" +grep -qE '^\| [a-z0-9-]+ \|\s*\|$' "$R" && bad "Cline 索引有空 description 的行" || ok +grep -q '\.cline/skills/' "$R" && ok || bad "Cline 索引未指向 .cline/skills/" +cd /; rm -rf "$T" + +T=$(mktemp -d); cd "$T"; node "$INS" --tool kilocode >/dev/null 2>&1 +R="$T/.kilocode/rules/superpowers-zh.md" +[ -f "$R" ] && ok || bad "Kilo 索引文件未生成" +rows=$(grep -cE '^\| [a-z][a-z0-9-]+ \|' "$R") +[ "$rows" = "$EXPECT_SKILLS" ] && ok || bad "Kilo 索引表 $rows 行,期望 $EXPECT_SKILLS" +grep -q '\.kilocode/skills/' "$R" && ok || bad "Kilo 索引未指向 .kilocode/skills/" +cd /; rm -rf "$T" + +echo "" +echo "─── F. PATH 探测健壮性(issue #48 新代码)───" +T=$(mktemp -d); cd "$T" +out=$(PATH="" "$NODE" "$INS" 2>&1); rc=$? +[ $rc -eq 1 ] && ok || bad "PATH 为空时应退出码 1,得到 $rc" +echo "$out" | grep -q "未在当前目录检测到" && ok || bad "PATH 为空时缺少检测落空提示" +out=$(PATH="/nonexistent:::/also/missing" "$NODE" "$INS" 2>&1); rc=$? +[ $rc -eq 1 ] && ok || bad "PATH 含空段/不存在目录时应优雅退出 1,得到 $rc" +echo "$out" | grep -qi "error\|Traceback\|ENOENT" && bad "PATH 异常时输出了未捕获错误" || ok +cd /; rm -rf "$T" + +echo "" +echo "═══════════════════════════════════" +echo "✅ PASS: $PASS ❌ FAIL: $FAIL" +if [ $FAIL -gt 0 ]; then + echo "" + echo "失败项:" + for f in "${FAILURES[@]}"; do echo " - $f"; done + exit 1 +fi +echo "✅ 深度验证全部通过"