Skip to content

feat: release pipeline + skill package + English README#18

Merged
Shadow-Azure merged 30 commits into
mainfrom
feat/release-pipeline
Jun 4, 2026
Merged

feat: release pipeline + skill package + English README#18
Shadow-Azure merged 30 commits into
mainfrom
feat/release-pipeline

Conversation

@Shadow-Azure

@Shadow-Azure Shadow-Azure commented Jun 3, 2026

Copy link
Copy Markdown
Owner

解决的问题

1. 缺少自动化发布流程

问题: 没有一键构建 + 发布的流程,每次发版需要手动操作多个步骤。

解决方案:

  • 新增 release.sh 一键构建脚本:Rust CLI/daemon 二进制 + Electron 应用 + skill tarball + npm platform packages
  • 新增 release.yml GitHub Actions 工作流:自动构建 + npm 发布
  • 新增 release/release-pipeline.md 设计文档

2. 用户安装门槛高

问题: 用户需要手动下载、解压、配置 PATH,步骤繁琐。

解决方案:

  • 新增 npm 安装方式:npm install -g cli-box-skill,自动安装二进制 + skill
  • 新增 shell 安装脚本:bash <(curl -fsSL .../install.sh)
  • 新增 postinstall.mjs:npm 安装后自动创建 symlink + 安装 SKILL.md 到 Claude/OpenCode 目录
  • 新增 cli-box-wrapper.js:支持 npx cli-box 直接运行

3. Skill 文件位置混乱

问题: Skill 文件散落在 skill/ 目录,npm 包结构不清晰。

解决方案:

  • 重构为 npm workspace 结构:packages/cli-box-skill/ (主包) + packages/cli-box-darwin-arm64/ (平台包) + packages/cli-box-electron-darwin-arm64/ (Electron 平台包)
  • 使用 optionalDependencies + os/cpu 字段自动匹配平台
  • Skill 文件迁移到 packages/cli-box-skill/skill/

4. E2E 测试缺失

问题: Skill 安装流程没有自动化测试,CI 无法验证。

解决方案:

  • 新增 tests/e2e-skill-install.sh:在 tmp 目录隔离测试 postinstall.mjs 和 install.sh
  • 集成到 test.sh:CI 自动运行 E2E 测试
  • Linux CI 兼容:macOS-only 测试自动跳过

5. release.sh 多个 bug

