release

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

/release - Release Workflow

/release - 发布工作流

Structured release preparation to ship with confidence.
结构化的发布准备流程,让你放心发布。

When to Use

使用场景

  • "Prepare a release"
  • "Ship version X"
  • "Release to production"
  • "Cut a release"
  • "Ready to deploy"
  • Before any production deployment
  • "准备发布"
  • "发布X版本"
  • "发布到生产环境"
  • "创建发布版本"
  • "准备部署"
  • 任何生产环境部署之前

Workflow Overview

工作流概览

┌─────────┐    ┌─────────┐    ┌──────────────┐    ┌──────────┐    ┌─────────┐
│  aegis  │───▶│  atlas  │───▶│ review-agent │───▶│  herald  │───▶│  scribe │
│         │    │         │    │              │    │          │    │         │
└─────────┘    └─────────┘    └──────────────┘    └──────────┘    └─────────┘
  Security       E2E            Final              Version         Release
  audit          tests          review             bump            notes
┌─────────┐    ┌─────────┐    ┌──────────────┐    ┌──────────┐    ┌─────────┐
│  aegis  │───▶│  atlas  │───▶│ review-agent │───▶│  herald  │───▶│  scribe │
│         │    │         │    │              │    │          │    │         │
└─────────┘    └─────────┘    └──────────────┘    └──────────┘    └─────────┘
  安全审计       E2E测试        最终评审           版本升级         发布
  审计           测试           评审               版本提升         说明

Agent Sequence

Agent执行序列

#AgentRoleOutput
1aegisSecurity vulnerability scanSecurity report
2atlasRun full E2E test suiteTest report
3review-agentFinal release reviewRelease approval
4heraldVersion bump, changelog generationUpdated version files
5scribeRelease notes, documentationRELEASE.md, docs
序号Agent职责输出
1aegis安全漏洞扫描安全报告
2atlas运行完整E2E测试套件测试报告
3review-agent最终发布评审发布批准
4herald版本升级、生成更新日志更新后的版本文件
5scribe发布说明、文档编写RELEASE.md, docs

Why This Order?

为何按此顺序?

  1. Security first: Catch vulnerabilities before they ship
  2. E2E tests: Verify full system works end-to-end
  3. Final review: Human-in-the-loop approval
  4. Version bump: Only after approval
  5. Documentation: Ship with proper release notes
  1. 安全优先:在发布前发现漏洞
  2. E2E测试:验证整个系统端到端运行正常
  3. 最终评审:人工参与的批准环节
  4. 版本升级:仅在获得批准后执行
  5. 文档编写:附带规范的发布说明

Execution

执行步骤

Phase 1: Security Audit

阶段1:安全审计

Task(
  subagent_type="aegis",
  prompt="""
  Security audit for release: [VERSION]

  Scan for:
  - Dependency vulnerabilities (npm audit, pip audit)
  - Hardcoded secrets/credentials
  - SQL injection, XSS, CSRF risks
  - Authentication/authorization issues
  - Insecure configurations

  Output: Security report with severity levels
  """
)
Task(
  subagent_type="aegis",
  prompt="""
  针对版本[VERSION]的安全审计:

  扫描内容:
  - 依赖项漏洞(npm audit, pip audit)
  - 硬编码的密钥/凭证
  - SQL注入、XSS、CSRF风险
  - 认证/授权问题
  - 不安全的配置

  输出:带有严重级别的安全报告
  """
)

Phase 2: E2E Tests

阶段2:E2E测试

Task(
  subagent_type="atlas",
  prompt="""
  Run E2E tests for release: [VERSION]

  Execute:
  - Full E2E test suite
  - Critical path tests
  - Integration tests
  - Performance benchmarks (if applicable)

  Output: Test report with pass/fail counts
  """
)
Task(
  subagent_type="atlas",
  prompt="""
  针对版本[VERSION]运行E2E测试:

  执行内容:
  - 完整的E2E测试套件
  - 关键路径测试
  - 集成测试
  - 性能基准测试(如适用)

  输出:包含通过/失败数量的测试报告
  """
)

Phase 3: Final Review

阶段3:最终评审

Task(
  subagent_type="review-agent",
  prompt="""
  Final release review: [VERSION]

  Review:
  - Security audit results
  - E2E test results
  - Changes since last release (git log)
  - Breaking changes
  - Migration requirements

  Output: RELEASE_APPROVED or RELEASE_BLOCKED with reasons
  """
)
Task(
  subagent_type="review-agent",
  prompt="""
  版本[VERSION]的最终发布评审:

  评审内容:
  - 安全审计结果
  - E2E测试结果
  - 自上次发布以来的变更(git log)
  - 破坏性变更
  - 迁移要求

  输出:RELEASE_APPROVED(发布批准)或RELEASE_BLOCKED(发布阻止)及原因
  """
)

Phase 4: Version Bump & Changelog

阶段4:版本升级与更新日志

Task(
  subagent_type="herald",
  prompt="""
  Prepare release: [VERSION]

  Tasks:
  - Bump version in package.json/pyproject.toml
  - Generate CHANGELOG.md entry
  - Update version constants in code
  - Tag commit (don't push yet)

  Follow semantic versioning.
  """
)
Task(
  subagent_type="herald",
  prompt="""
  准备版本[VERSION]的发布:

  任务:
  - 更新package.json/pyproject.toml中的版本号
  - 生成CHANGELOG.md条目
  - 更新代码中的版本常量
  - 创建Git标签(暂不推送)

  遵循语义化版本规范。
  """
)

