-
Notifications
You must be signed in to change notification settings - Fork 0
docs: the disclose policy, and what else 2.18.0 changes #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -192,7 +192,7 @@ allow_fixup_commits = true | |||||
| allow_wip_commits = false # changed: allowed by default | ||||||
| require_body = false | ||||||
| require_signed_off_by = false | ||||||
| ai_attribution = "forbid" # changed: "ignore" by default | ||||||
| ai_attribution = "disclose" # changed: "ignore" by default; see the AI policy guide | ||||||
| # ignore_authors = [] # optional: bypass all commit checks for these authors | ||||||
|
|
||||||
| [push] | ||||||
|
|
@@ -240,7 +240,7 @@ Used from a hook definition, with no config file anywhere in the repository: | |||||
| ```yaml title=".pre-commit-config.yaml" | ||||||
| repos: | ||||||
| - repo: https://github.com/commit-check/commit-check | ||||||
| rev: v2.17.0 | ||||||
| rev: v2.18.0 | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Publish
🤖 Prompt for AI Agents |
||||||
| hooks: | ||||||
| - id: check-message | ||||||
| args: | ||||||
|
|
@@ -288,6 +288,8 @@ The full mapping between the three forms: | |||||
| | `require_rebase_target = "main"` | `CCHK_REQUIRE_REBASE_TARGET=main` | `--require-rebase-target=main` | | ||||||
| | `allow_force_push = true` | `CCHK_ALLOW_FORCE_PUSH=true` | `--no-force-push` (sets `allow_force_push` to `false`) | | ||||||
| | `ai_attribution = "forbid"` | `CCHK_AI_ATTRIBUTION=forbid` | `--ai-attribution=forbid` | | ||||||
| | `ai_disclosure_trailers = ["Assisted-by"]` | `CCHK_AI_DISCLOSURE_TRAILERS=Assisted-by` | `--ai-disclosure-trailers=Assisted-by` | | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Document the complete default for The configuration reference defines the default as -| `ai_disclosure_trailers = ["Assisted-by"]` | `CCHK_AI_DISCLOSURE_TRAILERS=Assisted-by` | `--ai-disclosure-trailers=Assisted-by` |
+| `ai_disclosure_trailers = ["Assisted-by", "Generated-by"]` | `CCHK_AI_DISCLOSURE_TRAILERS=Assisted-by,Generated-by` | `--ai-disclosure-trailers=Assisted-by,Generated-by` |📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| | `ai_disclosure_pattern = '^\S+/\S+$'` | `CCHK_AI_DISCLOSURE_PATTERN=^\S+/\S+$` | `--ai-disclosure-pattern='^\S+/\S+$'` | | ||||||
| | `ignore_authors = ["bot"]` (in branch section) | `CCHK_BRANCH_IGNORE_AUTHORS=bot,user` | `--branch-ignore-authors=bot,user` | | ||||||
| | `regex = "^v\\d+\\.\\d+\\.\\d+$"` (in tag section) | `CCHK_TAG_REGEX=^v\\d+\\.\\d+\\.\\d+$` | `--tag-regex=^v\\d+\\.\\d+\\.\\d+$` | | ||||||
| | `max_size = "5MB"` (in files section) | `CCHK_FILES_MAX_SIZE=5MB` | `--files-max-size=5MB` | | ||||||
|
|
@@ -344,7 +346,9 @@ the same thing twice, so read the description rather than the cell: | |||||
| | commit | author_email_pattern | str | `^.+@.+$` | Custom regex for the author email check. When empty, the built-in default pattern is used. This option only takes effect when the author_email check is enabled (`-e` / `--author-email`). | | ||||||
| | commit | author_name_pattern | str | "" (built-in default) | Custom regex for the author name check. When empty, the built-in default pattern is used (it is not disabled). This option only takes effect when the author_name check is enabled (`-n` / `--author-name`). | | ||||||
| | commit | require_signed_off_by | bool | false | Require "Signed-off-by" line in the commit message footer. | | ||||||
| | commit | ai_attribution | str | "ignore" | AI attribution policy. `"forbid"` rejects any commit containing known AI tool signatures (Claude Code, Copilot, Codex, Gemini, Cursor, Devin, Aider, Windsurf, Tabby, and generic AI model patterns). `"ignore"` disables the check. This feature is a response to the industry-wide discussion on AI disclosure in open source (Linux kernel `Assisted-by:` trailer, CPython, VS Code, Apache, Fedora policies). | | ||||||
| | commit | ai_attribution | str | "ignore" | AI attribution policy. `"forbid"` rejects any commit carrying AI attribution — a co-author or sign-off line naming a known tool, a disclosure trailer, a vendor mark ([CC013](rules.md#cc013)). `"disclose"` accepts AI assistance that is disclosed with one of `ai_disclosure_trailers` ([CC014](rules.md#cc014)) and rejects the tool as a co-author ([CC015](rules.md#cc015)) or as a sign-off ([CC016](rules.md#cc016)). `"ignore"` disables the check. Any other value is a configuration error. | | ||||||
| | commit | ai_disclosure_trailers | list[str] | ["Assisted-by", "Generated-by"] | The trailers that disclose AI assistance under `"disclose"`. The first one is what a correction is written with. Listing `Co-authored-by` says the project accepts the tool as a co-author, and CC015 then passes. `Signed-off-by` is refused: only a person can certify the DCO. | | ||||||
| | commit | ai_disclosure_pattern | str | "" (any value) | A regex the disclosure trailer's value must match under `"disclose"`, e.g. `'^\S+/\S+$'` for an `agent/model` format. Empty accepts any value, but a trailer with no value at all is reported whatever the pattern is. | | ||||||
| | branch | conventional_branch | bool | true | Enforce Conventional Branch specification. | | ||||||
| | branch | allow_branch_types | list[str] | ["feature", "bugfix", "hotfix", "release", "chore", "feat", "fix", "build", "ci", "docs", "perf", "refactor", "style", "test", "ai", "claude", "codex", "copilot", "cursor", "dependabot", "renovate"] | Allowed branch types when `conventional_branch` is true. The default is a superset of the [Conventional Branch spec](https://conventionalbranch.org/): the spec types (`feature`, `bugfix`, `hotfix`, `release`, `chore`) plus the Conventional Commit types (`build`, `ci`, `docs`, `perf`, `refactor`, `style`, `test`), AI agent prefixes (`ai`, `claude`, `codex`, `copilot`, `cursor`) and bot prefixes (`dependabot`, `renovate`). For strict spec-only validation, set this option explicitly (e.g. `["feature", "bugfix", "hotfix", "release", "chore"]`). | | ||||||
| | branch | allow_branch_names | list[str] | [] (empty list) | Additional standalone branch names allowed when conventional_branch is true (e.g., ["develop", "staging"]). By default, master, main, HEAD, and PR-* are always allowed. | | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -91,16 +91,19 @@ ignore_authors = ["dependabot[bot]", "renovate[bot]"] | |||||
|
|
||||||
| ## AI attribution | ||||||
|
|
||||||
| AI coding tools add trailers to commit messages identifying themselves. Whether | ||||||
| that is welcome, required, or unacceptable is a decision each project makes for | ||||||
| itself — and the industry has landed in different places: | ||||||
| AI coding tools stamp their own trailers on the commits they help with. | ||||||
| Whether that is welcome, required or unacceptable is a decision each project | ||||||
| makes for itself, and the industry has landed in three places — which are the | ||||||
| three values `ai_attribution` takes: | ||||||
|
|
||||||
| - The **Linux kernel** added an `Assisted-by:` trailer, treating AI assistance | ||||||
| as something to disclose. | ||||||
| - **Some projects disallow AI-assisted contributions outright**, usually over | ||||||
| provenance and licensing. | ||||||
| - **Most projects have no stated position**, which means the question resurfaces | ||||||
| in every code review. | ||||||
| | `ai_attribution` | The project's position | Rules | | ||||||
| |---|---|---| | ||||||
| | `"ignore"` (default) | no stated position | — | | ||||||
| | `"forbid"` | no AI attribution in the history | [CC013](../rules.md#cc013) | | ||||||
| | `"disclose"` | AI is welcome, said out loud, and not credited as a person | [CC014](../rules.md#cc014)–[CC016](../rules.md#cc016) | | ||||||
|
|
||||||
| Whichever you pick, the check reads what the message says. It cannot see | ||||||
| assistance that left no trace — see the note below. | ||||||
|
|
||||||
| ### The default: no opinion | ||||||
|
|
||||||
|
|
@@ -122,26 +125,143 @@ ai_attribution = "forbid" | |||||
| Commits carrying a recognised AI signature now fail: | ||||||
|
|
||||||
| ```text | ||||||
| CC013 ai-attribution check failed ==> feat: add caching layer | ||||||
| AI attribution policy violation | ||||||
| Suggest: This project forbids AI-assisted commits. Remove AI trailers and re-commit. | ||||||
| CC013 ai-attribution check failed ==> Claude Code | ||||||
| AI attribution is forbidden in this project — detected: Claude Code | ||||||
| Suggest: This project does not accept AI attribution in commit messages. Remove the AI trailer lines and re-commit. | ||||||
| Docs: https://commit-check.com/rules/#cc013 | ||||||
| ``` | ||||||
|
|
||||||
| Recognised signatures are trailers and co-author lines naming Claude Code, | ||||||
| GitHub Copilot, Codex, Gemini, Cursor, Devin, Aider, Windsurf and Tabby, plus | ||||||
| generic AI model patterns. | ||||||
| Recognised signatures are co-author and sign-off lines naming Claude Code, | ||||||
| GitHub Copilot, Codex, Gemini, Cursor, Devin, Aider, Windsurf and Tabby, the | ||||||
| disclosure trailers `Assisted-by:` and `Generated-by:`, vendor marks such as | ||||||
| `🤖 Generated with Claude Code`, and generic AI model names. This is the | ||||||
| position [Kubernetes](https://www.kubernetes.dev/docs/guide/pull-requests/) | ||||||
| takes — no AI trailers in the history, disclosure in the pull request | ||||||
| instead. | ||||||
|
|
||||||
| !!! warning "This checks disclosure, not authorship" | ||||||
|
|
||||||
| CC013 reads commit metadata. It detects a commit that *says* it was | ||||||
| AI-assisted; it cannot detect one that was AI-assisted and did not say so. | ||||||
| These rules read commit metadata. They detect a commit that *says* it | ||||||
| was AI-assisted; they cannot detect one that was AI-assisted and did | ||||||
| not say so. | ||||||
|
|
||||||
| Set against a policy of "no AI contributions", it is an honesty check on | ||||||
| contributors who are already following the rules — not an enforcement | ||||||
| mechanism against those who aren't. Be clear with yourself about which of | ||||||
| those you are buying. | ||||||
|
|
||||||
| ### Asking for disclosure instead | ||||||
|
|
||||||
| Most projects that allow AI assistance ask to be told about it. The | ||||||
| [Linux kernel](https://docs.kernel.org/process/coding-assistants.html), | ||||||
| [Fedora](https://docs.fedoraproject.org/en-US/council/policy/ai-policy/) and | ||||||
| FluxCD want an `Assisted-by:` trailer; the | ||||||
| [Apache Software Foundation](https://www.apache.org/legal/generative-tooling.html) | ||||||
| recommends `Generated-by:`. The kernel adds a second rule: an AI agent must | ||||||
| never add a `Signed-off-by:` line, because only a person can certify the | ||||||
| [DCO](https://developercertificate.org/). | ||||||
|
|
||||||
| ```toml title="cchk.toml" | ||||||
| [commit] | ||||||
| ai_attribution = "disclose" | ||||||
| ``` | ||||||
|
|
||||||
| That turns on three rules, each about one of those conditions: | ||||||
|
|
||||||
| | Rule | Asks that | | ||||||
| |---|---| | ||||||
| | [CC014](../rules.md#cc014) | the assistance is disclosed with an accepted trailer | | ||||||
| | [CC015](../rules.md#cc015) | the tool is not credited as a co-author | | ||||||
| | [CC016](../rules.md#cc016) | the tool did not sign off the commit | | ||||||
|
|
||||||
| A commit that a vendor stamped and nobody disclosed fails the first two, and | ||||||
| the failure carries the disclosure already written: | ||||||
|
|
||||||
| ```text | ||||||
| CC014 ai-disclosure check failed ==> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> | ||||||
| AI assistance is not disclosed with Assisted-by or Generated-by — detected: Claude Code | ||||||
| Suggest: Disclose the tool with "Assisted-by: Claude Opus 5" | ||||||
| Docs: https://commit-check.com/rules/#cc014 | ||||||
|
|
||||||
| CC015 ai-co-author check failed ==> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> | ||||||
| An AI tool is credited as a co-author: Claude Code | ||||||
| Suggest: Use "Assisted-by: Claude Opus 5" in place of the co-author line | ||||||
| Docs: https://commit-check.com/rules/#cc015 | ||||||
| ``` | ||||||
|
|
||||||
| Both carry the same correction in `--format json`: the co-author line rewritten | ||||||
| as the project's disclosure trailer, keeping the name the tool gave itself. | ||||||
|
|
||||||
| ```json | ||||||
| "fix": "feat: add caching layer\n\nAssisted-by: Claude Opus 5" | ||||||
| ``` | ||||||
|
|
||||||
| Once the tool is disclosed, CC015 asks only for the co-author line to go, and | ||||||
| a commit written the way the kernel asks passes all three: | ||||||
|
|
||||||
| ```bash | ||||||
| printf 'feat: add caching layer\n\nAssisted-by: LLM coccinelle sparse\nSigned-off-by: Jane Dev <jane@example.com>' | commit-check -m | ||||||
| ``` | ||||||
|
|
||||||
| ### Choosing the format | ||||||
|
|
||||||
| `ai_disclosure_trailers` is the list of trailers that count as a disclosure, | ||||||
| and the first one is what a correction is written with: | ||||||
|
|
||||||
| ```toml title="cchk.toml" | ||||||
| [commit] | ||||||
| ai_attribution = "disclose" | ||||||
| ai_disclosure_trailers = ["Assisted-by"] # the kernel's, and nothing else | ||||||
| ``` | ||||||
|
|
||||||
| Listing `Co-authored-by` says the project accepts the tool as a co-author — | ||||||
| [pytest](https://github.com/pytest-dev/pytest/blob/main/CONTRIBUTING.rst) and | ||||||
| IREE do — and CC015 then passes. `Signed-off-by` is refused whatever else you | ||||||
| list, so CC016 cannot be configured away. | ||||||
|
|
||||||
| `ai_disclosure_pattern` asks for a particular shape, such as FluxCD's | ||||||
| `agent/model`: | ||||||
|
|
||||||
| ```toml title="cchk.toml" | ||||||
| [commit] | ||||||
| ai_attribution = "disclose" | ||||||
| ai_disclosure_pattern = '^\S+/\S+$' | ||||||
| ``` | ||||||
|
|
||||||
| ```text | ||||||
| CC014 ai-disclosure check failed ==> Assisted-by: Claude Code | ||||||
| The Assisted-by value does not match the required pattern: ^\S+/\S+$ | ||||||
| Suggest: Write the Assisted-by value so that it matches ^\S+/\S+$ (set by ai_disclosure_pattern in the [commit] config) | ||||||
| ``` | ||||||
|
|
||||||
| There is no correction for that one: which model, in which format, is not | ||||||
| something the tool should guess. | ||||||
|
|
||||||
| ### Disclosure that is appreciated, not required | ||||||
|
|
||||||
| Some projects — [CPython](https://devguide.python.org/getting-started/generative-ai/) | ||||||
| among them — welcome disclosure without demanding it, while still refusing the | ||||||
| tool as a co-author. Put CC014 in the top-level `warn` list and the other two | ||||||
| keep enforcing: | ||||||
|
|
||||||
| ```toml title="cchk.toml" | ||||||
| warn = ["ai_disclosure"] | ||||||
|
|
||||||
| [commit] | ||||||
| ai_attribution = "disclose" | ||||||
| ``` | ||||||
|
|
||||||
| ```text | ||||||
| CC014 ai-disclosure check warning ==> 🤖 Generated with [Claude | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Complete the warning example’s rejected value. The next line starts a separate diagnostic message, so it does not continue the subject. The recognized vendor mark is Proposed correction-CC014 ai-disclosure check warning ==> 🤖 Generated with [Claude
+CC014 ai-disclosure check warning ==> 🤖 Generated with Claude Code📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| AI assistance is not disclosed with Assisted-by or Generated-by — detected: Claude Code | ||||||
| Suggest: Disclose the tool with "Assisted-by: Claude Code" | ||||||
| Docs: https://commit-check.com/rules/#cc014 | ||||||
| This rule is set to warn in the config; it does not fail the run. | ||||||
| ``` | ||||||
|
|
||||||
| The run still passes. See | ||||||
| [Report a rule without enforcing it](../configuration.md#report-a-rule-without-enforcing-it). | ||||||
|
|
||||||
| ### Exempting automation | ||||||
|
|
||||||
| Bots that legitimately carry AI trailers can be excluded: | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
Repository: commit-check/commit-check.com
Length of output: 9681
🌐 Web query:
public release or package publication for v2.18.0 commit-check💡 Result:
<search_synthesis>
As of September 12, 2026, version 2.18.0 of the commit-check tool has not been publicly released. The most recent version available on the Python Package Index (PyPI) and the official project repository is v2.17.0 [1]. While other popular developer tools, such as pre-commit [2] and GoReleaser [3], have previously issued versions labeled v2.18.0, the commit-check project maintains its own independent release cycle [4][5]. You can monitor the official commit-check GitHub releases page [4] or the project&
#39;s official changelog [5] for updates regarding future releases.</search_synthesis>
<source_evidence>
Citations:
🏁 Script executed:
Repository: commit-check/commit-check.com
Length of output: 1582
Hold v2.18.0 documentation until the release is published.
v2.18.0is listed as the latest release, and the policy guide documents"disclose", but PyPI lists2.17.0as current while both PyPI2.18.0and the GitHub release tag return 404. Keep these references out of the current-version documentation until the dated release is published.📍 Affects 2 files
docs/changelog.md#L32-L32(this comment)docs/guides/policies.md#L94-L103🤖 Prompt for AI Agents
Source: Coding guidelines