问题:

  • rm -rf "$RELEASE_DIR" 删除了 git 跟踪的 release-pipeline.md
  • Skill 路径错误(skill/packages/cli-box-skill/skill/
  • chmod +x "$DIR/*" glob 在双引号内不展开

解决方案:

  • 改为只删除构建产物,保留 tracked 文件
  • 更新所有 skill 路径
  • 改为显式列出文件:chmod +x "$DIR/cli-box" "$DIR/cli-box-daemon"

6. CI 发布构建验证时机错误

问题: release-build job 只在 push to main 时运行,合并后才发现构建失败。

解决方案: 改为门禁通过后即运行(PR + push),合并前验证构建。

7. README 缺少吸引力

问题: README 没有快速安装指引,用户不知道怎么开始。

解决方案:

  • 新增 "For Humans" 一键安装指引:粘贴到 Claude Code 自动完成
  • 新增 Demo 截图:展示 OpenCode、Claude、多 Tab 效果
  • 精简为单页结构:安装 → 演示 → 特性 → 快速参考

文件变更

类型 文件 说明
新增 release.sh 一键构建脚本
新增 .github/workflows/release.yml 发布工作流
新增 packages/cli-box-skill/ npm 主包 (SKILL.md, install.sh, postinstall.mjs)
新增 packages/cli-box-darwin-arm64/ macOS ARM64 平台包
新增 packages/cli-box-electron-darwin-arm64/ Electron macOS ARM64 平台包
新增 tests/e2e-skill-install.sh E2E 安装测试
新增 .github/assets/demo-*.png README 演示截图
修改 README.md 英文 README 重写
修改 README.zh-cn.md 中文 README 重写
修改 .github/workflows/ci.yml 发布构建验证改为 PR 阶段运行
修改 test.sh 集成 E2E skill 安装测试
修改 .gitignore 忽略 npm platform package 构建产物

测试

  • test.sh 全部通过 (Rust fmt + clippy + test + frontend + E2E)
  • E2E skill 安装测试通过 (postinstall + install.sh)
  • release.sh 本地构建成功
  • 发布构建验证 CI 通过
  • 手动测试:opencode/zsh 沙箱启动、输入、截图、关闭

🤖 Generated with Claude Code

ZN-Ice and others added 10 commits June 3, 2026 22:56
- docs/design/release-pipeline.md: single source of truth for release pipeline
- docs/superpowers/plans/2026-06-03-release-pipeline-skill.md: detailed task plan

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
… (gitignored)

Moved from docs/design/release-pipeline.md to release/release-pipeline.md.
The file is now excluded from git tracking via .gitignore (release/*).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…ctron

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

🔒 门禁检查结果

检查项 状态
Rust 格式化 ✅ success
Rust Clippy ✅ success
Rust 测试 & 覆盖率 ✅ success
前端测试 & 覆盖率 ✅ success
Playwright E2E ✅ success
统一测试 (test.sh) ✅ success
安全检查 ✅ success

Rust 测试覆盖率

指标 覆盖率
行覆盖率 69.2%
分支覆盖率 0.0%
模块 行覆盖率
crates.cli-box-core.src.server █████████████████░░░ 87.5%
crates.cli-box-core.src.instance ███████████████████░ 99.1%
crates.cli-box-core.src.process █████████████░░░░░░░ 65.7%
crates.cli-box-core.src.automation ███████████░░░░░░░░░ 58.8%
crates.cli-box-core.src.capture ████████████████████ 100.0%
crates.cli-box-core.src ███████████░░░░░░░░░ 55.3%
crates.cli-box-core.src.daemon ██████████░░░░░░░░░░ 53.2%
crates.cli-box-core.src.sandbox ███████████████████░ 98.8%

详细报告见 Rust 覆盖率 artifact

前端测试覆盖率

指标 覆盖率
行覆盖率 ████████████████░░░░ 82.3%
分支覆盖率 68.9%
函数覆盖率 80.0%
语句覆盖率 80.0%
文件 行覆盖率
src/tests/mocks/websocket.ts ██████████████████░░ 88.0%
src/tests/mocks/xterm.ts ████████████████████ 100.0%
src/renderer/api.ts ██████████████░░░░░░ 68.2%
src/renderer/tabState.ts ████████████████████ 100.0%

详细报告见前端覆盖率 artifact

✅ 所有检查通过,可以合入

点击 Squash and merge 合并此PR

ZN-Ice and others added 19 commits June 4, 2026 08:01
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add Linux CI skip (macOS frameworks required)
- Add cargo build fallback when binaries not found
- Fixes unified-test CI failure

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
CI populates packages/*/bin/ and packages/*/app/ at publish time.
These should not be committed.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…oncise layout

- Add "For Humans" section: paste one prompt into Claude Code to install
- Add Demo section with 4 screenshots showing Claude, OpenCode, multi-tab
- Simplify Features to one-line table
- Merge CLI + MCP into Quick Reference code block
- Remove How it works architecture diagram (replaced by screenshots)
- Update Chinese README with same structure

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Replace rm -rf of entire release/ with targeted removal of build artifacts
- Preserve git-tracked files like release-pipeline.md
- Update skill paths from skill/ to packages/cli-box-skill/skill/
- Fix chmod glob-in-quotes by listing files explicitly

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Previously only ran on push to main, so build failures were discovered
after merge. Now runs on any event where gate passes, catching issues
before merge.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@Shadow-Azure
Shadow-Azure merged commit 2b5509c into main Jun 4, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant