From d7ae914b4d91d922819e474947413c9dbae4d113 Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Wed, 21 Oct 2026 05:09:27 +0200 Subject: [PATCH] fix: guard every private name in tracked text The pattern caught one notes file and missed the two others and the notes directory that the same exclude list keeps out of the repository. --- tests/test_prose_style.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/tests/test_prose_style.py b/tests/test_prose_style.py index e59c4d22..322b771c 100644 --- a/tests/test_prose_style.py +++ b/tests/test_prose_style.py @@ -178,10 +178,29 @@ class NoToolingNames(unittest.TestCase): """Nothing committed names the private notes or the agent tooling the maintainer works with. Two test docstrings did, and history keeps them.""" + # The names the repository keeps out of version control through its + # private exclude list, plus the assistant itself. `claude\w*` covers + # claudedocs/. NAMES = re.compile( - r"(?i)\b(claude|anthropic)\b|prompt\.md|\.claude/" + r"(?i)\b(claude\w*|anthropic)\b|\b(prompt|agents|audit)\.md\b" + r"|\.(claude|codex|cursor|continue|copilot|gemini|windsurf|serena|playwright-mcp)/" + r"|\.aider" ) + def test_the_pattern_covers_every_private_name(self): + """The pattern caught CLAUDE.md and missed AGENTS.md, AUDIT.md and + claudedocs/, which the same rule keeps out of the repository.""" + for text in ( + "see CLAUDE.md", "rules live in AGENTS.md", "AUDIT.md angle G", + "notes in claudedocs/launchers", "prompt.md", "under .claude/hooks", + "a .cursor/ rule", "the .serena/ cache", ".aider.conf.yml", + ): + with self.subTest(text=text): + self.assertRegex(text, self.NAMES) + for text in ("When Superpowers Collide", "audit_regressions", "an agent of change"): + with self.subTest(text=text): + self.assertNotRegex(text, self.NAMES) + def test_no_tracked_file_names_them(self): offenders = [] for path in _tracked():