Skip to content

Commit d488b01

Browse files
committed
fix: align kimi to .kimi/skills convention and fix ARGUMENTS unbound variable
1 parent 7735408 commit d488b01

File tree

4 files changed

+42
-8
lines changed

4 files changed

+42
-8
lines changed

.github/workflows/scripts/create-release-packages.ps1

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,39 @@ Execute the ${Cmd} workflow with arguments: ${Args}
8383
}
8484
}
8585

86+
# Create Kimi Code skills in .kimi/skills/<name>/SKILL.md format.
87+
# Kimi CLI discovers skills as directories containing a SKILL.md file.
88+
function New-KimiSkills {
89+
param([string]$SkillsDir)
90+
91+
$skills = @('constitution', 'specify', 'clarify', 'plan', 'tasks', 'analyze', 'checklist', 'implement', 'taskstoissues')
92+
foreach ($skill in $skills) {
93+
$skillName = "speckit.$skill"
94+
$skillDir = Join-Path $SkillsDir $skillName
95+
New-Item -ItemType Directory -Force -Path $skillDir | Out-Null
96+
@"
97+
---
98+
name: "$skillName"
99+
description: "Spec Kit: $skill workflow"
100+
---
101+
102+
Execute the $skillName workflow.
103+
"@ | Set-Content -Path (Join-Path $skillDir "SKILL.md") -Encoding UTF8
104+
}
105+
106+
# add-dir skill
107+
$addDirDir = Join-Path $SkillsDir "add-dir"
108+
New-Item -ItemType Directory -Force -Path $addDirDir | Out-Null
109+
@'
110+
---
111+
name: "add-dir"
112+
description: "Add a directory to the Spec Kit project structure"
113+
---
114+
115+
Execute the add-dir workflow with arguments: $ARGUMENTS
116+
'@ | Set-Content -Path (Join-Path $addDirDir "SKILL.md") -Encoding UTF8
117+
}
118+
86119
# Create release package for an agent
87120
function Create-Package {
88121
param(
@@ -179,8 +212,8 @@ function Create-Package {
179212
Generate-Commands -Agent $Agent -Format 'md' -Args '$ARGUMENTS' -DestDir "$BaseDir/.speckit\commands" -Script $Script
180213
}
181214
'kimi' {
182-
New-Item -ItemType Directory -Force -Path "$BaseDir/.kimi\commands" | Out-Null
183-
Generate-Commands -Agent $Agent -Format 'md' -Args '$ARGUMENTS' -DestDir "$BaseDir/.kimi\commands" -Script $Script
215+
New-Item -ItemType Directory -Force -Path "$BaseDir/.kimi/skills" | Out-Null
216+
New-KimiSkills -SkillsDir "$BaseDir/.kimi/skills"
184217
}
185218
}
186219

.github/workflows/scripts/create-release-packages.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ VERSION="${VERSION:-$(git describe --tags --always 2>/dev/null || echo 'dev')}"
3232
# Output directory
3333
OUTPUT_DIR=".genreleases"
3434

35+
# Placeholder string used in generated command files (can be overridden via env)
36+
ARGUMENTS="${ARGUMENTS:-\$ARGUMENTS}"
37+
3538
# Repository root (3 levels up from this script's location)
3639
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
3740
REPO_ROOT="$(cd "$SCRIPT_DIR/../../.." && pwd)"
@@ -308,13 +311,11 @@ echo ""
308311

309312
for agent in "${ALL_AGENTS[@]}"; do
310313
echo "Processing agent: $agent"
311-
314+
312315
# Create bash/zsh package
313-
ARGUMENTS="$ARGUMENTS"
314316
create_package "$agent" "sh"
315-
317+
316318
# Create PowerShell package
317-
ARGUMENTS="$ARGUMENTS"
318319
create_package "$agent" "ps"
319320
done
320321

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Specify supports multiple AI agents by generating agent-specific command files a
4848
| **Amp** | `.agents/commands/` | Markdown | `amp` | Amp CLI |
4949
| **SHAI** | `.shai/commands/` | Markdown | `shai` | SHAI CLI |
5050
| **Tabnine CLI** | `.tabnine/agent/commands/` | TOML | `tabnine` | Tabnine CLI |
51-
| **Kimi Code** | `.kimi/commands/` | Markdown | `kimi` | Kimi Code CLI (Moonshot AI) |
51+
| **Kimi Code** | `.kimi/skills/` | Markdown | `kimi` | Kimi Code CLI (Moonshot AI) |
5252
| **IBM Bob** | `.bob/commands/` | Markdown | N/A (IDE-based) | IBM Bob IDE |
5353
| **Generic** | User-specified via `--ai-commands-dir` | Markdown | N/A | Bring your own agent |
5454

src/specify_cli/extensions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ class CommandRegistrar:
702702
"extension": ".md"
703703
},
704704
"kimi": {
705-
"dir": ".kimi/commands",
705+
"dir": ".kimi/skills",
706706
"format": "markdown",
707707
"args": "$ARGUMENTS",
708708
"extension": ".md"

0 commit comments

Comments
 (0)