원클릭으로
merge-protocol
Protocol for safely merging approved PRs
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Protocol for safely merging approved PRs
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
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