Skip to content

Commit da3b88b

Browse files
committed
AGENTS(docs[CHANGES/MIGRATION]): Add changelog maintenance guidelines
why: Document best practices for maintaining CHANGES and MIGRATION files. what: - Add section on file structure and purpose - Document where to put PR references (in files, not commit messages) - Explain rationale: avoid linkback notification noise in PRs - Include examples for section headers and bullet items
1 parent b9fdc2f commit da3b88b

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

AGENTS.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,55 @@ EOF
330330
)"
331331
```
332332

333+
### CHANGES and MIGRATION Files
334+
335+
Maintain `CHANGES` (changelog) and `MIGRATION` (upgrade guide) for all user-facing changes.
336+
337+
**File structure:**
338+
- `CHANGES`: Organized by version with sections in this order of precedence:
339+
1. `### Breaking changes` - API changes that require user action
340+
2. `### New features` - New functionality
341+
3. `### Bug fixes` - Corrections to existing behavior
342+
4. `### Documentation` - Doc-only changes
343+
5. `### Development` or `### Internal` - Tooling, CI, refactoring
344+
- `MIGRATION`: Detailed migration instructions with before/after examples
345+
346+
**Maintenance-only releases:**
347+
For releases with no user-facing changes (only internal/development work), use:
348+
```markdown
349+
_Maintenance only, no bug fixes, or new features_
350+
```
351+
352+
**PR references - where to put them:**
353+
- **DO**: Put PR number in section headers or at end of bullet items in the files
354+
- **DON'T**: Put PR number in commit message titles (causes linkback notification noise in the PR)
355+
356+
**For larger changes with dedicated sections:**
357+
```markdown
358+
#### API Naming Consistency (#507)
359+
360+
Renamed parameters and methods...
361+
```
362+
363+
**For smaller changes in a list:**
364+
```markdown
365+
### Bug fixes
366+
367+
- Fix argument expansion in `rev_list` (#455)
368+
- Remove unused command: `Svn.mergelist` (#450)
369+
```
370+
371+
**Commit messages should NOT include PR numbers:**
372+
```bash
373+
# GOOD - no PR in commit message
374+
CHANGES(docs): Document breaking API changes for 0.39.x
375+
376+
# BAD - PR in commit message creates noise
377+
CHANGES(docs): Document breaking API changes for 0.39.x (#507)
378+
```
379+
380+
The PR reference in the file content creates a clean linkback when the PR merges, while keeping commit messages focused and avoiding duplicate notifications.
381+
333382
## Debugging Tips
334383
335384
When stuck in debugging loops:

0 commit comments

Comments
 (0)