Skip to content

Commit 0ecd0a9

Browse files
committed
chore: align hook typing and preset skill comment
1 parent 6ed4b3f commit 0ecd0a9

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/specify_cli/extensions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1660,7 +1660,7 @@ def _load_init_options(self) -> Dict[str, Any]:
16601660
return self._init_options_cache
16611661

16621662
@staticmethod
1663-
def _skill_name_from_command(command: str) -> str:
1663+
def _skill_name_from_command(command: Any) -> str:
16641664
"""Map a command id like speckit.plan to speckit-plan skill name."""
16651665
if not isinstance(command, str):
16661666
return ""
@@ -1669,7 +1669,7 @@ def _skill_name_from_command(command: str) -> str:
16691669
return ""
16701670
return f"speckit-{command_id[len('speckit.'):].replace('.', '-')}"
16711671

1672-
def _render_hook_invocation(self, command: str) -> str:
1672+
def _render_hook_invocation(self, command: Any) -> str:
16731673
"""Render an agent-specific invocation string for a hook command."""
16741674
if not isinstance(command, str):
16751675
return ""

src/specify_cli/presets.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,8 @@ def _register_skills(
652652
skill_name = f"speckit-{short_name}"
653653
legacy_skill_name = f"speckit.{raw_short_name}"
654654

655-
# Only overwrite existing skills (i.e. --ai-skills was used).
655+
# Only overwrite skills that already exist under skills_dir,
656+
# including Kimi native skills when ai_skills is false.
656657
# If both modern and legacy directories exist, update both.
657658
target_skill_names: List[str] = []
658659
if (skills_dir / skill_name).exists():

0 commit comments

Comments
 (0)