Back to list
LerianStudio

ringfinishing-a-development-branch

by LerianStudio

Mandatory workflow system enforcing software engineering best practices and quality gates for AI agents.

69🍴 9📅 Jan 23, 2026

SKILL.md


name: ring: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, ring:requesting-code-review]

Finishing a Development Branch

Overview

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

The Process

Step 1: Verify Tests

Run npm test / cargo test / pytest / go test ./... If tests fail: Show failures, stop. Cannot proceed until tests pass.

Step 2: Determine Base Branch

git merge-base HEAD main 2>/dev/null || git merge-base HEAD master 2>/dev/null

Step 3: Present Options

Present exactly these 4 options (no explanation):

  1. Merge back to locally
  2. Push and create a Pull Request
  3. Keep the branch as-is (I'll handle it later)
  4. Discard this work

Step 4: Execute Choice

OptionCommands
1. Merge Locallygit checkout <base>git pullgit merge <feature> → verify tests → git branch -d <feature> → Cleanup worktree
2. Create PRgit push -u origin <feature>gh pr create --title "..." --body "## Summary..." → Cleanup worktree
3. Keep As-IsReport: "Keeping branch . Worktree preserved at ." Don't cleanup.
4. DiscardConfirm first: "Type 'discard' to confirm." → git checkout <base>git branch -D <feature> → Cleanup worktree

Step 5: 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.

Quick Reference

OptionMergePushKeep WorktreeCleanup Branch
1. Merge locally--
2. Create PR--
3. Keep as-is---
4. Discard---✓ (force)

Common Mistakes

MistakeProblemFix
Skipping test verificationMerge broken code, create failing PRAlways verify tests before offering options
Open-ended questions"What should I do next?" → ambiguousPresent exactly 4 structured options
Automatic worktree cleanupRemove worktree when might need itOnly cleanup for Options 1 and 4
No confirmation for discardAccidentally delete workRequire typed "discard" confirmation

Red Flags

Never:

  • Proceed with failing tests
  • Merge without verifying tests on result
  • Delete work without confirmation
  • Force-push without explicit request

Always:

  • Verify tests before offering options
  • Present exactly 4 options
  • Get typed confirmation for Option 4
  • Clean up worktree for Options 1 & 4 only

Integration

Called by:

  • ring:subagent-driven-development (Step 7) - After all tasks complete
  • ring:executing-plans (Step 5) - After all batches complete

Pairs with:

  • ring:using-git-worktrees - Cleans up worktree created by that skill

Score

Total Score

70/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon