mirror of
https://github.com/github/spec-kit.git
synced 2026-07-03 20:36:23 +08:00
* feat(vibe): migrate to SkillsIntegration and inject user-invocable frontmatter Switches VibeIntegration from the old prompts-based MarkdownIntegration to SkillsIntegration, adopting the .vibe/skills/speckit-<name>/SKILL.md layout required by Mistral Vibe v2.0.0+. Post-processes each generated SKILL.md to inject `user-invocable: true` so skills are directly callable by users, not just by other agents. * test(vibe): assert user- invocable: true is present in all generated SKILL.md files * Update tests/integrations/test_integration_vibe.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
38 lines
1.4 KiB
Python
38 lines
1.4 KiB
Python
"""Tests for VibeIntegration."""
|
|
|
|
import yaml
|
|
|
|
from specify_cli.integrations import get_integration
|
|
from specify_cli.integrations.manifest import IntegrationManifest
|
|
|
|
from .test_integration_base_skills import SkillsIntegrationTests
|
|
|
|
|
|
class TestVibeIntegration(SkillsIntegrationTests):
|
|
KEY = "vibe"
|
|
FOLDER = ".vibe/"
|
|
COMMANDS_SUBDIR = "skills"
|
|
REGISTRAR_DIR = ".vibe/skills"
|
|
CONTEXT_FILE = "AGENTS.md"
|
|
|
|
|
|
class TestVibeUserInvocable:
|
|
def test_all_skills_have_user_invocable(self, tmp_path):
|
|
i = get_integration("vibe")
|
|
m = IntegrationManifest("vibe", tmp_path)
|
|
created = i.setup(tmp_path, m, script_type="sh")
|
|
skill_files = [f for f in created if f.name == "SKILL.md"]
|
|
assert skill_files
|
|
for f in skill_files:
|
|
content = f.read_text(encoding="utf-8")
|
|
assert content.startswith("---"), (
|
|
f"{f.parent.name}/SKILL.md is missing the opening frontmatter delimiter '---'"
|
|
)
|
|
parts = content.split("---", 2)
|
|
assert len(parts) >= 3, (
|
|
f"{f.parent.name}/SKILL.md has malformed frontmatter; expected a '--- ... ---' block"
|
|
)
|
|
parsed = yaml.safe_load(parts[1])
|
|
assert parsed.get("user-invocable") is True, (
|
|
f"{f.parent.name}/SKILL.md is missing user-invocable: true in frontmatter"
|
|
) |