Repository navigation
feat(branch): accept the agents/ prefix by default - #645
Conversation
VS Code's Agents window names its branches agents/<description>, and the prefix is hard-coded: git.branchPrefix is added in front of it, so users cannot make it conform. The Conventional Branch spec will accept agents/ as an alias of ai/ (conventional-branch/conventional-branch#196); accept it in the default branch types now so those branches pass without config. Also move the README pre-commit pin to v2.19.3, the latest release.
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Add and test the agents prefix commit_check/__init__.py, tests/rule_builder_test.py |
DEFAULT_BRANCH_TYPES includes agents. Tests check the default type and validate agents/add-dark-mode-toggle against the default branch rule. |
Pre-commit Example Revision
| Layer / File(s) | Summary |
|---|---|
Update the example revision README.md |
The pre-commit configuration example updates its pinned revision from v2.19.2 to v2.19.3. |
Priority:
Estimated code review effort: 2 (Simple) | ~5 minutes
Change: Feature
Suggested labels: tests
Merge Risk: 
Minimal · up to d34d4
-
The default prefix, tests, and documentation revision update are consistent with the stated intent and ready for normal checks.
Pre-merge checks: 
5
-
Full details: Title check
-
Explanation
The title "feat(branch): accept the agents/ prefix by default" matches the main change. The raw summary shows that commit_check/init.py adds "agents" to DEFAULT_BRANCH_TYPES, and tests/rule_builder_test.py checks that agents/add-dark-mode-toggle is accepted by default. The README pin bump from v2.19.2 to v2.19.3 is a minor side change that the title does not need to cover. The title is specific, concise, and follows a conventional commit format.
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 2 files. (1 skipped: 1 unsupported.)
-
Finishing Touches
-
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #645 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 14 14
Lines 2429 2429
Branches 470 470
=========================================
Hits 2429 2429 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
agents/ prefix by default
Brings the site in step with v2.19.4, published 2026-10-29 ([release](https://github.com/commit-check/commit-check/releases/tag/v2.19.4), on PyPI). ## Before / After `python -m pytest tests/ -q` with `commit-check==2.19.4` installed: | | Result | |---|---| | Before (`main`) | ❌ 2 failed, 16 passed: `test_pinned_revisions_match_the_released_version`, `test_documented_defaults_match_the_runtime` | | After (this branch) | ✅ 18 passed | What a reader sees: | Page | Before | After | |---|---|---| | pre-commit snippets (configuration, example, pre-commit guide ×3) | `rev: v2.19.3` | `rev: v2.19.4` | | Configuration → `allow_branch_types` default | `… "copilot", "cursor", "dependabot", "renovate"` | `… "copilot", "cursor", "agents", "dependabot", "renovate"`, and the description names `agents` (the prefix VS Code's Agents window uses) | | Rules → CC201 options | default list without `agents` | names `agents` among the defaults | | Rules → CC013, Policy guides | trailers listed up to Copilot's `Agent-Logs-Url:` | also Cursor's `Made-with: Cursor` | | Changelog | latest entry v2.19.3 | v2.19.4 (2026-10-29) entry and a Highlights row | ## Changes - Pins: `docs/configuration.md`, `docs/example.md`, `docs/guides/pre-commit.md` (blog posts untouched, as AGENTS.md asks). - `agents` in the default branch types, from commit-check/commit-check#645: `docs/configuration.md` (Every option) and `docs/rules.md` (CC201). The spec-strict config on CC201 is unchanged: the Conventional Branch spec does not list `agents` yet. - Cursor's `Made-with: Cursor` trailer, from commit-check/commit-check#643, which noted the site could name it once released: `docs/rules.md` (CC013) and `docs/guides/policies.md`. - `docs/changelog.md`: v2.19.4 entry with its release date, and a Highlights row, since the release changes what passes. `mkdocs build --strict` passes locally (no warnings). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Documentation** * Updated the changelog and policy guidance to describe recognition of Cursor’s `Made-with:` trailer. It is rejected when the `forbid` policy is enabled and corrected to `Assisted-by: Cursor` under `disclose`; other `Made-with:` values are unaffected. * Updated configuration and rule documentation to show `agents` as an accepted default branch prefix. * Updated pre-commit examples to use Commit Check v2.19.4. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Merging this PR will not alter performance1 warning
Comparing Footnotes
|



VS Code's Agents window names its branches
agents/<description>, and the prefix is hard-coded:git.branchPrefixis added in front of it (givingfeature/agents/...), so users cannot make it conform. The Conventional Branch spec will acceptagents/as an alias ofai/(conventional-branch/conventional-branch#196). This addsagentstoDEFAULT_BRANCH_TYPES, so those branches pass without any config.Before / After
commit-check --branchon a branch namedagents/add-dark-mode-toggle:CC201 branch check failed ==> agents/add-dark-mode-toggleai/add-dark-mode-toggleon 2.19.3Repositories that set
allow_branch_typesthemselves are unaffected: an explicit list still replaces the defaults.Changes
commit_check/__init__.py:agentsadded after the other AI agent prefixes, with a comment pointing at the spec issue.tests/rule_builder_test.py: assertsagentsis a default type and thatagents/add-dark-mode-togglematches.README.md: pre-commit pin moved fromv2.19.2tov2.19.3, the latest published release (tag and PyPI), per AGENTS.md.tests/conventional_branch_fixtures.jsonis left alone: it mirrors the spec's v1.1.0 fixtures, andagents/arrives in the spec's next release.Tests
pytest: 1449 passed.Summary by CodeRabbit
agents/are now accepted, including names such asagents/add-dark-mode-toggle. This adds another supported prefix for organizing branches while preserving support for existing branch naming conventions.v2.19.3.