一键导入
release
Promote beta to main: branch sync, promotion PR, CI gate, user approval loop, documentation, merge. Works standalone or as part of /epic-close.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Promote beta to main: branch sync, promotion PR, CI gate, user approval loop, documentation, merge. Works standalone or as part of /epic-close.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Process all open Dependabot PRs and security alerts: review changelogs, merge passing PRs, fix failing ones, remediate orphan alerts, and surface adoption opportunities.
Full development cycle for one or more user stories and/or bug fixes. Covers implementation, testing, PR, review, merge, and user verification — single items or batched into one PR.
Close an epic: refinement, E2E validation, UAT, documentation, and promotion from beta to main. Use after all stories in an epic are merged to beta.
Comprehensive PR review using the full agent team. Reviews for duplicates, suspicious changes, dependency changes, architecture violations, and spec compliance. Approves or rejects with consolidated findings.
Autonomous end-to-end epic execution: plans stories, develops each story sequentially, then closes the epic. Only pauses for promotion to main.
Iteratively fix failing E2E tests from a CI run. Analyzes failures, plans fixes, implements them, pushes, and repeats until all E2E tests pass.
| name | release |
| description | Promote beta to main: branch sync, promotion PR, CI gate, user approval loop, documentation, merge. Works standalone or as part of /epic-close. |
You are the orchestrator promoting the beta branch to main. This skill handles branch sync, the promotion PR, CI gates, user approval (with optional feedback fix loops), documentation, and merge. Follow these steps in order. Do NOT skip steps. The orchestrator delegates all work — never write production code, tests, or architectural artifacts directly.
When to use: Promoting beta to main — either standalone (no prior epic) or delegated from /epic-close.
When NOT to use: Planning a new epic (use /epic-start). Implementing stories (use /develop). Running the full epic closing workflow (use /epic-close, which delegates to this skill).
$ARGUMENTS may contain:
beta beyond main/epic-close to enrich the promotion PR with epic contextWhen invoked from /epic-close, the calling skill provides epic context (stories completed, UAT scenarios, refinement summary). Use this context to enrich the promotion PR body. When invoked standalone, generate the PR body from the git log diff between main and beta.
At the start of each /release invocation, create tasks to track progress. These tasks survive context compression and let you recover your place if context is lost.
Create these tasks upfront (using TaskCreate):
Progress rule: Before starting each step, mark its task in_progress. After completing, mark it completed. If a step is skipped (conditional), mark it completed with a note in the description.
Recovery rule: If you lose track of progress (e.g., after context compression), run TaskList to see which tasks are completed and resume from the first pending task.
Dynamic task rule: When a UAT fix round starts, create a new task for each round (e.g., "UAT Fix Round 1") so iterations are tracked.
Check if main has commits that beta doesn't (e.g., hotfixes cherry-picked to main):
git fetch origin main beta
git log origin/beta..origin/main --oneline
If so, create a sync PR (main -> beta), wait for CI, merge before proceeding. This ensures the promotion PR merges cleanly.
If no divergence, skip to step 2.
Create a PR from beta to main using a merge commit (not squash). The promotion PR is the single human checkpoint.
Generate the change summary from the git log:
# Commits on beta not yet on main
git log origin/main..origin/beta --oneline --no-merges
Group changes by type (features, fixes, chores, docs, tests) and by area (backend, frontend, E2E, docs/config).
If epic context is provided (invoked from /epic-close):
Use the epic-enriched body provided by the calling skill — it includes stories completed, validation report, and UAT scenarios as a manual validation checklist.
gh pr create --base main --head beta --title "release: promote epic #<epic-number> to main" --body "$(cat <<'EOF'
<epic-enriched body from /epic-close — see epic-close step 8 for format>
EOF
)"
If standalone (no epic context):
gh pr create --base main --head beta --title "release: promote beta to main" --body "$(cat <<'EOF'
## Release Summary
<One-line summary of what this release includes>
## Changes
### Features
- <list from git log, grouped>
### Fixes
- <list from git log, grouped>
### Chores / Refactoring
- <list from git log, grouped>
## Change Inventory
### Backend (`server/`, `shared/`)
<List of changed files grouped by area>
### Frontend (`client/`)
<List of changed files grouped by area>
### E2E Tests (`e2e/`)
<List of changed files>
### Docs / Config
<List of changed files>
## Manual Validation Checklist
<Key user-facing changes presented as a checklist the user can walk through to spot-check>
- [ ] <Scenario 1: page to visit, action to take, expected result>
- [ ] <Scenario 2: ...>
- ...
## Testing
- **DockerHub beta image**: `docker pull steilerdev/cornerstone:beta`
- **PR-specific image**: `docker pull steilerdev/cornerstone:pr-<pr-number>`
EOF
)"
Post detailed validation criteria as a comment on the promotion PR — step-by-step instructions the user can follow to validate key changes:
gh pr comment <pr-number> --body "$(cat <<'EOF'
## Detailed Validation
<Step-by-step manual validation instructions for each major change>
EOF
)"
If epic context is provided, use the UAT scenarios from /epic-close step 6.
If standalone, derive validation steps from the feature/fix commits in the diff.
After creating/pushing the promotion PR, wait 5 seconds for GitHub to compute merge status, then check mergeability: gh pr view <PR> --repo steilerDev/cornerstone --json mergeable -q '.mergeable'. Only continue if the result is MERGEABLE. If CONFLICTING, rebase onto main, force-push, and re-check. If UNKNOWN, wait a few more seconds and retry. Once mergeability is confirmed, use the CI Gate Polling pattern from CLAUDE.md (main variant — wait for Quality Gates + E2E Gates).
If any gate fails, investigate and resolve before proceeding.
Initialize feedbackRound = 0. This step loops until the user explicitly approves.
Present the user with:
docker pull steilerdev/cornerstone:beta for manual testingIf feedbackRound > 0, also include a summary of changes made in the previous feedback round (issues created, PRs merged, what was fixed).
Tell the user:
/tmp/notes.md and say "feedback in notes" -> fixes will be applied autonomouslyDo NOT merge without explicit user confirmation.
Wait for the user's response. Branch:
Read /tmp/notes.md and parse non-empty, non-comment lines. Print a numbered summary of the feedback items for the user to confirm.
Launch the product-owner agent to:
bug, and added to the Projects board in Todo statusFor each group of issues from 4d:
origin/beta: git checkout -B fix/<issue-number>-<short-description> origin/beta/develop steps 2-11 (skipping step 1 Rebase and step 4 Branch — branch is already created)product-architect reviewproduct-owner review (if any items are user-story-adjacent or touch acceptance criteria)ux-designer review (if the fix touches client/src/)security-engineer review may be skipped for frontend-only fixes (per Security Review Trigger Rules in /develop step 8)If any group fails after retry budget exhaustion, report the failure to the user and ask whether to continue with remaining groups or pause.
Important: Never bypass reviews for fix batches regardless of urgency. Large unreviewed PRs are the highest-risk code path.
After all fix groups are merged to beta:
gh pr close <pr-number>main and beta are alignedSupersedes #<old-pr-number>After creating/pushing the new promotion PR, wait 5 seconds for GitHub to compute merge status, then check mergeability: gh pr view <PR> --repo steilerDev/cornerstone --json mergeable -q '.mergeable'. Only continue if the result is MERGEABLE. If CONFLICTING, rebase onto main, force-push, and re-check. If UNKNOWN, wait a few more seconds and retry. Once mergeability is confirmed, use the CI Gate Polling pattern from CLAUDE.md (main variant — wait for Quality Gates + E2E Gates).
If any gate fails, investigate and resolve before proceeding.
Increment feedbackRound. Go to 4a with the new promotion PR.
Launch the docs-writer agent to:
docs/) with new feature guidesREADME.md with newly shipped capabilitiesRELEASE_SUMMARY.md for the GitHub Release changelog enrichment.env.example freshness: Scan server source code for all process.env.* references (primarily server/src/plugins/config.ts), compare against .env.example entries, and fix any drift. Rules:
# Optional: ... documentation commentsCLAUDE.md if new vars were addedCommit documentation updates to beta via a PR:
gh pr create --base beta --title "docs: update documentation for release" --body "..."
Wait for CI, then squash merge.
Note: Documentation runs after user approval (step 4) to ensure docs reflect the final state, including any changes from feedback rounds.
Update the implementation checklist with patterns learned:
Read agent memory files for reviewing agents:
product-owner/MEMORY.md — recurring acceptance criteria gapsux-designer/MEMORY.md — recurring token/pattern violationsproduct-architect/MEMORY.md — recurring architecture deviationsIdentify any new recurring patterns that are NOT yet in .claude/checklists/implementation-checklist.md
If new patterns found, add them to the checklist and commit:
git add .claude/checklists/implementation-checklist.md
git commit -m "chore: update implementation checklist with lessons learned
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>"
git push
If no new patterns, skip the commit
After user approval:
gh pr merge --merge <pr-url>
release.yml — creates a PR from main into beta). If it fails, manually resolve:
git checkout beta && git pull && git merge origin/main && git push
gh issue close <epic-number>
ITEM_ID=$(gh project item-list 4 --owner steilerDev --format json --limit 1 --query "is:issue #<epic-number>" --jq '.items[0].id')
gh project item-edit --id "$ITEM_ID" --project-id PVT_kwHOAGtLQM4BOlve --field-id PVTSSF_lAHOAGtLQM4BOlvezg9P0yo --single-select-option-id c558f50d
/exit