From c8a7c9ea875f140a172aff3d8275a98965a56657 Mon Sep 17 00:00:00 2001 From: Defame1297 Date: Sat, 12 Sep 2026 20:00:28 +0000 Subject: [PATCH] chore: fold skill-frontmatter into skill-size-check skill-frontmatter was a 62-line bash script inlined in .pre-commit-config.yaml, re-parsing SKILL.md frontmatter with grep and awk to check for name/description/metadata.version fields. skill-size-check.sh already parses the same frontmatter block with PyYAML for its ADR-0020 checks, so the two checks belonged in one script. Adds a ~20-line required-frontmatter check (name, description, metadata.version as three-part semver) to scripts/skill-size-check.sh. Removes the inline skill-frontmatter hook from .pre-commit-config.yaml and deletes tests/test-skill-frontmatter.sh (366 lines). Removes the 79-line "the other hook on that scope" discussion from docs/spec/gates.md and its now-dangling cross-reference, replacing both with a one-line note of the fold, and updates the pre-push hook counts there. Updates fixture builders in test-skill-size-check.sh, test-adr0020-body-checks.sh, test-adr0020-targets.sh, test-adr0020-differential.sh, and test-vale-hooks-consumer.sh to carry valid metadata.version so the new check doesn't spuriously fail existing fixtures that predate it. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01YR2CjVumUbEGWcMikcoXBD --- .pre-commit-config.yaml | 81 ------- SIMPLIFICATION-AUDIT.md | 3 +- docs/spec/gates.md | 95 +------- scripts/skill-size-check.sh | 20 ++ tests/test-adr0020-body-checks.sh | 2 + tests/test-adr0020-differential.sh | 6 + tests/test-adr0020-targets.sh | 2 + tests/test-skill-frontmatter.sh | 366 ----------------------------- tests/test-skill-size-check.sh | 22 +- tests/test-vale-hooks-consumer.sh | 2 + 10 files changed, 62 insertions(+), 537 deletions(-) delete mode 100644 tests/test-skill-frontmatter.sh diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 31283f0..ef2d349 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -238,87 +238,6 @@ repos: pass_filenames: false always_run: true - - id: skill-frontmatter - stages: ['pre-commit'] - name: SKILL.md frontmatter validation - description: Ensure SKILL.md files have required frontmatter fields - entry: bash - language: system - files: '^plugins/[^/]+/\.apm/skills/[^/]+/SKILL\.md$' - # Pinned by tests/test-skill-frontmatter.sh, which drives this exact - # `bash -c