T-YBKU-shim-deletion-guard
Status: closed/done · Impact: high · Complexity: medium
The irreversible step: delete plugin/scripts/ and plugin/validators/
wholesale, and land the guard that keeps dead paths from coming back.
Resolved design question (e) means no retained adapters — both
directories go completely.
| Location | Role today |
|---|---|
plugin/scripts/ | T-0010 forwarding shims (new_*, audit_entities, migrate_entities, sdlc_lease), thinned port forwarders, and one-time tools (migrate_identifier_shape, check_dependencies.sh, _example_script, _pyyaml) |
plugin/validators/ | validate_frontmatter (contract absorbed by T-Y1L0-entities-validate-absorb), validate_base, validate_sdlc_yaml (core absorbed by T-KO35-config-sdlc-yaml) |
.claude/skills/project-check/ | home for the new guard script |
Proposed
Section titled “Proposed”Both directories deleted. A check_no_legacy_script_paths.ts
project-check greps every plugin/skills/**/SKILL.md (all of them, not
just invariant-instrumented skills) for ${CLAUDE_PLUGIN_ROOT}scripts/
and validators/ references — proven red on a planted fixture; per-skill
forbidden_phrases invariants give local error messages; the guard is
wired into lefthook/quality checks.
Approach
Section titled “Approach”- Pre-delete gate: grep proves ZERO SKILL.md references to
scripts/new_*,scripts/audit_entities,scripts/migrate_entities,validators/*— anything still referencing blocks deletion. git rm -r plugin/scripts plugin/validators; move any still-referenced test fixture out first.- Land
check_no_legacy_script_paths.ts+ fixture test (red on planted violation, green on tree); wire into lefthook + quality checks. - Add
forbidden_phrasesentries to instrumented skills’ invariants.yaml. - Full
bun test+ every eval suite + fresh-project smoke.
Files to touch
Section titled “Files to touch”| Location | Kind | Change |
|---|---|---|
plugin/scripts/ | delete | entire directory |
plugin/validators/ | delete | entire directory |
.claude/skills/project-check/check_no_legacy_script_paths.ts | new | the guard + fixture test |
lefthook.yml | modify | wire the guard |
plugin/skills/*/invariants.yaml | modify | forbidden_phrases entries |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1:
plugin/scripts/andplugin/validators/do not exist;git log --followstill resolves history for every file that moved to lib. - AC-2: the guard exits 1 on a planted fixture violation and 0 on the clean tree; it runs in pre-commit.
- AC-3: full
bun test, everyrun_evals*suite, and the fresh-project smoke (sdlc project setup→task create→entities audit→index generate) green on main. - AC-4:
grep -rE 'plugin/(scripts|validators)/' plugin/ site/returns only historical docs (task post-mortems), nothing live.
Out of scope
Section titled “Out of scope”- docs/ and site/ prose refresh (T-YXM5-site-docs-long-tail).
- Any further lib moves — this task only deletes and guards.
Dependencies
Section titled “Dependencies”- T-QL5F-skill-prose-codemod — every caller must be flipped first; this PR merges only when main is green with all prior PRs in.
Discovery context
Section titled “Discovery context”- D-0007 §Migration steps 5–6 (forbid old paths post-cutover, delete shims); the all-SKILL.md guard scope comes from the refutation finding that the prose linter only checks invariant-instrumented skills.