Skip to content

Commit 1ef3daf

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 409d021 commit 1ef3daf

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,55 @@ Bad:
503503
$ pipx install --suffix=@next --pip-args '\--pre' --force 'libvcs'
504504
```
505505

506+
### CHANGES and MIGRATION Files
507+
508+
Maintain `CHANGES` (changelog) and `MIGRATION` (upgrade guide) for all user-facing changes.
509+
510+
**File structure:**
511+
- `CHANGES`: Organized by version with sections in this order of precedence:
512+
1. `### Breaking changes` - API changes that require user action
513+
2. `### New features` - New functionality
514+
3. `### Bug fixes` - Corrections to existing behavior
515+
4. `### Documentation` - Doc-only changes
516+
5. `### Development` or `### Internal` - Tooling, CI, refactoring
517+
- `MIGRATION`: Detailed migration instructions with before/after examples
518+
519+
**Maintenance-only releases:**
520+
For releases with no user-facing changes (only internal/development work), use:
521+
```markdown
522+
_Maintenance only, no bug fixes, or new features_
523+
```
524+
525+
**PR references - where to put them:**
526+
- **DO**: Put PR number in section headers or at end of bullet items in the files
527+
- **DON'T**: Put PR number in commit message titles (causes linkback notification noise in the PR)
528+
529+
**For larger changes with dedicated sections:**
530+
```markdown
531+
#### API Naming Consistency (#507)
532+
533+
Renamed parameters and methods...
534+
```
535+
536+
**For smaller changes in a list:**
537+
```markdown
538+
### Bug fixes
539+
540+
- Fix argument expansion in `rev_list` (#455)
541+
- Remove unused command: `Svn.mergelist` (#450)
542+
```
543+
544+
**Commit messages should NOT include PR numbers:**
545+
```bash
546+
# GOOD - no PR in commit message
547+
CHANGES(docs): Document breaking API changes for 0.39.x
548+
549+
# BAD - PR in commit message creates noise
550+
CHANGES(docs): Document breaking API changes for 0.39.x (#507)
551+
```
552+
553+
The PR reference in the file content creates a clean linkback when the PR merges, while keeping commit messages focused and avoiding duplicate notifications.
554+
506555
## Debugging Tips
507556
508557
When stuck in debugging loops:

0 commit comments

Comments
 (0)