Unify Kimi/Codex skill naming and migrate legacy dotted Kimi dirs#1971
Unify Kimi/Codex skill naming and migrate legacy dotted Kimi dirs#1971RbBtSn0w wants to merge 8 commits intogithub:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR standardizes skill naming to a single hyphenated format (speckit-...) across Kimi and Codex, and updates related plumbing (hook invocation rendering, preset/extension overrides, packaging) to match that canonical scheme while adding a temporary Kimi legacy directory migration.
Changes:
- Normalize generated skill directory names to hyphenated form and update extension/preset override mapping for multi-segment command IDs.
- Update hook messaging/execution metadata to emit agent-specific invocation strings (e.g.,
/skill:speckit-planfor Kimi,$speckit-tasksfor Codex skills mode). - Sync template packaging scripts and add a temporary migration helper for legacy dotted Kimi skill directories.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/specify_cli/__init__.py |
Unifies skill naming, adds Kimi dotted-dir migration helper, updates init output/invocation hints, removes Codex skills dir override. |
src/specify_cli/agents.py |
Makes skills-mode output naming consistently hyphenated (including multi-segment IDs). |
src/specify_cli/presets.py |
Fixes preset skill override mapping for multi-segment command IDs by hyphenating derived skill names. |
src/specify_cli/extensions.py |
Adds init-options-aware hook invocation rendering and returns invocation metadata from hook execution. |
tests/test_ai_skills.py |
Updates expectations to hyphenated Kimi skills and adds tests for legacy Kimi dotted-dir migration. |
tests/test_extensions.py |
Updates Codex skill path/name assertions and adds hook invocation rendering tests. |
tests/test_presets.py |
Adds regression test for hyphenated skill override mapping for speckit.<ext>.<cmd>. |
.github/workflows/scripts/create-release-packages.sh |
Updates Kimi packaging to generate hyphenated skill names. |
.github/workflows/scripts/create-release-packages.ps1 |
Updates Kimi packaging to generate hyphenated skill names. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mnriem
left a comment
There was a problem hiding this comment.
Please address Copilot feedback. If not applicable, please explain why.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mnriem
left a comment
There was a problem hiding this comment.
Please address Copilot feedback. If not applicable, please explain why
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
src/specify_cli/extensions.py:2024
HookExecutor.execute_hook()now returns aninvocationfield, but the docstring’s “Returns” section doesn’t mention it. Please update the return-value documentation to includeinvocationso callers know it’s available (and what format it uses).
Returns:
Dictionary with execution information:
- command: str - Command to execute
- extension: str - Extension ID
- optional: bool - Whether hook is optional
- description: str - Hook description
"""
return {
"command": hook.get("command"),
"invocation": self._render_hook_invocation(hook.get("command")),
"extension": hook.get("extension"),
"optional": hook.get("optional", True),
"description": hook.get("description", ""),
"prompt": hook.get("prompt", "")
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mnriem
left a comment
There was a problem hiding this comment.
Please address Copilot feedback. If not applicable, please explain why
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
src/specify_cli/extensions.py:1676
_render_hook_invocation()is annotated to takecommand: str, but it’s called withhook.get('command')(potentiallyNone) and defensively checks for non-strings. Updating the parameter type (e.g.,str | None) would better reflect actual usage and avoid type-checking warnings.
def _render_hook_invocation(self, command: str) -> str:
"""Render an agent-specific invocation string for a hook command."""
if not isinstance(command, str):
return ""
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mnriem
left a comment
There was a problem hiding this comment.
Please fix test & lint errors
Summary
This PR aligns skill naming/invocation behavior for Kimi and Codex with the skills model discussed in #1918 and follow-up context from #1919.
What changed
speckit-*) for Kimi/Codex paths.EXECUTE_COMMAND_INVOCATION.speckit.fakeext.cmd -> speckit-fakeext-cmd).speckit.xxx) during init; annotated for removal after 2026-06-25..agents/skillsvia general config).Why
Discussion #1918 called out that hooks/invocations should be skill-aware for skills agents. This change removes naming drift between generated skills, hook invocation hints, and preset overrides.
Validation
uv run --with pytest python -m pytest tests/test_ai_skills.py tests/test_extensions.py tests/test_presets.py::TestPresetSkills236 passedRelated discussions