fix: remove unsupported mode: frontmatter from Copilot skills mode (fixes #2799) (#2819)

VS Code Copilot Agent Skills do not support the `mode:` frontmatter field.
The generated SKILL.md files included `mode: speckit.<stem>` injected by
CopilotIntegration.post_process_skill_content(), which had no effect in
VS Code and could cause confusion. Simplify post_process_skill_content to
delegate directly to _CopilotSkillsHelper without injecting mode:.

Update tests to assert mode: is absent from generated skill frontmatter.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
lselvar
2026-06-02 18:14:08 -04:00
committed by GitHub
parent ee17b04784
commit d79a514b30
3 changed files with 16 additions and 66 deletions

View File

@@ -898,11 +898,10 @@ class TestIntegrationSwitch:
assert copilot_git_feature.exists(), "Git extension skill should exist for Copilot skills mode"
assert not copilot_agent_file.exists(), "Copilot skills mode should not create extension .agent.md files"
# Verify Copilot-specific frontmatter: mode field should map from
# skill name (speckit-git-feature) back to dot notation (speckit.git-feature)
# Verify Copilot skill frontmatter does NOT contain mode: — VS Code Copilot does not support it
skill_content = copilot_git_feature.read_text(encoding="utf-8")
assert "mode: speckit.git-feature" in skill_content, (
"Copilot skill frontmatter should contain mode mapped from skill name"
assert "mode:" not in skill_content, (
"Copilot skill frontmatter must not contain unsupported 'mode' field"
)
registry = json.loads(