Phase 5: Release Notes

阶段5:发布说明

Task(
  subagent_type="scribe",
  prompt="""
  Write release notes: [VERSION]

  Include:
  - Summary of changes
  - New features
  - Bug fixes
  - Breaking changes
  - Migration guide (if needed)
  - Contributors

  Output: RELEASE.md or update docs
  """
)
Task(
  subagent_type="scribe",
  prompt="""
  编写版本[VERSION]的发布说明:

  包含内容:
  - 变更摘要
  - 新功能
  - 漏洞修复
  - 破坏性变更
  - 迁移指南(如需要)
  - 贡献者

  输出:生成RELEASE.md或更新文档
  """
)

Release Types

发布类型

Major Release (Breaking Changes)

主版本发布(含破坏性变更)

/release --major
→ Full workflow with migration guide
/release --major
→ 完整工作流,包含迁移指南

Minor Release (New Features)

次版本发布(新增功能)

/release --minor
→ Full workflow, lighter security review
/release --minor
→ 完整工作流,简化安全评审

Patch Release (Bug Fixes)

补丁版本发布(漏洞修复)

/release --patch
→ Security + tests + quick review
/release --patch
→ 安全审计 + 测试 + 快速评审

Hotfix

紧急修复

/release --hotfix
→ Expedited: aegis → atlas → herald
/release --hotfix
→ 快速流程:aegis → atlas → herald

Example

示例

User: /release v2.0.0

Claude: Starting /release workflow for v2.0.0...

Phase 1: Security audit...
[Spawns aegis]
✅ No critical vulnerabilities
⚠️ 2 low-severity issues (documented)

Phase 2: E2E tests...
[Spawns atlas]
✅ 156/156 E2E tests passing

Phase 3: Final review...
[Spawns review-agent]
✅ RELEASE_APPROVED
- 47 commits since v1.9.0
- 3 new features
- 12 bug fixes
- No breaking changes

Phase 4: Version bump...
[Spawns herald]
✅ Version bumped to 2.0.0
✅ CHANGELOG.md updated
✅ Git tag created

Phase 5: Release notes...
[Spawns scribe]
✅ RELEASE-v2.0.0.md created

┌─────────────────────────────────────────┐
│ Release v2.0.0 Ready                    │
├─────────────────────────────────────────┤
│ Security: ✅ Passed                     │
│ Tests: ✅ 156/156                       │
│ Review: ✅ Approved                     │
│                                         │
│ Next steps:                             │
│ 1. git push origin v2.0.0              │
│ 2. Create GitHub release               │
│ 3. Deploy to production                │
└─────────────────────────────────────────┘
用户: /release v2.0.0

Claude: 启动v2.0.0版本的/release工作流...

阶段1: 安全审计...
[启动aegis]
✅ 无严重漏洞
⚠️ 2个低风险问题(已记录)

阶段2: E2E测试...
[启动atlas]
✅ 156/156个E2E测试通过

阶段3: 最终评审...
[启动review-agent]
✅ RELEASE_APPROVED
- 自v1.9.0以来有47次提交
- 3个新功能
- 12个漏洞修复
- 无破坏性变更

阶段4: 版本升级...
[启动herald]
✅ 版本已升级至2.0.0
✅ CHANGELOG.md已更新
✅ Git标签已创建

阶段5: 发布说明...
[启动scribe]
✅ 已创建RELEASE-v2.0.0.md

┌─────────────────────────────────────────┐
│ v2.0.0版本发布准备就绪                    │
├─────────────────────────────────────────┤
│ 安全状态: ✅ 通过                     │
│ 测试状态: ✅ 156/156通过                       │
│ 评审状态: ✅ 已批准                     │
│                                         │
│ 下一步操作:                             │
│ 1. git push origin v2.0.0              │
│ 2. 创建GitHub发布版本               │
│ 3. 部署到生产环境                │
└─────────────────────────────────────────┘

Blockers

阻塞情况

The workflow stops if:
  • Critical security vulnerability found
  • E2E tests failing
  • Review verdict is RELEASE_BLOCKED
Phase 1: Security audit...
❌ CRITICAL: SQL injection in user.py:45

Release blocked. Fix critical issues before proceeding.
出现以下情况时,工作流将终止:
  • 发现严重安全漏洞
  • E2E测试失败
  • 评审结果为RELEASE_BLOCKED
阶段1: 安全审计...
❌ 严重问题: user.py:45存在SQL注入漏洞

发布已阻塞。修复严重问题后再继续。

Flags

标志参数

  • --major/--minor/--patch
    : Semantic version type
  • --hotfix
    : Expedited release path
  • --skip-security
    : Skip security audit (not recommended)
  • --dry-run
    : Run checks without bumping version
  • --major/--minor/--patch
    : 语义化版本类型
  • --hotfix
    : 快速发布流程
  • --skip-security
    : 跳过安全审计(不推荐)
  • --dry-run
    : 仅运行检查,不升级版本