Ss branch strategy
Cross-project agent workflow skills — session onboarding, handoffs, PR review, and merge workflows
npx -y skills add jsirish/workflow-skills --skill ss-branch-strategyAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Establish consistent branch-naming and default-branch conventions across all module repos when executing a major framework or CMS version upgrade. Covers integer branch naming, default-branch promotion, previous-version preservation, and the fork-and-upstream workflow for third-party modules. Use when planning or executing a major version upgrade across a suite of repos.
SKILL.md
7.8 KB, ~1.8k tokens by cl100k_base, as published. Nobody here has run it
Major-Version Branch Strategy
Goal: Keep branch naming and default-branch setup consistent across all module repos during a major-version upgrade cycle, so old versions stay maintainable while new work proceeds on a clearly-named active branch.
The convention applies regardless of ecosystem (Composer/PHP, npm/Node, pip/Python, etc.). Replace "recipe version" with your ecosystem's concept of a shared dependency version.
Branch Naming
- Integer version branches are the default branch:
3,4,5,6,7. - The branch integer matches the targeted framework/ecosystem major version — or the ecosystem's shared package/recipe version if repos version against that rather than their own semver. A module targeting v6 of a framework uses branch
6; a module versioned against a shared recipe on3targeting the same framework major uses branch3. Follow whichever the repo already versions against. masteris deprecated as a default branch. It may remain for history, but it is not the active dev target. Ifmastercurrently holds the latest content, migrate that content to the correct numbered branch and leavemasterin place.- Feature branches branch off the active version branch — e.g.
fix/accordion-migrationorfeature/v6-upgradeoff6.
Default-Branch Rules
| Target version | Branch name | State |
|---|---|---|
v6 | 6 (or ecosystem version, e.g. 3) | Active development |
v5 | 5 (or ecosystem version, e.g. 2) | Maintenance — backports only |
v4 | 4 (or ecosystem version, e.g. 1) | Frozen / EOL |
Preserve the Previous Major
- When a new major version ships, create its numbered branch from the current default (e.g. branch
6from5). - The previous version branch stays in the repo for backport fixes (e.g.
5remains after6becomes default). - Do not create long-lived
N.xbranches for versions that are no longer supported. One integer branch per maintained major is enough.
Forking 3rd-Party Modules for New Version Support
When an upstream module lacks support for the target framework/ecosystem version:
- Fork the upstream repo into your org, keeping the original package prefix.
- Create a
feature/<target>-upgradebranch with the dependency bumps. - Push and open a PR upstream.
- Add a dependency override to the root project's manifest — e.g. Composer
repositories, npmoverrides, or equivalent — to point to the fork. (These overrides are not inherited transitively from shared recipes/configs; they must live in the root project.) - The override makes the fork replace the upstream package. If/when the upstream merges and tags a release, switch back to the registry and drop the override entry.
Auto-Merge on Integer Default Branches
Auto-merge (gh pr merge --auto, the GitHub "Enable auto-merge" button) is not gated on
the branch being named master/main. It works against any default branch — 6, 5, 3 —
provided the repo is configured for it. If auto-merge "doesn't work," the cause is almost
always a missing repo setting, not the branch name. Do not switch the default branch to
master to make auto-merge work.
Prerequisites (per repo):
- Enable "Allow auto-merge" in repo settings — the most common missing piece:
gh api -X PATCH repos/<owner>/<repo> -F allow_auto_merge=true - Branch protection on the integer default branch with at least one requirement (a
required status check or required review). Without a protection rule,
--autoerrors and you must use a plaingh pr merge --squashinstead. Themerge-prskill already resolves the default branch dynamically, so plain squash-merge works against6/5/3today.
Applying the Strategy to a Repo
- Identify the versioning basis — does this repo version against a shared recipe/manifest number or its own semver? Check existing branch names and the package manifest.
- Migrate
masterif it holds active content. Ifmasteris the current default and already carries the latest content, create the numbered branch frommasterso no history is lost, then leavemasterin place for history. Otherwise, create the new numbered branch from the current default for the new major. - Set it as the default branch in GitHub settings; keep the previous version branch for backports.
- Update CI configs (GitHub Actions or equivalent) to target the new default branch.
- Update the package manifest:
- Branch aliases — e.g. Composer
"extra": { "branch-alias": { "dev-6": "6.x-dev" } }or npm"version": "6.0.0-dev". - Dependency constraints use a dev/pre-release specifier for the new major during the upgrade (e.g.
^6@devin Composer,^6.0.0-alphain npm semver).
- Branch aliases — e.g. Composer
- Declare dependency overrides in the root project manifest for any 3rd-party modules being upgraded via a fork.
Checklist
- Default branch is an integer matching the ecosystem/recipe major (not
master, not the module's own semver) - Any active content on
mastermigrated to a numbered branch;masterleft in place for history - Previous major's branch retained for backports
- No stray long-lived
N.xbranches for unsupported versions - CI configs point at the new default branch
- Package manifest branch-alias and constraints updated for dev stability on the new major
- Fork dependency overrides declared in the root project manifest, not a shared recipe
-
allow_auto_mergeenabled on the repo (auto-merge is branch-name-agnostic — never switch tomasterfor it)
Example: Silverstripe CMS + Dynamic Essentials
The following illustrates the convention for the Dynamic Essentials Silverstripe ecosystem, where module repos version against the recipe number rather than the CMS version.
Reference mapping — Essentials product line
Recipe/module repos version against the recipe number, not the CMS number:
| Module | SS6 Branch | SS5 Branch | Notes |
|---|---|---|---|
| recipe-silverstripe-essentials-website | 3 (default) | 2 | Recipe version, not CMS |
| silverstripe-essentials-tools | 3 (default) | 2 | |
| silverstripe-elemental-accordion | 6 (default) | 5 | Module's own major |
| silverstripe-elemental-embedded-code | 4 | master | |
| silverstripe-elemental-sponsors | 5 (default) | master | |
| silverstripe-elemental-templates | 3 (default) | 2 |
Example repo: dynamic/silverstripe-elemental-accordion
| Branch | CMS Version | Status |
|---|---|---|
5 | SS5 | Maintenance (backports only) |
6 | SS6 | Active development (default) |
Silverstripe fork workflow
- Fork the upstream repo into the
dynamic/GitHub org, keeping thesilverstripe-prefix. - Create a
feature/ss6-upgradebranch with the dependency bumps. - Push and open a PR upstream.
- Add a VCS repo entry for the fork to the root project
composer.json(VCS repos are not inherited transitively from recipes — they must live in the root project). - Composer's VCS-repo priority makes the fork replace the upstream package. When the upstream merges and tags a release, switch back to Packagist and drop the VCS entry.
For Composer specifically, the manifest steps are:
- Branch aliases — e.g.
"extra": { "branch-alias": { "dev-master": "6.x-dev" } }(or alias the numbered branch, e.g."dev-6": "6.x-dev"). - Recipe constraints use
^6@devfor SS6 branches to allow dev stability during the upgrade.