From 067a0a825f615fc916776b076659b7049ca30f03 Mon Sep 17 00:00:00 2001 From: Edbert Chan Date: Wed, 16 Sep 2026 14:16:57 -0700 Subject: [PATCH] Classify corpus/CLAUDE.learned.md as a corpus lesson The learned rules file fell through to the docs-by-extension rule, so a PR that adds a rule and the test pinning it read as two review units. Class it with corpus/skills so its tests ride along, and pin that in the preflight tests. Co-Authored-By: Claude Opus 5 (1M context) Change-Id: Ib8058de42a469d080f0242d1c2394f0e120cfaa0 --- drafter.config.json | 1 + engine/skills/make-pr/tests/test_preflight.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/drafter.config.json b/drafter.config.json index 5a3a7257..6271b2f0 100644 --- a/drafter.config.json +++ b/drafter.config.json @@ -33,6 +33,7 @@ { "id": "manifests-neutral", "pathGlob": "**/tsconfig*.json", "unit": [] }, { "id": "skill-debt-allowlist-neutral", "pathGlob": "scripts/ci/skill_test_debt_allowlist.txt", "unit": [] }, { "id": "corpus-lesson", "pathGlob": "corpus/skills/**", "unit": ["corpus-lesson"] }, + { "id": "corpus-learned-rules", "pathGlob": "corpus/CLAUDE.learned.md", "unit": ["corpus-lesson"] }, { "id": "product-skill", "pathGlob": "product/skills/**", "unit": ["product-skill"] }, { "id": "engine-runtime", "pathGlob": "{engine,scripts,.github}/**", "unit": ["engine-runtime"] }, { "id": "engine-runtime-root-config", "pathGlob": "{drafter.config.json,install.sh,install_*.py}", "unit": ["engine-runtime"] }, diff --git a/engine/skills/make-pr/tests/test_preflight.py b/engine/skills/make-pr/tests/test_preflight.py index 1728460d..22fa2d14 100644 --- a/engine/skills/make-pr/tests/test_preflight.py +++ b/engine/skills/make-pr/tests/test_preflight.py @@ -50,6 +50,11 @@ def test_docs_other_than_the_inventory_are_their_own_unit(self): info = pf.classify(["engine/hooks/demo/detect.py", "docs/guide.md"]) self.assertEqual(set(info["units"]), {"engine-runtime", "docs"}) + def test_learned_rules_file_is_a_corpus_lesson_its_test_can_ride_with(self): + info = pf.classify(["corpus/CLAUDE.learned.md", "tests/test_zsh_loop_rule.py"]) + self.assertEqual(info["units"], {"corpus-lesson": ["corpus/CLAUDE.learned.md"]}) + self.assertEqual(info["neutral"], ["tests/test_zsh_loop_rule.py"]) + def test_gates_for_hook_slice_run_hook_and_skill_checks(self): cmds = pf.gates_for(HOOK_SLICE) self.assertIn(["python3", "scripts/ci/check_hook_test_coverage.py", "engine/hooks/prove-it-ship-gate"], cmds)