Skip to content

Commit a3dbac5

Browse files
dahliaclaude
andcommitted
Add next branch for major version development
Update branch policy documentation to introduce a three-tier branching strategy where the next branch is used for major version updates, main for minor updates, and x.y-maintenance branches for patch releases. This change clarifies the development workflow by providing separate branches for breaking changes (next) and new features (main), while maintaining backward compatibility through the existing maintenance branch structure. Co-Authored-By: Claude <[email protected]>
1 parent aa466d0 commit a3dbac5

File tree

2 files changed

+18
-11
lines changed

2 files changed

+18
-11
lines changed

AGENTS.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -196,13 +196,15 @@ maintenance:
196196

197197
### Branch Types
198198

199-
1. **main**: Contains unreleased development for the next major/minor version
200-
2. **x.y-maintenance**: Maintenance branches for released major/minor versions
199+
1. **next**: Contains unreleased development for the next major version
200+
2. **main**: Contains unreleased development for the next minor version
201+
3. **x.y-maintenance**: Maintenance branches for released major/minor versions
201202
(e.g., `1.5-maintenance`, `1.6-maintenance`)
202203

203204
### Development Workflow
204205

205-
- **New features**: Always target the `main` branch
206+
- **Breaking changes**: Target the `next` branch
207+
- **New features**: Target the `main` branch
206208
- **Bug fixes**: Target the oldest applicable maintenance branch that contains
207209
the bug
208210

@@ -215,9 +217,10 @@ When a bug is fixed in a maintenance branch:
215217
3. Merge the fix into the next maintenance branch (e.g., `1.6-maintenance`)
216218
4. Create a new patch release tag for that branch (e.g., `1.6.1`)
217219
5. Continue merging forward through all subsequent maintenance branches
218-
6. Finally merge into `main`
220+
6. Merge into `main`
221+
7. Finally merge into `next`
219222

220-
This ensures that all maintenance branches and the main development branch
223+
This ensures that all maintenance branches and the development branches
221224
include the fix.
222225

223226

@@ -242,7 +245,7 @@ When adding features:
242245
3. Update documentation for API changes
243246
4. Verify examples work with the change
244247
5. Update CHANGES.md with details
245-
6. Target the main branch
248+
6. Target the main branch for non-breaking changes, or the next branch for breaking changes
246249

247250

248251
Build and Distribution

CONTRIBUTING.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,15 @@ maintenance:
9494

9595
#### Branch types
9696

97-
- **main**: Contains unreleased development for the next major/minor version.
97+
- **next**: Contains unreleased development for the next major version.
98+
- **main**: Contains unreleased development for the next minor version.
9899
- **x.y-maintenance**: Maintenance branches for released major/minor versions
99100
(e.g., *1.5-maintenance*, *1.6-maintenance*).
100101

101102
#### Target branches
102103

103-
- **New features**: Always target the *main* branch.
104+
- **Breaking changes**: Target the *next* branch.
105+
- **New features**: Target the *main* branch.
104106
- **Bug fixes**: Target the oldest applicable maintenance branch that contains
105107
the bug.
106108

@@ -114,9 +116,10 @@ When a bug is fixed in a maintenance branch:
114116
3. Merge the fix into the next maintenance branch (e.g., *1.6-maintenance*).
115117
4. Create a new patch release tag for that branch (e.g., `1.6.1`).
116118
5. Continue merging forward through all subsequent maintenance branches.
117-
6. Finally merge into *main*.
119+
6. Merge into *main*.
120+
7. Finally merge into *next*.
118121

119-
This ensures that all maintenance branches and the main development branch
122+
This ensures that all maintenance branches and the development branches
120123
include the fix.
121124

122125
### Bug fix
@@ -161,7 +164,8 @@ A patch set should include the following:
161164
- The *CHANGES.md* entry. The entry should include the issue number,
162165
the pull request number, and your name (unless you want to be anonymous).
163166

164-
Feature pull requests should target the *main* branch.
167+
Feature pull requests should target the *main* branch for non-breaking changes,
168+
or the *next* branch for breaking changes.
165169

166170
### Pull request builds
167171

0 commit comments

Comments
 (0)