Two hooks in .pre-commit-config.yaml, each printing its rule as the failure message:
Roles only. A local hook with language: fail and files: ^plugins/. Message: the Collection holds roles only; a plugin needs an ADR in docs/adr/ first, and that ADR's pull request removes this hook. No script.
Agent trailers. A local hook at the commit-msg stage that refuses a Claude-Session: line and a Co-Authored-By: line naming a known agent identity (for example [email protected], Claude, Copilot, Cursor, Gemini, Codex). A human co-author stays allowed. Message: agent-written content carries Assisted-by: <tool>[:<model>], never Co-Authored-By: for an agent or a session link (see docs/contributing/ai-assistance.md). Prefer language: pygrep. Not certain that pygrep runs at commit-msg: check it, and fall back to a short script under scripts/ with a test only if it does not. scripts/dev-setup.sh must install the commit-msg hook type if it does not already (Conventional Commits already runs there, so it probably does).
.pre-commit-config.yaml is an image input: carry the PATCH bump of the ci image version: (scripts/bump_image_versions.py).
Acceptance
Committing a file under plugins/ fails with the rule as the message.
A commit message with Co-Authored-By: Claude <[email protected]> or Claude-Session: … fails; one with a human Co-Authored-By: and one with Assisted-by: Claude Code pass.
Each rule's held-by in the docs names its hook once the docs exist (root AGENTS.md, ai-assistance.md), or the PR notes the docs edit owed.
The PR says what was verified and what was not.
Not in scope
Requiring Assisted-by: (no check can tell agent-written content; held by review). Rewriting existing commits.
Spec: [Where the last unplaced rules live: architecture, the two positions and the trailer rule](https://git.rkdr.net/Mortis/Kamino/issues/258) (resolution comment, items 2 and 4).
## What to build
Two hooks in `.pre-commit-config.yaml`, each printing its rule as the failure message:
1. **Roles only.** A `local` hook with `language: fail` and `files: ^plugins/`. Message: the Collection holds roles only; a plugin needs an ADR in `docs/adr/` first, and that ADR's pull request removes this hook. No script.
2. **Agent trailers.** A `local` hook at the `commit-msg` stage that refuses a `Claude-Session:` line and a `Co-Authored-By:` line naming a known agent identity (for example `[email protected]`, Claude, Copilot, Cursor, Gemini, Codex). A human co-author stays allowed. Message: agent-written content carries `Assisted-by: <tool>[:<model>]`, never `Co-Authored-By:` for an agent or a session link (see `docs/contributing/ai-assistance.md`). Prefer `language: pygrep`. Not certain that `pygrep` runs at `commit-msg`: check it, and fall back to a short script under `scripts/` with a test only if it does not. `scripts/dev-setup.sh` must install the `commit-msg` hook type if it does not already (Conventional Commits already runs there, so it probably does).
`.pre-commit-config.yaml` is an image input: carry the PATCH bump of the `ci` image `version:` (`scripts/bump_image_versions.py`).
## Acceptance
- [ ] Committing a file under `plugins/` fails with the rule as the message.
- [ ] A commit message with `Co-Authored-By: Claude <[email protected]>` or `Claude-Session: …` fails; one with a human `Co-Authored-By:` and one with `Assisted-by: Claude Code` pass.
- [ ] Each rule's held-by in the docs names its hook once the docs exist (root `AGENTS.md`, `ai-assistance.md`), or the PR notes the docs edit owed.
- [ ] The PR says what was verified and what was not.
## Not in scope
Requiring `Assisted-by:` (no check can tell agent-written content; held by review). Rewriting existing commits.
Claude
added this to the Open to contributors milestone 2026-11-20 21:14:39 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Spec: Where the last unplaced rules live: architecture, the two positions and the trailer rule (resolution comment, items 2 and 4).
What to build
Two hooks in
.pre-commit-config.yaml, each printing its rule as the failure message:localhook withlanguage: failandfiles: ^plugins/. Message: the Collection holds roles only; a plugin needs an ADR indocs/adr/first, and that ADR's pull request removes this hook. No script.localhook at thecommit-msgstage that refuses aClaude-Session:line and aCo-Authored-By:line naming a known agent identity (for example[email protected], Claude, Copilot, Cursor, Gemini, Codex). A human co-author stays allowed. Message: agent-written content carriesAssisted-by: <tool>[:<model>], neverCo-Authored-By:for an agent or a session link (seedocs/contributing/ai-assistance.md). Preferlanguage: pygrep. Not certain thatpygrepruns atcommit-msg: check it, and fall back to a short script underscripts/with a test only if it does not.scripts/dev-setup.shmust install thecommit-msghook type if it does not already (Conventional Commits already runs there, so it probably does)..pre-commit-config.yamlis an image input: carry the PATCH bump of theciimageversion:(scripts/bump_image_versions.py).Acceptance
plugins/fails with the rule as the message.Co-Authored-By: Claude <[email protected]>orClaude-Session: …fails; one with a humanCo-Authored-By:and one withAssisted-by: Claude Codepass.AGENTS.md,ai-assistance.md), or the PR notes the docs edit owed.Not in scope
Requiring
Assisted-by:(no check can tell agent-written content; held by review). Rewriting existing commits.