Agent Skill
2/7/2026finishing-a-development-branch
Use this skill when implementation is complete and you need to decide how to integrate, keep, or discard a development branch.
M
mcj
0GitHub Stars
1Views
npx skills add mcj-coder/agent-skills
SKILL.md
| Name | finishing-a-development-branch |
| Description | Use this skill when implementation is complete and you need to decide how to integrate, keep, or discard a development branch. |
name: finishing-a-development-branch description: > Use this skill when implementation is complete and you need to decide how to integrate, keep, or discard a development branch.
Finishing a Development Branch
Intent
Close out work safely by verifying tests, presenting integration options, and cleaning up worktrees consistently.
When to Use
- After plan execution is complete.
- Before merging, creating a PR, or discarding work.
Precondition Failure Signal
- Tests have not been run in the branch before integration.
- A merge or PR is created without verification evidence.
- Work is discarded without explicit confirmation.
Postcondition Success Signal
- Tests pass with fresh evidence.
- One of the approved integration options is chosen.
- Worktrees are cleaned up appropriately.
Process
- Verify Tests: Run the project test suite and record results.
- Determine Base Branch: Confirm merge base (usually
main). - Present Options:
- Merge locally.
- Push and create PR.
- Keep branch as-is.
- Discard work (requires explicit confirmation).
- Execute Choice: Follow the selected path precisely.
- Cleanup: Remove worktree for options that discard or merge work.
Example Test / Validation
- Tests pass on the branch before presenting options.
Common Red Flags / Guardrail Violations
- Skipping verification because "it passed earlier".
- Automatically deleting worktrees without user confirmation.
- Forcing a merge without tests on the merged result.
Recommended Review Personas
- Tech Lead - validates readiness for integration.
- Release Manager / SRE - validates release/traceability implications.
Skill Priority
P2 - Consistency & Governance
Conflict Resolution Rules
- If tests fail, return to
systematic-debugging. - Discarding work requires explicit user confirmation.
Conceptual Dependencies
- verification-and-handover
- change-risk-rollback
Classification
Governance
Operational
Notes
Branch closure is a release decision, not a formality.
Skills Info
Original Name:finishing-a-development-branchAuthor:mcj
Download