Skip to content

Commit 91bfea7

Browse files
committed
fix: align kimi skill naming and add extension registrar test
- Fix install_ai_skills() to use speckit.<cmd> naming for kimi (dot separator) instead of speckit-<cmd>, matching /skill:speckit.<cmd> invocation convention and packaging scripts - Add test_kimi_in_extension_registrar to verify CommandRegistrar.AGENT_CONFIGS includes kimi with correct dir and SKILL.md extension
1 parent f1e1db0 commit 91bfea7

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

src/specify_cli/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1195,7 +1195,12 @@ def install_ai_skills(project_path: Path, selected_ai: str, tracker: StepTracker
11951195
# SKILL_DESCRIPTIONS lookups work.
11961196
if command_name.startswith("speckit."):
11971197
command_name = command_name[len("speckit."):]
1198-
skill_name = f"speckit-{command_name}"
1198+
# Kimi CLI discovers skills by directory name and invokes them as
1199+
# /skill:<name> — use dot separator to match packaging convention.
1200+
if selected_ai == "kimi":
1201+
skill_name = f"speckit.{command_name}"
1202+
else:
1203+
skill_name = f"speckit-{command_name}"
11991204

12001205
# Create skill directory (additive — never removes existing content)
12011206
skill_dir = skills_dir / skill_name

tests/test_agent_config_consistency.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,15 @@ def test_kimi_in_agent_config(self):
181181
assert AGENT_CONFIG["kimi"]["commands_subdir"] == "skills"
182182
assert AGENT_CONFIG["kimi"]["requires_cli"] is True
183183

184+
def test_kimi_in_extension_registrar(self):
185+
"""Extension command registrar should include kimi using .kimi/skills and SKILL.md."""
186+
cfg = CommandRegistrar.AGENT_CONFIGS
187+
188+
assert "kimi" in cfg
189+
kimi_cfg = cfg["kimi"]
190+
assert kimi_cfg["dir"] == ".kimi/skills"
191+
assert kimi_cfg["extension"] == "/SKILL.md"
192+
184193
def test_kimi_in_release_agent_lists(self):
185194
"""Bash and PowerShell release scripts should include kimi in agent lists."""
186195
sh_text = (REPO_ROOT / ".github" / "workflows" / "scripts" / "create-release-packages.sh").read_text(encoding="utf-8")

0 commit comments

Comments
 (0)