with one click
merge-protocol
Protocol for safely merging approved PRs
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Protocol for safely merging approved PRs
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Core coding skill for the FORGE builder agent
Planning skill for the FORGE builder agent
Evaluation criteria for the SENTINEL reviewer agent
Review skill for the SENTINEL reviewer agent
Create generative, code-based art and visualizations using P5.JS and algorithmic principles.
Visual philosophy and design principles for creating impactful visual content.
| name | merge-protocol |
| description | Protocol for safely merging approved PRs |
Before merging, verify:
git fetch origin main
BEHIND=$(git rev-list --count HEAD..origin/main)
if [ "$BEHIND" -gt 0 ]; then
# Need rebase or merge
fi
Use merge_pr MCP tool with:
squash (recommended) or mergeAfter a successful merge into main, all active FORGE worktrees MUST be rebased onto the updated main to prevent drift and merge conflicts.
Policy: No branch may fall behind main. All branches must be at main or ahead of main.
# Fetch the latest main (now including the merge we just performed)
git fetch origin main
# Sync every active worktree
for wt in $(git worktree list --porcelain | grep "^worktree" | cut -d' ' -f2); do
BRANCH=$(git -C "$wt" branch --show-current)
if [ "$BRANCH" != "main" ] && [ -n "$BRANCH" ]; then
BEHIND=$(git -C "$wt" rev-list --count "HEAD..origin/main" 2>/dev/null || echo "0")
if [ "$BEHIND" -gt 0 ]; then
echo "Syncing worktree $wt ($BRANCH) — $BEHIND commits behind main"
git -C "$wt" rebase origin/main
if [ $? -ne 0 ]; then
git -C "$wt" rebase --abort
echo "CONFLICT in $wt on branch $BRANCH — requires manual resolution"
# Report conflict to NEXUS
fi
else
echo "Worktree $wt ($BRANCH) is up to date"
fi
fi
done
Alternatively, use the dedicated sync script:
bash scripts/sync-worktrees.sh
Conflict handling:
BLOCKED with reason REBASE_CONFLICT| Method | Use When |
|---|---|
squash | Single logical change (recommended) |
merge | Multiple commits should be preserved |
rebase | Linear history preferred |
If merge fails:
deploy_failedIf worktree sync fails (rebase conflict):
BLOCKED with reason REBASE_CONFLICT