Skip to content

release-branch

<!– story: e38s07 –> <!– story: e45s15 –> <!– story: e45s32 –> <!– story: e45s39 –> <!– story: e20s02 –>

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-tdd to fix regressions or add missing tests before proceeding.

Finalize a completed feature branch: verify coverage gates, integrate onto main, and clean up the worktree.

  • --hotfix: Cherry-pick to main + tag. Skip PR in solo.
  • --squash-state: Squash chore(state): commits before merge.

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 creategh pr merge --squash

If unsure, prefer solo-local.

Timing: bash scripts/bp-timing.sh start release-branch at invocation; bash scripts/bp-timing.sh end release-branch before handoff.

Terminal window
<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
  • Overall coverage ≥ 80%; business logic coverage ≥ 95%
  • specs/security/REVIEW.md exists and is fresh (matches current branch diff)
  • No unresolved HIGH findings with confidence ≥ 8 (or all documented in specs/security/EXCEPTIONS.md with sign-off rationale)

If REVIEW.md is missing or stale → run security-review inline. Findings block the merge unless documented in EXCEPTIONS.md.

Run gate-trace before merge. FAIL blocks merge; CONCERNS requires explicit override in specs/state.yaml (traceability_override: CONCERNS accepted, reason: &lt;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.

  • All commits intentional, no secrets, CONVENTIONS.md compliance

Options: Release (solo-local) / Open PR / Keep branch / Discard

Run commit-message for the squash subject, then land:

Terminal window
# Path A (preferred):
bash scripts/land-branch.sh <task-slug> "feat(scope): description"
# Path B (fallback if land-branch.sh missing): see REFERENCE.md

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:

Terminal window
gh pr create --title "..." --body "$(cat <<'EOF'
## Summary
<!-- bigpowers-provenance: agent-generated -->
- ...
## Test plan
- [ ] ...
EOF
)"
gh pr merge --squash --delete-branch

semantic-release auto-detects the commit, bumps SemVer, tags the repo, generates release notes.

HARD GATE — When all epic stories are done (all done in execution-status.yaml), archive the capsule:

Terminal window
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.

Terminal window
bash scripts/wait-for-ci.sh --timeout 600 --interval 30
  • CI passes; release.ci_verified: true in state.yaml
  • On failure: handoff.next_skill = fix-bug

Worktree prune, branch delete, git checkout main. Cycle-time: see REFERENCE.md.

Report: “Branch released.”

→ 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"