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
parent 6dbcb89f3d
commit 8a04560bf5
28 changed files with 32 additions and 52 deletions
-1
View File
@@ -1,7 +1,6 @@
---
name: graphify
description: "Use for any question about a codebase, its architecture, file relationships, or project content — especially when graphify-out/ exists, where the question should be treated as a graphify query first. Turns any input (code, docs, papers, images, videos) into a persistent knowledge graph with god nodes, community detection, and query/path/explain tools."
trigger: /graphify
---
# /graphify
-1
View File
@@ -1,7 +1,6 @@
---
name: graphify
description: "Use for any question about a codebase, its architecture, file relationships, or project content — especially when graphify-out/ exists, where the question should be treated as a graphify query first. Turns any input (code, docs, papers, images, videos) into a persistent knowledge graph with god nodes, community detection, and query/path/explain tools."
trigger: /graphify
---
# /graphify
-1
View File
@@ -1,7 +1,6 @@
---
name: graphify
description: "Use for any question about a codebase, its architecture, file relationships, or project content — especially when graphify-out/ exists, where the question should be treated as a graphify query first. Turns any input (code, docs, papers, images, videos) into a persistent knowledge graph with god nodes, community detection, and query/path/explain tools."
trigger: /graphify
---
# /graphify
-1
View File
@@ -1,7 +1,6 @@
---
name: graphify
description: "Use for any question about a codebase, its architecture, file relationships, or project content — especially when graphify-out/ exists, where the question should be treated as a graphify query first. Turns any input (code, docs, papers, images, videos) into a persistent knowledge graph with god nodes, community detection, and query/path/explain tools."
trigger: /graphify
---
# /graphify
-1
View File
@@ -1,7 +1,6 @@
---
name: graphify
description: "Use for any question about a codebase, its architecture, file relationships, or project content — especially when graphify-out/ exists, where the question should be treated as a graphify query first. Turns any input (code, docs, papers, images, videos) into a persistent knowledge graph with god nodes, community detection, and query/path/explain tools."
trigger: /graphify
---
# /graphify
-1
View File
@@ -1,7 +1,6 @@
---
name: graphify
description: "Use for any question about a codebase, its architecture, file relationships, or project content — especially when graphify-out/ exists, where the question should be treated as a graphify query first. Turns any input (code, docs, papers, images, videos) into a persistent knowledge graph with god nodes, community detection, and query/path/explain tools."
trigger: /graphify
---
# /graphify
-1
View File
@@ -1,7 +1,6 @@
---
name: graphify
description: "Use for any question about a codebase, its architecture, file relationships, or project content — especially when graphify-out/ exists, where the question should be treated as a graphify query first. Turns any input (code, docs, papers, images, videos) into a persistent knowledge graph with god nodes, community detection, and query/path/explain tools."
trigger: /graphify
---
# /graphify
-1
View File
@@ -1,7 +1,6 @@
---
name: graphify
description: "Use for any question about a codebase, its architecture, file relationships, or project content — especially when graphify-out/ exists, where the question should be treated as a graphify query first. Turns any input (code, docs, papers, images, videos) into a persistent knowledge graph with god nodes, community detection, and query/path/explain tools."
trigger: /graphify
---
# /graphify
-1
View File
@@ -1,7 +1,6 @@
---
name: graphify
description: "Use for any question about a codebase, its architecture, file relationships, or project content — especially when graphify-out/ exists, where the question should be treated as a graphify query first. Turns any input (code, docs, papers, images, videos) into a persistent knowledge graph with god nodes, community detection, and query/path/explain tools."
trigger: /graphify
---
# /graphify
-1
View File
@@ -1,7 +1,6 @@
---
name: graphify
description: "Use for any question about a codebase, its architecture, file relationships, or project content — especially when graphify-out/ exists, where the question should be treated as a graphify query first. Turns any input (code, docs, papers, images, videos) into a persistent knowledge graph with god nodes, community detection, and query/path/explain tools."
trigger: /graphify
---
# /graphify
-1
View File
@@ -1,7 +1,6 @@
---
name: graphify-windows
description: "Use for any question about a codebase, its architecture, file relationships, or project content — especially when graphify-out/ exists, where the question should be treated as a graphify query first. Turns any input (code, docs, papers, images, videos) into a persistent knowledge graph with god nodes, community detection, and query/path/explain tools."
trigger: /graphify
---
# /graphify
-1
View File
@@ -1,7 +1,6 @@
---
name: graphify
description: "Use for any question about a codebase, its architecture, file relationships, or project content — especially when graphify-out/ exists, where the question should be treated as a graphify query first. Turns any input (code, docs, papers, images, videos) into a persistent knowledge graph with god nodes, community detection, and query/path/explain tools."
trigger: /graphify
---
# /graphify
+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
@@ -1,7 +1,6 @@
---
name: graphify
description: "Use for any question about a codebase, its architecture, file relationships, or project content — especially when graphify-out/ exists, where the question should be treated as a graphify query first. Turns any input (code, docs, papers, images, videos) into a persistent knowledge graph with god nodes, community detection, and query/path/explain tools."
trigger: /graphify
---
# /graphify
@@ -1,7 +1,6 @@
---
name: graphify
description: "Use for any question about a codebase, its architecture, file relationships, or project content — especially when graphify-out/ exists, where the question should be treated as a graphify query first. Turns any input (code, docs, papers, images, videos) into a persistent knowledge graph with god nodes, community detection, and query/path/explain tools."
trigger: /graphify
---
# /graphify
@@ -1,7 +1,6 @@
---
name: graphify
description: "Use for any question about a codebase, its architecture, file relationships, or project content — especially when graphify-out/ exists, where the question should be treated as a graphify query first. Turns any input (code, docs, papers, images, videos) into a persistent knowledge graph with god nodes, community detection, and query/path/explain tools."
trigger: /graphify
---
# /graphify
@@ -1,7 +1,6 @@
---
name: graphify
description: "Use for any question about a codebase, its architecture, file relationships, or project content — especially when graphify-out/ exists, where the question should be treated as a graphify query first. Turns any input (code, docs, papers, images, videos) into a persistent knowledge graph with god nodes, community detection, and query/path/explain tools."
trigger: /graphify
---
# /graphify
@@ -1,7 +1,6 @@
---
name: graphify
description: "Use for any question about a codebase, its architecture, file relationships, or project content — especially when graphify-out/ exists, where the question should be treated as a graphify query first. Turns any input (code, docs, papers, images, videos) into a persistent knowledge graph with god nodes, community detection, and query/path/explain tools."
trigger: /graphify
---
# /graphify
@@ -1,7 +1,6 @@
---
name: graphify
description: "Use for any question about a codebase, its architecture, file relationships, or project content — especially when graphify-out/ exists, where the question should be treated as a graphify query first. Turns any input (code, docs, papers, images, videos) into a persistent knowledge graph with god nodes, community detection, and query/path/explain tools."
trigger: /graphify
---
# /graphify
@@ -1,7 +1,6 @@
---
name: graphify
description: "Use for any question about a codebase, its architecture, file relationships, or project content — especially when graphify-out/ exists, where the question should be treated as a graphify query first. Turns any input (code, docs, papers, images, videos) into a persistent knowledge graph with god nodes, community detection, and query/path/explain tools."
trigger: /graphify
---
# /graphify
@@ -1,7 +1,6 @@
---
name: graphify
description: "Use for any question about a codebase, its architecture, file relationships, or project content — especially when graphify-out/ exists, where the question should be treated as a graphify query first. Turns any input (code, docs, papers, images, videos) into a persistent knowledge graph with god nodes, community detection, and query/path/explain tools."
trigger: /graphify
---
# /graphify
@@ -1,7 +1,6 @@
---
name: graphify
description: "Use for any question about a codebase, its architecture, file relationships, or project content — especially when graphify-out/ exists, where the question should be treated as a graphify query first. Turns any input (code, docs, papers, images, videos) into a persistent knowledge graph with god nodes, community detection, and query/path/explain tools."
trigger: /graphify
---
# /graphify
@@ -1,7 +1,6 @@
---
name: graphify
description: "Use for any question about a codebase, its architecture, file relationships, or project content — especially when graphify-out/ exists, where the question should be treated as a graphify query first. Turns any input (code, docs, papers, images, videos) into a persistent knowledge graph with god nodes, community detection, and query/path/explain tools."
trigger: /graphify
---
# /graphify
@@ -1,7 +1,6 @@
---
name: graphify-windows
description: "Use for any question about a codebase, its architecture, file relationships, or project content — especially when graphify-out/ exists, where the question should be treated as a graphify query first. Turns any input (code, docs, papers, images, videos) into a persistent knowledge graph with god nodes, community detection, and query/path/explain tools."
trigger: /graphify
---
# /graphify
@@ -1,7 +1,6 @@
---
name: graphify
description: "Use for any question about a codebase, its architecture, file relationships, or project content — especially when graphify-out/ exists, where the question should be treated as a graphify query first. Turns any input (code, docs, papers, images, videos) into a persistent knowledge graph with god nodes, community detection, and query/path/explain tools."
trigger: /graphify
---
# /graphify
-1
View File
@@ -1,7 +1,6 @@
---
name: graphify
description: "Use for any question about a codebase, its architecture, file relationships, or project content — especially when graphify-out/ exists, where the question should be treated as a graphify query first. Turns any input (code, docs, papers, images, videos) into a persistent knowledge graph with god nodes, community detection, and query/path/explain tools."
trigger: /graphify
---
# /graphify
+20 -10
View File
@@ -244,7 +244,7 @@ class Platform:
refs_dst: str | None = None
name: str = "graphify"
description: str | None = None
trigger: str | None = "/graphify"
trigger: str | None = None # removed — not part of Agent Skills spec (#1180)
dispatch: str | None = None
query_variant: str = "cli-inline"
extraction: str = "verbose"
@@ -283,7 +283,7 @@ def load_platforms() -> dict[str, Platform]:
refs_dst=cfg.get("refs_dst"),
name=cfg.get("name", "graphify"),
description=cfg.get("description"),
trigger=cfg.get("trigger", "/graphify"),
trigger=cfg.get("trigger"),
dispatch=cfg.get("dispatch"),
query_variant=cfg.get("query_variant", "cli-inline"),
extraction=cfg.get("extraction", "verbose"),
@@ -318,16 +318,14 @@ class RenderedArtifact:
def _render_frontmatter(platform: Platform) -> str:
"""Render the YAML frontmatter from the platform's name/description/trigger.
"""Render the YAML frontmatter from the platform's name and description.
The trigger line is omitted when the platform has no trigger (kiro/pi).
Only emits fields from the Agent Skills spec (name, description).
The description is preserved verbatim from platforms.toml never invented.
"""
if platform.description is None:
raise ValueError(f"split platform '{platform.key}' is missing a description")
lines = ["---", f"name: {platform.name}", f'description: "{platform.description}"']
if platform.trigger:
lines.append(f"trigger: {platform.trigger}")
lines.append("---")
return "\n".join(lines)
@@ -718,6 +716,15 @@ def _is_chunk_cleanup_line(line: str) -> bool:
return line.lstrip().startswith("rm -f") and "find " in line and "-name '.graphify_chunk_" in line
def _is_trigger_line(line: str) -> bool:
"""Whether a line is the non-spec ``trigger:`` frontmatter field (#1180).
The Agent Skills spec does not include ``trigger:`` only name/description
and a few optional fields. Removing it is a permitted monolith diff.
"""
return line.strip().startswith("trigger:")
def monolith_roundtrip(platform: Platform) -> list[str]:
"""Assert a monolith renders diff-clean vs its v8 blob modulo allowed changes.
@@ -735,14 +742,17 @@ def monolith_roundtrip(platform: Platform) -> list[str]:
original = _normalise(_git_show(platform.roundtrip_ref))
rendered_lines = rendered.splitlines()
original_lines = original.splitlines()
# Strip trigger lines from the original before comparing — they are non-spec
# and their removal (#1180) is a permitted diff. Filter here so the line-count
# check and the per-line zip both operate on the same reduced set.
original_lines = [l for l in original.splitlines() if not _is_trigger_line(l)]
problems: list[str] = []
if len(rendered_lines) != len(original_lines):
problems.append(
f"[{platform.key}] line count differs: rendered {len(rendered_lines)} vs v8 {len(original_lines)} "
"(the only allowed changes are the enum line(s) and the description line, "
"which must not add or remove lines)"
"(the only allowed changes are the enum line(s), the description line, "
"the chunk-cleanup rewrite, and trigger: removal — none must add or remove other lines)"
)
return problems
@@ -750,7 +760,7 @@ def monolith_roundtrip(platform: Platform) -> list[str]:
if r == o:
continue
# The permitted diffs are the enum unification, the unified description,
# and the shell-agnostic chunk-cleanup rewrite (#1172).
# the shell-agnostic chunk-cleanup rewrite (#1172), and trigger removal (#1180).
if _is_enum_line(r) or _is_frontmatter_description_line(r) or _is_chunk_cleanup_line(r):
continue
problems.append(
-3
View File
@@ -18,7 +18,6 @@
# refs_dst rendered references/ dir, relative to the repo root (split only).
# name frontmatter name (default "graphify"; graphify-windows for windows).
# description frontmatter description, PRESERVED VERBATIM per platform. Required.
# trigger frontmatter trigger (default "/graphify"; omit -> no trigger line).
# dispatch Part-B dispatch fragment basename under fragments/dispatch/.
# query_variant cli | cli-inline. Selects both the core query stub and the
# query reference body.
@@ -158,7 +157,6 @@ core = "core"
skill_dst = "graphify/skill-kiro.md"
refs_dst = "graphify/skills/kiro/references"
description = "Use for any question about a codebase, its architecture, file relationships, or project content — especially when graphify-out/ exists, where the question should be treated as a graphify query first. Turns any input (code, docs, papers, images, videos) into a persistent knowledge graph with god nodes, community detection, and query/path/explain tools."
trigger = ""
dispatch = "agent-tool-disk"
query_variant = "cli-inline"
extraction = "compact"
@@ -169,7 +167,6 @@ core = "core"
skill_dst = "graphify/skill-pi.md"
refs_dst = "graphify/skills/pi/references"
description = "Use for any question about a codebase, its architecture, file relationships, or project content — especially when graphify-out/ exists, where the question should be treated as a graphify query first. Turns any input (code, docs, papers, images, videos) into a persistent knowledge graph with god nodes, community detection, and query/path/explain tools."
trigger = ""
dispatch = "agent-tool-disk"
query_variant = "cli-inline"
extraction = "compact"