Skip to content

Commit b4bf321

Browse files
authored
docs: --ai-only, ai_tools and new AI marks for v2.20.1 (#77)
Brings the site up to commit-check 2.20.1. ## What changes | Page | Before | After | |---|---|---| | Changelog | latest entry v2.20.0 | v2.20.1 entry (2026-11-08) and a Highlights row | | Pre-commit snippets (configuration, example, tools comparison, pre-commit guide) | `rev: v2.20.0` | `rev: v2.20.1` | | Rules, CC013 | tool list ends at Qwen Code | adds Warp and Crush, credit trailers (`Reviewed-by:` etc.) naming a tool, the Claude Code notice with or without the emoji, and agent run links (Claude Code session, Codex task, Devin session, Jules task, Cursor agent) | | Policy guides | no way to check a pull request description | new section "Checking a pull request description" with `--ai-only`, including the label-only use under `ignore` | | Command-line recipes, Reading the JSON | no `ai_tools` | `ai_tools` explained with an example | Every example output was run against commit-check 2.20.1 from PyPI, e.g. a description ending in `Link to Devin run: https://app.devin.ai/sessions/...` under `forbid` gives `fail`, `ai_tools: ["Devin"]`, CC013; "We used Claude Code for this." passes with no tools. ## Checks - `python -m pytest tests/ -q` with commit-check 2.20.1: 18 passed. - `mkdocs build --strict`: clean. The Action's `pr-body` / `ai-label` and the App's `check_body` / `ai_label` are documented once those ship. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Documentation** * Updated the release notes and guides with information about AI-attribution checks for piped text and recognized AI marks. * Documented the `ai_tools` field in JSON results and clarified that tool mentions alone are not treated as marks. * Updated pre-commit examples to use version 2.20.1. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Xianpeng Shen <3353385+shenxianpeng@users.noreply.github.com>
1 parent d51bdc0 commit b4bf321

7 files changed

Lines changed: 88 additions & 13 deletions

File tree

‎docs/changelog.md‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ below and to the page that documents the feature properly.
1111

1212
| Version | What changed | Documented in |
1313
|---|---|---|
14+
| [2.20.1](#v2201) | `--ai-only` checks a pull request description against the AI rules; JSON reports `ai_tools`; Warp, Crush, credit trailers and agent run links recognised | [Checking a pull request description](guides/policies.md#checking-a-pull-request-description) · [CC013](rules.md#cc013) |
1415
| [2.20.0](#v2200) | A commit authored by an AI tool rejected (CC017); Continue, Mistral Vibe and Qwen Code recognised; subject length `0` turns the rule off; Python 3.10 dropped | [CC017](rules.md#cc017) · [CC013](rules.md#cc013) · [CC004](rules.md#cc004) |
1516
| [2.19.5](#v2195) | GitHub merge queue branches accepted by default; aider's default co-author trailer recognised; exit 2 when git cannot read the repository | [CC201](rules.md#cc201) · [CC013](rules.md#cc013) · [Exit codes](troubleshoot.md#exit-codes) |
1617
| [2.19.4](#v2194) | `agents/` branches accepted by default; Cursor's `Made-with: Cursor` trailer recognised | [CC201](rules.md#cc201) · [CC013](rules.md#cc013) |
@@ -37,6 +38,36 @@ below and to the page that documents the feature properly.
3738
| [2.5.0](#v250) | Organization-wide config with `inherit_from` | [Across an organization](guides/organization.md) |
3839
| [2.0.0](#v200) | Configuration moved from YAML to TOML — breaking | [Migrating from v1](migration.md) |
3940

41+
## v2.20.1 (2026-11-08) { #v2201 }
42+
43+
### Added
44+
45+
* **`--ai-only` checks text that is not a commit message** — it runs only the
46+
AI rules ([CC013](rules.md#cc013)–[CC016](rules.md#cc016)) on what you pipe
47+
in, so a pull request description can be held to the same `ai_attribution`
48+
policy as the commits without being judged as a Conventional Commit. See
49+
[Checking a pull request description](guides/policies.md#checking-a-pull-request-description).
50+
See PR [#673](https://github.com/commit-check/commit-check/pull/673).
51+
52+
* **JSON output names the AI tools it found** — whenever a message is checked,
53+
`--format json` adds `ai_tools`, the tools recognised in the message and, for
54+
a commit, in its author. It is filled under every `ai_attribution` policy,
55+
`ignore` included, so a workflow can label a pull request without failing
56+
it. See [Reading the JSON](example.md#reading-the-json).
57+
See PR [#673](https://github.com/commit-check/commit-check/pull/673).
58+
59+
* **[CC013](rules.md#cc013)–[CC016](rules.md#cc016) recognise more AI marks** —
60+
`Reviewed-by`, `Suggested-by`, `Helped-by`, `Tested-by` and `Reported-by`
61+
naming a known tool; the Claude Code notice without the robot emoji, in
62+
italics, or as a lone `https://claude.ai/code/session_...` line; Warp's
63+
cloud agent `Warp <agent@warp.dev>`; Crush (`💘 Generated with Crush`,
64+
`crush@charm.land`); and the run links agents leave in pull request
65+
descriptions: Codex task, Devin session, Jules task and Cursor agent links.
66+
A person named in a credit trailer, or a sentence that merely mentions a
67+
tool, still passes.
68+
See PRs [#672](https://github.com/commit-check/commit-check/pull/672) and
69+
[#673](https://github.com/commit-check/commit-check/pull/673).
70+
4071
## v2.20.0 (2026-11-08) { #v2200 }
4172

4273
### Added

‎docs/compare/tools.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Replace the hook:
6565
```yaml title=".pre-commit-config.yaml"
6666
repos:
6767
- repo: https://github.com/commit-check/commit-check
68-
rev: v2.20.0
68+
rev: v2.20.1
6969
hooks:
7070
- id: check-message
7171
```

‎docs/configuration.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ Used from a hook definition, with no config file anywhere in the repository:
274274
```yaml title=".pre-commit-config.yaml"
275275
repos:
276276
- repo: https://github.com/commit-check/commit-check
277-
rev: v2.20.0
277+
rev: v2.20.1
278278
hooks:
279279
- id: check-message
280280
args:

‎docs/example.md‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ pushed:
162162
```yaml title=".pre-commit-config.yaml"
163163
repos:
164164
- repo: https://github.com/commit-check/commit-check
165-
rev: v2.20.0
165+
rev: v2.20.1
166166
hooks:
167167
- id: check-no-force-push
168168
stages: [pre-push]
@@ -372,5 +372,20 @@ $ commit-check -m -b --format json | jq '{status, warnings}'
372372
}
373373
```
374374

375+
When a message is checked, the JSON also carries `ai_tools`: the AI tools
376+
recognised by their known marks in the message and, for a commit, by its
377+
author. It is filled under every `ai_attribution` policy, the default
378+
`ignore` included, so a script can act on the attribution without failing
379+
the commit:
380+
381+
```console
382+
$ commit-check -m --rev HEAD --format json | jq -c '.ai_tools'
383+
["Claude Code"]
384+
```
385+
386+
It reports attribution, not authorship: a sentence that merely mentions a
387+
tool adds nothing, an empty list does not mean no AI was used, and a listed
388+
tool may only have assisted.
389+
375390
From Python, [`commit_check.api`](guides/python-api.md) returns the same
376391
result as a `dict`, without a subprocess.

‎docs/guides/policies.md‎

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,13 @@ Docs: https://commit-check.com/rules/#cc013
141141

142142
Recognised signatures are co-author and sign-off lines naming Claude Code,
143143
GitHub Copilot, Codex, Gemini, Cursor, Devin, Aider, Windsurf, Tabby, Amp,
144-
OpenHands, Factory Droid, Jules, Continue, Mistral Vibe and Qwen Code, the
145-
disclosure trailers `Assisted-by:` and
144+
OpenHands, Factory Droid, Jules, Continue, Mistral Vibe, Qwen Code, Warp and
145+
Crush, credit trailers such as `Reviewed-by:` or `Suggested-by:` naming one of
146+
those tools, the disclosure trailers `Assisted-by:` and
146147
`Generated-by:`, vendor marks such as `🤖 Generated with Claude Code`, Amp's
147148
`Amp-Thread-ID:`, the Copilot coding agent's `Agent-Logs-Url:` and Cursor's
148-
`Made-with: Cursor`, and generic AI model names. This is the
149+
`Made-with: Cursor`, agent run links on their own line, and generic AI model
150+
names; [CC013](../rules.md#cc013) has the full list. This is the
149151
position [Kubernetes](https://www.kubernetes.dev/docs/guide/pull-requests/)
150152
takes — no AI trailers in the history, disclosure in the pull request
151153
instead.
@@ -201,6 +203,29 @@ bots write long ones: Renovate's `Update dependency
201203
com.googlecode.owasp-java-html-sanitizer:owasp-java-html-sanitizer to
202204
v20261103` is 95 characters.
203205

206+
### Checking a pull request description
207+
208+
Agents leave their mark in the pull request description as often as in the
209+
commits: `🤖 Generated with Claude Code`, `Link to Devin run: https://app.devin.ai/sessions/...`,
210+
a Codex task or Cursor agent link. `--ai-only` holds any text to the AI rules
211+
alone, so the description is not judged as a Conventional Commit:
212+
213+
```console
214+
$ set -o pipefail # a failed `gh` must not pass as an empty description
215+
$ gh pr view 42 --json body -q .body | commit-check --ai-only
216+
```
217+
218+
Under `ai_attribution = "forbid"` a description with an agent's mark fails
219+
[CC013](../rules.md#cc013); under `"disclose"` it has to disclose the tool,
220+
like a commit. Under the default `"ignore"` no rule runs and the check
221+
passes; `--format json` still lists what it found in `ai_tools`, which is
222+
enough to label the pull request:
223+
224+
```console
225+
$ gh pr view 42 --json body -q .body | commit-check --ai-only --format json | jq -c '.ai_tools'
226+
["Devin"]
227+
```
228+
204229
### Asking for disclosure instead
205230

206231
Most projects that allow AI assistance ask to be told about it.

‎docs/guides/pre-commit.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Add Commit Check to `.pre-commit-config.yaml`:
88
```yaml title=".pre-commit-config.yaml"
99
repos:
1010
- repo: https://github.com/commit-check/commit-check
11-
rev: v2.20.0
11+
rev: v2.20.1
1212
hooks:
1313
- id: check-message
1414
- id: check-branch
@@ -68,7 +68,7 @@ Options can be passed as hook arguments, which keeps everything in one file:
6868
```yaml title=".pre-commit-config.yaml"
6969
repos:
7070
- repo: https://github.com/commit-check/commit-check
71-
rev: v2.20.0
71+
rev: v2.20.1
7272
hooks:
7373
- id: check-message
7474
args:
@@ -90,7 +90,7 @@ colon, and lets the commit through:
9090
```yaml title=".pre-commit-config.yaml"
9191
repos:
9292
- repo: https://github.com/commit-check/commit-check
93-
rev: v2.20.0
93+
rev: v2.20.1
9494
hooks:
9595
- id: check-message
9696
args: [--fix]

‎docs/rules.md‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -565,11 +565,15 @@ git commit --amend --signoff
565565
Rejects a commit whose message carries any AI attribution: a co-author or
566566
sign-off line naming Claude Code, Copilot, Codex, Gemini, Cursor, Devin,
567567
Aider, Windsurf, Tabby, Amp, OpenHands, Factory Droid, Jules, Continue,
568-
Mistral Vibe or Qwen Code, a disclosure
569-
trailer such as `Assisted-by:` or `Generated-by:`, a vendor's own mark such
570-
as `🤖 Generated with Claude Code`, Amp's `Amp-Thread-ID:` trailer, the
568+
Mistral Vibe, Qwen Code, Warp or Crush, a disclosure
569+
trailer such as `Assisted-by:` or `Generated-by:`, a credit trailer such as
570+
`Reviewed-by:` or `Suggested-by:` naming one of those tools, a vendor's own
571+
mark such as `🤖 Generated with Claude Code` (with or without the emoji),
572+
Amp's `Amp-Thread-ID:` trailer, the
571573
`Agent-Logs-Url:` trailer the Copilot coding agent adds or Cursor's
572-
`Made-with: Cursor`, and generic AI model names. Copilot is also recognised by its account's
574+
`Made-with: Cursor`, a run link an agent leaves on its own line (a Claude
575+
Code session, Codex task, Devin session, Jules task or Cursor agent link),
576+
and generic AI model names. Copilot is also recognised by its account's
573577
`N+Copilot@users.noreply.github.com` address, so the coding agent's
574578
`copilot-swe-agent[bot]` co-author line counts under any display name.
575579

0 commit comments

Comments
 (0)