Run the full post-approval wrap-up for a completed user story. This skill assumes the code is already approved and all tests pass. All issues identified and corrected during implementation and manual testing must be documented in the arc42 docs before this step.
-
Verify branch and clean scope
git status
git branch --show-current
git diff --stat
Confirm you are on the intended feature branch and understand exactly what will ship.
-
Run final local quality checks
Use the checks required by CLAUDE.md for the touched feature. At minimum, run the relevant tests and lint checks; if UI strings changed, include translation validation.
-
Run an independent PR review
Launch the local .claude/agents/senior-reviewer.md agent in a fresh, isolated worktree to review the branch as if it were an external reviewer. The review should look for correctness issues, regressions, missing tests, translation misses, and security concerns. Treat the result as an input to the finalization decision, not as a rubber stamp.
-
Apply any fixes from review
Re-run the affected checks after fixes. If the reviewer found nothing actionable, note that in the PR summary.
-
Commit all staged/unstaged changes on the feature branch:
git add <changed files>
git commit -m "feat(US-X.X): <description>"
Include Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>.
-
Push the feature branch:
git push -u origin feature/US-X.X-short-description
-
Create PR via GitHub CLI:
"C:\Program Files\GitHub CLI\gh.exe" pr create --title "feat(US-X.X): Title" --body "..."
Body must include ## Summary (bullet points), ## Test plan (checklist), and the Claude Code footer. Include a short note if an independent PR review was run and whether it produced changes.
-
Gate on CI, capture the current tag, then merge.
First wait for the PR's checks to pass — --fail-fast exits non-zero on the first failure, so a red CI is surfaced instead of silently waited on. Do not merge if this fails; stop and report the failing check.
"C:\Program Files\GitHub CLI\gh.exe" pr checks <PR#> --watch --fail-fast
Then capture the latest release tag before merging (the merge is what triggers release.yml), so step 9 can wait on the tag changing rather than on a date:
before_tag=$("C:\Program Files\GitHub CLI\gh.exe" release list --limit 1 --json tagName --jq '.[0].tagName')
Then merge via GitHub CLI (--admin covers branch protection / draft→ready; checks are already green):
"C:\Program Files\GitHub CLI\gh.exe" pr merge <PR#> --squash --delete-branch --admin
-
Wait for the CI release by tag transition — the CI release workflow (release.yml) auto-creates a release + tag on every non-chore push to master. Default is patch bump; for minor/major add the minor or major label to the PR before merging.
Poll until the top tag differs from before_tag (timezone-independent; also correct when two releases land the same day). Never match on $(date ...) — local-vs-UTC createdAt mismatches make date matching unreliable (issue #229).
new_tag="$before_tag"
for _ in $(seq 1 40); do
new_tag=$("C:\Program Files\GitHub CLI\gh.exe" release list --limit 1 --json tagName --jq '.[0].tagName')
[ "$new_tag" != "$before_tag" ] && break
sleep 15
done
if [ "$new_tag" = "$before_tag" ]; then
echo "No new release after merge — check the release workflow before continuing."; exit 1
fi
"C:\Program Files\GitHub CLI\gh.exe" release list --limit 1
If no new tag appears, stop and report — do not run the version bump against the stale tag.
-
Version bump — sync source files to the CI-created release: