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)