gitlink-cli/doc/changes/skill-validator-codex-compa...

24 lines
1.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Skill 元数据双模式校验
维护者效率 Skill 使用 Codex/Agent Skill 的最小 frontmatter只要求 `name`
`description`。仓库原有校验器则无条件要求 `version`、`metadata.requires.bins`
`metadata.cliHelp`,导致符合 Codex 规范的 Skill 在仓库测试中被误报。
本次把校验调整为双模式:
- 只声明 `name``description` 时,按 Codex 最小规范校验。
- 一旦声明 `version`、`requires.bins` 或 `cliHelp` 中任一执行元数据,就继续要求
三项完整,并校验语义版本、`gitlink-cli` 依赖和命令帮助入口。
- Skill 名称、目录一致性和描述长度规则保持不变。
这样不会为了兼容 Codex 而放过不完整的旧版执行元数据,同时确保五个维护专项 Skill
`gitlink-maintenance-orchestrator` 能通过仓库校验与 Codex `quick_validate.py`
验证命令:
```bash
go test ./internal/skillmeta \
-run 'TestValidateCatchesBadSkills|TestValidateAcceptsCodexMinimalFrontmatter' \
-count=1
```