Skip to content

feat: preflight.py and k_checker.py ship with the plugin - #109

Merged
svedbg merged 1 commit into
mainfrom
feat/scripts-ship-with-plugin
Sep 6, 2026
Merged

feat: preflight.py and k_checker.py ship with the plugin#109
svedbg merged 1 commit into
mainfrom
feat/scripts-ship-with-plugin

Conversation

@svedbg

@svedbg svedbg commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Summary

Point 2 of the trz-expert evaluation: tools/preflight.py and tools/k_checker.py lived outside skills/trz-expert on purpose (SKILL.md's compatibility field said "no bundled scripts"), because installing a Claude Code plugin copies the skill directory whole. That made both scripts unreachable for any /plugin install user — only someone working in a cloned checkout ever had them.

Both move to skills/trz-expert/scripts/, alongside mapping.example.yaml. compatibility now 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_DIR is one dirname() from the script's location instead of two dirname()s to repo root and back down — references/ is now a sibling of scripts/.
  • test/preflight_test.py / test/k_checker_test.py's sys.path.insert calls.
  • The pre-commit hook's trigger regex (^(test|tools)/.*\.py$) — a change under scripts/ would have silently stopped triggering the five-suite run locally, caught only in CI.
  • .github/workflows/tests.yml comments, CLAUDE.md's "tools/ is not part of the skill" bullet (rewritten — the premise inverted), and every other stray tools/ path mention across CLAUDE.md, SKILL.md, references/proverki.md and references/proverki/k.md — two of which were leftovers from before this session's proverki.md split 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 green
  • Full pre-commit hook fires correctly on skills/trz-expert/scripts/ changes (confirmed on this commit)

🤖 Generated with Claude Code

https://claude.ai/code/session_01XvbzEbQwxwxxHAtXfPMrno

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
@svedbg
svedbg merged commit 2dbdfb7 into main Sep 6, 2026
12 checks passed
@svedbg
svedbg deleted the feat/scripts-ship-with-plugin branch September 6, 2026 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant