Skip to content

Commit 4e4906e

Browse files
committed
docs(sdk): align native skills frontmatter + document multi-generator drift
1 parent d2559d7 commit 4e4906e

File tree

5 files changed

+30
-3
lines changed

5 files changed

+30
-3
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,10 @@ agent: $basename
204204
# Create skills in <skills_dir>\<name>\SKILL.md format.
205205
# Most agents use hyphenated names (e.g. speckit-plan); Kimi is the
206206
# current dotted-name exception (e.g. speckit.plan).
207+
#
208+
# Technical debt note:
209+
# Keep SKILL.md frontmatter aligned with `install_ai_skills()` and extension
210+
# overrides (at minimum: name/description/compatibility/metadata.source).
207211
function New-Skills {
208212
param(
209213
[string]$SkillsDir,
@@ -285,7 +289,7 @@ function New-Skills {
285289
if ($inBody) { $templateBody += "$line`n" }
286290
}
287291

288-
$skillContent = "---`nname: `"$skillName`"`ndescription: `"$description`"`n---`n`n$templateBody"
292+
$skillContent = "---`nname: `"$skillName`"`ndescription: `"$description`"`ncompatibility: `"Requires spec-kit project structure with .specify/ directory`"`nmetadata:`n author: `"github-spec-kit`"`n source: `"templates/commands/$name.md`"`n---`n`n$templateBody"
289293
Set-Content -Path (Join-Path $skillDir "SKILL.md") -Value $skillContent -NoNewline
290294
}
291295
}

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ EOF
124124
# Create skills in <skills_dir>/<name>/SKILL.md format.
125125
# Most agents use hyphenated names (e.g. speckit-plan); Kimi is the
126126
# current dotted-name exception (e.g. speckit.plan).
127+
#
128+
# Technical debt note:
129+
# Keep SKILL.md frontmatter aligned with `install_ai_skills()` and extension
130+
# overrides (at minimum: name/description/compatibility/metadata.source).
127131
create_skills() {
128132
local skills_dir="$1"
129133
local script_variant="$2"
@@ -187,6 +191,10 @@ create_skills() {
187191
printf -- '---\n'
188192
printf 'name: "%s"\n' "$skill_name"
189193
printf 'description: "%s"\n' "$description"
194+
printf 'compatibility: "%s"\n' "Requires spec-kit project structure with .specify/ directory"
195+
printf -- 'metadata:\n'
196+
printf ' author: "%s"\n' "github-spec-kit"
197+
printf ' source: "%s"\n' "templates/commands/${name}.md"
190198
printf -- '---\n\n'
191199
printf '%s\n' "$template_body"
192200
} > "$skill_dir/SKILL.md"

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Specify supports multiple AI agents by generating agent-specific command files a
3333
| **Cursor** | `.cursor/commands/` | Markdown | `cursor-agent` | Cursor CLI |
3434
| **Qwen Code** | `.qwen/commands/` | Markdown | `qwen` | Alibaba's Qwen Code CLI |
3535
| **opencode** | `.opencode/command/` | Markdown | `opencode` | opencode CLI |
36-
| **Codex CLI** | `.codex/prompts/` | Markdown | `codex` | Codex CLI |
36+
| **Codex CLI** | `.agents/skills/` | Markdown | `codex` | Codex CLI (skills) |
3737
| **Windsurf** | `.windsurf/workflows/` | Markdown | N/A (IDE-based) | Windsurf IDE workflows |
3838
| **Junie** | `.junie/commands/` | Markdown | `junie` | Junie by JetBrains |
3939
| **Kilo Code** | `.kilocode/workflows/` | Markdown | N/A (IDE-based) | Kilo Code IDE |
@@ -380,7 +380,7 @@ Command content with {SCRIPT} and {{args}} placeholders.
380380

381381
- **CLI agents**: Usually `.<agent-name>/commands/`
382382
- **Common prompt-based exceptions**:
383-
- Codex: `.codex/prompts/`
383+
- Codex: `.agents/skills/` (skills, invoked as `$speckit-<command>`)
384384
- Kiro CLI: `.kiro/prompts/`
385385
- Pi: `.pi/prompts/`
386386
- **IDE agents**: Follow IDE-specific patterns:

src/specify_cli/__init__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,6 +1218,15 @@ def load_init_options(project_path: Path) -> dict[str, Any]:
12181218
DEFAULT_SKILLS_DIR = ".agents/skills"
12191219

12201220
# Agents whose downloaded template already contains skills in the final layout.
1221+
#
1222+
# Technical debt note:
1223+
# - Spec-kit currently has multiple SKILL.md generators:
1224+
# 1) release packaging scripts that build the template zip (native skills),
1225+
# 2) `install_ai_skills()` which converts extracted command templates to skills,
1226+
# 3) extension/preset overrides via `agents.CommandRegistrar.render_skill_command()`.
1227+
# - Keep the skills frontmatter schema aligned across all generators
1228+
# (at minimum: name/description/compatibility/metadata.source).
1229+
# - When adding fields here, update the release scripts and override writers too.
12211230
NATIVE_SKILLS_AGENTS = {"codex", "kimi"}
12221231

12231232
# Enhanced descriptions for each spec-kit command skill

src/specify_cli/agents.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,12 @@ def render_skill_command(
298298
SKILL-target agents should receive the same skills-oriented
299299
frontmatter shape used elsewhere in the project instead of the
300300
original command frontmatter.
301+
302+
Technical debt note:
303+
Spec-kit currently has multiple SKILL.md generators (template packaging,
304+
init-time conversion, and extension/preset overrides). Keep the skill
305+
frontmatter keys aligned (name/description/compatibility/metadata) to
306+
avoid drift across agents.
301307
"""
302308
if not isinstance(frontmatter, dict):
303309
frontmatter = {}

0 commit comments

Comments
 (0)