con un clic
merge-protocol
Protocol for safely merging approved PRs
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Protocol for safely merging approved PRs
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
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.
Basado en la clasificación ocupacional SOC
| 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