Skip to content

Commit 8ad4c4a

Browse files
authored
docs: add a blog post on checking the "no LLM co-authors" rule (#64)
Before: the blog had one post on AI attribution policies in general (2026-10-11). It had nothing for projects whose single rule is "no LLM co-authors", the rule in the AI policy that pip and attrs use, and nothing on how a squash merge copies co-author lines into main. After: a new post, "No LLM bots in Co-authored-by": checking the rule before the squash merge, at `/blog/2026/10/24/no-llm-co-authors/`. It quotes the policy, explains why squash merges make a missed line permanent, and gives the one `cchk.toml` that checks only that rule. It also shows the App's squash-mode result and lists what the check catches and what it can't do. How: one file, `docs/blog/posts/no-llm-co-authors.md`. `python -m pytest tests/ -q` passes (18 tests), and so does `mkdocs build --strict`. In the built page, the links to CC014–CC016, the App guide's Pull requests section and the earlier post all resolve. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Documentation** * Added a blog post explaining how to configure Commit Check to warn about missing AI-assistance disclosures before squash merges. * The post covers checking squash commits, detected AI attribution trailers, accepted human and service co-authors, and the limitation that checks assess commit text rather than verify authorship. It also includes examples for the Commit Check App and workflow action. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Xianpeng Shen <3353385+shenxianpeng@users.noreply.github.com>
1 parent 26df49f commit 8ad4c4a

1 file changed

Lines changed: 132 additions & 0 deletions

File tree

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
---
2+
date:
3+
created: 2026-10-24
4+
readtime: 4
5+
slug: no-llm-co-authors
6+
description: >-
7+
Some projects close any pull request that credits an LLM as a co-author.
8+
Here is how to check that rule on every pull request, including the
9+
co-author lines a squash merge copies into main.
10+
categories:
11+
- UPDATES
12+
tags:
13+
- commit-check
14+
- ai
15+
- github-app
16+
authors:
17+
- shenxianpeng
18+
---
19+
20+
# "No LLM bots in Co-authored-by": checking the rule before the squash merge
21+
22+
Some projects have written down a short, strict rule about AI tools. The AI
23+
policy that [pip](https://github.com/pypa/pip/blob/main/AI_POLICY.md) and
24+
[attrs](https://github.com/python-attrs/attrs/blob/main/.github/AI_POLICY.md)
25+
use puts it in one line:
26+
27+
> No LLM bots in `Co-authored-by:`s.
28+
29+
A pull request that lists an LLM product as a co-author "can't be merged and
30+
will be closed without further discussion". Using AI tools is still allowed,
31+
but contributors "must remove any LLM co-author tags and take full ownership
32+
of every line."
33+
34+
A machine can check that rule. Unless one does, a reviewer has to open every
35+
commit of every pull request and read its trailers.
36+
37+
<!-- more -->
38+
39+
## Why squash merges make it worse
40+
41+
The co-author line is rarely on the commit a reviewer looks at. An agent adds
42+
it to the commit it wrote, the contributor pushes a fix on top, and the review
43+
happens on the final diff.
44+
45+
When the project squashes on merge, GitHub's default squash message collects
46+
the `Co-authored-by:` and `Signed-off-by:` lines from all of the pull
47+
request's commits and appends them, whichever body the repository uses. It also credits each commit author other than the person
48+
who opened the pull request, so commits written by the Copilot coding agent
49+
reach main with a `Co-authored-by: Copilot` line. One line missed in any commit
50+
becomes a permanent co-author credit on main.
51+
52+
## One file
53+
54+
[Commit Check](https://github.com/commit-check/commit-check) reads its rules
55+
from a `cchk.toml`. This one checks the co-author rule, turns off the message
56+
format and branch name rules, and allows any subject up to 1000 characters.
57+
The default author name and email checks ([CC101](../../rules.md#cc101),
58+
[CC102](../../rules.md#cc102)) stay on:
59+
60+
```toml
61+
warn = ["CC014"] # the policy does not ask for disclosure: report it, never fail
62+
63+
[commit]
64+
ai_attribution = "disclose" # fail if an AI tool is credited as co-author or sign-off
65+
conventional_commits = false # no message format
66+
subject_max_length = 1000 # allow long subjects
67+
subject_min_length = 0 # and short ones
68+
69+
[branch]
70+
conventional_branch = false # no branch name rules
71+
72+
[pull_request]
73+
check = "squash" # check the one commit a squash merge lands
74+
```
75+
76+
The `disclose` policy fails a commit that credits an AI tool as a co-author
77+
([CC015](../../rules.md#cc015)) or has it sign off
78+
([CC016](../../rules.md#cc016)). It also asks for an `Assisted-by:` disclosure
79+
([CC014](../../rules.md#cc014)). This policy doesn't ask for one, so the
80+
`warn` line reports it without failing the check.
81+
82+
## Check the commit that lands
83+
84+
With the [Commit Check App](https://github.com/apps/commit-check) installed,
85+
every pull request gets a **Commit Check** result. The `[pull_request]` section
86+
makes it check the commit a squash merge would land: the title and body your
87+
merge settings produce, plus the co-author and sign-off lines GitHub adds from
88+
the commits. A pull request whose second commit was co-authored by Claude Code
89+
gets this:
90+
91+
```text
92+
❌ Squash message failed (1 of 3 checks)
93+
94+
Squash message `Add retries to the HTTP client (#214)` CC015 ai-co-author
95+
value: Co-Authored-By: Claude <noreply@anthropic.com>
96+
An AI tool is credited as a co-author: Claude Code
97+
```
98+
99+
Make **Commit Check** a required check in the branch's ruleset, and the pull
100+
request can't be merged until the contributor removes the line from their
101+
commits. The App can read the repository and its pull requests and can write
102+
only check runs ([what it reads](../../privacy.md)). It never comments, and it is
103+
free for public repositories. The
104+
[App guide](../../guides/github-app.md#pull-requests) shows what is checked
105+
under each merge setting.
106+
107+
If you would rather keep it in a workflow,
108+
[commit-check-action](https://github.com/commit-check/commit-check-action)
109+
reads the same file and checks every commit of the pull request.
110+
111+
## What it catches
112+
113+
It catches the co-author and sign-off lines that Claude Code, GitHub Copilot
114+
(including the coding agent), Cursor, Codex, Devin, Jules, Amp, Factory Droid
115+
and OpenHands write, and model names such as `gemini-2.5-pro`. It matches those
116+
known signatures, so a tool it doesn't recognize yet passes. Human co-authors
117+
pass, including people who happen to be called Claude or Jules, and so do
118+
Dependabot and pre-commit.ci. `Assisted-by:` and `Generated-by:` trailers pass
119+
too, since this policy doesn't forbid them.
120+
121+
## What it can't do
122+
123+
It checks what a commit says, not who wrote it. A commit with no AI trailer
124+
passes, whoever wrote it. The other half of the policy, "take full ownership of
125+
every line", is still the reviewer's job. What the check removes is the part a
126+
reviewer is worst at: reading trailers on the twentieth pull request of the
127+
day.
128+
129+
If your project's AI policy says something different, such as "disclose it
130+
with `Assisted-by:`" or "no AI trailers at all",
131+
[this earlier post](ai-commit-attribution-policy.md) shows the setting for
132+
each.

0 commit comments

Comments
 (0)