feat: preflight.py and k_checker.py ship with the plugin - #109
Merged
Conversation
Point 2 of the trz-expert evaluation: tools/preflight.py and tools/k_checker.py lived outside skills/trz-expert on purpose, because installing a Claude Code plugin copies the skill directory whole and SKILL.md's compatibility field promised "prose and reference material only; no bundled scripts". That promise had a real cost - the two scripts were unreachable from anywhere except a cloned checkout, so every /plugin install never had them at all, only users working in this repository directly. Both files move to skills/trz-expert/scripts/, alongside mapping.example.yaml. compatibility now states the scripts exist instead of denying them. SKILL.md's two pointers to K5/K6 and to the mapping tool drop the "when you can execute it" hedge, since the files now always exist for an installed user - whether a given session can run Bash is a separate question the hedge was never really about. preflight.py's own path logic simplifies along the way: SKILL_DIR is now one dirname() from the script's own location instead of two dirname()s to the repo root and back down through skills/trz-expert/references - references/ is a sibling of scripts/ now, not two levels away. Fixed everything that assumed the old location: - test/preflight_test.py and test/k_checker_test.py's sys.path.insert calls - the pre-commit hook's trigger regex, which matched `^(test|tools)/.*\.py$` - a change under scripts/ would have stopped triggering the five-suite run locally and been caught only in CI - .github/workflows/tests.yml's explanatory comments - CLAUDE.md's "tools/ is not part of the skill" bullet, rewritten since the premise inverted, plus every other tools/ path mention across CLAUDE.md, SKILL.md, references/proverki.md and references/proverki/k.md (two of which were leftover from before this session's proverki.md split and had gone unnoticed until this pass) Full test battery green: rates_test, preflight_test, k_checker_test --seeds 100, run_tests --seeds 50, komplekt_test, lifecycle_test, eval_skill --selftest. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XvbzEbQwxwxxHAtXfPMrno
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Point 2 of the trz-expert evaluation:
tools/preflight.pyandtools/k_checker.pylived outsideskills/trz-experton purpose (SKILL.md'scompatibilityfield said "no bundled scripts"), because installing a Claude Code plugin copies the skill directory whole. That made both scripts unreachable for any/plugin installuser — only someone working in a cloned checkout ever had them.Both move to
skills/trz-expert/scripts/, alongsidemapping.example.yaml.compatibilitynow states the scripts exist. SKILL.md's two pointers to them drop the "when you can execute it" hedge, since the files always exist for an installed user now.What had to change
preflight.py's own path logic simplifies:SKILL_DIRis onedirname()from the script's location instead of twodirname()s to repo root and back down —references/is now a sibling ofscripts/.test/preflight_test.py/test/k_checker_test.py'ssys.path.insertcalls.^(test|tools)/.*\.py$) — a change underscripts/would have silently stopped triggering the five-suite run locally, caught only in CI..github/workflows/tests.ymlcomments,CLAUDE.md's "tools/ is not part of the skill" bullet (rewritten — the premise inverted), and every other straytools/path mention acrossCLAUDE.md,SKILL.md,references/proverki.mdandreferences/proverki/k.md— two of which were leftovers from before this session'sproverki.mdsplit that had gone unnoticed until this pass.Test plan
rates_test,preflight_test,k_checker_test --seeds 100,run_tests --seeds 50,komplekt_test,lifecycle_test,eval_skill --selftest— all greenskills/trz-expert/scripts/changes (confirmed on this commit)🤖 Generated with Claude Code
https://claude.ai/code/session_01XvbzEbQwxwxxHAtXfPMrno