원클릭으로
beefinishing-a-development-branch
Branch completion workflow - guides merge/PR/cleanup decisions after implementation is verified complete.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Branch completion workflow - guides merge/PR/cleanup decisions after implementation is verified complete.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | bee:finishing-a-development-branch |
| description | Branch completion workflow - guides merge/PR/cleanup decisions after implementation is verified complete. |
| trigger | - Implementation complete (tests passing) - Ready to integrate work to main branch - Need to decide: merge, PR, or more work |
| skip_when | - Tests not passing → fix first - Implementation incomplete → continue development - Already merged → proceed to next task |
| sequence | {"after":["verification-before-completion","bee:requesting-code-review"]} |
Guide completion of development work by presenting clear options and handling chosen workflow.
Core principle: Verify tests → Present options → Execute choice → Clean up.
Announce at start: "I'm using the finishing-a-development-branch skill to complete this work."
Run npm test / cargo test / pytest / php artisan test If tests fail: Show failures, stop. Cannot proceed until tests pass.
git merge-base HEAD main 2>/dev/null || git merge-base HEAD master 2>/dev/null
Present exactly these 4 options (no explanation):
| Option | Commands |
|---|---|
| 1. Merge Locally | git checkout <base> → git pull → git merge <feature> → verify tests → git branch -d <feature> → Cleanup worktree |
| 2. Create PR | git push -u origin <feature> → gh pr create --title "..." --body "## Summary..." → Cleanup worktree |
| 3. Keep As-Is | Report: "Keeping branch . Worktree preserved at ." Don't cleanup. |
| 4. Discard | Confirm first: "Type 'discard' to confirm." → git checkout <base> → git branch -D <feature> → Cleanup worktree |
Options 1, 2, 4: git worktree list | grep $(git branch --show-current) → if in worktree: git worktree remove <path>
Option 3: Keep worktree.
| Option | Merge | Push | Keep Worktree | Cleanup Branch |
|---|---|---|---|---|
| 1. Merge locally | ✓ | - | - | ✓ |
| 2. Create PR | - | ✓ | ✓ | - |
| 3. Keep as-is | - | - | ✓ | - |
| 4. Discard | - | - | - | ✓ (force) |
| Mistake | Problem | Fix |
|---|---|---|
| Skipping test verification | Merge broken code, create failing PR | Always verify tests before offering options |
| Open-ended questions | "What should I do next?" → ambiguous | Present exactly 4 structured options |
| Automatic worktree cleanup | Remove worktree when might need it | Only cleanup for Options 1 and 4 |
| No confirmation for discard | Accidentally delete work | Require typed "discard" confirmation |
Never:
Always:
Called by:
Pairs with:
STOP and report if:
| Decision Type | Blocker Condition | Required Action |
|---|---|---|
| Test Verification | Tests fail or test command not found | STOP and report - CANNOT proceed until tests pass |
| Base Branch | Cannot determine base branch (main or master) | STOP and ask user which branch to merge into |
| Git State | Uncommitted changes exist in working directory | STOP and report - MUST commit or stash changes first |
| Merge Conflict | Git merge results in conflicts | STOP and report conflicts - user MUST resolve |
The following requirements CANNOT be waived:
| Severity | Condition | Required Action |
|---|---|---|
| CRITICAL | Tests failing in feature branch | MUST fix tests before any merge/PR option |
| HIGH | Merge to base branch introduces test failures | MUST abort merge and report - tests must pass post-merge |
| MEDIUM | Worktree cleanup fails after successful merge | Should report warning but consider completion successful |
| LOW | Branch deletion fails after merge | Fix in next iteration - code is already merged |
| User Says | Your Response |
|---|---|
| "Just merge it, I'll fix the tests later" | "CANNOT proceed with failing tests. Tests MUST pass before offering merge options. This prevents broken code from reaching the base branch." |
| "Skip the test verification, I know it works" | "I MUST run test verification. 'Knowing it works' is not evidence - actual test output is required before proceeding." |
| "Delete the branch without confirmation" | "CANNOT delete work without typed 'discard' confirmation. Type 'discard' to confirm you want to permanently delete this branch." |
| Rationalization | Why It's WRONG | Required Action |
|---|---|---|
| "Tests were passing earlier, skip verification" | Tests can break between commits. Current state must be verified, not assumed. | MUST run tests before offering options |
| "User is experienced, skip the 4-option prompt" | Structured options prevent mistakes. User experience doesn't justify skipping workflow. | MUST present exactly 4 options |
| "Small change, discard confirmation is overkill" | Size doesn't determine value. Any work deserves explicit discard confirmation. | MUST require typed 'discard' for Option 4 |
| "Worktree cleanup failed but merge succeeded" | Cleanup failure leaves orphan state. Report it even if merge completed. | MUST report cleanup failures |
Gate 4 of development cycle - dispatches 6 specialized reviewers (code, business-logic, security, test, nil-safety, consequences) in parallel for comprehensive code review feedback.
Gate 7 of development cycle - ensures chaos tests exist using Toxiproxy to verify graceful degradation under connection loss, latency, and partitions.
Main orchestrator for the 8-gate development cycle system. Loads tasks/subtasks from PM team output and executes through implementation → unit testing → fuzz testing → property testing → integration testing (write) → chaos testing (write) → review → validation gates (Gates 0-7), with state persistence and metrics collection. Gates 4-5 (integration/chaos) write and update test code per unit but only execute tests at end of cycle (deferred execution).
Development cycle feedback system - calculates assertiveness scores, analyzes prompt quality for all agents executed, aggregates cycle metrics, performs root cause analysis on failures, and generates improvement reports to docs/feedbacks/cycle-{date}/.
Gate 1 of the React Native frontend development cycle - ensures all components pass accessibility checks with zero violations: correct accessibilityLabel, accessibilityRole, accessibilityHint, VoiceOver (iOS) and TalkBack (Android) compatibility, and minimum touch target sizes.
Gate 1 of frontend development cycle - ensures all components pass axe-core automated accessibility scans with zero WCAG 2.1 AA violations.