From 797c5dd4fcea589b9370a61e89055cd685b72cbf Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Mon, 9 Nov 2026 02:14:12 +0100 Subject: [PATCH] =?UTF-8?q?Answer=20product-owner=20round=201:=201=20?= =?UTF-8?q?=F0=9F=94=B4,=202=20=F0=9F=9F=A1=20(0=20misread);=20check=20chu?= =?UTF-8?q?nk-pr=20commands=20for=20an=20attribution;=20the=20default-bran?= =?UTF-8?q?ch=20refusal=20and=20the=20PR=20summary=20went=20in=20the=20sta?= =?UTF-8?q?bility=20and=20prose=20commits;=20tea's=20--draft=20and=20--rea?= =?UTF-8?q?dy=20are=20verified=20by=20its=20help=20and=20#448?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/rule_hook/rules.py | 4 ++-- bin/rule_hook/test_rule_hook.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/rule_hook/rules.py b/bin/rule_hook/rules.py index 636e7083..9d119eb0 100644 --- a/bin/rule_hook/rules.py +++ b/bin/rule_hook/rules.py @@ -45,7 +45,7 @@ RULES: dict[RuleName, Rule] = { ), "no-ai-attribution": Rule( "no commit, PR, issue comment or file carries a Claude or Anthropic attribution, such as a co-author trailer or a generated-with line", - "a git, gh or tea command, and any file written", + "a git, gh, tea or chunk-pr command, and any file written", ), # A Read carries no text for a marker, and a misjudged read has a way through that the message names, so no marker waives it. "repeat-read": Rule( @@ -140,7 +140,7 @@ def check(breaches: list[Breach], written: str, markdown: bool, bash: bool) -> C def command_breaches(command: str, simples: list[Simple], home: str) -> list[Breach]: breaches = [] found = commits(simples, home) - publishing = [simple for simple in simples if simple.words[0] in ("gh", "git", "tea")] + publishing = [simple for simple in simples if posixpath.basename(simple.words[0]) in ("chunk-pr", "gh", "git", "tea")] if publishing and ATTRIBUTION.search(command): breaches.append(Breach("no-ai-attribution", "the command carries an attribution", publishing[0].directory)) for simple in simples: diff --git a/bin/rule_hook/test_rule_hook.py b/bin/rule_hook/test_rule_hook.py index ded9dc2e..db283b15 100644 --- a/bin/rule_hook/test_rule_hook.py +++ b/bin/rule_hook/test_rule_hook.py @@ -133,8 +133,9 @@ class CommandBreaches(unittest.TestCase): with self.subTest(command): self.assertEqual(checked(command), []) - def test_an_attribution_breaks_only_in_a_git_gh_or_tea_command(self): + def test_an_attribution_breaks_only_in_a_git_gh_tea_or_chunk_pr_command(self): self.assertEqual(checked(f"tea pr create --description '{TRAILER}'"), ["no-ai-attribution"]) + self.assertEqual(checked(f"~/.claude/bin/chunk-pr open 'Do it' '{TRAILER}'"), ["no-ai-attribution"]) self.assertEqual(checked(f"grep -rn '{TRAILER}' ."), []) def test_a_commit_breach_names_the_commit_s_checkout(self):