From b85cb407829e0ce84ed22debb95fc36921207f76 Mon Sep 17 00:00:00 2001 From: shenxianpeng Date: Mon, 6 Jul 2026 21:59:19 +0300 Subject: [PATCH 1/2] feat: add AI attribution governance support from commit-check v2.11.0 Sync the new AI attribution governance feature from commit-check v2.11.0: - Bump minimum commit-check dependency to >=2.11.0 - Add 'ai_attribution' to validate_commit_message and validate_commit_context check lists so the rule is actually executed - Update README with AI attribution governance documentation When config [commit] ai_attribution = "forbid" is set, commits containing known AI tool signatures (Claude Code, GitHub Copilot, etc.) will be rejected. --- README.md | 6 ++++++ pyproject.toml | 2 +- src/commit_check_mcp/server.py | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7b546fa..4e13175 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,12 @@ This MCP server exposes commit-check validations as MCP tools: - `validate_repository_state` — validates latest commit, current branch, author state, and optional push safety for a repo - `describe_validation_rules` — returns the effective config and enabled rules after merging defaults and repo config +> **v2.11.0+**: AI attribution governance is now supported. Set `[commit] ai_attribution = "forbid"` +> in your commit-check config to reject commits co-authored by AI coding agents +> (Claude Code, GitHub Copilot, Cursor, etc.). See the +> [commit-check docs](https://github.com/commit-check/commit-check?tab=readme-ov-file#ai-attribution-governance) +> for details. + All validation tools return the same structured commit-check result shape: ```json diff --git a/pyproject.toml b/pyproject.toml index 4029f5d..71cbc0e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,7 +25,7 @@ classifiers = [ "Topic :: Software Development", ] dependencies = [ - "commit-check>=2.7.0,<3", + "commit-check>=2.11.0,<3", "mcp>=1.27.0,<2" ] dynamic = ["version"] diff --git a/src/commit_check_mcp/server.py b/src/commit_check_mcp/server.py index a1ac882..139a63a 100644 --- a/src/commit_check_mcp/server.py +++ b/src/commit_check_mcp/server.py @@ -162,6 +162,7 @@ def _validate_message( "allow_empty_commits", "allow_fixup_commits", "allow_wip_commits", + "ai_attribution", ], ValidationContext(stdin_text=message, config=cfg), cfg, @@ -281,6 +282,7 @@ def _validate_all( "allow_empty_commits", "allow_fixup_commits", "allow_wip_commits", + "ai_attribution", ], ValidationContext(stdin_text=message, config=cfg), cfg, From 64bd00fc62d4ebb54c915755b869da87cfb30a8d Mon Sep 17 00:00:00 2001 From: Xianpeng Shen Date: Mon, 6 Jul 2026 22:15:18 +0300 Subject: [PATCH 2/2] docs: Update README with AI attribution governance details Added information about AI attribution governance in v2.11.0+. --- README.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/README.md b/README.md index 4e13175..7b546fa 100644 --- a/README.md +++ b/README.md @@ -27,12 +27,6 @@ This MCP server exposes commit-check validations as MCP tools: - `validate_repository_state` — validates latest commit, current branch, author state, and optional push safety for a repo - `describe_validation_rules` — returns the effective config and enabled rules after merging defaults and repo config -> **v2.11.0+**: AI attribution governance is now supported. Set `[commit] ai_attribution = "forbid"` -> in your commit-check config to reject commits co-authored by AI coding agents -> (Claude Code, GitHub Copilot, Cursor, etc.). See the -> [commit-check docs](https://github.com/commit-check/commit-check?tab=readme-ov-file#ai-attribution-governance) -> for details. - All validation tools return the same structured commit-check result shape: ```json