refactor(skills): mandate metadata.version on every skill's frontmatter
Only 12 of 39 skills carried metadata.version, and adoption tracked which plugin a skill lived in rather than any stated rule: core, gitea and lint were consistent adopters, bin and kyberforge were consistent non-adopters, git was split with one outlier. There was no documented convention, and skill-author's own bump logic was already written as if presence were conditional. metadata.version is now required on every skill. The 19 skills here that never carried one (bin, kyberforge, gitea-files) are seeded at 1.0.0, not 0.1.0 -- that value stays reserved for a skill's actual creation point under skill-author's existing convention. The skill-frontmatter pre-commit hook now fails a SKILL.md missing the field, the same class of failure as a missing name/description. Full rationale in the new ADR. The git-plugin skills that also need this field follow in the next commit, bundled with issue #113's rtk normalization since both touch the same files. Refs: #127 ADR: 0022 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EeH8SCbcrCAQrtymkNuhKP
This commit is contained in:
@@ -259,8 +259,18 @@ repos:
|
||||
- |
|
||||
for f in "$@"; do
|
||||
if [[ -f "$f" ]]; then
|
||||
if ! grep -q "^name:" "$f" || ! grep -q "^description:" "$f"; then
|
||||
echo "ERROR: $f is missing required frontmatter fields (name: and description:)"
|
||||
missing=""
|
||||
if ! grep -q "^name:" "$f"; then
|
||||
missing="${missing}name: "
|
||||
fi
|
||||
if ! grep -q "^description:" "$f"; then
|
||||
missing="${missing}description: "
|
||||
fi
|
||||
if ! grep -A10 "^metadata:" "$f" | grep -q " version:"; then
|
||||
missing="${missing}metadata.version "
|
||||
fi
|
||||
if [[ -n "$missing" ]]; then
|
||||
echo "ERROR: $f is missing required frontmatter fields (${missing})"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user