Skip to content

ci: add frontmatter lint workflow (expected red until #128 merges) - #134

Merged
lis186 merged 2 commits into
mainfrom
ci/frontmatter-lint
Oct 21, 2026
Merged

lis186 merged 2 commits into
mainfrom
ci/frontmatter-lint

Conversation

@lis186

@lis186 lis186 commented Oct 21, 2026

Copy link
Copy Markdown
Owner

做什麼

新增第一個 CI(VERIFICATION.md §9 Tier 1 的 lint-frontmatter):

  • .github/workflows/verify.yml:pull_request 與 push 到 main 觸發,permissions: contents: read,不用任何 secret。
  • tests/tools/lint-frontmatter.py(+ lint-frontmatter.sh wrapper):用 PyYAML safe_load 解析
    plugin/commands/*/SKILL.md、plugin/skills/*/SKILL.md、.claude/commands/*.md 的 frontmatter。
    • 解析失敗 → fail;frontmatter 不是 mapping → fail
    • 有 argument-hint 但不是字串 → fail(Skills fail to load in GitHub Copilot CLI 1.0.65+ due to array-shaped argument-hint #129 的根因)
    • description 必須是非空字串;SKILL.md 的 name 必須是非空字串
    • .claude/commands/*.md 的 name 為選填(Claude Code 由檔名推得,現有檔案都沒有),有的話必須是字串
    • 每個問題印一行 path: reason,最後印 N files checked, F files failed (P problems);有失敗 exit 1,找不到任何檔案 exit 2(防止在錯的目錄跑)

這個 PR 不修任何指令檔,那是 #128 的工作。

⚠️ 預期會紅

在目前的 main 上,這個 CI 預期會紅燈,而且應該剛好抱怨下面 11 個檔案(就是 #128 修的那些)。等 #128 合併後轉綠。

本機在 main(b176ae0)上的輸出,exit 1:

.claude/commands/atlas.deps.md: YAML parse error at line 5: expected <block end>, but found '['
.claude/commands/atlas.flow.md: YAML parse error at line 5: expected <block end>, but found '['
.claude/commands/atlas.impact.md: YAML parse error at line 5: expected <block end>, but found '['
.claude/commands/atlas.overview.md: YAML parse error at line 5: expected <block end>, but found '['
.claude/commands/atlas.pattern.md: YAML parse error at line 5: expected <block end>, but found '['
.claude/commands/atlas.reset.md: YAML parse error at line 5: mapping values are not allowed here
plugin/commands/deps/SKILL.md: YAML parse error at line 6: expected <block end>, but found '['
plugin/commands/flow/SKILL.md: YAML parse error at line 6: expected <block end>, but found '['
plugin/commands/impact/SKILL.md: YAML parse error at line 6: expected <block end>, but found '['
plugin/commands/pattern/SKILL.md: YAML parse error at line 6: expected <block end>, but found '['
plugin/commands/reset/SKILL.md: YAML parse error at line 6: mapping values are not allowed here
24 files checked, 11 files failed (11 problems)

本機套用 #128 head(af28b44)之後,exit 0:

24 files checked, 0 files failed (0 problems)

另外在 /tmp 做過負向測試:argument-hint 是 list、缺 description、frontmatter 沒有結尾 ---、SKILL.md 缺 name、在錯的目錄執行,都會觸發對應的錯誤。

建議合併順序

#128 來自外部 fork,pull_request workflow 要等這個檔進了 main 才會在 fork PR 上跑,而且首次貢獻者可能要維護者按 "Approve and run"。建議:先合這個 PR(紅燈是預期的),再讓 #128 rebase 或重跑 CI 確認綠燈後合併,main 就會轉綠。

Refs #129

Parses YAML frontmatter of plugin/commands/*/SKILL.md, plugin/skills/*/SKILL.md and .claude/commands/*.md; fails on parse errors, non-string argument-hint, missing name/description. Refs #129.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T07:36:38.830427Z dd30dbd PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@lis186
lis186 merged commit e3c7d6c into main Oct 21, 2026
1 check failed
lis186 added a commit that referenced this pull request Oct 22, 2026
…137)

* ci: add frontmatter lint workflow (expected red until #128 merges) (#134)

* ci: add frontmatter lint workflow (Tier 1)

Parses YAML frontmatter of plugin/commands/*/SKILL.md, plugin/skills/*/SKILL.md and .claude/commands/*.md; fails on parse errors, non-string argument-hint, missing name/description. Refs #129.

* ci(lint): only treat column-0 --- as frontmatter delimiter

(cherry picked from commit e3c7d6c)

* ci: also run verify on push to feature/skill-slim
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