docs(docs): stop manual CHANGELOG edits and use release please

This commit is contained in:
aesoft
2026-04-10 13:58:52 +02:00
parent 8a7106c8f2
commit dc5877579e
4 changed files with 59 additions and 40 deletions
+1 -1
View File
@@ -509,7 +509,7 @@ rtk newcmd args
- Update `CLAUDE.md` Module Responsibilities table
- Update `README.md` with command support
- Update `CHANGELOG.md`
- CHANGELOG.md is auto-generated by release-please — do not edit manually
## Performance Targets
+10 -27
View File
@@ -61,8 +61,9 @@ git status # Should show "nothing to commit, working tree clean"
**Files to update**:
1. `Cargo.toml` (line 3): `version = "X.Y.Z"`
2. `CHANGELOG.md` (add new section)
3. `README.md` (if version mentioned)
2. `README.md` (if version mentioned)
> **Note**: `CHANGELOG.md` is auto-generated by release-please from conventional commit messages — do not edit manually.
**Example**:
```toml
@@ -77,21 +78,11 @@ name = "rtk"
version = "0.17.0" # New version
```
**CHANGELOG.md template**:
```markdown
## [0.17.0] - 2026-02-15
### Added
- `rtk pytest` command for Python test filtering (90% token reduction)
- Support for `pytest` JSON output parsing
- Integration with `uv` package manager auto-detection
### Fixed
- Shell escaping for PowerShell on Windows
- Memory leak in regex pattern caching
### Changed
- Updated `cargo test` filter to show test names in failures
**Commit message quality matters** — release-please generates CHANGELOG entries directly from your `feat:` and `fix:` commits:
```
feat(pytest): add Python test filtering with JSON output parsing
fix(shell): correct PowerShell escaping on Windows
perf(cargo): lazy-compile clippy regex patterns
```
### Step 3: Build and Verify
@@ -119,13 +110,12 @@ hyperfine 'target/release/rtk git status' --warmup 3
```bash
# Stage version files
git add Cargo.toml Cargo.lock CHANGELOG.md README.md
git add Cargo.toml Cargo.lock README.md
# Commit with version tag
git commit -m "chore(release): bump version to v0.17.0
- Updated Cargo.toml version
- Updated CHANGELOG.md with release notes
- Verified all quality checks pass
- Benchmarked performance (<10ms startup)
@@ -361,14 +351,7 @@ target/release/rtk --version
**Symptom**: CHANGELOG.md has conflicts after rebase
**Solution**:
```bash
# Always add new entries at top
# Manual merge:
# 1. Keep all entries from both branches
# 2. Sort by version (newest first)
# 3. Ensure date format consistency
```
**Solution**: Do not edit CHANGELOG.md manually. It is auto-generated by release-please from conventional commit messages when merging to master.
## Security Considerations
+47 -11
View File
@@ -107,15 +107,50 @@ For the step-by-step checklist (create filter, register rewrite pattern, registe
---
## Commit Messages & Changelog
RTK uses [Conventional Commits](https://www.conventionalcommits.org/) and [release-please](https://github.com/googleapis/release-please) to **auto-generate CHANGELOG.md, version bumps, and GitHub releases**. Never edit `CHANGELOG.md` manually — it is fully managed by release-please from your commit messages.
### Commit format
```
<type>(<scope>): <short description>
```
| Type | Semver Impact | When to Use |
|------|---------------|-------------|
| `feat` | Minor | New features, new filters, new command support |
| `fix` | Patch | Bug fixes, corrections |
| `perf` | Patch | Performance improvements |
| `refactor` | — | Code restructuring (no changelog entry) |
| `docs` | — | Documentation only |
| `chore` | — | Maintenance, CI, deps |
| `feat!` / `fix!` | Major | Breaking changes (add `!` after type) |
**Scope** should match the module or area: `git`, `cargo`, `gh`, `hook`, `tracking`, `cicd`, etc.
### Examples
```
feat(kubectl): add pod log filtering
fix(git): preserve merge commit messages in log filter
perf(cargo): lazy-compile clippy regex patterns
feat!(hook): change rewrite config format
```
These commit messages directly become CHANGELOG entries when release-please creates a release PR. Write them as if they will be read by users.
---
## Branch Naming Convention
Git branch names cannot include spaces or colons, so we use slash-prefixed names. Pick the prefix that matches your change type and follow it with an optional scope and a short, kebab-case description.
| Prefix | Semver Impact | When to Use |
|--------|---------------|-------------|
| `fix/` | Patch | Bug fixes, corrections, minor adjustments |
| `feat/` | Minor | New features, new filters, new command support |
| `chore/` | Major | Breaking changes, API changes, removed functionality |
| Prefix | When to Use |
|--------|-------------|
| `fix/` | Bug fixes, corrections, minor adjustments |
| `feat/` | New features, new filters, new command support |
| `chore/` | CI/CD, deps, maintenance, breaking changes |
Combine the prefix with a scope if it adds clarity (e.g. `git`, `kubectl`, `filter`, `tracking`, `config`) and finish with a descriptive slug: `fix/<scope>-<description>` or `feat/<description>`.
@@ -137,7 +172,7 @@ chore/release-pipeline-cleanup
**For large features or refactors**, prefer multi-part PRs over one enormous PR. Split the work into logical, reviewable chunks that can each be merged independently. Examples:
- feat(Part 1): Add data model and tests
- feat(Part 2): Add CLI command and integration
- feat(Part 3): Update documentation and CHANGELOG
- feat(Part 3): Update documentation
**Why**: Small, focused PRs are easier to review, safer to merge, and faster to ship. Large PRs slow down review, hide bugs, and increase merge conflict risk.
@@ -166,7 +201,7 @@ Every change **must** include tests. See [Testing](#testing) below.
### 4. Add Documentation
Every change **must** include documentation updates. See [Documentation](#documentation) below.
Documentation updates are required for new filters, new features, and changes that affect already-documented behavior. Bug fixes and refactors typically don't need doc updates. See [Documentation](#documentation) below.
### Contributor License Agreement (CLA)
@@ -235,17 +270,18 @@ cargo fmt --all --check && cargo clippy --all-targets && cargo test
## Documentation
Every change **must** include documentation updates. Use this table to find which docs to update:
Documentation updates are required for new filters, new features, and changes that affect already-documented behavior. Use this table to find which docs to update:
| What you changed | Update these docs |
|------------------|-------------------|
| New Rust filter (`src/cmds/`) | Ecosystem `README.md` (e.g., `src/cmds/git/README.md`), [README.md](README.md) command list, [CHANGELOG.md](CHANGELOG.md) |
| New TOML filter (`src/filters/`) | [src/filters/README.md](src/filters/README.md) if naming conventions change, [README.md](README.md) command list, [CHANGELOG.md](CHANGELOG.md) |
| New Rust filter (`src/cmds/`) | Ecosystem `README.md` (e.g., `src/cmds/git/README.md`), [README.md](README.md) command list |
| New TOML filter (`src/filters/`) | [src/filters/README.md](src/filters/README.md) if naming conventions change, [README.md](README.md) command list |
| New rewrite pattern | `src/discover/rules.rs` — see [Adding a New Command Filter](src/cmds/README.md#adding-a-new-command-filter) |
| Core infrastructure (`src/core/`) | [src/core/README.md](src/core/README.md), [docs/contributing/TECHNICAL.md](docs/contributing/TECHNICAL.md) if flow changes |
| Hook system (`src/hooks/`) | [src/hooks/README.md](src/hooks/README.md), [hooks/README.md](hooks/README.md) for agent-facing docs |
| Architecture or design change | [ARCHITECTURE.md](docs/contributing/ARCHITECTURE.md), [docs/contributing/TECHNICAL.md](docs/contributing/TECHNICAL.md) |
| Bug fix or breaking change | [CHANGELOG.md](CHANGELOG.md) |
> **Note**: Do NOT edit `CHANGELOG.md` manually — it is auto-generated by [release-please](https://github.com/googleapis/release-please) from your commit messages. See [Commit Messages & Changelog](#commit-messages--changelog).
**Navigation**: [CONTRIBUTING.md](CONTRIBUTING.md) (you are here) → [docs/contributing/TECHNICAL.md](docs/contributing/TECHNICAL.md) (architecture + flow) → each folder's `README.md` (implementation details).
+1 -1
View File
@@ -194,7 +194,7 @@ Adding a new filter or command requires changes in multiple places. For TOML-vs-
- Add routing match arm in `main.rs`: `Commands::Mycmd { args } => mycmd_cmd::run(&args, cli.verbose)?,`
3. **Add rewrite pattern** — Entry in `src/discover/rules.rs` (PATTERNS + RULES arrays at matching index) so hooks auto-rewrite the command
4. **Write tests** — Real fixture, snapshot test, token savings >= 60% (see [testing rules](../../.claude/rules/cli-testing.md))
5. **Update docs** — Ecosystem README, CHANGELOG.md
5. **Update docs** — Ecosystem README (CHANGELOG.md is auto-generated by release-please)
### TOML filter (simple line-based filtering)