Enforce hierarchical merge protocol - branches merge to parent, not directly to main
/plugin marketplace add ekson73/multi-agent-os/plugin install multi-agent-os@multi-agent-osThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Validate and enforce the Hierarchical Merge Protocol (HMP) which ensures branches merge to their parent branch, not directly to main. This creates controlled convergence through parent-child relationships.
Branches merge to their PARENT branch, not directly to main.
| Branch Level | Merges To |
|---|---|
| Level 3 (subtask) | Level 2 (task) |
| Level 2 (task) | Level 1 (sprint) |
| Level 1 (sprint) | main |
A branch can ONLY merge to its parent when ALL children are complete:
These prefixes bypass the Child Completion Constraint:
bugfix/* - Bug fixes that shouldn't waithotfix/* - Critical production fixesemergency/* - System-critical changesselective/* - Intentional partial merge (documented)partial/* - Known incomplete work (documented)Before allowing merge:
[ ] All child branches merged or abandoned
[ ] All child worktrees removed (git worktree prune)
[ ] tasks.md entries show COMPLETED
[ ] No active lock files for child branches
[ ] CI/CD passes
[ ] Code review approved (if required)
# Verify children are complete
git branch --list "feature/task-A*" | wc -l # Should be 1
# Merge to parent (not main!)
git checkout feature/sprint-01
git merge --no-ff feature/task-A -m "merge: task-A complete"
NEVER merge directly to main from a subtask:
git checkout main
git merge feature/subtask-A1 # WRONG!
CORRECT approach:
git checkout feature/task-A
git merge feature/subtask-A1 # Merge to parent first
Skill based on Hierarchical Merge Protocol v1.0 | multi-agent-os