一键导入
epic-close
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.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
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.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | epic-close |
| description | 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. |
You are the orchestrator running the closing phase for a completed epic. Follow these 13 steps in order. Do NOT skip steps. The orchestrator delegates all work — never write production code, tests, or architectural artifacts directly.
When to use: After all user stories in an epic have been merged to beta and are closed. This skill handles refinement, E2E validation, UAT, documentation, and promotion to main.
When NOT to use: Planning a new epic (use /epic-start). Implementing a single story or bug fix (use /develop).
$ARGUMENTS contains the epic issue number. If empty, ask the user to provide the epic issue number before proceeding.
At the start of each /epic-close 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 or E2E fix cycle starts, create a new task for each round (e.g., "UAT Fix Round 1", "E2E Fix Round 1") so iterations are tracked.
Fetch and rebase the worktree branch onto origin/beta:
git fetch origin beta && git rebase origin/beta
If already rebased at session start, skip.
Confirm all sub-issues of the epic are closed and merged to beta:
gh issue view <epic-number>
# Check the sub-issues section — all should be closed
If any story is still open, stop and inform the user. All stories must be complete before proceeding.
Check the most recent auto-fix workflow run for unfixable lint issues:
# Get the latest auto-fix run ID
RUN_ID=$(gh run list --workflow=auto-fix.yml --limit=1 --json databaseId --jq '.[0].databaseId')
# Extract lint errors and warnings
gh run view "$RUN_ID" --log 2>/dev/null | grep -E '##\[(warning|error)\]' | grep -v 'Process completed'
If there are unfixable lint errors or warnings, include them in the refinement items (step 3). These should be addressed in the refinement PR alongside any review observations.
Review all story PRs for non-blocking review comments — observations that were noted during review but not required for merge. Collect these into a list of refinement items.
Search for review comments on the story PRs:
# List merged PRs for the epic's stories
gh pr list --state merged --search "label:user-story" --json number,title
If there are refinement items to address:
git branch -m chore/<epic-number>-refinement[MODE: spec] with the refinement observations to produce targeted fix specs[MODE: review] with the original refinement items + changed filesVERDICT: CHANGES_REQUIRED, iterate fixes (route to agents, re-review)[MODE: commit] with contributing agents list, branch name, and no issue number (refinement)beta:
gh pr create --base beta --title "chore: address refinement items for epic #<epic-number>" --body "..."
gh pr view <PR> --repo steilerDev/cornerstone --json mergeable -q '.mergeable'. Only continue if the result is MERGEABLE. If CONFLICTING, rebase onto beta, force-push, and re-check. If UNKNOWN, wait a few more seconds and retry. Once mergeability is confirmed, wait for CI using the CI Gate Polling pattern from CLAUDE.md (beta variant — wait for Quality Gates)gh pr merge --squash <pr-url>If no refinement items exist, skip to step 5.
Launch the e2e-test-engineer agent to:
page.route() mocks)beta to trigger the full sharded E2E suite in CI (if it does not yet exist)If the e2e-test-engineer's PR passes all E2E shards, squash merge it and proceed to step 6.
If E2E shards fail: Use /fix-e2e <run-id> to iteratively analyze, fix, and verify failing tests. The /fix-e2e skill handles the full fix cycle — root cause analysis, agent delegation, push, CI wait, and iteration — and merges its own PR when all shards pass.
This approval is required before proceeding to UAT validation.
Launch the product-owner agent to produce UAT scenarios. The e2e-test-engineer must have already covered these scenarios in step 5. E2E pass + e2e-test-engineer report = sufficient validation. Post the UAT report as a comment on the epic issue and proceed to step 7.
The UAT scenarios are included in the promotion PR (step 8) as a manual validation checklist so the user can spot-check during the promotion gate.
/releaseInvoke /release <epic-number> to handle the remaining steps: branch sync, promotion PR, CI gate, user approval loop, documentation, lessons learned, and merge.
Before invoking, prepare the epic context that /release will use to enrich the promotion PR body:
The /release skill uses this context to build the promotion PR body (see /release step 2b, epic-enriched variant). It also handles:
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.
Promote beta to main: branch sync, promotion PR, CI gate, user approval loop, documentation, merge. Works standalone or as part of /epic-close.
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.