You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a448317
Browse filesBrowse the repository at this point in the historyBrowse files
docs: the disclose policy, and what else 2.18.0 changes (#39)
Documents what
[commit-check#575](commit-check/commit-check#575)
merged, and the rest of what is queued for **2.18.0**.
The tool already prints `Docs: https://commit-check.com/rules/#cc014` on
a failure and that anchor does not exist, so this has to land with the
release.
## What changed
**`docs/rules.md`** — three new sections, each with the policy that asks
for it:
| | |
|---|---|
| [CC014](https://commit-check.com/rules/#cc014) `ai-disclosure` | the
kernel, Fedora and FluxCD ask for `Assisted-by:`; the ASF recommends
`Generated-by:` |
| [CC015](https://commit-check.com/rules/#cc015) `ai-co-author` | pip,
attrs and Requests refuse AI in `Co-authored-by:` |
| [CC016](https://commit-check.com/rules/#cc016) `ai-signoff` | a
sign-off certifies the DCO, which only a person can do |
CC013 is rewritten rather than left alone: it now catches the disclosure
trailers too, and both its error and its suggestion text changed, so the
old section described a tool that no longer exists.
**`docs/guides/policies.md`** — a new "Asking for disclosure instead"
section: the three conditions, the correction a failure carries (`fix`
rewrites the vendor's co-author line as the project's trailer), choosing
the trailers and the value format, and `warn = ["ai_disclosure"]` for
projects that appreciate disclosure without demanding it. The section
intro now names all three policies in a table. The `forbid` sample there
was a stale transcript — it showed an error message the tool stopped
printing — and has been re-run.
**`docs/configuration.md`** — `ai_disclosure_trailers` and
`ai_disclosure_pattern` in the options table and the TOML/env/CLI
mapping; the `ai_attribution` row rewritten for three values.
**`docs/troubleshoot.md`** — an exit-codes section. Exit code `2` ships
in this release and the site had nowhere that said what it means, which
is the difference between "your commit was rejected" and "your config is
broken".
**`docs/changelog.md`** — the whole release, not only the AI work: the
measurements in a failure (#571), hyperlinked spec names (#568),
anchored branch names and the narrowed CC001 exemption (#569), exit code
2 and a working `--dry-run` (#570), a setting whose regex does not
compile naming itself (#574), `inherit_from` failures on stderr (#569).
## Verification
- `python -m pytest tests/ -q` — 9 pass,
`test_pinned_revisions_match_the_released_version` fails.
- `mkdocs build --strict` — clean; the only warnings are the `social`
plugin's imaging dependencies, which are absent from my local
environment and present in CI.
- Every transcript on these pages was produced by running the command
against the merged code, as `AGENTS.md` asks. That includes the ones I
replaced.
## The red test is the expected one
The install pins now say `v2.18.0`, which is not on PyPI yet, so
`test_pinned_revisions_match_the_released_version` is red until it is.
This is the case `AGENTS.md` describes under "The one case where pins
may name an unreleased version": **merge this after 2.18.0 is
published**, then re-run CI to confirm it goes green.
Two things to check before merging:
1. **The changelog entry is dated `2026-09-13`.** If the release goes
out on another day, that date has to match it.
2. **The version.** The draft release is named v2.18.0 and carries
everything since 2.17.0, so that is what this documents. If the fixes go
out as 2.17.1 first, the entry needs splitting.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Added documentation for the new `disclose` AI attribution policy and
its disclosure, co-author, and sign-off checks.
- Documented configurable disclosure trailers and patterns.
- Added guidance for choosing attribution policies and handling
disclosure warnings.
- **Documentation**
- Improved troubleshooting guidance for exit codes, rejected commits,
and configuration or pattern errors.
- Updated examples, rule references, and pre-commit configuration to
version 2.18.0.
- Documented clearer failure messages and several validation behavior
fixes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Copy file name to clipboardExpand all lines: docs/changelog.md
+72Lines changed: 72 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,7 @@ below and to the page that documents the feature properly.
11
11
12
12
| Version | What changed | Documented in |
13
13
|---|---|---|
14
+
|[2.18.0](#v2180)| AI disclosure policy: three rules, and the correction written for you |[Policy guides](guides/policies.md#asking-for-disclosure-instead) · [CC014](rules.md#cc014)|
14
15
|[2.17.0](#v2170)| Concrete corrections for mechanical slips; a `warn` level per rule |[Reading the JSON](example.md#reading-the-json) · [Report without enforcing](configuration.md#report-a-rule-without-enforcing-it)|
15
16
|[2.16.0](#v2160)| Tag name validation, and file size, path and pattern policies |[CC401](rules.md#cc401) · [CC302–CC304](rules.md#push-rules)|
16
17
|[2.15.1](#v2151)| Color and rule-ID links appear only where they render; `NO_COLOR` honoured |[Color and links](example.md#color-and-links)|
@@ -28,6 +29,77 @@ below and to the page that documents the feature properly.
28
29
|[2.5.0](#v250)| Organization-wide config with `inherit_from`|[Across an organization](guides/organization.md)|
29
30
|[2.0.0](#v200)| Configuration moved from YAML to TOML — breaking |[Migrating from v1](migration.md)|
30
31
32
+
## v2.18.0 (2026-09-13) { #v2180 }
33
+
34
+
### Added
35
+
36
+
***AI attribution gained a third policy, `"disclose"`** — for the projects
37
+
that welcome AI assistance and ask to be told about it. It turns on three
38
+
rules, one per condition, so any of them can be demoted to a warning while
39
+
the others keep enforcing: the assistance is disclosed with one of
@@ -344,7 +346,9 @@ the same thing twice, so read the description rather than the cell:
344
346
| 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`). |
345
347
| 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`). |
346
348
| commit | require_signed_off_by | bool | false | Require "Signed-off-by" line in the commit message footer. |
347
-
| 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). |
349
+
| 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. |
350
+
| 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. |
351
+
| 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. |
0 commit comments