release-branch
<!– story: e38s07 –> <!– story: e45s15 –> <!– story: e45s32 –> <!– story: e45s39 –> <!– story: e20s02 –>
Release Branch
Section titled “Release Branch”HARD GATE — Do NOT merge or release if tests fail or if coverage gates are not met. If the branch is red, return to
develop-tddto fix regressions or add missing tests before proceeding.
Finalize a completed feature branch: verify coverage gates, integrate onto main, and clean up the worktree.
Additional modes
Section titled “Additional modes”--hotfix: Cherry-pick to main + tag. Skip PR in solo.--squash-state: Squashchore(state):commits before merge.
Integrate mode
Section titled “Integrate mode”Read specs/state.yaml key workflow_mode (team-pr | solo-git). Fall back to profiles/solo-git.md.
| Mode | When | Ship path |
|---|---|---|
| solo-local | workflow_mode: solo-git |
Auto: scripts/land-branch.sh if present, else fallback (Step 5) |
| team-pr | workflow_mode: team-pr (default) |
gh pr create → gh pr merge --squash |
If unsure, prefer solo-local.
Process
Section titled “Process”Timing:
bash scripts/bp-timing.sh start release-branchat invocation;bash scripts/bp-timing.sh end release-branchbefore handoff.
1. Final verification
Section titled “1. Final verification”<full test command> && <typecheck command> && <lint command>git log main...HEAD --oneline | grep -vE "^[a-f0-9]+ (feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)(\(.+\))?!?: .+$" && echo "❌ Non-conventional commits found" || echo "✅ Commits verified"- All tests pass, no type errors, no lint violations, all commits follow Conventional Commits
2. Coverage check
Section titled “2. Coverage check”- Overall coverage ≥ 80%; business logic coverage ≥ 95%
2a. Security gate
Section titled “2a. Security gate”-
specs/security/REVIEW.mdexists and is fresh (matches current branch diff) - No unresolved HIGH findings with confidence ≥ 8 (or all documented in
specs/security/EXCEPTIONS.mdwith sign-off rationale)
If REVIEW.md is missing or stale → run security-review inline. Findings block the merge unless documented in EXCEPTIONS.md.
2b. Traceability gate
Section titled “2b. Traceability gate”Run gate-trace before merge. FAIL blocks merge; CONCERNS requires explicit override in specs/state.yaml (traceability_override: CONCERNS accepted, reason: <explanation>). WAIVED if no matrix available.
Adversarial refute framing (e45s32): The final pre-merge check is refute, not rubber-stamp. Before declaring ready, actively try to disprove traceability completeness — missing story tags, absent verify evidence, stale security review. Only proceed when refutation fails.
3. Diff review
Section titled “3. Diff review”- All commits intentional, no secrets, CONVENTIONS.md compliance
4. Decision
Section titled “4. Decision”Options: Release (solo-local) / Open PR / Keep branch / Discard
5. Solo-local integrate
Section titled “5. Solo-local integrate”Run commit-message for the squash subject, then land:
# Path A (preferred):bash scripts/land-branch.sh <task-slug> "feat(scope): description"# Path B (fallback if land-branch.sh missing): see REFERENCE.md6. Create PR (team-pr only)
Section titled “6. Create PR (team-pr only)”Create the pull request with a literal provenance marker in the body so agent-generated PRs are identifiable and do not rot silently:
<!-- bigpowers-provenance: agent-generated -->Place the marker on its own line immediately after the ## Summary heading. Then merge via gh:
gh pr create --title "..." --body "$(cat <<'EOF'## Summary<!-- bigpowers-provenance: agent-generated -->
- ...
## Test plan- [ ] ...
EOF)"gh pr merge --squash --delete-branchsemantic-release auto-detects the commit, bumps SemVer, tags the repo, generates release notes.
7a. Archive completed epic capsule
Section titled “7a. Archive completed epic capsule”HARD GATE — When all epic stories are done (all
doneinexecution-status.yaml), archive the capsule:
mv specs/epics/eNN-slug specs/epics/archive/7b. CI verification & agent lock release (e39s02)
Section titled “7b. CI verification & agent lock release (e39s02)”HARD GATE — Do NOT declare success until CI completes. Three-independent-facts (e45s15): commit landed, workflow green, registry visible — see REFERENCE.md.
bash scripts/wait-for-ci.sh --timeout 600 --interval 30- CI passes;
release.ci_verified: truein state.yaml - On failure:
handoff.next_skill = fix-bug
8. Clean up & return
Section titled “8. Clean up & return”Worktree prune, branch delete, git checkout main. Cycle-time: see REFERENCE.md.
Report: “Branch released.”
Verify
Section titled “Verify”→ verify: command -v gh >/dev/null 2>&1 && test -f specs/state.yaml && test -d skills/verify-work && echo "OK: release-branch dependencies available" || echo "FAIL"