pdlc-ship
发布工作流(跑测试 → bump VERSION → 更 CHANGELOG → tag → 触发 CI/CD)
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
发布工作流(跑测试 → bump VERSION → 更 CHANGELOG → tag → 触发 CI/CD)
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
全自动 PDLC 新功能开发(串联 PRD→设计→TDD→实现→评审→发布)
全自动 Bug 修复(定位→复现→修复→测试→文档)
按设计文档和已有测试用例实现代码(带前置守卫、自检、handoff)
创建 PRD 文档(自动化生成 + 自检 + handoff)
质量闸门——跑真实 check、对照质量目标、出可核对报告,由人签字放行
代码评审 + 文档评审
| name | pdlc-ship |
| description | 发布工作流(跑测试 → bump VERSION → 更 CHANGELOG → tag → 触发 CI/CD) |
串联发布一个版本所需的所有步骤:跑测试 → 升级 VERSION → 更新 CHANGELOG → 创建 tag → 推送触发 CI/CD。
⛔ 发布是破坏性·不可逆操作:打 tag / bump 版本 / 触发 CI/CD 属破坏性范畴。
--autonomous对本命令无效——即使带该参数,§1.1(未完成功能)与 §1.2(测试门)的人工确认仍必须真实由人应答。自主循环(/pdlc-loop-run)的终态是review_done,永不进入本命令。
master / main(参考 CLAUDE.md §5)git status clean)docs/.pdlc-state/ 下是否有未完成的功能(current_stage 不在 [*_done] 的)
docs/00_standards/quality-targets.yml):
读 docs/07_reviews/quality/ 下最近一份报告:
/pdlc-quality,询问是继续还是先出报告/pdlc-quality必须主动询问用户(不得默认跳过,也不得默认强制跑):
📦 发布前测试门检查:是否先跑全量单测 + E2E 测试?
[选项 A] 跑测试(推荐)
→ 后端:./gradlew test 或 mvn test
→ 前端:pnpm test 或 npm test
→ E2E:pnpm exec playwright test(如有)
[选项 B] 跳过测试 —— 仅适用于生产 hotfix
→ 理由:<请说明>
→ 自动记录到 commit 消息
请选择 A 或 B。
若选 B:$ARGUMENTS 必须含 --skip-tests 且有理由说明,否则中止。
VERSION 文件$ARGUMENTS 带 --version x.y.z,用指定值;否则按语义化规则建议:
VERSIONdocs/.pdlc-state/ 自上次 tag 以来所有 current_stage 在 [*_done] 的功能stage 分组(feature → "新增",fix → "修复",refactor → "重构")[未发布] 段[未发布] 改为 [<new-version>] - <今日日期>git add VERSION CHANGELOG.md
git commit -m "release: v<new-version>"
git tag -a "v<new-version>" -m "Release v<new-version>"
若选项 B(跳过测试):commit 消息末尾追加 [skip-tests: <理由>]。
若项目尚未有 CI 配置,根据技术栈生成对应的 CI 文件:
GitHub Actions(.github/workflows/ci.yml):
GitLab CI(.gitlab-ci.yml):
Jenkins(Jenkinsfile)/ 云效 / 其他:按项目已有约定生成。
若已有 CI 配置,检查是否覆盖本次新增的功能/测试路径,必要时更新。
生成后在 docs/05_deployment/ci-cd/ 下记录流水线使用说明。
发布自检清单:
git tag -l v<new-version> 返回非空)[skip-tests] 标记针对未通过项:
本阶段状态机更新:对所有本次发布涉及的功能,追加 { "stage": "ship", ... } 到其 history。
本命令的 handoff 输出:
✅ 发布准备完成:v<new-version>
- VERSION:已更新
- CHANGELOG:已追加
- Tag:v<new-version> 已创建
- 测试:<通过 / [skip-tests: 理由]>
📦 状态机:已更新 <N> 个功能
👉 下一步:/pdlc-deploy v<new-version>(或手动 git push origin v<new-version> 触发 CI)
参数:$ARGUMENTS