fix(lint): exempt meta-skills from lineage/source checks

The compare-masters skill is an aggregate meta-skill that borrows from
other masters and has no single lineage, dates, sources, or own corpus
directories. Treating it as a regular master made --strict CI fail on
all branches since 2026-04-08.

Introduce a kind field (default master) and skip the lineage/dates/
sources/citation_format and references/sources directory checks when
kind == meta-skill. compare/SKILL.md gains kind: meta-skill.

Required fields (name, description) and version/license are still
enforced for all skills.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
xr843
2026-04-11 09:18:59 +08:00
parent 38e7eb09dd
commit a0c367c058
2 changed files with 21 additions and 13 deletions
+1
View File
@@ -3,6 +3,7 @@ name: compare-masters
description: Use when user asks to compare masters, compare schools, compare perspectives, 对比, 各宗怎么看, 不同宗派, 禅净之争, 性相之辩, 空有之争, or wants multiple masters to answer the same question. Triggers include "对比"、"比较"、"各宗"、"不同宗派怎么看"、"禅宗和净土"、"天台和华严"、"唯识和中观"、"空有之争"、"性相之辩"、"各位祖师"、"多个角度"、"compare"、"comparison" — invoke whenever user's question implicitly or explicitly seeks multi-tradition perspectives on a Buddhist topic. description: Use when user asks to compare masters, compare schools, compare perspectives, 对比, 各宗怎么看, 不同宗派, 禅净之争, 性相之辩, 空有之争, or wants multiple masters to answer the same question. Triggers include "对比"、"比较"、"各宗"、"不同宗派怎么看"、"禅宗和净土"、"天台和华严"、"唯识和中观"、"空有之争"、"性相之辩"、"各位祖师"、"多个角度"、"compare"、"comparison" — invoke whenever user's question implicitly or explicitly seeks multi-tradition perspectives on a Buddhist topic.
version: 0.3.0 version: 0.3.0
license: MIT license: MIT
kind: meta-skill
verified_by: xr843 verified_by: xr843
verified_at: 2026-04-06 verified_at: 2026-04-06
--- ---
+7
View File
@@ -24,6 +24,8 @@ PREBUILT_DIR = Path(__file__).resolve().parent.parent / "prebuilt"
REQUIRED_FIELDS = {"name", "description"} REQUIRED_FIELDS = {"name", "description"}
RECOMMENDED_FIELDS = {"version", "license", "lineage", "dates", "sources", "citation_format"} RECOMMENDED_FIELDS = {"version", "license", "lineage", "dates", "sources", "citation_format"}
# Fields not applicable to meta-skills (aggregate/comparison skills with no single lineage)
META_SKILL_EXCLUDED = {"lineage", "dates", "sources", "citation_format"}
MAX_DESCRIPTION_CHARS = 500 MAX_DESCRIPTION_CHARS = 500
MAX_SKILL_LINES = 500 MAX_SKILL_LINES = 500
@@ -104,7 +106,10 @@ def lint_master(master_dir: Path, strict: bool = False) -> list[str]:
issues.append(f"[ERROR] {name}: missing required field '{field}'") issues.append(f"[ERROR] {name}: missing required field '{field}'")
# --- Recommended fields --- # --- Recommended fields ---
kind = fm.get("kind", "master")
for field in RECOMMENDED_FIELDS: for field in RECOMMENDED_FIELDS:
if kind == "meta-skill" and field in META_SKILL_EXCLUDED:
continue
if field not in fm: if field not in fm:
issues.append(f"[WARN] {name}: missing recommended field '{field}'") issues.append(f"[WARN] {name}: missing recommended field '{field}'")
@@ -126,6 +131,8 @@ def lint_master(master_dir: Path, strict: bool = False) -> list[str]:
issues.append(f"[WARN] {name}: sources[{i}] missing 'title' or 'cbeta_id'") issues.append(f"[WARN] {name}: sources[{i}] missing 'title' or 'cbeta_id'")
# --- Directory structure checks --- # --- Directory structure checks ---
# Meta-skills (e.g. compare-masters) borrow from other masters and have no own corpus
if kind != "meta-skill":
refs_dir = master_dir / "references" refs_dir = master_dir / "references"
sources_dir = master_dir / "sources" sources_dir = master_dir / "sources"