feature-branching
Skill1 starsChanged 27 days agoMITView on GitHub
Conductor-only. Branching procedure — when and how to branch, batching todos, pausing mid-task, syncing with develop, and cleaning up after a merge. Commit and branch naming live in docs/wiki/git-conventions.md.
- Commits and pushes
In this repository20 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- adversarial-reviewSkill
- clean-architectureSkill
- decision-recordingSkill
- design-system-checkSkill
- dispatch-handoffSkill
- finding-dispositionSkill
- git-recoverySkill
- gotcha-recordingSkill
- human-checkpointSkill
- plan-reviewSkill
- plan-writingSkill
- pr-createSkill
- simplicity-ladderSkill
- spec-writingSkill
- subagent-contractSkill
- subagent-dispatchSkill
- tdd-loopSkill
- update-toolkitSkill
- wiki-updateSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 24
If --ff-only fails, develop diverged → human-checkpoint (never force or rebase).
- Distinctive: line 50
If interrupted before a green commit boundary:
- Very specific: line 64
If union-merging docs/wiki/log.md puts entries out of timestamp order, sort them oldest-first by ## [YYYY-MM-DD HH:MM] in the merge commit.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Branching
Code (feat/*, fix/*, refactor/*, perf/*) ships on a branch cut from develop and merged via PR. Living documentation and maintenance (docs/wiki/, docs/raw/, .claude/) commit directly to develop or ride the active branch (rule 19). Naming and commit format: docs/wiki/git-conventions.md.
Starting work
- Clean tree:
git status --porcelainmust be empty (elsehuman-checkpointor see§ Mid-task pause). Sync
develop(fetch+merge --ff-only, neverpull):git checkout develop || { echo "could not switch to develop — stop and run human-checkpoint"; exit 1; } if git remote get-url origin >/dev/null 2>&1; then git fetch origin develop "refs/heads/<type>/<slug>:refs/remotes/origin/<type>/<slug>" 2>/dev/null || git fetch origin develop || { echo "fetch failed — stop and run human-checkpoint"; exit 1; } git merge --ff-only origin/develop || { echo "develop has diverged from origin — stop and run human-checkpoint"; exit 1; } fiIf
--ff-onlyfails,developdiverged →human-checkpoint(never force or rebase). If nooriginremote exists, both fetch and merge are skipped cleanly.Create or resume
<type>/<slug>(<type>∈feat,fix,chore,docs,refactor,test,perf):git checkout "<type>/<slug>" 2>/dev/null || git checkout -b "<type>/<slug>" if git rev-parse --verify "origin/<type>/<slug>" >/dev/null 2>&1; then git merge --ff-only "origin/<type>/<slug>" || { echo "<type>/<slug> has diverged from origin — stop and run human-checkpoint"; exit 1; } fi
<slug> equals the entity-page slug (or [infra] concept slug) — branch, wiki page, .handoff/<slug>-plan.md, and test names all key off it.
Which command branches
| Command | Branch |
/project:work | feat/<slug> (or fix/<slug>), cut before the first failing test |
/project:interview, /project:wiki, /project:review | none — on develop (via sync-develop.md) or the active feat/* |
/project:adversary | none — runs on the active branch (develop only for release review, whose approved fixes cut fix/<slug>) |
Batching todos
Multiple todos share a branch only when they target the same entity page, depend on each other sequentially, and splitting them would produce a meaningless intermediate PR. A batch shares a branch, plan, and PR (never a single squashed commit), and 2+ todos trigger planner.
Mid-task pause
If interrupted before a green commit boundary:
- Preferred — checkpoint commit: Stage paths explicitly (never
git add -p), commitwip: <what's in flight>, and taggit tag checkpoint-$(date -u +%Y%m%dT%H%M%SZ). On resume,git reset HEAD~1. - Fallback — named stash (same-session only):
git stash push -u -m "wip: <unique tag>", record its SHA fromgit stash list --format='%H %gs', and later apply viagit stash apply <sha>(never baregit stash pop).
Syncing a long-running branch
git fetch origin develop
git merge origin/develop # conflicts: git-recovery skill
<test command> # re-verify after merge
git pushIf union-merging docs/wiki/log.md puts entries out of timestamp order, sort them oldest-first by ## [YYYY-MM-DD HH:MM] in the merge commit. Never rebase a pushed branch without explicit human approval.
After the human merges the PR
git checkout develop
git fetch origin develop && git merge --ff-only origin/develop
git branch -d feat/<slug>
git push origin --delete feat/<slug>Anti-patterns
- Committing code to
developormain. git commit -aorgit add -A(stage explicit paths per rule 21).- Squashing commits to hide the Red→Green trace.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

