| name | branch-protection |
| description | Activate when performing git operations. MANDATORY by default - prevents direct commits to main/master, blocks destructive operations (force push, reset --hard). Enforces dev-first workflow where all changes go to dev before main. Assumes branch protection enabled unless disabled in settings. |
Branch Protection Skill
MANDATORY by default. Branch protection is assumed enabled unless explicitly disabled.
Branch Hierarchy (CRITICAL)
main ← STABLE RELEASE ONLY (production-ready)
↑
dev ← INTEGRATION BRANCH (all features merge here first)
↑
feature/* ← DEVELOPMENT (where work happens)
fix/*
chore/*
Workflow Rules
| From | To | Method | When |
|---|
| feature/* | dev | PR | When feature is complete and tested |
| fix/* | dev | PR | When fix is ready |
| dev | main | PR | When dev is stable and release-ready |
NEVER merge directly to main from feature branches.
Default Behavior
Branch protection is ON unless git.branch_protection=false in icc.config.json:
{
"git": {
"branch_protection": false
}
}
Protected Branches
main - Stable releases only (from dev PRs)
dev - Integration branch (from feature PRs)
- Configurable via
git.default_branch setting
Rules
NEVER Do (Unless User Explicitly Requests)
git checkout main && git commit
git checkout dev && git commit
git push --force
git reset --hard
git checkout .
git restore .
git clean -f
git branch -D
gh pr create --base main
ALWAYS Do
git checkout -b feature/my-change
git commit -m "feat: Add feature"
git push -u origin feature/my-change
gh pr create --base dev
Commit Workflow
- Create branch:
git checkout -b feature/description
- Make changes: Edit files
- Test: Run tests
- Commit:
git commit -m "type: description"
- Push:
git push -u origin feature/description
- PR to dev:
gh pr create --base dev
- Merge to dev: Via PR after approval
- Release to main: Separate PR from dev → main (when stable)
Self-Check Before Git Operations
- Am I on a feature branch? → If on main/dev, create branch first
- Is this destructive? → Only proceed if user explicitly requested
- Am I PRing to main? → Should this go to dev first?
- Is this a release? → Only then PR to main
Release Process
Only create PRs to main when:
- Dev branch is stable and tested
- All features for release are merged to dev
- User explicitly requests a release
git checkout dev
git pull origin dev
git checkout -b release/v10.2.0
gh pr create --base main --title "release: v10.2.0"
Integration
Works with:
- git-privacy skill - No AI attribution in commits
- commit-pr skill - Commit message formatting, defaults PR to dev
- process skill - Development workflow phases (including Phase 4: Release)