fix: remove non-spec trigger: field from skill frontmatter (#1180)

The Agent Skills spec only defines name, description, license,
compatibility, metadata, and allowed-tools as valid frontmatter fields.
The trigger: /graphify line was non-spec, silently ignored by spec-
following hosts, and flagged by agentskills validate CI checks.

- gen.py: removed trigger emission from _render_frontmatter; added
  _is_trigger_line() helper for roundtrip allow-list
- fragments/core/aider.md: removed hardcoded trigger: /graphify
- platforms.toml: removed trigger doc comment and trigger="" entries
- test_skillgen.py: replaced trigger-assertion tests with a single
  test asserting no host has trigger: in frontmatter
- Regenerated all 125 skill artifacts

Routing intent is preserved: the description field already contains
"treated as a graphify query first" and "graphify-out/ exists".

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Safi
2026-06-07 15:49:52 +01:00
co-authored by Claude Sonnet 4.6
parent 6dbcb89f3d
commit 8a04560bf5
28 changed files with 32 additions and 52 deletions
+12 -14
View File
@@ -365,20 +365,13 @@ def test_all_progressive_hosts_check_and_audit_clean():
assert probs == [], f"[{key}] audit\n" + "\n".join(probs)
def test_kiro_and_pi_omit_the_trigger_line():
"""kiro and pi render no frontmatter trigger (trigger absent in v8)."""
for key in ("kiro", "pi"):
def test_no_host_has_trigger_in_frontmatter():
"""No split host emits a trigger: field — not part of Agent Skills spec (#1180)."""
for key in ("claude", "codex", "opencode", "kilo", "copilot", "claw", "droid",
"amp", "trae", "vscode", "kiro", "pi"):
core, _ = _platform_artifacts(key)
head = core.split("---", 2)[1]
assert "trigger:" not in head, f"[{key}] unexpectedly has a trigger line"
def test_triggered_hosts_keep_the_trigger_line():
"""The other split hosts keep trigger: /graphify in the frontmatter."""
for key in ("opencode", "kilo", "copilot", "claw", "droid", "amp", "trae", "vscode"):
core, _ = _platform_artifacts(key)
head = core.split("---", 2)[1]
assert "trigger: /graphify" in head, f"[{key}] missing trigger line"
assert "trigger:" not in head, f"[{key}] unexpectedly has a trigger: line"
def test_kilo_renders_its_rules_tail_section():
@@ -466,10 +459,15 @@ def test_monoliths_change_only_the_enum_description_and_chunk_cleanup():
platforms = gen.load_platforms()
for key in ("aider", "devin"):
rendered = gen.render(platforms[key])[0].content.splitlines()
original = gen._normalise(gen._git_show(platforms[key].roundtrip_ref)).splitlines()
# Strip trigger: lines from the reference — their removal (#1180) is a
# permitted diff alongside enum, description, and chunk-cleanup changes.
original = [
l for l in gen._normalise(gen._git_show(platforms[key].roundtrip_ref)).splitlines()
if not gen._is_trigger_line(l)
]
assert len(rendered) == len(original), f"[{key}] line count changed"
diff_idx = [i for i, (r, o) in enumerate(zip(rendered, original)) if r != o]
# Exactly four lines change: the prose enum guidance, the schema line,
# Four lines change: the prose enum guidance, the schema line,
# the frontmatter description, and the chunk-cleanup rewrite.
assert len(diff_idx) == 4, f"[{key}] expected 4 changed lines, got {len(diff_idx)}"
enum_changes = 0